ff02ed10 by zhaoqian

逻辑幢的编辑

1 parent 209cb582
1 import request from '@/plugin/axios'
2
3 /**
4 * 查询逻辑幢基本信息
5 */
6 export function getQjLjzDetailById(data) {
7 return request({
8 url: '/system/qjLjz/getQjLjzDetailById',
9 method: 'get',
10 params: {
11 id: data,
12 }
13 })
14 }
15
16 /**
17 * 更新保存逻辑幢基本信息
18 */
19 export function updateQjLjz(data) {
20 return request({
21 url: '/system/qjLjz/updateQjLjz',
22 method: 'put',
23 data: data,
24 })
25 }
26
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
315 315
316 export default { 316 export default {
317 name: "", 317 name: "",
318 inject: ['getTreeByS'], 318 inject: ['getTreeByS','getRightTree'],
319 components: {zdQueryData,dzQueryData,hfghb}, 319 components: {zdQueryData,dzQueryData,hfghb},
320 props: {}, 320 props: {},
321 data() { 321 data() {
...@@ -634,6 +634,7 @@ ...@@ -634,6 +634,7 @@
634 } 634 }
635 saveDzFg(this.dzFghData).then(res => { 635 saveDzFg(this.dzFghData).then(res => {
636 if (res.success) { 636 if (res.success) {
637 this.getRightTree(res.result,'0,1,2');
637 Message.success("保存成功") 638 Message.success("保存成功")
638 //TO DO 多幢分割完成后的操作 639 //TO DO 多幢分割完成后的操作
639 } else { 640 } else {
......
...@@ -109,15 +109,18 @@ ...@@ -109,15 +109,18 @@
109 <span @click="deleteYtInfo(index)">删除</span> 109 <span @click="deleteYtInfo(index)">删除</span>
110 </td> 110 </td>
111 <td colspan="9"> 111 <td colspan="9">
112 <el-select v-model="item1.fwytzdbsm" placeholder="请选择"> 112 <el-select-tree style="width:100%"
113 <el-option 113 ref="yt"
114 v-for="item in $store.state.tdytList" 114 v-if="show"
115 :key="item.bsm" 115 :default-expand-all="defaultExpandAll"
116 :label="item.mc" 116 :multiple="multiple"
117 :value="item.bsm" 117 :placeholder="placeholder"
118 > 118 :data="$store.state.fwytList"
119 </el-option> 119 :props="treeProps"
120 </el-select> 120 :check-strictly="checkStrictly"
121 :clearable="clearable"
122 v-model="item1.fwytzdbsm"
123 ></el-select-tree>
121 </td> 124 </td>
122 </tr> 125 </tr>
123 126
...@@ -145,15 +148,18 @@ ...@@ -145,15 +148,18 @@
145 <span @click="deleteFwjgInfo(index)">删除</span> 148 <span @click="deleteFwjgInfo(index)">删除</span>
146 </td> 149 </td>
147 <td colspan="9"> 150 <td colspan="9">
148 <el-select v-model="item1.fwjgzdbsm" placeholder="请选择"> 151 <el-select-tree style="width:100%"
149 <el-option 152 ref="yt"
150 v-for="item in $store.state.jgOptions" 153 v-if="show"
151 :key="item.bsm" 154 :default-expand-all="defaultExpandAll"
152 :label="item.mc" 155 :multiple="multiple"
153 :value="item.bsm" 156 :placeholder="placeholder"
154 > 157 :data="$store.state.jgOptions"
155 </el-option> 158 :props="treeProps"
156 </el-select> 159 :check-strictly="checkStrictly"
160 :clearable="clearable"
161 v-model="item1.fwjgzdbsm"
162 ></el-select-tree>
157 </td> 163 </td>
158 </tr> 164 </tr>
159 165
...@@ -192,6 +198,7 @@ ...@@ -192,6 +198,7 @@
192 198
193 <script> 199 <script>
194 import { insertLjzInfo } from "@api/lpb"; 200 import { insertLjzInfo } from "@api/lpb";
201 import { getQjLjzDetailById,updateQjLjz } from "@api/ljz";
195 import { formdate } from "@libs/function"; 202 import { formdate } from "@libs/function";
196 export default { 203 export default {
197 name: "ljz", 204 name: "ljz",
...@@ -204,6 +211,21 @@ export default { ...@@ -204,6 +211,21 @@ export default {
204 }, 211 },
205 data() { 212 data() {
206 return { 213 return {
214
215 //树型结构
216 show:true,
217 clearable: true,
218 defaultExpandAll: true,
219 multiple: false,
220 placeholder: '请选择',
221 disabled: false,
222 checkStrictly: true,
223 treeProps: {
224 value: 'bsm',
225 children: 'children',
226 label: 'mc'
227 },
228
207 form: { 229 form: {
208 zrzbsm: "", 230 zrzbsm: "",
209 ljzh: "", //逻辑幢号 231 ljzh: "", //逻辑幢号
...@@ -336,6 +358,11 @@ export default { ...@@ -336,6 +358,11 @@ export default {
336 }else{ 358 }else{
337 //逻辑幢更新接口调用 TODO 359 //逻辑幢更新接口调用 TODO
338 console.log('保存'); 360 console.log('保存');
361 updateQjLjz(this.form).then((res)=>{
362 if(res.code === 200){
363 this.$message.success("修改成功")
364 }
365 })
339 } 366 }
340 }, 367 },
341 onSubmit() { 368 onSubmit() {
...@@ -343,8 +370,48 @@ export default { ...@@ -343,8 +370,48 @@ export default {
343 }, 370 },
344 //根据逻辑幢bsm查询逻辑幢信息 371 //根据逻辑幢bsm查询逻辑幢信息
345 getLjzInfo(bsm){ 372 getLjzInfo(bsm){
346 //逻辑幢信息查询接口调用 bsm为逻辑幢bsm TODO 373 //逻辑幢信息查询接口调用 bsm为逻辑幢bsm
347 this.form = {zrzh:'11111111'}; 374 getQjLjzDetailById(bsm).then((res)=>{
375 if(res.code === 200){
376 this.form = res.result;
377 this.form.zrzh = this.$store.state.zrzh;
378 this.form.fwjgList= [
379 {
380 fwjgzdbsm: "", //房屋结构字典标识码
381 glbsm: "", //关联标识码
382 sx: "", //顺序
383 },
384 ];
385 this.form.ytList= [
386 {
387 glbsm: "", //关联标识码
388 fwytzdbsm: "", //房屋用途字典标识码
389 sx: "", //顺序
390 },
391 ];
392 if(this.form.qjfwjg.length>0){
393 this.form.fwjgList= [];
394 for(let i =0;i<this.form.qjfwjg.length;i++){
395 this.form.fwjgList.push({
396 fwjgzdbsm: this.form.qjfwjg[i].fwjgzdbsm, //房屋结构字典标识码
397 glbsm: this.form.qjfwjg[i].glbsm, //关联标识码
398 sx: this.form.qjfwjg[i].sx, //顺序
399 })
400 }
401 }
402 if(this.form.qjfwyt.length>0){
403 this.form.ytList= [];
404 for(let i =0;i<this.form.qjfwyt.length;i++){
405 this.form.ytList.push({
406 fwytzdbsm: this.form.qjfwyt[i].fwytzdbsm, //房屋结构字典标识码
407 glbsm: this.form.qjfwyt[i].glbsm, //关联标识码
408 sx: this.form.qjfwyt[i].sx, //顺序
409 })
410 }
411 }
412 console.log(JSON.stringify(this.form)+":this.form")
413 }
414 })
348 this.$forceUpdate(); 415 this.$forceUpdate();
349 } 416 }
350 }, 417 },
......