205828b4 by renchao@pashanhoo.com

style:国有建设用地使用权自然幢多幢业务拆分

1 parent c6c016b1
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-10-10 15:54:58 4 * @LastEditTime: 2023-10-10 16:32:22
5 --> 5 -->
6 <template> 6 <template>
7 <div class="from-clues"> 7 <div class="from-clues">
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
62 </div> 62 </div>
63 <div class="from-clues-content loadingtext"> 63 <div class="from-clues-content loadingtext">
64 <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" 64 <lb-table ref="table1" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300"
65 :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" @select="select" 65 :current-page.sync="pageData.currentPage" :total="zrztableData.total"
66 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" 66 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns"
67 :data="zrztableData.data"> 67 :data="zrztableData.data">
68 </lb-table> 68 </lb-table>
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
90 </el-col> 90 </el-col>
91 <el-col :span="10" class="btnColRight"> 91 <el-col :span="10" class="btnColRight">
92 <el-form-item> 92 <el-form-item>
93 <!-- <el-button type="primary" @click="resetForm(true)">重置</el-button> -->
94 <el-button type="primary" @click="handleSearch">查询</el-button> 93 <el-button type="primary" @click="handleSearch">查询</el-button>
95 </el-form-item> 94 </el-form-item>
96 </el-col> 95 </el-col>
...@@ -100,7 +99,7 @@ ...@@ -100,7 +99,7 @@
100 </div> 99 </div>
101 <div class="from-clues-content loadingtext"> 100 <div class="from-clues-content loadingtext">
102 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="262" 101 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="262"
103 :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange" @select="select" 102 :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange"
104 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns" 103 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns"
105 :data="dztableData.data"> 104 :data="dztableData.data">
106 </lb-table> 105 </lb-table>
...@@ -132,6 +131,7 @@ ...@@ -132,6 +131,7 @@
132 return { 131 return {
133 loading: false, 132 loading: false,
134 activeName: 'zrz', 133 activeName: 'zrz',
134 radioVal: '',
135 queryzrzForm: { 135 queryzrzForm: {
136 qllx: '', 136 qllx: '',
137 bdcdyh: '', 137 bdcdyh: '',
...@@ -159,6 +159,28 @@ ...@@ -159,6 +159,28 @@
159 }, 159 },
160 mounted () { 160 mounted () {
161 sendThis(this) 161 sendThis(this)
162 if (this.sqywInfo.djywbm == 'B37100') {
163 this.zrztableData.columns =
164 [{
165 type: 'selection',
166 label: '全选',
167 width: '50'
168 }].concat(datas.zrzcolumns())
169 } else {
170 this.zrztableData.columns = [{
171 label: '选择',
172 width: '50px',
173 render: (h, scope) => {
174 return (
175 <div class="orgColumn">
176 <el-radio onChange={() => { this.handleZrzChange(scope.row) }} v-model={this.radioVal} label={scope.row.bdcdyid}>
177 &ensp;
178 </el-radio>
179 </div>
180 )
181 }
182 }].concat(datas.zrzcolumns())
183 }
162 }, 184 },
163 methods: { 185 methods: {
164 /** 186 /**
...@@ -287,15 +309,7 @@ ...@@ -287,15 +309,7 @@
287 * @author: renchao 309 * @author: renchao
288 */ 310 */
289 handleSelectionChange (val) { 311 handleSelectionChange (val) {
290 if (this.sqywInfo.sqywdylx == "1") {
291 if (val.length > 1) {
292 this.bdcdysz = [...val[val.length - 1]];
293 } else {
294 this.bdcdysz = val;
295 }
296 } else {
297 this.bdcdysz = val; 312 this.bdcdysz = val;
298 }
299 }, 313 },
300 /** 314 /**
301 * @description: handleLpbClick 315 * @description: handleLpbClick
...@@ -310,21 +324,10 @@ ...@@ -310,21 +324,10 @@
310 scyclx: 1 324 scyclx: 1
311 }, '85%', true, false) 325 }, '85%', true, false)
312 }, 326 },
313 /** 327 // 自然幢单选
314 * @description: select 328 handleZrzChange () {
315 * @param {*} selection 329 let arr = this.zrztableData.data.filter(item => item.bdcdyid == this.radioVal)
316 * @param {*} row 330 this.bdcdysz = arr
317 * @author: renchao
318 */
319 select (selection, row) {
320 if (this.sqywInfo.sqywdylx == "1") {
321 // 清除 所有勾选项
322 this.$refs.table.clearSelection()
323 // 当表格数据都没有被勾选的时候 就返回
324 // 主要用于将当前勾选的表格状态清除
325 if (selection.length == 0) return
326 this.$refs.table.toggleRowSelection(row, true);
327 }
328 }, 331 },
329 /** 332 /**
330 * @description: handleRowClick 333 * @description: handleRowClick
...@@ -333,22 +336,26 @@ ...@@ -333,22 +336,26 @@
333 */ 336 */
334 handleRowClick (row) { 337 handleRowClick (row) {
335 // 自然幢单选,多幢多选 338 // 自然幢单选,多幢多选
339 let that = this
336 let refs = 'table1'; 340 let refs = 'table1';
337 if (this.activeName == 'dz') { 341 if (this.activeName == 'dz') {
338 refs = 'table'; 342 refs = 'table';
339 } else { 343 } else {
340 this.sqywInfo.djywbm !== 'B37100' && this.$refs[refs].clearSelection() 344 if (this.sqywInfo.djywbm !== 'B37100') {
345 that.bdcdysz = [row]
346 that.radioVal = row.bdcdyid
341 } 347 }
342 const bdcdysz = this.bdcdysz 348 }
349 const bdcdysz = that.bdcdysz
343 if (bdcdysz.length > 0) { 350 if (bdcdysz.length > 0) {
344 bdcdysz.forEach(item => { 351 bdcdysz.forEach(item => {
345 // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中 352 // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
346 if (item == row) { 353 if (item == row) {
347 this.$nextTick(() => { this.$refs[refs].toggleRowSelection(row, false); }) 354 that.$nextTick(() => { that.$refs[refs].toggleRowSelection(row, false); })
348 } 355 }
349 // 不然就让当前的一行勾选 356 // 不然就让当前的一行勾选
350 else { 357 else {
351 this.$refs[refs].toggleRowSelection(row, true); 358 that.$refs[refs].toggleRowSelection(row, true);
352 } 359 }
353 }) 360 })
354 } 361 }
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-08-29 13:05:13 4 * @LastEditTime: 2023-10-10 16:32:09
5 */ 5 */
6 import filter from '@/utils/filter.js' 6 import filter from '@/utils/filter.js'
7 let vm = null 7 let vm = null
...@@ -16,12 +16,6 @@ class data extends filter { ...@@ -16,12 +16,6 @@ class data extends filter {
16 zrzcolumns () { 16 zrzcolumns () {
17 return [ 17 return [
18 { 18 {
19 type: 'selection',
20 label: '全选',
21 width: '50',
22 selectable: this.selected
23 },
24 {
25 label: '序号', 19 label: '序号',
26 type: 'index', 20 type: 'index',
27 width: '50', 21 width: '50',
...@@ -152,8 +146,7 @@ class data extends filter { ...@@ -152,8 +146,7 @@ class data extends filter {
152 { 146 {
153 type: 'selection', 147 type: 'selection',
154 label: '全选', 148 label: '全选',
155 width: '50', 149 width: '50'
156 selectable: this.selected
157 }, 150 },
158 { 151 {
159 label: '序号', 152 label: '序号',
......