dbff093e by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents afd2c3d3 d017add8
...@@ -329,12 +329,14 @@ ...@@ -329,12 +329,14 @@
329 type: String, 329 type: String,
330 default: "15vh", 330 default: "15vh",
331 }, 331 },
332 'bsm':String 332 bsm: {
333 type: String,
334 default: "",
335 },
333 }, 336 },
334 data() { 337 data() {
335 return { 338 return {
336 update:false, 339 update:false,
337 // bsm:'',
338 gyfs: '', 340 gyfs: '',
339 tableData: [], 341 tableData: [],
340 gyfsList:[], 342 gyfsList:[],
...@@ -499,7 +501,7 @@ ...@@ -499,7 +501,7 @@
499 updateQlrDlrFr(this.formData).then((res)=>{ 501 updateQlrDlrFr(this.formData).then((res)=>{
500 if(res.code===200){ 502 if(res.code===200){
501 this.$message.success("修改完成!"); 503 this.$message.success("修改完成!");
502 this.getQlrInfo(); 504 this.getQlrInfo(this.bsm);
503 this.update=false; 505 this.update=false;
504 this.dialogVisible = false; 506 this.dialogVisible = false;
505 } 507 }
...@@ -510,7 +512,7 @@ ...@@ -510,7 +512,7 @@
510 this.tableData.push(this.formData); 512 this.tableData.push(this.formData);
511 Object.assign(this.$data, this.$options.data()) 513 Object.assign(this.$data, this.$options.data())
512 this.dialogVisible = false; 514 this.dialogVisible = false;
513 this.getQlrInfo(); 515 this.getQlrInfo(this.bsm);
514 } 516 }
515 }) 517 })
516 } 518 }
...@@ -572,7 +574,7 @@ ...@@ -572,7 +574,7 @@
572 deleteQlrDlrFrByQlrbsm(qlrbsms).then((res)=>{ 574 deleteQlrDlrFrByQlrbsm(qlrbsms).then((res)=>{
573 if(res.code===200){ 575 if(res.code===200){
574 this.$message.success("删除完成!") 576 this.$message.success("删除完成!")
575 this.getQlrInfo(); 577 this.getQlrInfo(this.bsm);
576 } 578 }
577 }) 579 })
578 } else { 580 } else {
...@@ -614,8 +616,8 @@ ...@@ -614,8 +616,8 @@
614 }); 616 });
615 } 617 }
616 }, 618 },
617 getQlrInfo(){ 619 getQlrInfo(bsm){
618 getQlrInfoByGlbsm(this.bsm).then((res)=>{ 620 getQlrInfoByGlbsm(bsm).then((res)=>{
619 if(res.code){ 621 if(res.code){
620 if(res.result!=null){ 622 if(res.result!=null){
621 this.tableData=res.result; 623 this.tableData=res.result;
...@@ -633,7 +635,7 @@ ...@@ -633,7 +635,7 @@
633 this.gyfsList = this.$store.state.gyfsList; 635 this.gyfsList = this.$store.state.gyfsList;
634 }, 636 },
635 mounted() { 637 mounted() {
636 this.getQlrInfo(); 638 this.getQlrInfo(this.bsm);
637 if(this.$store.state.gyfsList.length>0){ 639 if(this.$store.state.gyfsList.length>0){
638 this.gyfs=this.$store.state.gyfsList[0].bsm; 640 this.gyfs=this.$store.state.gyfsList[0].bsm;
639 } 641 }
...@@ -711,7 +713,6 @@ ...@@ -711,7 +713,6 @@
711 this.$refs.zjzlbsm.$el.style.border = ''; 713 this.$refs.zjzlbsm.$el.style.border = '';
712 } 714 }
713 }, 715 },
714
715 // "formData.gyfsbsm":function (val) { 716 // "formData.gyfsbsm":function (val) {
716 // let ddsy = ''; 717 // let ddsy = '';
717 // for(let i = 0;i<this.gyfsList.length;i++){ 718 // for(let i = 0;i<this.gyfsList.length;i++){
......
...@@ -263,7 +263,7 @@ export default { ...@@ -263,7 +263,7 @@ export default {
263 zddm: "", 263 zddm: "",
264 zl: "", 264 zl: "",
265 pageNo: 1, 265 pageNo: 1,
266 pageSize: 12, 266 pageSize: 15,
267 type:'add', 267 type:'add',
268 }, 268 },
269 Data: [], 269 Data: [],
...@@ -369,7 +369,7 @@ export default { ...@@ -369,7 +369,7 @@ export default {
369 zddm: "", 369 zddm: "",
370 zl: "", 370 zl: "",
371 pageNo: 1, 371 pageNo: 1,
372 pageSize: 12 372 pageSize: 15
373 }; 373 };
374 this.getData(this.queryData); 374 this.getData(this.queryData);
375 }, 375 },
......
...@@ -380,6 +380,7 @@ ...@@ -380,6 +380,7 @@
380 getQjZdjbxxDetailById, 380 getQjZdjbxxDetailById,
381 updateQjZdjbxx, 381 updateQjZdjbxx,
382 } from "@api/zd"; 382 } from "@api/zd";
383 import { Message } from 'element-ui';
383 384
384 export default { 385 export default {
385 inject: ['getRightTree'], 386 inject: ['getRightTree'],
...@@ -753,48 +754,52 @@ ...@@ -753,48 +754,52 @@
753 type: "warning", 754 type: "warning",
754 }); 755 });
755 } else { 756 } else {
756 updateQjZdjbxx(this.formData) 757 if (this.$refs.qlrxxModule.getQlgyfsData() == 'PSHGSBDCQJDC000000000000DC340020' && this.$refs.qlrxxModule.getQlrxxData().length < 2 ) {
757 .then((res) => { 758 Message.error('当前权利人共有方式至少需要添加两名权利人')
758 if (res.code == 200) { 759 }else{
759 console.log(res); 760 updateQjZdjbxx(this.formData)
761 .then((res) => {
762 if (res.code == 200) {
763 console.log(res);
764 this.$message({
765 message: '保存成功',
766 type: "success",
767 });
768 // 保存成功再次查询
769 this.getZdjbxxData(this.$store.state.zdbsm);
770 } else {
771 this.$message({
772 message: res.message,
773 type: "warning",
774 });
775 }
776 })
777 .catch((error) => {
760 this.$message({ 778 this.$message({
761 message: '保存成功', 779 message: error.message+",查看日志,联系管理员",
762 type: "success", 780 type: "error",
763 }); 781 });
764 // 保存成功再次查询 782 });
765 this.getZdjbxxData(this.$store.state.zdbsm); 783 //保存到空间库里面
784 var self = this;
785 for (var key in this.geoAttributes) {
786 if (key == "BSM") {
787 self.geoAttributes[key] = this.$store.state.zdbsm
788 } else if (key == 'QLSDFS') {
789 var qlsdfsList = self.$store.state.qlsdfsList, value = self.formData.qlsdfs;
790 var qlsdfs = qlsdfsList.filter(item => {
791 return item.bsm == value;
792 })
793 self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc : "";
766 } else { 794 } else {
767 this.$message({ 795 var formKay = key.toLowerCase();
768 message: res.message, 796 self.geoAttributes[key] = self.formData[formKay];
769 type: "warning",
770 });
771 } 797 }
772 })
773 .catch((error) => {
774 this.$message({
775 message: error.message+",查看日志,联系管理员",
776 type: "error",
777 });
778 });
779 //保存到空间库里面
780 var self = this;
781 for (var key in this.geoAttributes) {
782 if (key == "BSM") {
783 self.geoAttributes[key] = this.$store.state.zdbsm
784 } else if (key == 'QLSDFS') {
785 var qlsdfsList = self.$store.state.qlsdfsList, value = self.formData.qlsdfs;
786 var qlsdfs = qlsdfsList.filter(item => {
787 return item.bsm == value;
788 })
789 self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc : "";
790 } else {
791 var formKay = key.toLowerCase();
792 self.geoAttributes[key] = self.formData[formKay];
793 } 798 }
799 self.updAttributes(this.$store.state.zdbsm, 'zd', this.geoAttributes, function (res) {
800 console.log("属性保存完成!!");
801 });
794 } 802 }
795 self.updAttributes(this.$store.state.zdbsm, 'zd', this.geoAttributes, function (res) {
796 console.log("属性保存完成!!");
797 });
798 } 803 }
799 } else { 804 } else {
800 this.$message({ 805 this.$message({
...@@ -922,7 +927,8 @@ ...@@ -922,7 +927,8 @@
922 this.$store.state.zddm = val; 927 this.$store.state.zddm = val;
923 }, 928 },
924 zdbsm: function (val) { 929 zdbsm: function (val) {
925 this.getZdjbxxData(val) 930 this.getZdjbxxData(val);
931 this.$refs.qlrxxModule.getQlrInfo(val);
926 this.curZdbsm = val; 932 this.curZdbsm = val;
927 }, 933 },
928 "formData.bdcdyh": function (val) { 934 "formData.bdcdyh": function (val) {
......