添加层户功能完善
Showing
5 changed files
with
549 additions
and
444 deletions
... | @@ -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({ |
... | @@ -21,4 +30,14 @@ export function insertZdyInfo (data) { | ... | @@ -21,4 +30,14 @@ export function insertZdyInfo (data) { |
21 | method: 'post', | 30 | method: 'post', |
22 | data:data | 31 | data:data |
23 | }) | 32 | }) |
33 | } | ||
34 | /** | ||
35 | * 添加层户接口信息 | ||
36 | */ | ||
37 | export function insertChInfo (data) { | ||
38 | return request({ | ||
39 | url: 'fw/lpb/insertQjCH', | ||
40 | method: 'post', | ||
41 | data:data | ||
42 | }) | ||
24 | } | 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" | 4 | <el-table-column prop="cz" width="40" align="center"> |
5 | :data="tableData" | ||
6 | style="width: 100%" | ||
7 | border | ||
8 | > | ||
9 | <el-table-column prop="cz" width="40" align="center"> | ||
10 | <template slot-scope="scope"> | ||
11 | <span class="cp" @click="handleRowClick(scope.row,scope.$index)">{{scope.row.cz}}</span> | ||
12 | </template> | ||
13 | </el-table-column> | ||
14 | <el-table-column prop="ljzbsm" label="逻辑幢" align="center"> | ||
15 | <template slot-scope="scope"> | 5 | <template slot-scope="scope"> |
16 | <el-input size="small" v-model="scope.row.ljzbsm"></el-input> | 6 | <span class="cp" @click="handleRowClick(scope.row, scope.$index)">{{ |
7 | scope.row.cz | ||
8 | }}</span> | ||
17 | </template> | 9 | </template> |
18 | </el-table-column> | 10 | </el-table-column> |
19 | <el-table-column prop="zdybsm" label="幢单元" align="center"> | 11 | <el-table-column prop="ljzmc" label="逻辑幢" align="center"> |
20 | <template slot-scope="scope"> | 12 | <!-- <template slot-scope="scope"> |
13 | <el-input size="small" v-model="scope.row.ljzbsm"></el-input> | ||
14 | </template> --> | ||
15 | </el-table-column> | ||
16 | <el-table-column prop="zdymc" label="幢单元" align="center"> | ||
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"> |
... | @@ -30,88 +27,158 @@ | ... | @@ -30,88 +27,158 @@ |
30 | <template slot-scope="scope"> | 27 | <template slot-scope="scope"> |
31 | <el-input size="small" v-model="scope.row.jsc"></el-input> | 28 | <el-input size="small" v-model="scope.row.jsc"></el-input> |
32 | </template> | 29 | </template> |
33 | </el-table-column> | 30 | </el-table-column> |
34 | <el-table-column prop="mchs" label="每层户数" align="center"> | 31 | <el-table-column prop="mchs" label="每层户数" align="center"> |
35 | <template slot-scope="scope"> | 32 | <template slot-scope="scope"> |
36 | <el-input size="small" v-model="scope.row.mchs"></el-input> | 33 | <el-input size="small" v-model="scope.row.mchs"></el-input> |
37 | </template> | 34 | </template> |
38 | </el-table-column> | 35 | </el-table-column> |
39 | </el-table> | 36 | </el-table> |
40 | </div> | 37 | </div> |
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: {}, |
49 | return { | 47 | dialogVisible: { |
50 | tableData:[ | 48 | type: Boolean, |
51 | 49 | default: false, | |
52 | ], | 50 | }, |
53 | formData:{ | 51 | }, |
54 | cz:'+', | 52 | data() { |
55 | ljzbsm:'', | 53 | return { |
56 | zdybsm:'', | 54 | ljzBsm: null, |
57 | qsc:'', | 55 | zdyBsm: null, |
58 | jsc:'', | 56 | zrzBsm: null, |
59 | mchs:'', | 57 | tableData: [], |
60 | } | 58 | formData: { |
61 | } | 59 | cz: "+", |
62 | }, | 60 | ljzbsm: "", |
63 | created(){ | 61 | ljzmc:"", |
64 | this.tableData.push(this.formData) | 62 | zdymc:"", |
65 | }, | 63 | zdybsm: "", |
66 | mounted(){}, | 64 | zrzbsm: "", |
67 | methods:{ | 65 | syclx: "0", |
68 | //行操作 | 66 | qsc: "", |
69 | handleRowClick(row,index){ | 67 | jsc: "", |
70 | console.log(index); | 68 | hs: "", |
71 | if(row.cz =='+'){ | 69 | }, |
72 | let temp = JSON.parse(JSON.stringify(this.formData)); | 70 | }; |
73 | temp.cz = '-'; | 71 | }, |
74 | this.tableData.push(temp); | 72 | created() {}, |
75 | }else{ | 73 | mounted() { |
76 | this.tableData.splice(index, 1) | 74 | console.log(this.treeData, "treeData"); |
77 | } | 75 | }, |
78 | }, | 76 | methods: { |
79 | //重置数据 | 77 | //行操作 |
80 | reset(){ | 78 | handleRowClick(row, index) { |
81 | this.tableData = [ | 79 | console.log(this.tableData, "this.tableData"); |
82 | { | 80 | console.log(this.formData, "this.formData"); |
83 | cz:'+', | 81 | console.log(index); |
84 | ljzbsm:'', | 82 | if (row.cz == "+") { |
85 | zdybsm:'', | 83 | let temp = JSON.parse(JSON.stringify(this.formData)); |
86 | qsc:'', | 84 | temp.cz = "-"; |
87 | jsc:'', | 85 | this.tableData.push(temp); |
88 | mchs:'', | 86 | } else { |
89 | } | 87 | this.tableData.splice(index, 1); |
90 | ] | 88 | } |
91 | } | 89 | }, |
92 | }, | 90 | onSave(bsm) { |
93 | computed: {}, | 91 | insertChInfo(this.tableData).then((res) => { |
94 | watch: {}, | 92 | if (res.code === 200) { |
95 | } | 93 | this.$message.success("保存成功"); |
94 | //更新树结构数据 | ||
95 | console.log(this); | ||
96 | this.$parent.$parent.getLpbMenuTree(bsm); | ||
97 | //关闭弹框 | ||
98 | this.$parent.$parent.closeDaialog(); | ||
99 | } | ||
100 | }); | ||
101 | }, | ||
102 | //重置数据 | ||
103 | reset() { | ||
104 | this.tableData = [ | ||
105 | { | ||
106 | cz: "+", | ||
107 | ljzbsm: "", | ||
108 | zdybsm: "", | ||
109 | qsc: "", | ||
110 | jsc: "", | ||
111 | mchs: "", | ||
112 | }, | ||
113 | ]; | ||
114 | }, | ||
115 | }, | ||
116 | computed: {}, | ||
117 | watch: { | ||
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; |
102 | margin: 0; | 170 | margin: 0; |
103 | line-height: 20px; | 171 | line-height: 20px; |
104 | outline: none; | 172 | outline: none; |
105 | border: none; | 173 | border: none; |
106 | color: #606764; | 174 | color: #606764; |
107 | overflow: visible; | 175 | overflow: visible; |
108 | cursor: text; | 176 | cursor: text; |
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> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
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 | <tbody> | 5 | border="1" |
6 | <tr height="30"> | 6 | width="100%" |
7 | <td colspan="12" align="center" ><font size="4">逻辑幢基本信息</font></td> | 7 | cellspacing="0" |
8 | </tr> | 8 | cellpadding="0" |
9 | <tr height="30"> | 9 | class="hTable" |
10 | <td colspan="2" align="center" >逻辑幢号</td> | 10 | > |
11 | <td colspan="4" > | 11 | <tbody> |
12 | <el-input v-model="form.ljzh"></el-input> | 12 | <tr height="30"> |
13 | </td> | 13 | <td colspan="12" align="center"> |
14 | <td colspan="2" align="center" >自然幢号</td> | 14 | <font size="4">逻辑幢基本信息</font> |
15 | <td colspan="4" > | 15 | </td> |
16 | <el-input v-model="form.zrzh"></el-input> | 16 | </tr> |
17 | </td> | 17 | <tr height="30"> |
18 | </tr> | 18 | <td colspan="2" align="center">逻辑幢号</td> |
19 | <tr height="30"> | 19 | <td colspan="4"> |
20 | <td colspan="2" align="center" >逻辑幢名称</td> | 20 | <el-input v-model="form.ljzh"></el-input> |
21 | <td colspan="4" > | 21 | </td> |
22 | <el-input v-model="form.ljzmc"></el-input> | 22 | <td colspan="2" align="center">自然幢号</td> |
23 | </td> | 23 | <td colspan="4"> |
24 | <td colspan="2" align="center" >不动产单元号</td> | 24 | <el-input v-model="form.zrzh"></el-input> |
25 | <td colspan="4" > | 25 | </td> |
26 | <el-input v-model="form.bdcdyh" style="width: 70%"></el-input> | 26 | </tr> |
27 | <el-button @click.prevent="" size="mini" type="primary" style="width:25%;margin-left:3%">生成</el-button> | 27 | <tr height="30"> |
28 | </td> | 28 | <td colspan="2" align="center">逻辑幢名称</td> |
29 | </tr> | 29 | <td colspan="4"> |
30 | <el-input v-model="form.ljzmc"></el-input> | ||
31 | </td> | ||
32 | <td colspan="2" align="center">不动产单元号</td> | ||
33 | <td colspan="4"> | ||
34 | <el-input v-model="form.bdcdyh" style="width: 70%"></el-input> | ||
35 | <el-button | ||
36 | @click.prevent="" | ||
37 | size="mini" | ||
38 | type="primary" | ||
39 | style="width:25%;margin-left:3%" | ||
40 | >生成</el-button | ||
41 | > | ||
42 | </td> | ||
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="选择日期" |
43 | </el-date-picker> | 57 | > |
44 | </td> | 58 | </el-date-picker> |
45 | </tr> | 59 | </td> |
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 | ||
95 | <tr | ||
96 | height="30" | ||
97 | v-for="(item1, index) in form.ytList" | ||
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 | > | ||
113 | <span>用途</span> | ||
114 | </td> | ||
115 | <td colspan="1" align="center"> | ||
116 | <span @click="deleteYtInfo(index)">删除</span> | ||
117 | </td> | ||
118 | <td colspan="9"> | ||
119 | <el-select v-model="item1.fwytzdbsm" placeholder="请选择"> | ||
120 | <el-option | ||
121 | v-for="item in $store.state.tdytList" | ||
122 | :key="item.bsm" | ||
123 | :label="item.mc" | ||
124 | :value="item.bsm" | ||
125 | > | ||
126 | </el-option> | ||
127 | </el-select> | ||
128 | </td> | ||
129 | </tr> | ||
80 | 130 | ||
81 | <tr height="30" v-for="(item1,index) in form.ytList" :key="'yt'+index"> | 131 | <tr |
82 | <td colspan="2" v-if="index===0" :rowspan="ytTitleRowspan" align="center" > | 132 | height="30" |
83 | <el-button type="primary" size="mini" style="margin-right: 10px" @click="addYtInfo">添加</el-button> | 133 | v-for="(item1, index) in form.fwjgList" |
84 | <span>用途</span> | 134 | :key="'jg' + index" |
85 | </td> | 135 | > |
86 | <td colspan="1" align="center" > | 136 | <td |
87 | <span @click="deleteYtInfo(index)">删除</span> | 137 | colspan="2" |
88 | </td> | 138 | v-if="index === 0" |
89 | <td colspan="9" > | 139 | :rowspan="fwjgTitleRowspan" |
90 | <el-select v-model="item1.fwytzdbsm" placeholder="请选择" > | 140 | align="center" |
91 | <el-option | 141 | > |
92 | v-for="item in $store.state.tdytList" | 142 | <el-button |
93 | :key="item.bsm" | 143 | type="primary" |
94 | :label="item.mc" | 144 | size="mini" |
95 | :value="item.bsm"> | 145 | style="margin-right: 10px" |
96 | </el-option> | 146 | @click="addFwjgInfo" |
97 | </el-select> | 147 | >添加</el-button |
98 | </td> | 148 | > |
99 | </tr> | 149 | <span>房屋结构</span> |
150 | </td> | ||
151 | <td colspan="1" align="center"> | ||
152 | <span @click="deleteFwjgInfo(index)">删除</span> | ||
153 | </td> | ||
154 | <td colspan="9"> | ||
155 | <el-select v-model="item1.fwjgzdbsm" placeholder="请选择"> | ||
156 | <el-option | ||
157 | v-for="item in $store.state.jgOptions" | ||
158 | :key="item.bsm" | ||
159 | :label="item.mc" | ||
160 | :value="item.bsm" | ||
161 | > | ||
162 | </el-option> | ||
163 | </el-select> | ||
164 | </td> | ||
165 | </tr> | ||
100 | 166 | ||
101 | <tr height="30" v-for="(item1,index) in form.fwjgList" :key="'jg'+index"> | 167 | <tr height="30"> |
102 | <td colspan="2" v-if="index===0" :rowspan="fwjgTitleRowspan" align="center" > | 168 | <td colspan="2" align="center">地下层数</td> |
103 | <el-button type="primary" size="mini" style="margin-right: 10px" @click="addFwjgInfo">添加</el-button> | 169 | <td colspan="4"> |
104 | <span>房屋结构</span> | 170 | <el-input v-model="form.dxcs"></el-input> |
105 | </td> | 171 | </td> |
106 | <td colspan="1" align="center" > | 172 | <td colspan="2" align="center">地上层数</td> |
107 | <span @click="deleteFwjgInfo(index)">删除</span> | 173 | <td colspan="4"> |
108 | </td> | 174 | <el-input v-model="form.dscs"></el-input> |
109 | <td colspan="9" > | 175 | </td> |
110 | <el-select v-model="item1.fwjgzdbsm" placeholder="请选择" > | 176 | </tr> |
111 | <el-option | ||
112 | v-for="item in $store.state.jgOptions" | ||
113 | :key="item.bsm" | ||
114 | :label="item.mc" | ||
115 | :value="item.bsm"> | ||
116 | </el-option> | ||
117 | </el-select> | ||
118 | </td> | ||
119 | </tr> | ||
120 | 177 | ||
121 | <tr height="30"> | 178 | <tr height="30"> |
122 | <td colspan="2" align="center" >地下层数</td> | 179 | <td colspan="2" align="center">总层数</td> |
123 | <td colspan="4" > | 180 | <td colspan="4"> |
124 | <el-input v-model="form.dxcs"></el-input> | 181 | <el-input v-model="form.zcs"></el-input> |
125 | </td> | 182 | </td> |
126 | <td colspan="2" align="center" >地上层数</td> | 183 | <td colspan="2" align="center">建筑物状态</td> |
127 | <td colspan="4" > | 184 | <td colspan="4"> |
128 | <el-input v-model="form.dscs"></el-input> | 185 | <el-input v-model="form.jzwzt"></el-input> |
129 | </td> | 186 | </td> |
130 | </tr> | 187 | </tr> |
131 | |||
132 | |||
133 | <tr height="30"> | ||
134 | <td colspan="2" align="center" >总层数</td> | ||
135 | <td colspan="4" > | ||
136 | <el-input v-model="form.zcs"></el-input> | ||
137 | </td> | ||
138 | <td colspan="2" align="center" >建筑物状态</td> | ||
139 | <td colspan="4" > | ||
140 | <el-input v-model="form.jzwzt"></el-input> | ||
141 | </td> | ||
142 | </tr> | ||
143 | |||
144 | |||
145 | <tr height="30"> | ||
146 | <td colspan="2" rowspan="2" align="center" > | ||
147 | <span>备注</span> | ||
148 | </td> | ||
149 | <td colspan="10" rowspan="2" > | ||
150 | <el-input v-model="form.bz" type="textarea"></el-input> | ||
151 | </td> | ||
152 | </tr> | ||
153 | <tr height="30"> | ||
154 | </tr> | ||
155 | |||
156 | </tbody> | ||
157 | </table> | ||
158 | </el-form> | ||
159 | </div> | ||
160 | 188 | ||
189 | <tr height="30"> | ||
190 | <td colspan="2" rowspan="2" align="center"> | ||
191 | <span>备注</span> | ||
192 | </td> | ||
193 | <td colspan="10" rowspan="2"> | ||
194 | <el-input v-model="form.bz" type="textarea"></el-input> | ||
195 | </td> | ||
196 | </tr> | ||
197 | <tr height="30"></tr> | ||
198 | </tbody> | ||
199 | </table> | ||
200 | </el-form> | ||
201 | </div> | ||
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:[{ | 231 | }, |
191 | fwjgzdbsm:'', //房屋结构字典标识码 | 232 | ], |
192 | glbsm:'', //关联标识码 | 233 | fwjgList: [ |
193 | sx:'', //顺序 | 234 | { |
194 | }], | 235 | fwjgzdbsm: "", //房屋结构字典标识码 |
195 | dxcs:'', //地下层数 | 236 | glbsm: "", //关联标识码 |
196 | dscs:'', //地上层数 | 237 | sx: "", //顺序 |
197 | zcs:'', //总层数 | 238 | }, |
198 | jzwzt:'', //建筑物状态 | 239 | ], |
199 | }, | 240 | dxcs: "", //地下层数 |
200 | value: '', | 241 | dscs: "", //地上层数 |
201 | ytTitleRowspan:1, //用途的单元格垂直合并数量 | 242 | zcs: "", //总层数 |
202 | fwjgTitleRowspan:1, //房屋结构的单元格垂直合并数量 | 243 | jzwzt: "", //建筑物状态 |
203 | } | 244 | }, |
204 | }, | 245 | value: "", |
205 | methods: { | 246 | ytTitleRowspan: 1, //用途的单元格垂直合并数量 |
206 | addYtInfo(){ | 247 | fwjgTitleRowspan: 1, //房屋结构的单元格垂直合并数量 |
207 | this.form.ytList.push({ | 248 | }; |
208 | glbsm:'', | 249 | }, |
209 | fwytzdbsm:'', | 250 | methods: { |
210 | sx:'', | 251 | addYtInfo() { |
211 | }); | 252 | this.form.ytList.push({ |
212 | this.ytTitleRowspan=this.form.ytList.length; | 253 | glbsm: "", |
213 | }, | 254 | fwytzdbsm: "", |
214 | deleteYtInfo(index){ | 255 | sx: "", |
215 | if(this.form.ytList.length<=1){ | 256 | }); |
216 | this.$message({ | 257 | this.ytTitleRowspan = this.form.ytList.length; |
217 | message: '不能删除,最少含有一条用途信息', | 258 | }, |
218 | type: 'warning' | 259 | deleteYtInfo(index) { |
219 | }); | 260 | if (this.form.ytList.length <= 1) { |
220 | }else{ | 261 | this.$message({ |
221 | this.form.ytList.splice(index,1); | 262 | message: "不能删除,最少含有一条用途信息", |
222 | this.ytTitleRowspan=this.form.ytList.length; | 263 | type: "warning", |
223 | } | 264 | }); |
224 | }, | 265 | } else { |
225 | addFwjgInfo(){ | 266 | this.form.ytList.splice(index, 1); |
226 | this.form.fwjgList.push({ | 267 | this.ytTitleRowspan = this.form.ytList.length; |
227 | fwjgzdbsm:'', //房屋结构字典标识码 | 268 | } |
228 | glbsm:'', //关联标识码 | 269 | }, |
229 | sx:'', //顺序 | 270 | addFwjgInfo() { |
230 | }); | 271 | this.form.fwjgList.push({ |
231 | this.fwjgTitleRowspan=this.form.fwjgList.length; | 272 | fwjgzdbsm: "", //房屋结构字典标识码 |
232 | }, | 273 | glbsm: "", //关联标识码 |
233 | //重置数据 | 274 | sx: "", //顺序 |
234 | reset(){ | 275 | }); |
235 | this.form = { | 276 | this.fwjgTitleRowspan = this.form.fwjgList.length; |
236 | zrzbsm:'', | 277 | }, |
237 | ljzh:'', //逻辑幢号 | 278 | //重置数据 |
238 | zrzh:'', //自然幢号 | 279 | reset() { |
239 | ljzmc:'', //逻辑幢顺序号 | 280 | this.form = { |
240 | bdcdyh:'', //不动产单元号 | 281 | zrzbsm: "", |
241 | mph:'', //门牌号 | 282 | ljzh: "", //逻辑幢号 |
242 | jgrq:'', //竣工日期 | 283 | zrzh: "", //自然幢号 |
243 | ycjzmj:'', //预测建筑面积 | 284 | ljzmc: "", //逻辑幢顺序号 |
244 | scjzmj:'', //实测建筑面积 | 285 | bdcdyh: "", //不动产单元号 |
245 | ycdxmj:'', //预测地下面积 | 286 | mph: "", //门牌号 |
246 | scdxmj:'', //实测地下面积 | 287 | jgrq: "", //竣工日期 |
247 | ycqtmj:'', //预测其他面积 | 288 | ycjzmj: "", //预测建筑面积 |
248 | scqymj:'', //实测其他面积 | 289 | scjzmj: "", //实测建筑面积 |
249 | ytList:[{ | 290 | ycdxmj: "", //预测地下面积 |
250 | glbsm:'', //关联标识码 | 291 | scdxmj: "", //实测地下面积 |
251 | fwytzdbsm:'', //房屋用途字典标识码 | 292 | ycqtmj: "", //预测其他面积 |
252 | sx:'', //顺序 | 293 | scqymj: "", //实测其他面积 |
253 | }], | 294 | ytList: [ |
254 | fwjgList:[{ | 295 | { |
255 | fwjgzdbsm:'', //房屋结构字典标识码 | 296 | glbsm: "", //关联标识码 |
256 | glbsm:'', //关联标识码 | 297 | fwytzdbsm: "", //房屋用途字典标识码 |
257 | sx:'', //顺序 | 298 | sx: "", //顺序 |
258 | }], | 299 | }, |
259 | dxcs:'', //地下层数 | 300 | ], |
260 | dscs:'', //地上层数 | 301 | fwjgList: [ |
261 | zcs:'', //总层数 | 302 | { |
262 | jzwzt:'', //建筑物状态 | 303 | fwjgzdbsm: "", //房屋结构字典标识码 |
263 | } | 304 | glbsm: "", //关联标识码 |
264 | }, | 305 | sx: "", //顺序 |
265 | deleteFwjgInfo(index){ | 306 | }, |
266 | if(this.form.fwjgList.length<=1){ | 307 | ], |
267 | this.$message({ | 308 | dxcs: "", //地下层数 |
268 | message: '不能删除,最少含有一条房屋结构信息', | 309 | dscs: "", //地上层数 |
269 | type: 'warning' | 310 | zcs: "", //总层数 |
270 | }); | 311 | jzwzt: "", //建筑物状态 |
271 | }else{ | 312 | }; |
272 | this.form.fwjgList.splice(index,1); | 313 | }, |
273 | this.fwjgTitleRowspan=this.form.fwjgList.length; | 314 | deleteFwjgInfo(index) { |
274 | } | 315 | if (this.form.fwjgList.length <= 1) { |
275 | }, | 316 | this.$message({ |
276 | onSave(data,bsm){ | 317 | message: "不能删除,最少含有一条房屋结构信息", |
277 | //自然幢标识码 | 318 | type: "warning", |
278 | this.form.zrzbsm= bsm; | 319 | }); |
279 | insertLjzInfo(this.form).then((res)=>{ | 320 | } else { |
280 | if(res.code===200){ | 321 | this.form.fwjgList.splice(index, 1); |
281 | this.$message.success("保存成功") | 322 | this.fwjgTitleRowspan = this.form.fwjgList.length; |
282 | //更新树结构数据 | 323 | } |
283 | console.log(this); | 324 | }, |
284 | this.$parent.$parent.getLpbMenuTree(bsm); | 325 | onSave(data, bsm) { |
285 | //关闭弹框 | 326 | debugger |
286 | this.$parent.$parent.closeDaialog() | 327 | //自然幢标识码 |
287 | } | 328 | this.form.zrzbsm = bsm; |
288 | }) | 329 | insertLjzInfo(this.form).then((res) => { |
289 | }, | 330 | if (res.code === 200) { |
290 | onSubmit(){ | 331 | this.$message.success("保存成功"); |
291 | console.log(this.form) | 332 | //更新树结构数据 |
292 | } | 333 | console.log(this); |
293 | }, | 334 | this.$parent.$parent.getLpbMenuTree(bsm); |
294 | created() { | 335 | //关闭弹框 |
295 | 336 | this.$parent.$parent.closeDaialog(); | |
296 | }, | 337 | } |
297 | mounted() { | 338 | }); |
298 | 339 | }, | |
299 | } | 340 | onSubmit() { |
300 | } | 341 | console.log(this.form); |
342 | }, | ||
343 | }, | ||
344 | created() {}, | ||
345 | mounted() {}, | ||
346 | }; | ||
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 | |||
308 | /deep/.el-input__inner{ | ||
309 | width: 100%; | ||
310 | border: 0; | ||
311 | } | ||
312 | 353 | ||
313 | /deep/textarea{ | 354 | /deep/.el-input__inner { |
314 | width: 100%; | 355 | width: 100%; |
315 | border: 0; | 356 | border: 0; |
316 | } | 357 | } |
317 | 358 | ||
359 | /deep/textarea { | ||
360 | width: 100%; | ||
361 | border: 0; | ||
362 | } | ||
318 | 363 | ||
319 | .el-form-item{ | 364 | .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 | } | 382 | } |
338 | } | 383 | } |
339 | 384 | ||
340 | table{ | 385 | table { |
341 | font-size: 14px; | 386 | font-size: 14px; |
342 | } | 387 | } |
343 | 388 | ||
344 | .hTable{ | ||
345 | margin-top: 10px; | ||
346 | } | ||
347 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
389 | .hTable { | ||
390 | margin-top: 10px; | ||
391 | } | ||
392 | </style> | ... | ... |
-
Please register or sign in to post a comment