54efdc3e by zhaoqian

构筑物

1 parent c950353a
import request from '@/plugin/axios'
/**
* 新增构筑物基本信息
*/
export function insertGzwjbxx(data) {
return request({
url: '/system/qjGzw/insertQjGzw',
method: 'post',
data: data,
})
}
/**
* 生成不动产单元号
*/
export function getBdcdyh(dpdm, dptype) {
return request({
url: '/system/generator/getBdcdyh',
method: 'get',
params: {
dpdm: dpdm,
dptype: dptype
}
})
}
/**
* 更新构筑物基本信息
*/
export function updateGzwjbxx(data) {
return request({
url: '/system/qjGzw/updateQjGzw',
method: 'put',
data: data,
})
}
/**
* 获取构筑物基本信息
*/
export function getQjGzwDetailInfo(data) {
return request({
url: '/system/qjGzw/getQjGzwDetailById',
method: 'get',
params: {
id: data
}
})
}
\ No newline at end of file
......@@ -74,6 +74,7 @@
<el-checkbox label="zd" name="type">宗地</el-checkbox>
<el-checkbox label="dz" name="type">多幢</el-checkbox>
<el-checkbox label="zrz" name="type">自然幢</el-checkbox>
<el-checkbox label="gzw" name="type">构筑物</el-checkbox>
<el-checkbox label="h" name="type" v-show="type !== 'add'"></el-checkbox>
<!-- <el-checkbox label="gzw" name="type">构筑物</el-checkbox>
<el-checkbox label="lq" name="type">林权</el-checkbox>
......
......@@ -45,5 +45,9 @@ let bdcLxArray = [
label: "多幢",
value: "dz",
},
{
label: "构筑物",
value: "gzw",
},
];
createFilter("bdcLxFilter", bdcLxArray);
\ No newline at end of file
......
......@@ -77,6 +77,12 @@ const constantRoutes = [
component: () => import("@/views/systemH/index"),
},
{
path: "/gzw",
name: "构筑物",
code: "1-7",
component: () => import("@/views/gzw/index"),
},
{
path: "/viewMap",
name: "地图",
code: "0-6",
......
......@@ -41,6 +41,7 @@ const store = new Vuex.Store({
jgOptions:[],
gmjjhyflbsmList:[],
fwytList:[],
gzwlxList:[],
//创建自然幢时需要用到的临时存储信息
zrzbsm: '',
zjlxList: [],
......
......@@ -272,6 +272,7 @@ export default {
s.hxList = s.hxList.length == 0 ?await this.getDicData("户型") : s.hxList;
s.hxjgList = s.hxjgList.length == 0 ?await this.getDicData("户型结构") : s.hxjgList;
s.fwjgList = s.fwjgList.length == 0 ?await this.getDicData("户型结构") : s.fwjgList;
s.gzwlxList = s.gzwlxList.length == 0 ?await this.getDicData("构(建)筑物类型") : s.gzwlxList;
s.fwxzOptions = s.fwxzOptions.length == 0 ?await this.getDicData("房屋性质") : s.fwxzOptions;
s.cbOptions = s.cbOptions.length == 0 ?await this.getDicData("房屋产别") : s.cbOptions;
......
<template>
<gzwInfo></gzwInfo>
</template>
<script>
import gzwInfo from './jbxx/index';
export default {
name: "index",
components:{
gzwInfo,
},
}
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div class="gzw content-form">
<el-form ref="form" :model="form" label-width="160px">
<Qlr ref="qlrxxModule" :bsm="bsm"></Qlr>
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="gzwTable">
<tr height="30">
<th colspan="12"><font size="4"></font>构筑物基本信息</th>
</tr>
<tr height="30">
<td colspan="2" align="center" >宗地(海)代码</td>
<td colspan="4" >
<input class="formInput" maxlength="19" v-model="form.zdzhdm" disabled="disabled">
</td>
<td colspan="2" align="center" >项目名称</td>
<td colspan="4" >
<input class="formInput" v-model="form.xmmc" :disabled="form.qszt!=='0'">
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" >坐落</td>
<td colspan="4" >
<input class="formInput" v-model="form.zl" :disabled="form.qszt!=='0'">
</td>
<td colspan="2" align="center" >不动产单元号</td>
<td colspan="4" class="psr">
<input class="formInput percent80" maxlength="28" v-model="form.bdcdyh" :disabled="form.qszt!=='0'">
<el-button @click.prevent="generatorCode" size="mini" class="createBtn" type="warning" :disabled="form.qszt!=='0'">生成</el-button>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" >构(建)筑物类型</td>
<td colspan="4" >
<el-select-tree style="width:100%"
ref="ghyt"
v-if="show"
:default-expand-all="defaultExpandAll"
:multiple="multiple"
:placeholder="placeholder"
:disabled="form.qszt!='0'"
:data="$store.state.gzwlxList"
:props="treeProps"
:check-strictly="checkStrictly"
:clearable="clearable"
v-model="form.gzwlx"
></el-select-tree>
</td>
<td colspan="2" align="center" >构(建)筑物规划用途</td>
<td colspan="4" >
<input class="formInput percent80" maxlength="28" v-model="form.gzwghyt" :disabled="form.qszt!=='0'">
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" >构(建)筑物面积(㎡)</td>
<td colspan="4" >
<input class="formInput" v-model="form.mj" :disabled="form.qszt!=='0'">
</td>
<td colspan="2" align="center" >竣工日期</td>
<td colspan="4" >
<el-date-picker
style="width:100%"
v-model="form.jgrq"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
:disabled="form.qszt!=='0'">
</el-date-picker>
</td>
</tr>
<tr height="30">
<td colspan="2" rowspan="2" align="center" >
<span>附加说明</span>
</td>
<td colspan="10" rowspan="2" >
<input class="formInput" v-model="form.bz" type="textarea" :disabled="form.qszt!=='0'">
</td>
</tr>
</table>
</el-form>
<div class="header-button">
<el-button type="primary" class="saveBtn" @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
</div>
</div>
</template>
<script>
import Qlr from "@components/formMenu/qlr";
import {getQjZdjbxxDetailById} from "@api/zd"
import {submit,registerCall} from "@api/common"
import {getBdcdyh,updateGzwjbxx,getQjGzwDetailInfo} from "@api/gzw";
export default {
name: "index",
components:{
Qlr
},
data(){
return{
//树型结构
show:true,
clearable: true,
defaultExpandAll: true,
multiple: false,
placeholder: '请选择',
disabled: false,
checkStrictly: true,
treeProps: {
value: 'bsm',
children: 'children',
label: 'mc'
},
bsm:'',
form:{
zdzhdm:'',
xmmc:'',
bdcdyh:'',
zl:'',
gzwlx:'',
gzwghyt:'',
mj:'',
jgrq:'',
bz:'',
qszt:0,
bsm:'',
},
zdbsm:'',
}
},
methods:{
getZddm(zdbsm){
getQjZdjbxxDetailById(zdbsm).then((res)=>{
if(res.code===200){
this.form.zdzhdm=res.result.zddm;
console.log(this.form.zdzhdm+"============")
}
})
},
generatorCode(){
if(this.form.bdcdyh!=null&&this.form.bdcdyh!==''){
this.open();
return;
}
getBdcdyh(this.form.zdzhdm,"gzw")
.then((res)=>{
if(res.code === 200){
this.form.bdcdyh=res.result;
}else {
this.$message.warning(res.message)
}
})
},
open() {
this.$confirm('已经存在不动产单元号, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
getBdcdyh(this.form.zdzhdm,"gzw")
.then((res)=>{
if(res.code === 200){
this.form.bdcdyh=res.result;
this.$message({
type: 'success',
message: '生成成功!'
});
}else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
onSave(){
console.log(this.form,'this.form');
this.bsm=this.$route.query.bsm;
this.form.bsm=this.bsm;
this.form.jgsj=this.form.jgrq;
updateGzwjbxx(this.form).then((res)=>{
if(res.code === 200){
this.$message.success("保存完成!");
}
})
},
getGzwDetailInfo(){
getQjGzwDetailInfo(this.bsm).then((res)=>{
if(res.code === 200){
this.form.xmmc = res.result.xmmc;
this.form.zl = res.result.zl;
this.form.gzwlx = res.result.gzwlx;
this.form.gzwghyt = res.result.gzwghyt;
this.form.mj = res.result.mj;
this.form.jgrq = res.result.jgsj;
this.form.bz = res.result.bz;
this.form.bdcdyh = res.result.bdcdyh;
this.form.qszt = res.result.qszt;
this.zdbsm = res.result.zdzhbsm;
this.getZddm(this.zdbsm);
}
})
},
onSubmit(){
let data={
glbsm:this.bsm,
status:1,
type:"gzw"
}
submit(data).then((res)=>{
if(res.code===200){
this.$message.success("提交完成!");
this.getGzwDetailInfo(this.bsm)
}
})
},
registerCall(){
let data={
type:'gzw',
bsm:this.bsm
}
registerCall(data).then(res=>{
if (res.success) {
this.$message.success("登记成功")
this.getTreeByBsm(this.bsm,'gzw','0,1,2')
this.getGzwDetailInfo(this.bsm)
}
})
},
},
created() {
this.bsm = this.$route.query.bsm;
},
mounted() {
this.getGzwDetailInfo();
}
}
</script>
<style rel="stylesheet/less" lang="less" scoped>
.gzw {
box-sizing: border-box;
padding: 18px;
padding-bottom: 0;
/deep/textarea{
width: 100%;
border: 0;
}
.el-form-item{
font-weight: bold;
font-size: xx-large
}
table{
background: #fff;
table-layout: fixed;
}
th {
height: 36px;
line-height: 36px;
font-size: 16px;
}
td{
height: 36px;
width:8.33%;
text-align: right;
padding-right: 10px;
}
.el-select{
width: 100%;
}
table{
font-size: 14px;
}
.gzwTable{
margin-top: 10px;
/deep/.el-input__inner {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
}
}
}
.header-button{
margin-top: 12px;
text-align: center;
}
</style>
\ No newline at end of file
......@@ -133,10 +133,18 @@
<el-button type="primary" class="w98 cancel" @click="close">取消</el-button>
</div>
</el-tab-pane>
<el-tab-pane class="eltabspane" v-if="!createZrz" label="构筑物" name="gzw">
<el-tab-pane class="eltabspane" label="构筑物" name="gzw">
<el-form :inline="true" :rules="rules4" :model="ruleForm4" ref="ruleForm4" class="demo-form-inline">
<el-form-item label="项目名称" class="w100" prop="xmmc">
<el-input
v-model="ruleForm4.xmmc"
placeholder="项目名称"
></el-input>
</el-form-item>
</el-form>
<div class="handleBtn">
<el-button type="primary" class="w98 import">导入图形</el-button>
<el-button type="primary" class="w98 creat" @click="todo">创建</el-button>
<el-button type="primary" class="w98 creat" @click="newGzw">创建</el-button>
<el-button type="primary" class="w98 cancel" @click="close">取消</el-button>
</div>
</el-tab-pane>
......@@ -152,6 +160,7 @@ import {
import { insertQjZdjbxx } from "@api/zd";
import { insertZrzjbxx } from "@api/zrz";
import { insertDzjbxx } from "@api/dz";
import { insertGzwjbxx } from "@api/gzw";
export default {
name: "",
......@@ -199,6 +208,11 @@ export default {
xmmc:'',
userbsm:''
},
ruleForm4:{
zdzhbsm:'',
xmmc:'',
userbsm:''
},
rules: {
xzqbsm: [
{ required: true, message: '请选择行政区', trigger: 'change' }
......@@ -229,6 +243,11 @@ export default {
{ required: true, message: '请输入项目名称', trigger: 'blur' },
],
},
rules4: {
xmmc: [
{ required: true, message: '请输入项目名称', trigger: 'blur' },
],
},
syqlx: [
{
label: "国家所有",
......@@ -341,6 +360,37 @@ export default {
});
},
newGzw(){
this.$refs['ruleForm4'].validate((valid) => {
if (valid) {
if(1>0){
this.ruleForm4.zdzhbsm = this.$store.state.zdbsm != '' ? this.$store.state.zdbsm : '';
insertGzwjbxx(this.ruleForm4)
.then((res)=>{
if(res.code === 200){
this.close();
this.$router.push({
path: '/gzw', query:{
source: 1,
bsm:res.result.bsm,
auth: '0,1,2'
}
});
}
})
}else {
this.close();
this.$router.push({
path: '/gzw', query:{
source: 1,
bsm:"12345678901234567890",
auth: '0,1,2'
}
});
}
}
})
},
newDz() {
//todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm
this.$refs['ruleForm2'].validate((valid) => {
......
......@@ -152,6 +152,11 @@
this.$store.state.hbsm=row.glbsm
this.getTreeByBsm(row.glbsm,'h','0,1,2');
break;
case "gzw":
this.$store.state.gzwbsm = row.glbsm;
this.getTreeByBsm(row.glbsm,"gzw",'0,1,2');
path = "/gzw";
break;
default:
break;
}
......