176 lines
7.0 KiB
Vue
176 lines
7.0 KiB
Vue
<template>
|
|
<section class="Add">
|
|
<ai-detail v-if="!id || isEdit==true">
|
|
<template #title>
|
|
<ai-title :title="params.id ? '编辑宅基地所有权登记' : '新增宅基地所有权登记'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)"></ai-title>
|
|
</template>
|
|
<template #content>
|
|
<ai-card title="宅基地所有权信息">
|
|
<template #right v-if="params.id">
|
|
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="isEdit=false">取消</span>
|
|
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="confirm()">保存</span>
|
|
</template>
|
|
<template #content>
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px">
|
|
<el-form-item label="使用证书" prop="unifiedCode">
|
|
<el-input v-model="form.unifiedCode" placeholder="请输入宅基地使用证书号"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="所在地区" prop="unifiedCode">
|
|
<ai-area-select v-model="areaId" provinceAction="/api/area/queryProvinceListContainCity" always-show clearable :instance="$request" :areaLevel="5" @fullname="(name) => (this.formJobWant.employmentAreaName = name)"></ai-area-select>
|
|
</el-form-item>
|
|
<el-row type="flex">
|
|
<el-col :span="20">
|
|
<el-form-item label="使用人" prop="unifiedCode">
|
|
<el-input v-model="form.unifiedCode" placeholder="请输入使用人姓名"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="20">
|
|
<el-form-item label="家庭人口" prop="unifiedCode">
|
|
<el-input v-model="form.unifiedCode" placeholder="请输入使用人家庭人口"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row type="flex">
|
|
<el-col :span="20">
|
|
<el-form-item label="身份证号" prop="unifiedCode">
|
|
<el-input v-model="form.unifiedCode" placeholder="请输入使用人身份证号"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="20">
|
|
<el-form-item label="土地所有权" prop="unifiedCode">
|
|
<el-input v-model="form.unifiedCode" placeholder="请输入土地所有权人/组织名称"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row type="flex">
|
|
<el-col :span="12">
|
|
<el-form-item label="土地面积/㎡" prop="unifiedCode">
|
|
<el-input v-model="form.unifiedCode" placeholder="请输入土地面积"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-form-item label="土地四至" prop="unifiedCode">
|
|
<el-input type="textarea" v-model="form.unifiedCode" placeholder="请说明宅基地的地块名称地界四至" maxlength="500" show-word-limit :rows="5" />
|
|
</el-form-item>
|
|
<el-form-item label="使用情况" prop="unifiedCode">
|
|
<el-input type="textarea" v-model="form.unifiedCode" placeholder="请说明宅基地的使用情况" maxlength="500" show-word-limit :rows="5" />
|
|
</el-form-item>
|
|
</el-form>
|
|
</template>
|
|
</ai-card>
|
|
</template>
|
|
<template slot="footer" class="footer">
|
|
<el-button class="delete-btn footer-btn" @click="cancel(false)">取消</el-button>
|
|
<el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
|
|
</template>
|
|
</ai-detail>
|
|
<ai-detail class="add" v-if="params.id && !isEdit">
|
|
<template slot="title">
|
|
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
|
</template>
|
|
<template slot="content">
|
|
<ai-card title="合同信息">
|
|
<template #right>
|
|
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="isEdit=true,forms=data">修改</span>
|
|
</template>
|
|
<template #content>
|
|
<ai-wrapper>
|
|
<ai-info-item label="使用证书" :value="data.useCertificate"></ai-info-item>
|
|
<ai-info-item label="所在地区" :value="data.areaName"></ai-info-item>
|
|
<ai-info-item label="使用人" :value="data.usePerson"></ai-info-item>
|
|
<ai-info-item label="家庭人口" :value="data.houseNumber"></ai-info-item>
|
|
<ai-info-item label="身份证号" :value="data.idNumber"></ai-info-item>
|
|
<ai-info-item label="土地所有权" :value="data.landOwnership">{{ dict.getLabel('landOwnership', data.landOwnership) }}</ai-info-item>
|
|
<ai-info-item label="土地面积/㎡" :value="data.landArea"></ai-info-item>
|
|
<ai-info-item label="土地四至" :value="data.landFourTo"></ai-info-item>
|
|
<ai-info-item label="使用情况" :value="data.useSituation"></ai-info-item>
|
|
<ai-info-item label="权证照片" :value="data.unifiedCode"></ai-info-item>
|
|
</ai-wrapper>
|
|
</template>
|
|
</ai-card>
|
|
</template>
|
|
</ai-detail>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
import {mapState} from 'vuex'
|
|
export default {
|
|
name: "Add",
|
|
props: {
|
|
instance: Function,
|
|
dict: Object,
|
|
permissions: Function,
|
|
params: Object,
|
|
},
|
|
data() {
|
|
return {
|
|
id: '',
|
|
form: {
|
|
useCertificate: '',
|
|
|
|
},
|
|
isEdit: false,
|
|
radioFrom: ''
|
|
}
|
|
},
|
|
computed: {
|
|
rules() {
|
|
return {
|
|
useCertificate: [{required: true, message: '请输入', trigger: 'blur'}]
|
|
}
|
|
},
|
|
...mapState(['user'])
|
|
},
|
|
created() {
|
|
if (this.params && this.params.id) {
|
|
this.id = this.params.id
|
|
this.getDetail(this.params.id)
|
|
}
|
|
this.areaId = this.user.info.areaId
|
|
},
|
|
methods: {
|
|
cancel(isRefresh) {
|
|
this.$emit('change', {
|
|
type: 'List',
|
|
isRefresh: !!isRefresh,
|
|
})
|
|
},
|
|
getDetail(id) {
|
|
this.instance.post(`/apphomesteadinfo/queryDetailById?id=${id}`).then(res => {
|
|
if (res.code === 0) {
|
|
this.data = res.data
|
|
}
|
|
})
|
|
},
|
|
confirm() {
|
|
this.$refs.form.validate((valid) => {
|
|
if (valid) {
|
|
this.instance.post(`/apphomesteadinfo/addOrUpdate`, {
|
|
...this.forms,
|
|
id: this.params.id || '',
|
|
}).then(res => {
|
|
if (res.code == 0) {
|
|
this.$message.success('提交成功')
|
|
setTimeout(() => {
|
|
this.cancel(true)
|
|
}, 600)
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.Add {
|
|
height: 100%;
|
|
background: #f3f4f5;
|
|
|
|
::v-deep .ai-detail .ai-detail__footer {
|
|
background: #FFF;
|
|
}
|
|
}
|
|
</style> |