Merge remote-tracking branch 'origin/master'
Showing
5 changed files
with
75 additions
and
60 deletions
| ... | @@ -429,7 +429,6 @@ export default { | ... | @@ -429,7 +429,6 @@ export default { |
| 429 | }, | 429 | }, |
| 430 | created() {}, | 430 | created() {}, |
| 431 | mounted(){ | 431 | mounted(){ |
| 432 | console.log(this.formData,'formData'); | ||
| 433 | }, | 432 | }, |
| 434 | methods: { | 433 | methods: { |
| 435 | startTime(index,childIndex){ | 434 | startTime(index,childIndex){ |
| ... | @@ -452,7 +451,6 @@ export default { | ... | @@ -452,7 +451,6 @@ export default { |
| 452 | } | 451 | } |
| 453 | }, | 452 | }, |
| 454 | sumTime(index,childIndex,syqx,e){ | 453 | sumTime(index,childIndex,syqx,e){ |
| 455 | console.log(e,'eeee'); | ||
| 456 | this.$refs.syqx.forEach((item,index)=>{ | 454 | this.$refs.syqx.forEach((item,index)=>{ |
| 457 | if(item.value == syqx){ | 455 | if(item.value == syqx){ |
| 458 | this.$refs.tdsyjssj[index].$el.style.border="" | 456 | this.$refs.tdsyjssj[index].$el.style.border="" |
| ... | @@ -567,13 +565,10 @@ export default { | ... | @@ -567,13 +565,10 @@ export default { |
| 567 | }); | 565 | }); |
| 568 | }, | 566 | }, |
| 569 | getQlxzDataList() { | 567 | getQlxzDataList() { |
| 570 | console.log(this.countList,'this.countList'); | ||
| 571 | return this.countList; | 568 | return this.countList; |
| 572 | }, | 569 | }, |
| 573 | getRules(){ | 570 | getRules(){ |
| 574 | let rules = []; | 571 | let rules = []; |
| 575 | console.log(this.$refs.tdsyqssj,'this.$refs.qlxzdm'); | ||
| 576 | console.log(this.countList,'this.countList'); | ||
| 577 | let temp = 0; | 572 | let temp = 0; |
| 578 | this.countList.forEach((item,index)=>{ | 573 | this.countList.forEach((item,index)=>{ |
| 579 | rules.push({ | 574 | rules.push({ |
| ... | @@ -599,9 +594,6 @@ export default { | ... | @@ -599,9 +594,6 @@ export default { |
| 599 | rule: /^\s*$/g, //非空 | 594 | rule: /^\s*$/g, //非空 |
| 600 | }, | 595 | }, |
| 601 | ) | 596 | ) |
| 602 | if (ind == item.list.length-1) { | ||
| 603 | temp += item.list.length; | ||
| 604 | } | ||
| 605 | if(this.hasSyqx){ | 597 | if(this.hasSyqx){ |
| 606 | rules.push( | 598 | rules.push( |
| 607 | { | 599 | { |
| ... | @@ -613,6 +605,9 @@ export default { | ... | @@ -613,6 +605,9 @@ export default { |
| 613 | } | 605 | } |
| 614 | ) | 606 | ) |
| 615 | } | 607 | } |
| 608 | if (ind == item.list.length-1) { | ||
| 609 | temp += item.list.length; | ||
| 610 | } | ||
| 616 | }) | 611 | }) |
| 617 | }) | 612 | }) |
| 618 | this.rulesResult = true; | 613 | this.rulesResult = true; |
| ... | @@ -664,6 +659,18 @@ export default { | ... | @@ -664,6 +659,18 @@ export default { |
| 664 | 659 | ||
| 665 | // }, | 660 | // }, |
| 666 | }, | 661 | }, |
| 662 | watch:{ | ||
| 663 | countList: { | ||
| 664 | handler : function (newVal, oldVal) { | ||
| 665 | newVal.forEach((item,ind)=>{ | ||
| 666 | if(item.qlxzdm != ''){ | ||
| 667 | this.$refs.qlxzdm[ind].$el.style.border="" | ||
| 668 | } | ||
| 669 | }) | ||
| 670 | }, | ||
| 671 | deep:true | ||
| 672 | } , | ||
| 673 | } | ||
| 667 | }; | 674 | }; |
| 668 | </script> | 675 | </script> |
| 669 | <style lang="less"> | 676 | <style lang="less"> | ... | ... |
| ... | @@ -254,6 +254,8 @@ export default { | ... | @@ -254,6 +254,8 @@ export default { |
| 254 | this.$store.state.zdbsm = this.zdData.zdbsm; | 254 | this.$store.state.zdbsm = this.zdData.zdbsm; |
| 255 | if(this.zdData.type == 'dz'){ | 255 | if(this.zdData.type == 'dz'){ |
| 256 | this.$store.state.dzbsm = this.zdData.bsm; | 256 | this.$store.state.dzbsm = this.zdData.bsm; |
| 257 | }else{ | ||
| 258 | this.$store.state.dzbsm = ''; | ||
| 257 | } | 259 | } |
| 258 | }, | 260 | }, |
| 259 | //关闭添加定着物弹框 | 261 | //关闭添加定着物弹框 | ... | ... |
| ... | @@ -290,8 +290,9 @@ export default { | ... | @@ -290,8 +290,9 @@ export default { |
| 290 | //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm | 290 | //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm |
| 291 | this.$refs['ruleForm1'].validate((valid) => { | 291 | this.$refs['ruleForm1'].validate((valid) => { |
| 292 | if (valid) { | 292 | if (valid) { |
| 293 | this.ruleForm1.zdbsm = this.$store.state.zdbsm != '' ? this.$store.state.zdbsm : ''; | 293 | |
| 294 | this.ruleForm1.dzbsm = this.$store.state.dzbsm != '' ? this.$store.state.dzbsm : ''; | 294 | this.ruleForm1.zdbsm = this.auth ? this.$store.state.zdbsm : ''; |
| 295 | this.ruleForm1.dzbsm = this.auth ? this.$store.state.dzbsm : ''; | ||
| 295 | insertZrzjbxx(this.ruleForm1) | 296 | insertZrzjbxx(this.ruleForm1) |
| 296 | .then((res) => { | 297 | .then((res) => { |
| 297 | if (res.code == "200") { | 298 | if (res.code == "200") { | ... | ... |
| ... | @@ -627,7 +627,6 @@ export default { | ... | @@ -627,7 +627,6 @@ export default { |
| 627 | updateZDxx(formData) { | 627 | updateZDxx(formData) { |
| 628 | //获取权利性质数据 | 628 | //获取权利性质数据 |
| 629 | this.formData.list = this.$refs.qlxzModule.getQlxzDataList(); | 629 | this.formData.list = this.$refs.qlxzModule.getQlxzDataList(); |
| 630 | this.$refs.qlxzModule.getRules(); | ||
| 631 | console.log(this.$refs.qlxzModule.getRulesResult(),'this.$refs.qlxzModule.getRules()'); | 630 | console.log(this.$refs.qlxzModule.getRulesResult(),'this.$refs.qlxzModule.getRules()'); |
| 632 | //判断容密高是否为区间值,如果是区间值,则将输入框的值赋予 | 631 | //判断容密高是否为区间值,如果是区间值,则将输入框的值赋予 |
| 633 | this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl; | 632 | this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl; |
| ... | @@ -689,14 +688,8 @@ export default { | ... | @@ -689,14 +688,8 @@ export default { |
| 689 | rule: /^\s*$/g, //非空 | 688 | rule: /^\s*$/g, //非空 |
| 690 | }, | 689 | }, |
| 691 | ] | 690 | ] |
| 692 | //判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致) | ||
| 693 | if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){ | ||
| 694 | this.$message({ | ||
| 695 | message: '宗地代码或不动产单元号有误,请核对后再试一次', | ||
| 696 | type: "warning", | ||
| 697 | }); | ||
| 698 | }else{ | ||
| 699 | // console.log(this.rules,'rules'); | 691 | // console.log(this.rules,'rules'); |
| 692 | this.$refs.qlxzModule.getRules(); | ||
| 700 | let flag = true; | 693 | let flag = true; |
| 701 | this.rules.forEach(item=>{ | 694 | this.rules.forEach(item=>{ |
| 702 | if(item.rule.test(item.data) || item.data == null){ | 695 | if(item.rule.test(item.data) || item.data == null){ |
| ... | @@ -717,47 +710,55 @@ export default { | ... | @@ -717,47 +710,55 @@ export default { |
| 717 | } | 710 | } |
| 718 | }) | 711 | }) |
| 719 | this.$nextTick(()=>{ | 712 | this.$nextTick(()=>{ |
| 720 | if(flag){ | 713 | if(flag && this.$refs.qlxzModule.getRulesResult()){ |
| 721 | //宗地面积处理 | 714 | //宗地面积处理 |
| 722 | // console.log(this.formData.zdmj,'this.formData.zdmj'); | 715 | // console.log(this.formData.zdmj,'this.formData.zdmj'); |
| 723 | // this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'') | 716 | // this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'') |
| 724 | updateQjZdjbxx(this.formData) | 717 | //判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致) |
| 725 | .then((res) => { | 718 | if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){ |
| 726 | if (res.code == 200) { | 719 | this.$message({ |
| 727 | console.log(res); | 720 | message: '宗地代码或不动产单元号有误,请核对后再试一次', |
| 728 | this.$message({ | 721 | type: "warning", |
| 729 | message: '保存成功', | 722 | }); |
| 730 | type: "success", | 723 | }else{ |
| 731 | }); | 724 | updateQjZdjbxx(this.formData) |
| 732 | // 保存成功再次查询 | 725 | .then((res) => { |
| 733 | this.getZdjbxxData(this.$store.state.zdbsm); | 726 | if (res.code == 200) { |
| 734 | } else { | 727 | console.log(res); |
| 735 | this.$message({ | 728 | this.$message({ |
| 736 | message: res.message, | 729 | message: '保存成功', |
| 737 | type: "warning", | 730 | type: "success", |
| 738 | }); | 731 | }); |
| 739 | } | 732 | // 保存成功再次查询 |
| 740 | }) | 733 | this.getZdjbxxData(this.$store.state.zdbsm); |
| 741 | .catch((error) => {}); | 734 | } else { |
| 742 | //保存到空间库里面 | 735 | this.$message({ |
| 743 | var self = this; | 736 | message: res.message, |
| 744 | for(var key in this.geoAttributes){ | 737 | type: "warning", |
| 745 | if(key == "BSM"){ | 738 | }); |
| 746 | self.geoAttributes[key] = this.$store.state.zdbsm | 739 | } |
| 747 | }else if(key == 'QLSDFS'){ | ||
| 748 | var qlsdfsList = self.$store.state.qlsdfsList,value = self.formData.qlsdfs; | ||
| 749 | var qlsdfs = qlsdfsList.filter(item => { | ||
| 750 | return item.bsm == value; | ||
| 751 | }) | 740 | }) |
| 752 | self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc:""; | 741 | .catch((error) => {}); |
| 753 | }else { | 742 | //保存到空间库里面 |
| 754 | var formKay = key.toLowerCase(); | 743 | var self = this; |
| 755 | self.geoAttributes[key] = self.formData[formKay]; | 744 | for(var key in this.geoAttributes){ |
| 745 | if(key == "BSM"){ | ||
| 746 | self.geoAttributes[key] = this.$store.state.zdbsm | ||
| 747 | }else if(key == 'QLSDFS'){ | ||
| 748 | var qlsdfsList = self.$store.state.qlsdfsList,value = self.formData.qlsdfs; | ||
| 749 | var qlsdfs = qlsdfsList.filter(item => { | ||
| 750 | return item.bsm == value; | ||
| 751 | }) | ||
| 752 | self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc:""; | ||
| 753 | }else { | ||
| 754 | var formKay = key.toLowerCase(); | ||
| 755 | self.geoAttributes[key] = self.formData[formKay]; | ||
| 756 | } | ||
| 756 | } | 757 | } |
| 758 | self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) { | ||
| 759 | console.log("属性保存完成!!"); | ||
| 760 | }); | ||
| 757 | } | 761 | } |
| 758 | self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) { | ||
| 759 | console.log("属性保存完成!!"); | ||
| 760 | }); | ||
| 761 | }else{ | 762 | }else{ |
| 762 | this.$message({ | 763 | this.$message({ |
| 763 | // message: item.name+'不能为空', | 764 | // message: item.name+'不能为空', |
| ... | @@ -766,11 +767,6 @@ export default { | ... | @@ -766,11 +767,6 @@ export default { |
| 766 | }); | 767 | }); |
| 767 | } | 768 | } |
| 768 | }) | 769 | }) |
| 769 | |||
| 770 | |||
| 771 | } | ||
| 772 | |||
| 773 | |||
| 774 | 770 | ||
| 775 | }, | 771 | }, |
| 776 | inputBlur(e){ | 772 | inputBlur(e){ |
| ... | @@ -885,6 +881,16 @@ export default { | ... | @@ -885,6 +881,16 @@ export default { |
| 885 | zdbsm:function (val) { | 881 | zdbsm:function (val) { |
| 886 | this.getZdjbxxData(val) | 882 | this.getZdjbxxData(val) |
| 887 | this.curZdbsm = val; | 883 | this.curZdbsm = val; |
| 884 | }, | ||
| 885 | "formData.bdcdyh":function (val) { | ||
| 886 | if (val != '') { | ||
| 887 | this.$refs.bdcdyh.style.border = ''; | ||
| 888 | } | ||
| 889 | }, | ||
| 890 | "formData.zddm":function (val) { | ||
| 891 | if (val != '') { | ||
| 892 | this.$refs.zddm.style.border = ''; | ||
| 893 | } | ||
| 888 | } | 894 | } |
| 889 | }, | 895 | }, |
| 890 | }; | 896 | }; | ... | ... |
| ... | @@ -519,7 +519,6 @@ | ... | @@ -519,7 +519,6 @@ |
| 519 | this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList(); | 519 | this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList(); |
| 520 | this.$refs.qlxzModule.getRules(); | 520 | this.$refs.qlxzModule.getRules(); |
| 521 | let flag = true; | 521 | let flag = true; |
| 522 | console.log(this.rules,'this.rules'); | ||
| 523 | this.rules.forEach(item=>{ | 522 | this.rules.forEach(item=>{ |
| 524 | if(item.rule.test(item.data) || item.data == null){ | 523 | if(item.rule.test(item.data) || item.data == null){ |
| 525 | if(item.dom.$el){ | 524 | if(item.dom.$el){ |
| ... | @@ -534,7 +533,7 @@ | ... | @@ -534,7 +533,7 @@ |
| 534 | } | 533 | } |
| 535 | }) | 534 | }) |
| 536 | this.$nextTick(()=>{ | 535 | this.$nextTick(()=>{ |
| 537 | if (flag) { | 536 | if (flag && this.$refs.qlxzModule.getRulesResult()) { |
| 538 | if(this.form.zrzh.substring(0,19) != this.form.zddm || this.form.bdcdyh.substring(0,19) != this.form.zddm){ | 537 | if(this.form.zrzh.substring(0,19) != this.form.zddm || this.form.bdcdyh.substring(0,19) != this.form.zddm){ |
| 539 | this.$message({ | 538 | this.$message({ |
| 540 | message: '自然幢号或不动产单元号有误,请核对后再试一次', | 539 | message: '自然幢号或不动产单元号有误,请核对后再试一次', | ... | ... |
-
Please register or sign in to post a comment