fe2bdbd0 by 杨威

添加层户功能完善

1 parent e0d614ec
...@@ -11,9 +11,18 @@ export function getLpbMenuTree (data) { ...@@ -11,9 +11,18 @@ export function getLpbMenuTree (data) {
11 }, 11 },
12 }) 12 })
13 } 13 }
14
15 /** 14 /**
16 * 新增幢单元接口信息 15 * 添加逻辑幢信息接口
16 */
17 export function insertLjzInfo (data) {
18 return request({
19 url: '/system/qjLjz/insertQjLjz',
20 method: 'post',
21 data:data
22 })
23 }
24 /**
25 * 添加幢单元接口信息
17 */ 26 */
18 export function insertZdyInfo (data) { 27 export function insertZdyInfo (data) {
19 return request({ 28 return request({
...@@ -22,3 +31,13 @@ export function insertZdyInfo (data) { ...@@ -22,3 +31,13 @@ export function insertZdyInfo (data) {
22 data:data 31 data:data
23 }) 32 })
24 } 33 }
34 /**
35 * 添加层户接口信息
36 */
37 export function insertChInfo (data) {
38 return request({
39 url: 'fw/lpb/insertQjCH',
40 method: 'post',
41 data:data
42 })
43 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -69,16 +69,6 @@ export function queryYzgy(id) { ...@@ -69,16 +69,6 @@ export function queryYzgy(id) {
69 params: {id} 69 params: {id}
70 }) 70 })
71 } 71 }
72 /**
73 * 新增逻辑幢信息接口
74 */
75 export function insertLjzInfo (data) {
76 return request({
77 url: '/system/qjLjz/insertQjLjz',
78 method: 'post',
79 data:data
80 })
81 }
82 72
83 /** 73 /**
84 * 新增逻辑幢信息接口 74 * 新增逻辑幢信息接口
......
1 <template> 1 <template>
2 <div class="addCh"> 2 <div class="addCh">
3 <el-table 3 <el-table class="addChTable" :data="tableData" style="width: 100%" border>
4 class="addChTable"
5 :data="tableData"
6 style="width: 100%"
7 border
8 >
9 <el-table-column prop="cz" width="40" align="center"> 4 <el-table-column prop="cz" width="40" align="center">
10 <template slot-scope="scope"> 5 <template slot-scope="scope">
11 <span class="cp" @click="handleRowClick(scope.row,scope.$index)">{{scope.row.cz}}</span> 6 <span class="cp" @click="handleRowClick(scope.row, scope.$index)">{{
7 scope.row.cz
8 }}</span>
12 </template> 9 </template>
13 </el-table-column> 10 </el-table-column>
14 <el-table-column prop="ljzbsm" label="逻辑幢" align="center"> 11 <el-table-column prop="ljzmc" label="逻辑幢" align="center">
15 <template slot-scope="scope"> 12 <!-- <template slot-scope="scope">
16 <el-input size="small" v-model="scope.row.ljzbsm"></el-input> 13 <el-input size="small" v-model="scope.row.ljzbsm"></el-input>
17 </template> 14 </template> -->
18 </el-table-column> 15 </el-table-column>
19 <el-table-column prop="zdybsm" label="幢单元" align="center"> 16 <el-table-column prop="zdymc" label="幢单元" align="center">
20 <template slot-scope="scope"> 17 <!-- <template slot-scope="scope">
21 <el-input size="small" v-model="scope.row.zdybsm"></el-input> 18 <el-input size="small" v-model="scope.row.zdybsm"></el-input>
22 </template> 19 </template> -->
23 </el-table-column> 20 </el-table-column>
24 <el-table-column prop="qsc" label="起始层" align="center"> 21 <el-table-column prop="qsc" label="起始层" align="center">
25 <template slot-scope="scope"> 22 <template slot-scope="scope">
...@@ -41,61 +38,132 @@ ...@@ -41,61 +38,132 @@
41 </template> 38 </template>
42 39
43 <script> 40 <script>
41 import { insertChInfo } from "../../../../../api/lpb";
44 export default { 42 export default {
45 name:"", 43 name: "",
46 components:{}, 44 components: {},
47 props:{}, 45 props: {
48 data(){ 46 treeData: {},
47 dialogVisible: {
48 type: Boolean,
49 default: false,
50 },
51 },
52 data() {
49 return { 53 return {
50 tableData:[ 54 ljzBsm: null,
51 55 zdyBsm: null,
52 ], 56 zrzBsm: null,
53 formData:{ 57 tableData: [],
54 cz:'+', 58 formData: {
55 ljzbsm:'', 59 cz: "+",
56 zdybsm:'', 60 ljzbsm: "",
57 qsc:'', 61 ljzmc:"",
58 jsc:'', 62 zdymc:"",
59 mchs:'', 63 zdybsm: "",
60 } 64 zrzbsm: "",
61 } 65 syclx: "0",
66 qsc: "",
67 jsc: "",
68 hs: "",
62 }, 69 },
63 created(){ 70 };
64 this.tableData.push(this.formData)
65 }, 71 },
66 mounted(){}, 72 created() {},
67 methods:{ 73 mounted() {
74 console.log(this.treeData, "treeData");
75 },
76 methods: {
68 //行操作 77 //行操作
69 handleRowClick(row,index){ 78 handleRowClick(row, index) {
79 console.log(this.tableData, "this.tableData");
80 console.log(this.formData, "this.formData");
70 console.log(index); 81 console.log(index);
71 if(row.cz =='+'){ 82 if (row.cz == "+") {
72 let temp = JSON.parse(JSON.stringify(this.formData)); 83 let temp = JSON.parse(JSON.stringify(this.formData));
73 temp.cz = '-'; 84 temp.cz = "-";
74 this.tableData.push(temp); 85 this.tableData.push(temp);
75 }else{ 86 } else {
76 this.tableData.splice(index, 1) 87 this.tableData.splice(index, 1);
88 }
89 },
90 onSave(bsm) {
91 insertChInfo(this.tableData).then((res) => {
92 if (res.code === 200) {
93 this.$message.success("保存成功");
94 //更新树结构数据
95 console.log(this);
96 this.$parent.$parent.getLpbMenuTree(bsm);
97 //关闭弹框
98 this.$parent.$parent.closeDaialog();
77 } 99 }
100 });
78 }, 101 },
79 //重置数据 102 //重置数据
80 reset(){ 103 reset() {
81 this.tableData = [ 104 this.tableData = [
82 { 105 {
83 cz:'+', 106 cz: "+",
84 ljzbsm:'', 107 ljzbsm: "",
85 zdybsm:'', 108 zdybsm: "",
86 qsc:'', 109 qsc: "",
87 jsc:'', 110 jsc: "",
88 mchs:'', 111 mchs: "",
89 } 112 },
90 ] 113 ];
91 } 114 },
92 }, 115 },
93 computed: {}, 116 computed: {},
94 watch: {}, 117 watch: {
95 } 118 treeData: {
119 handler(n) {
120 this.formData = {
121 cz: "+",
122 ljzbsm: "",
123 zdybsm: "",
124 zrzbsm: "",
125 syclx: "0",
126 qsc: "",
127 jsc: "",
128 hs: "",
129 };
130 switch (n.type) {
131 case "zrz":
132 this.formData.zrzbsm = n.bsm;
133 break;
134 case "ljz":
135 this.formData.zrzbsm = n.zrzbsm;
136 this.formData.ljzbsm = n.bsm;
137 this.formData.ljzmc = n.ljzmc;
138 break;
139 case "zdy":
140 this.formData.zrzbsm = n.zrzbsm;
141 this.formData.ljzbsm = n.ljzbsm;
142 this.formData.ljzmc = n.ljzmc;
143 this.formData.zdybsm = n.bsm;
144 this.formData.zdymc = n.mc;
145 break;
146 default:
147 break;
148 }
149 this.tableData = [];
150 this.tableData.push(this.formData);
151 },
152 //深度监听,第一次接收到父组件传值就触发事件
153 immediate: true,
154 deep: true,
155 },
156 // dialogVisible(n){
157 // this.tableData = [];
158 // if(n){
159 // this.tableData.push(this.formData);
160 // }
161 // }
162 },
163 };
96 </script> 164 </script>
97 <style lang="less"> 165 <style lang="less">
98 .addCh{ 166 .addCh {
99 .addChTable { 167 .addChTable {
100 .el-input__inner { 168 .el-input__inner {
101 height: 20px; 169 height: 20px;
...@@ -109,9 +177,8 @@ export default { ...@@ -109,9 +177,8 @@ export default {
109 text-align: center; 177 text-align: center;
110 } 178 }
111 } 179 }
112 .cp{ 180 .cp {
113 cursor: pointer; 181 cursor: pointer;
114 } 182 }
115 } 183 }
116
117 </style> 184 </style>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
38 <LineTree :pd="pd" class="treeData" :islpb="islpb"></LineTree> 38 <LineTree :pd="pd" class="treeData" :islpb="islpb"></LineTree>
39 <p 39 <p
40 @click="createFlag = false" 40 @click="createFlag = false"
41 style="width:20px;float:left;cursor:pointer;" 41 style="width:20px;float:left;margin-top: 12px;margin-left:10px;cursor:pointer;"
42 > 42 >
43 X 43 X
44 </p> 44 </p>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
96 <addZdy ref="zdy"></addZdy> 96 <addZdy ref="zdy"></addZdy>
97 </div> 97 </div>
98 <div class="addCh" v-show="menuType == 'ch'"> 98 <div class="addCh" v-show="menuType == 'ch'">
99 <addCh ref="ch"></addCh> 99 <addCh ref="ch" :dialogVisible="dialogVisible" :treeData="treeData"></addCh>
100 </div> 100 </div>
101 <div class="btnGroup"> 101 <div class="btnGroup">
102 <el-button type="primary" @click="saveInfo">保存</el-button> 102 <el-button type="primary" @click="saveInfo">保存</el-button>
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
203 this.getHeight(); 203 this.getHeight();
204 }, 204 },
205 mounted() { 205 mounted() {
206 this.getLpbMenuTree("d1b82b27f2a6ab7bf3f0e7708c96e46f"); 206 this.getLpbMenuTree("1e0c83dfe2e73284f834a80a0947f0c9");
207 // 楼盘表绘制区域宽度计算:楼盘表区域宽度-图例宽度34-滚动条宽度6 207 // 楼盘表绘制区域宽度计算:楼盘表区域宽度-图例宽度34-滚动条宽度6
208 setTimeout(() => { 208 setTimeout(() => {
209 this.lpbContentwidth = this.$store.state.contentWidth - 34 - 6; 209 this.lpbContentwidth = this.$store.state.contentWidth - 34 - 6;
...@@ -243,8 +243,8 @@ export default { ...@@ -243,8 +243,8 @@ export default {
243 this.$refs.zdy.submitForm("form", this.pd[0].bsm, this.treeData.bsm); 243 this.$refs.zdy.submitForm("form", this.pd[0].bsm, this.treeData.bsm);
244 break; 244 break;
245 case "ch": 245 case "ch":
246 this.$refs.ch.onSave(this.pd[0].bsm);
246 break; 247 break;
247
248 default: 248 default:
249 break; 249 break;
250 } 250 }
...@@ -276,15 +276,6 @@ export default { ...@@ -276,15 +276,6 @@ export default {
276 }, 276 },
277 }, 277 },
278 computed: { 278 computed: {
279 // tabContentWidth(){
280 // let w = this.$refs.tabContent != undefined ? this.$refs.tabContent.offsetWidth : 0
281 // return w;
282 // // if(this.$refs.tabContent != undefined){
283 // // return this.$refs.tabContent.offsetWidth
284 // // }else{
285 // // return
286 // // }
287 // }
288 }, 279 },
289 destroyed() { 280 destroyed() {
290 window.removeEventListener("resize", this.getHeight); 281 window.removeEventListener("resize", this.getHeight);
...@@ -304,13 +295,6 @@ export default { ...@@ -304,13 +295,6 @@ export default {
304 this.lpbContentwidth += 260; 295 this.lpbContentwidth += 260;
305 } 296 }
306 }, 297 },
307 // tabContentWidth(n){
308 // debugger
309 // if(n != 0){
310 // // 楼盘表绘制区域宽度计算:楼盘表区域宽度-图例宽度34-滚动条宽度6
311 // this.lpbContentwidth = this.$refs.tabContent.offsetWidth - 34 - 6;
312 // }
313 // }
314 }, 298 },
315 }; 299 };
316 </script> 300 </script>
......
1 <template> 1 <template>
2 <div class="h content-form"> 2 <div class="h content-form">
3 <el-form ref="form" :model="form" label-width="160px"> 3 <el-form ref="form" :model="form" label-width="160px">
4 <table border="1" width="100%" cellspacing="0" cellpadding="0" class="hTable"> 4 <table
5 border="1"
6 width="100%"
7 cellspacing="0"
8 cellpadding="0"
9 class="hTable"
10 >
5 <tbody> 11 <tbody>
6 <tr height="30"> 12 <tr height="30">
7 <td colspan="12" align="center" ><font size="4">逻辑幢基本信息</font></td> 13 <td colspan="12" align="center">
14 <font size="4">逻辑幢基本信息</font>
15 </td>
8 </tr> 16 </tr>
9 <tr height="30"> 17 <tr height="30">
10 <td colspan="2" align="center" >逻辑幢号</td> 18 <td colspan="2" align="center">逻辑幢号</td>
11 <td colspan="4" > 19 <td colspan="4">
12 <el-input v-model="form.ljzh"></el-input> 20 <el-input v-model="form.ljzh"></el-input>
13 </td> 21 </td>
14 <td colspan="2" align="center" >自然幢号</td> 22 <td colspan="2" align="center">自然幢号</td>
15 <td colspan="4" > 23 <td colspan="4">
16 <el-input v-model="form.zrzh"></el-input> 24 <el-input v-model="form.zrzh"></el-input>
17 </td> 25 </td>
18 </tr> 26 </tr>
19 <tr height="30"> 27 <tr height="30">
20 <td colspan="2" align="center" >逻辑幢名称</td> 28 <td colspan="2" align="center">逻辑幢名称</td>
21 <td colspan="4" > 29 <td colspan="4">
22 <el-input v-model="form.ljzmc"></el-input> 30 <el-input v-model="form.ljzmc"></el-input>
23 </td> 31 </td>
24 <td colspan="2" align="center" >不动产单元号</td> 32 <td colspan="2" align="center">不动产单元号</td>
25 <td colspan="4" > 33 <td colspan="4">
26 <el-input v-model="form.bdcdyh" style="width: 70%"></el-input> 34 <el-input v-model="form.bdcdyh" style="width: 70%"></el-input>
27 <el-button @click.prevent="" size="mini" type="primary" style="width:25%;margin-left:3%">生成</el-button> 35 <el-button
36 @click.prevent=""
37 size="mini"
38 type="primary"
39 style="width:25%;margin-left:3%"
40 >生成</el-button
41 >
28 </td> 42 </td>
29 </tr> 43 </tr>
30 44
31 <tr height="30"> 45 <tr height="30">
32 <td colspan="2" align="center" >门牌号</td> 46 <td colspan="2" align="center">门牌号</td>
33 <td colspan="4" > 47 <td colspan="4">
34 <el-input v-model="form.mph"></el-input> 48 <el-input v-model="form.mph"></el-input>
35 </td> 49 </td>
36 <td colspan="2" align="center" >竣工日期</td> 50 <td colspan="2" align="center">竣工日期</td>
37 <td colspan="4" > 51 <td colspan="4">
38 <el-date-picker 52 <el-date-picker
39 v-model="form.jgrq" 53 v-model="form.jgrq"
40 type="date" 54 type="date"
41 value-format="yyyy-MM-dd" 55 value-format="yyyy-MM-dd"
42 placeholder="选择日期"> 56 placeholder="选择日期"
57 >
43 </el-date-picker> 58 </el-date-picker>
44 </td> 59 </td>
45 </tr> 60 </tr>
46 61
47 <tr height="30"> 62 <tr height="30">
48 <td colspan="2" align="center" >预测建筑面积(㎡)</td> 63 <td colspan="2" align="center">预测建筑面积(㎡)</td>
49 <td colspan="4" > 64 <td colspan="4">
50 <el-input v-model="form.ycjzmj"></el-input> 65 <el-input v-model="form.ycjzmj"></el-input>
51 </td> 66 </td>
52 <td colspan="2" align="center" >实测建筑面积(㎡)</td> 67 <td colspan="2" align="center">实测建筑面积(㎡)</td>
53 <td colspan="4" > 68 <td colspan="4">
54 <el-input v-model="form.scjzmj"></el-input> 69 <el-input v-model="form.scjzmj"></el-input>
55 </td> 70 </td>
56 </tr> 71 </tr>
57 72
58 <tr height="30"> 73 <tr height="30">
59 <td colspan="2" align="center" >预测地下面积(㎡)</td> 74 <td colspan="2" align="center">预测地下面积(㎡)</td>
60 <td colspan="4" > 75 <td colspan="4">
61 <el-input v-model="form.ycdxmj"></el-input> 76 <el-input v-model="form.ycdxmj"></el-input>
62 </td> 77 </td>
63 <td colspan="2" align="center" >实测地下面积(㎡)</td> 78 <td colspan="2" align="center">实测地下面积(㎡)</td>
64 <td colspan="4" > 79 <td colspan="4">
65 <el-input v-model="form.scdxmj"></el-input> 80 <el-input v-model="form.scdxmj"></el-input>
66 </td> 81 </td>
67 </tr> 82 </tr>
68 83
69 <tr height="30"> 84 <tr height="30">
70 <td colspan="2" align="center" >预测其他面积(㎡)</td> 85 <td colspan="2" align="center">预测其他面积(㎡)</td>
71 <td colspan="4" > 86 <td colspan="4">
72 <el-input v-model="form.ycqtmj"></el-input> 87 <el-input v-model="form.ycqtmj"></el-input>
73 </td> 88 </td>
74 <td colspan="2" align="center" >实测其他面积(㎡)</td> 89 <td colspan="2" align="center">实测其他面积(㎡)</td>
75 <td colspan="4" > 90 <td colspan="4">
76 <el-input v-model="form.scqymj"></el-input> 91 <el-input v-model="form.scqymj"></el-input>
77 </td> 92 </td>
78 </tr> 93 </tr>
79 94
80 95 <tr
81 <tr height="30" v-for="(item1,index) in form.ytList" :key="'yt'+index"> 96 height="30"
82 <td colspan="2" v-if="index===0" :rowspan="ytTitleRowspan" align="center" > 97 v-for="(item1, index) in form.ytList"
83 <el-button type="primary" size="mini" style="margin-right: 10px" @click="addYtInfo">添加</el-button> 98 :key="'yt' + index"
99 >
100 <td
101 colspan="2"
102 v-if="index === 0"
103 :rowspan="ytTitleRowspan"
104 align="center"
105 >
106 <el-button
107 type="primary"
108 size="mini"
109 style="margin-right: 10px"
110 @click="addYtInfo"
111 >添加</el-button
112 >
84 <span>用途</span> 113 <span>用途</span>
85 </td> 114 </td>
86 <td colspan="1" align="center" > 115 <td colspan="1" align="center">
87 <span @click="deleteYtInfo(index)">删除</span> 116 <span @click="deleteYtInfo(index)">删除</span>
88 </td> 117 </td>
89 <td colspan="9" > 118 <td colspan="9">
90 <el-select v-model="item1.fwytzdbsm" placeholder="请选择" > 119 <el-select v-model="item1.fwytzdbsm" placeholder="请选择">
91 <el-option 120 <el-option
92 v-for="item in $store.state.tdytList" 121 v-for="item in $store.state.tdytList"
93 :key="item.bsm" 122 :key="item.bsm"
94 :label="item.mc" 123 :label="item.mc"
95 :value="item.bsm"> 124 :value="item.bsm"
125 >
96 </el-option> 126 </el-option>
97 </el-select> 127 </el-select>
98 </td> 128 </td>
99 </tr> 129 </tr>
100 130
101 <tr height="30" v-for="(item1,index) in form.fwjgList" :key="'jg'+index"> 131 <tr
102 <td colspan="2" v-if="index===0" :rowspan="fwjgTitleRowspan" align="center" > 132 height="30"
103 <el-button type="primary" size="mini" style="margin-right: 10px" @click="addFwjgInfo">添加</el-button> 133 v-for="(item1, index) in form.fwjgList"
134 :key="'jg' + index"
135 >
136 <td
137 colspan="2"
138 v-if="index === 0"
139 :rowspan="fwjgTitleRowspan"
140 align="center"
141 >
142 <el-button
143 type="primary"
144 size="mini"
145 style="margin-right: 10px"
146 @click="addFwjgInfo"
147 >添加</el-button
148 >
104 <span>房屋结构</span> 149 <span>房屋结构</span>
105 </td> 150 </td>
106 <td colspan="1" align="center" > 151 <td colspan="1" align="center">
107 <span @click="deleteFwjgInfo(index)">删除</span> 152 <span @click="deleteFwjgInfo(index)">删除</span>
108 </td> 153 </td>
109 <td colspan="9" > 154 <td colspan="9">
110 <el-select v-model="item1.fwjgzdbsm" placeholder="请选择" > 155 <el-select v-model="item1.fwjgzdbsm" placeholder="请选择">
111 <el-option 156 <el-option
112 v-for="item in $store.state.jgOptions" 157 v-for="item in $store.state.jgOptions"
113 :key="item.bsm" 158 :key="item.bsm"
114 :label="item.mc" 159 :label="item.mc"
115 :value="item.bsm"> 160 :value="item.bsm"
161 >
116 </el-option> 162 </el-option>
117 </el-select> 163 </el-select>
118 </td> 164 </td>
119 </tr> 165 </tr>
120 166
121 <tr height="30"> 167 <tr height="30">
122 <td colspan="2" align="center" >地下层数</td> 168 <td colspan="2" align="center">地下层数</td>
123 <td colspan="4" > 169 <td colspan="4">
124 <el-input v-model="form.dxcs"></el-input> 170 <el-input v-model="form.dxcs"></el-input>
125 </td> 171 </td>
126 <td colspan="2" align="center" >地上层数</td> 172 <td colspan="2" align="center">地上层数</td>
127 <td colspan="4" > 173 <td colspan="4">
128 <el-input v-model="form.dscs"></el-input> 174 <el-input v-model="form.dscs"></el-input>
129 </td> 175 </td>
130 </tr> 176 </tr>
131 177
132
133 <tr height="30"> 178 <tr height="30">
134 <td colspan="2" align="center" >总层数</td> 179 <td colspan="2" align="center">总层数</td>
135 <td colspan="4" > 180 <td colspan="4">
136 <el-input v-model="form.zcs"></el-input> 181 <el-input v-model="form.zcs"></el-input>
137 </td> 182 </td>
138 <td colspan="2" align="center" >建筑物状态</td> 183 <td colspan="2" align="center">建筑物状态</td>
139 <td colspan="4" > 184 <td colspan="4">
140 <el-input v-model="form.jzwzt"></el-input> 185 <el-input v-model="form.jzwzt"></el-input>
141 </td> 186 </td>
142 </tr> 187 </tr>
143 188
144
145 <tr height="30"> 189 <tr height="30">
146 <td colspan="2" rowspan="2" align="center" > 190 <td colspan="2" rowspan="2" align="center">
147 <span>备注</span> 191 <span>备注</span>
148 </td> 192 </td>
149 <td colspan="10" rowspan="2" > 193 <td colspan="10" rowspan="2">
150 <el-input v-model="form.bz" type="textarea"></el-input> 194 <el-input v-model="form.bz" type="textarea"></el-input>
151 </td> 195 </td>
152 </tr> 196 </tr>
153 <tr height="30"> 197 <tr height="30"></tr>
154 </tr>
155
156 </tbody> 198 </tbody>
157 </table> 199 </table>
158 </el-form> 200 </el-form>
159 </div> 201 </div>
160
161 </template> 202 </template>
162 203
163 <script> 204 <script>
164 import {insertLjzInfo} from "../../../../../api/zrz"; 205 import { insertLjzInfo } from "../../../../../api/lpb";
165 import {formdate} from "../../../../../libs/function"; 206 import { formdate } from "../../../../../libs/function";
166 export default { 207 export default {
167 name:'ljz', 208 name: "ljz",
168 components:{}, 209 components: {},
169 data () { 210 data() {
170 return { 211 return {
171 form:{ 212 form: {
172 zrzbsm:'', 213 zrzbsm: "",
173 ljzh:'', //逻辑幢号 214 ljzh: "", //逻辑幢号
174 zrzh:'', //自然幢号 215 zrzh: "", //自然幢号
175 ljzmc:'', //逻辑幢顺序号 216 ljzmc: "", //逻辑幢顺序号
176 bdcdyh:'', //不动产单元号 217 bdcdyh: "", //不动产单元号
177 mph:'', //门牌号 218 mph: "", //门牌号
178 jgrq:'', //竣工日期 219 jgrq: "", //竣工日期
179 ycjzmj:'', //预测建筑面积 220 ycjzmj: "", //预测建筑面积
180 scjzmj:'', //实测建筑面积 221 scjzmj: "", //实测建筑面积
181 ycdxmj:'', //预测地下面积 222 ycdxmj: "", //预测地下面积
182 scdxmj:'', //实测地下面积 223 scdxmj: "", //实测地下面积
183 ycqtmj:'', //预测其他面积 224 ycqtmj: "", //预测其他面积
184 scqymj:'', //实测其他面积 225 scqymj: "", //实测其他面积
185 ytList:[{ 226 ytList: [
186 glbsm:'', //关联标识码 227 {
187 fwytzdbsm:'', //房屋用途字典标识码 228 glbsm: "", //关联标识码
188 sx:'', //顺序 229 fwytzdbsm: "", //房屋用途字典标识码
189 }], 230 sx: "", //顺序
190 fwjgList:[{
191 fwjgzdbsm:'', //房屋结构字典标识码
192 glbsm:'', //关联标识码
193 sx:'', //顺序
194 }],
195 dxcs:'', //地下层数
196 dscs:'', //地上层数
197 zcs:'', //总层数
198 jzwzt:'', //建筑物状态
199 }, 231 },
200 value: '', 232 ],
201 ytTitleRowspan:1, //用途的单元格垂直合并数量 233 fwjgList: [
202 fwjgTitleRowspan:1, //房屋结构的单元格垂直合并数量 234 {
203 } 235 fwjgzdbsm: "", //房屋结构字典标识码
236 glbsm: "", //关联标识码
237 sx: "", //顺序
238 },
239 ],
240 dxcs: "", //地下层数
241 dscs: "", //地上层数
242 zcs: "", //总层数
243 jzwzt: "", //建筑物状态
244 },
245 value: "",
246 ytTitleRowspan: 1, //用途的单元格垂直合并数量
247 fwjgTitleRowspan: 1, //房屋结构的单元格垂直合并数量
248 };
204 }, 249 },
205 methods: { 250 methods: {
206 addYtInfo(){ 251 addYtInfo() {
207 this.form.ytList.push({ 252 this.form.ytList.push({
208 glbsm:'', 253 glbsm: "",
209 fwytzdbsm:'', 254 fwytzdbsm: "",
210 sx:'', 255 sx: "",
211 }); 256 });
212 this.ytTitleRowspan=this.form.ytList.length; 257 this.ytTitleRowspan = this.form.ytList.length;
213 }, 258 },
214 deleteYtInfo(index){ 259 deleteYtInfo(index) {
215 if(this.form.ytList.length<=1){ 260 if (this.form.ytList.length <= 1) {
216 this.$message({ 261 this.$message({
217 message: '不能删除,最少含有一条用途信息', 262 message: "不能删除,最少含有一条用途信息",
218 type: 'warning' 263 type: "warning",
219 }); 264 });
220 }else{ 265 } else {
221 this.form.ytList.splice(index,1); 266 this.form.ytList.splice(index, 1);
222 this.ytTitleRowspan=this.form.ytList.length; 267 this.ytTitleRowspan = this.form.ytList.length;
223 } 268 }
224 }, 269 },
225 addFwjgInfo(){ 270 addFwjgInfo() {
226 this.form.fwjgList.push({ 271 this.form.fwjgList.push({
227 fwjgzdbsm:'', //房屋结构字典标识码 272 fwjgzdbsm: "", //房屋结构字典标识码
228 glbsm:'', //关联标识码 273 glbsm: "", //关联标识码
229 sx:'', //顺序 274 sx: "", //顺序
230 }); 275 });
231 this.fwjgTitleRowspan=this.form.fwjgList.length; 276 this.fwjgTitleRowspan = this.form.fwjgList.length;
232 }, 277 },
233 //重置数据 278 //重置数据
234 reset(){ 279 reset() {
235 this.form = { 280 this.form = {
236 zrzbsm:'', 281 zrzbsm: "",
237 ljzh:'', //逻辑幢号 282 ljzh: "", //逻辑幢号
238 zrzh:'', //自然幢号 283 zrzh: "", //自然幢号
239 ljzmc:'', //逻辑幢顺序号 284 ljzmc: "", //逻辑幢顺序号
240 bdcdyh:'', //不动产单元号 285 bdcdyh: "", //不动产单元号
241 mph:'', //门牌号 286 mph: "", //门牌号
242 jgrq:'', //竣工日期 287 jgrq: "", //竣工日期
243 ycjzmj:'', //预测建筑面积 288 ycjzmj: "", //预测建筑面积
244 scjzmj:'', //实测建筑面积 289 scjzmj: "", //实测建筑面积
245 ycdxmj:'', //预测地下面积 290 ycdxmj: "", //预测地下面积
246 scdxmj:'', //实测地下面积 291 scdxmj: "", //实测地下面积
247 ycqtmj:'', //预测其他面积 292 ycqtmj: "", //预测其他面积
248 scqymj:'', //实测其他面积 293 scqymj: "", //实测其他面积
249 ytList:[{ 294 ytList: [
250 glbsm:'', //关联标识码 295 {
251 fwytzdbsm:'', //房屋用途字典标识码 296 glbsm: "", //关联标识码
252 sx:'', //顺序 297 fwytzdbsm: "", //房屋用途字典标识码
253 }], 298 sx: "", //顺序
254 fwjgList:[{
255 fwjgzdbsm:'', //房屋结构字典标识码
256 glbsm:'', //关联标识码
257 sx:'', //顺序
258 }],
259 dxcs:'', //地下层数
260 dscs:'', //地上层数
261 zcs:'', //总层数
262 jzwzt:'', //建筑物状态
263 }
264 }, 299 },
265 deleteFwjgInfo(index){ 300 ],
266 if(this.form.fwjgList.length<=1){ 301 fwjgList: [
302 {
303 fwjgzdbsm: "", //房屋结构字典标识码
304 glbsm: "", //关联标识码
305 sx: "", //顺序
306 },
307 ],
308 dxcs: "", //地下层数
309 dscs: "", //地上层数
310 zcs: "", //总层数
311 jzwzt: "", //建筑物状态
312 };
313 },
314 deleteFwjgInfo(index) {
315 if (this.form.fwjgList.length <= 1) {
267 this.$message({ 316 this.$message({
268 message: '不能删除,最少含有一条房屋结构信息', 317 message: "不能删除,最少含有一条房屋结构信息",
269 type: 'warning' 318 type: "warning",
270 }); 319 });
271 }else{ 320 } else {
272 this.form.fwjgList.splice(index,1); 321 this.form.fwjgList.splice(index, 1);
273 this.fwjgTitleRowspan=this.form.fwjgList.length; 322 this.fwjgTitleRowspan = this.form.fwjgList.length;
274 } 323 }
275 }, 324 },
276 onSave(data,bsm){ 325 onSave(data, bsm) {
326 debugger
277 //自然幢标识码 327 //自然幢标识码
278 this.form.zrzbsm= bsm; 328 this.form.zrzbsm = bsm;
279 insertLjzInfo(this.form).then((res)=>{ 329 insertLjzInfo(this.form).then((res) => {
280 if(res.code===200){ 330 if (res.code === 200) {
281 this.$message.success("保存成功") 331 this.$message.success("保存成功");
282 //更新树结构数据 332 //更新树结构数据
283 console.log(this); 333 console.log(this);
284 this.$parent.$parent.getLpbMenuTree(bsm); 334 this.$parent.$parent.getLpbMenuTree(bsm);
285 //关闭弹框 335 //关闭弹框
286 this.$parent.$parent.closeDaialog() 336 this.$parent.$parent.closeDaialog();
287 } 337 }
288 }) 338 });
289 }, 339 },
290 onSubmit(){ 340 onSubmit() {
291 console.log(this.form) 341 console.log(this.form);
292 }
293 }, 342 },
294 created() {
295
296 }, 343 },
297 mounted() { 344 created() {},
298 345 mounted() {},
299 } 346 };
300 }
301 </script> 347 </script>
302 <style rel="stylesheet/less" lang="less" scoped> 348 <style rel="stylesheet/less" lang="less" scoped>
303 .h { 349 .h {
304 min-height: 200px; 350 min-height: 200px;
305 width: 100%; 351 width: 100%;
306 margin: 0 auto; 352 margin: 0 auto;
307 353
308 /deep/.el-input__inner{ 354 /deep/.el-input__inner {
309 width: 100%; 355 width: 100%;
310 border: 0; 356 border: 0;
311 } 357 }
312 358
313 /deep/textarea{ 359 /deep/textarea {
314 width: 100%; 360 width: 100%;
315 border: 0; 361 border: 0;
316 } 362 }
317 363
318 364 .el-form-item {
319 .el-form-item{
320 font-weight: bold; 365 font-weight: bold;
321 font-size: xx-large 366 font-size: xx-large;
322 } 367 }
323 368
324 table{ 369 table {
325 background: #fff; 370 background: #fff;
326 table-layout: fixed; 371 table-layout: fixed;
327 } 372 }
328 373
329 td{ 374 td {
330 //bgcolor:#F1F4FC; 375 //bgcolor:#F1F4FC;
331 background-color:#fff; 376 background-color: #fff;
332 width:8.33% 377 width: 8.33%;
333 } 378 }
334 379
335 .el-select{ 380 .el-select {
336 display:block; 381 display: block;
337 }
338 } 382 }
383 }
339 384
340 table{ 385 table {
341 font-size: 14px; 386 font-size: 14px;
342 } 387 }
343 388
344 .hTable{ 389 .hTable {
345 margin-top: 10px; 390 margin-top: 10px;
346 } 391 }
347 </style> 392 </style>
......