feat(fg):宗地分割选择幢基本功能实现
Showing
1 changed file
with
83 additions
and
46 deletions
... | @@ -19,19 +19,21 @@ | ... | @@ -19,19 +19,21 @@ |
19 | <div class="zxx"> | 19 | <div class="zxx"> |
20 | <div class="dz"> | 20 | <div class="dz"> |
21 | <div class="title"> | 21 | <div class="title"> |
22 | <span>多幢信息({{zdZxx.zrzList.length}}个)</span> | 22 | <span>多幢信息({{zdZxx.dzList.length}}个)</span> |
23 | </div> | 23 | </div> |
24 | <ul> | 24 | <ul> |
25 | <li v-for="(item,index) in zdZxx.zrzList" :key="index">{{item.xmmc}}</li> | 25 | <li v-for="(item,index) in zdZxx.dzList" :key="index" |
26 | :class="[{'border':'((index+1)%2) == 0'},{'nosearch':zdDzList.includes(item)}]" | ||
27 | >{{item.xmmc}}</li> | ||
26 | </ul> | 28 | </ul> |
27 | </div> | 29 | </div> |
28 | <div class="zrz"> | 30 | <div class="zrz"> |
29 | <div class="title"> | 31 | <div class="title"> |
30 | <span>自然幢信息({{zdZxx.dzList.length}}个)</span> | 32 | <span>自然幢信息({{zdZxx.zrzList.length}}个)</span> |
31 | </div> | 33 | </div> |
32 | <ul> | 34 | <ul> |
33 | <li v-for="(item,index) in zdZxx.dzList" :key="index" | 35 | <li v-for="(item,index) in zdZxx.zrzList" :key="index" |
34 | :class="(index+1)%2==0?'':'border'">{{item.xmmc}} | 36 | :class="[{'border':'((index+1)%2) == 0'},{'nosearch':zdZrzList.includes(item)}]">{{item.xmmc}} |
35 | </li> | 37 | </li> |
36 | </ul> | 38 | </ul> |
37 | </div> | 39 | </div> |
... | @@ -49,6 +51,7 @@ | ... | @@ -49,6 +51,7 @@ |
49 | <th class="tdtzm">土地特征码</th> | 51 | <th class="tdtzm">土地特征码</th> |
50 | <th class="xmmc">项目名称</th> | 52 | <th class="xmmc">项目名称</th> |
51 | <th class="zxx">幢信息</th> | 53 | <th class="zxx">幢信息</th> |
54 | <th class="">选择</th> | ||
52 | </tr> | 55 | </tr> |
53 | <tr v-for="(item,index) in zdFghData.newZdlist" :key="index"> | 56 | <tr v-for="(item,index) in zdFghData.newZdlist" :key="index"> |
54 | <td class="cz"> | 57 | <td class="cz"> |
... | @@ -114,33 +117,36 @@ | ... | @@ -114,33 +117,36 @@ |
114 | <input type="text" v-model="item.xmmc" class="formInput"/> | 117 | <input type="text" v-model="item.xmmc" class="formInput"/> |
115 | </td> | 118 | </td> |
116 | <td class="zxx"> | 119 | <td class="zxx"> |
117 | <!--<el-select placeholder="请选择多幢" @change="xzDz(i.bsm,index)" v-model="zdFghData.newZdlist.fwlist[1].zbsm"> | 120 | <span>多幢:</span> |
118 | <el-option | 121 | <ul> |
119 | v-for="i in zdZxx.dzList" | 122 | <li v-for="(dzItem,dzIndex) in item.dz" :key="dzIndex">{{dzItem}}</li> |
120 | :key="i.bsm" | 123 | </ul> |
121 | :label="i.xmmc" | 124 | <span>自然幢:</span> |
122 | :value="i.bsm"> | 125 | <ul> |
123 | </el-option> | 126 | <li v-for="(dzItem,dzIndex) in item.zrz" :key="dzIndex">{{dzItem}}</li> |
124 | </el-select> | 127 | </ul> |
125 | <el-select placeholder="请选择自然幢" @change="xzZrz(i.bsm,index)" v-model="zdFghData.newZdlist.fwlist[1].zbsm"> | 128 | </td> |
126 | <el-option | 129 | <td class=""> |
127 | v-for="i in zdZxx.zrzList" | 130 | <el-dropdown @command="dzHandleCommand($event,index)"> |
128 | :key="i.bsm" | ||
129 | :label="i.xmmc" | ||
130 | :value="i.bsm"> | ||
131 | </el-option> | ||
132 | </el-select>--> | ||
133 | <!-- <span @click="xzzrz(index)" class="xz">选择</span>--> | ||
134 | <el-dropdown @command="handleCommand"> | ||
135 | <span class="el-dropdown-link"> | 131 | <span class="el-dropdown-link"> |
136 | 选择多幢<i class="el-icon-arrow-down el-icon--right"></i> | 132 | 选择多幢<i class="el-icon-arrow-down el-icon--right"></i> |
137 | </span> | 133 | </span> |
138 | <el-dropdown-menu slot="dropdown" > | 134 | <el-dropdown-menu slot="dropdown"> |
139 | <el-dropdown-item v-for="(ce,index) in zdZxx.dzList" :key="index" :command="ce" >{{ce.xmmc}}</el-dropdown-item> | 135 | <el-dropdown-item v-for="(childItem,childIndex) in zdDzList" |
140 | <!--<el-dropdown-item command="b">狮子头</el-dropdown-item> | 136 | :key="childIndex" :command="childItem.bsm"> |
141 | <el-dropdown-item command="c">螺蛳粉</el-dropdown-item> | 137 | {{childItem.xmmc}} |
142 | <el-dropdown-item command="d" disabled>双皮奶</el-dropdown-item> | 138 | </el-dropdown-item> |
143 | <el-dropdown-item command="e" divided>蚵仔煎</el-dropdown-item>--> | 139 | </el-dropdown-menu> |
140 | </el-dropdown> | ||
141 | <el-dropdown @command="zrzHandleCommand($event,index)"> | ||
142 | <span class="el-dropdown-link"> | ||
143 | 选择自然幢<i class="el-icon-arrow-down el-icon--right"></i> | ||
144 | </span> | ||
145 | <el-dropdown-menu slot="dropdown"> | ||
146 | <el-dropdown-item v-for="(childItem,childIndex) in zdZrzList" | ||
147 | :key="childIndex" :command="childItem.bsm"> | ||
148 | {{childItem.xmmc}} | ||
149 | </el-dropdown-item> | ||
144 | </el-dropdown-menu> | 150 | </el-dropdown-menu> |
145 | </el-dropdown> | 151 | </el-dropdown> |
146 | </td> | 152 | </td> |
... | @@ -616,6 +622,8 @@ | ... | @@ -616,6 +622,8 @@ |
616 | zdFgqData: {}, // 宗地分割前数据 | 622 | zdFgqData: {}, // 宗地分割前数据 |
617 | dzFgqData: {}, //多幢分割前数据 | 623 | dzFgqData: {}, //多幢分割前数据 |
618 | hFgqData: {}, // 户分割前数据 | 624 | hFgqData: {}, // 户分割前数据 |
625 | zdZrzList: [], // 宗地自然幢集合 | ||
626 | zdDzList: [], // 宗地多幢集合 | ||
619 | zdZxx: { | 627 | zdZxx: { |
620 | zrzList: [], | 628 | zrzList: [], |
621 | dzList: [] | 629 | dzList: [] |
... | @@ -722,27 +730,47 @@ | ... | @@ -722,27 +730,47 @@ |
722 | }) | 730 | }) |
723 | }, | 731 | }, |
724 | methods: { | 732 | methods: { |
725 | xzDz(bsm,index){ | 733 | xzDz(bsm, index) { |
726 | this.zdFghData.newZdlist.fwlist[index].push({ | 734 | this.zdFghData.newZdlist.fwlist[index].push({ |
727 | zbsm:bsm, | 735 | zbsm: bsm, |
728 | ztype:'dz' | 736 | ztype: 'dz' |
729 | }) | 737 | }) |
730 | console.log(this.zdFghData,'zdFghData') | 738 | console.log(this.zdFghData, 'zdFghData') |
731 | }, | 739 | }, |
732 | xzZrz(bsm,index){ | 740 | xzZrz(bsm, index) { |
733 | this.zdFghData.newZdlist.fwlist[index].push({ | 741 | this.zdFghData.newZdlist.fwlist[index].push({ |
734 | zbsm:bsm, | 742 | zbsm: bsm, |
735 | ztype:'zrz' | 743 | ztype: 'zrz' |
736 | }) | 744 | }) |
737 | console.log(this.zdFghData,'zdFghData') | 745 | console.log(this.zdFghData, 'zdFghData') |
746 | }, | ||
747 | dzHandleCommand(command, index) { | ||
748 | console.log(command,"============") | ||
749 | let item = this.zdDzList.filter(i => i.bsm == command)[0]; | ||
750 | console.log(item,"item........") | ||
751 | console.log(this.zdDzList,"zdDzlist") | ||
752 | this.zdFghData.newZdlist[index].fwlist.push({ | ||
753 | zbsm: command, | ||
754 | ztype: 'dz' | ||
755 | }); | ||
756 | this.zdFghData.newZdlist[index].dz.push(item.xmmc) | ||
757 | this.zdDzList = this.zdDzList.filter(i => i.bsm !== command); | ||
738 | }, | 758 | }, |
739 | handleCommand(command) { | 759 | zrzHandleCommand(command, index) { |
740 | this.$message('click on item ' + command); | 760 | let item = this.zdZrzList.filter(i => i.bsm == command)[0]; |
761 | this.zdFghData.newZdlist[index].fwlist.push({ | ||
762 | zbsm: command, | ||
763 | ztype: 'zrz' | ||
764 | }) | ||
765 | this.zdFghData.newZdlist[index].zrz.push(item.xmmc) | ||
766 | this.zdZrzList = this.zdZrzList.filter(i => i.bsm !== command); | ||
741 | }, | 767 | }, |
742 | ZdgetDzXx(zdbsm) { | 768 | ZdgetDzXx(zdbsm) { |
743 | ZdfggetZxx(zdbsm).then(res => { | 769 | ZdfggetZxx(zdbsm).then(res => { |
744 | if (res.success) { | 770 | if (res.success) { |
745 | this.zdZxx = res.result; | 771 | this.zdZxx = res.result; |
772 | this.zdZrzList = res.result.zrzList | ||
773 | this.zdDzList = res.result.dzList | ||
746 | } | 774 | } |
747 | }) | 775 | }) |
748 | }, | 776 | }, |
... | @@ -813,8 +841,10 @@ | ... | @@ -813,8 +841,10 @@ |
813 | this.checkedData = res.result | 841 | this.checkedData = res.result |
814 | // 用户bsm暂时传空 | 842 | // 用户bsm暂时传空 |
815 | this.checkedData.userbsm = '' | 843 | this.checkedData.userbsm = '' |
844 | this.checkedData.dz=[], | ||
845 | this.checkedData.zrz=[], | ||
816 | // fwlist 暂时传空 | 846 | // fwlist 暂时传空 |
817 | this.checkedData.fwlist = [{zbsm: '', ztype: ''}] | 847 | this.checkedData.fwlist = [] |
818 | }) | 848 | }) |
819 | }, | 849 | }, |
820 | getDzZdjbxx(id) { | 850 | getDzZdjbxx(id) { |
... | @@ -822,8 +852,10 @@ | ... | @@ -822,8 +852,10 @@ |
822 | this.checkedData = res.result | 852 | this.checkedData = res.result |
823 | // 用户bsm暂时传空 | 853 | // 用户bsm暂时传空 |
824 | this.checkedData.userbsm = '' | 854 | this.checkedData.userbsm = '' |
855 | this.checkedData.dz=[], | ||
856 | this.checkedData.zrz=[], | ||
825 | // fwlist 暂时传空 | 857 | // fwlist 暂时传空 |
826 | this.checkedData.fwlist = [{zbsm: '', ztype: ''}] | 858 | this.checkedData.fwlist = [] |
827 | }) | 859 | }) |
828 | }, | 860 | }, |
829 | getHZdxx(id) { | 861 | getHZdxx(id) { |
... | @@ -831,8 +863,10 @@ | ... | @@ -831,8 +863,10 @@ |
831 | this.checkedData = res.result | 863 | this.checkedData = res.result |
832 | // 用户bsm暂时传空 | 864 | // 用户bsm暂时传空 |
833 | this.checkedData.userbsm = '' | 865 | this.checkedData.userbsm = '' |
866 | this.checkedData.dz=[], | ||
867 | this.checkedData.zrz=[], | ||
834 | // fwlist 暂时传空 | 868 | // fwlist 暂时传空 |
835 | this.checkedData.fwlist = [{zbsm: '', ztype: ''}] | 869 | this.checkedData.fwlist = [] |
836 | }) | 870 | }) |
837 | }, | 871 | }, |
838 | getzdtzm() { | 872 | getzdtzm() { |
... | @@ -912,10 +946,10 @@ | ... | @@ -912,10 +946,10 @@ |
912 | zdtzmbsm: "", | 946 | zdtzmbsm: "", |
913 | userbsm: "", | 947 | userbsm: "", |
914 | fwlist: [ | 948 | fwlist: [ |
915 | { | 949 | /* { |
916 | zbsm: "", | 950 | zbsm: "", |
917 | ztype: "" | 951 | ztype: "" |
918 | } | 952 | }*/ |
919 | ] | 953 | ] |
920 | }); | 954 | }); |
921 | this.changeXzq(this.checkedData.xzqbsm) | 955 | this.changeXzq(this.checkedData.xzqbsm) |
... | @@ -1123,7 +1157,7 @@ | ... | @@ -1123,7 +1157,7 @@ |
1123 | padding: 5px; | 1157 | padding: 5px; |
1124 | text-align: center; | 1158 | text-align: center; |
1125 | line-height: 20px; | 1159 | line-height: 20px; |
1126 | 1160 | color: #BBB; | |
1127 | } | 1161 | } |
1128 | } | 1162 | } |
1129 | } | 1163 | } |
... | @@ -1137,7 +1171,7 @@ | ... | @@ -1137,7 +1171,7 @@ |
1137 | width: 48%; | 1171 | width: 48%; |
1138 | text-align: center; | 1172 | text-align: center; |
1139 | display: inline-block; | 1173 | display: inline-block; |
1140 | 1174 | color: #BBB; | |
1141 | } | 1175 | } |
1142 | } | 1176 | } |
1143 | } | 1177 | } |
... | @@ -1259,4 +1293,7 @@ | ... | @@ -1259,4 +1293,7 @@ |
1259 | .xzq, .djq, .djzq { | 1293 | .xzq, .djq, .djzq { |
1260 | width: 150px; | 1294 | width: 150px; |
1261 | } | 1295 | } |
1296 | .nosearch{ | ||
1297 | color: #000 !important; | ||
1298 | } | ||
1262 | </style> | 1299 | </style> | ... | ... |
-
Please register or sign in to post a comment