选择不动产根据申请业务单一流向状态判断单选还是多选
Showing
2 changed files
with
88 additions
and
20 deletions
... | @@ -57,7 +57,7 @@ | ... | @@ -57,7 +57,7 @@ |
57 | </div> | 57 | </div> |
58 | <div class="from-clues-content loadingtext"> | 58 | <div class="from-clues-content loadingtext"> |
59 | <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" | 59 | <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" |
60 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" | 60 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" @select="select" |
61 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" | 61 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" |
62 | :data="zrztableData.data"> | 62 | :data="zrztableData.data"> |
63 | </lb-table> | 63 | </lb-table> |
... | @@ -100,15 +100,15 @@ | ... | @@ -100,15 +100,15 @@ |
100 | <el-col :span="3" class="btnColRight"> | 100 | <el-col :span="3" class="btnColRight"> |
101 | <el-form-item> | 101 | <el-form-item> |
102 | <el-button type="primary" @click="resetForm(true)">重置</el-button> | 102 | <el-button type="primary" @click="resetForm(true)">重置</el-button> |
103 | <el-button type="primary" @click="handleSearch">查询</el-button> | 103 | <el-button type="primary" @click="handleSearch">查询11</el-button> |
104 | </el-form-item> | 104 | </el-form-item> |
105 | </el-col> | 105 | </el-col> |
106 | </el-row> | 106 | </el-row> |
107 | </el-form> | 107 | </el-form> |
108 | </div> | 108 | </div> |
109 | <div class="from-clues-content loadingtext"> | 109 | <div class="from-clues-content loadingtext"> |
110 | <lb-table ref="table" @row-dblclick="handleRowClick" :page-size="pageData.pageSize" :calcHeight="400" | 110 | <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="400" |
111 | :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange" | 111 | :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange" @select="select" |
112 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns" | 112 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns" |
113 | :data="dztableData.data"> | 113 | :data="dztableData.data"> |
114 | </lb-table> | 114 | </lb-table> |
... | @@ -276,7 +276,57 @@ | ... | @@ -276,7 +276,57 @@ |
276 | djqxmc: this.sqywInfo.nodetype == "djqx" ? this.sqywInfo.nodename : "", | 276 | djqxmc: this.sqywInfo.nodetype == "djqx" ? this.sqywInfo.nodename : "", |
277 | } | 277 | } |
278 | }) | 278 | }) |
279 | } | 279 | }, |
280 | select(selection, row){ | ||
281 | if(this.sqywInfo.sqywdylx=="1"){ | ||
282 | // 清除 所有勾选项 | ||
283 | this.$refs.table.clearSelection() | ||
284 | // 当表格数据都没有被勾选的时候 就返回 | ||
285 | // 主要用于将当前勾选的表格状态清除 | ||
286 | if(selection.length == 0) return | ||
287 | this.$refs.table.toggleRowSelection(row, true); | ||
288 | } | ||
289 | |||
290 | }, | ||
291 | handleRowClick(row){ | ||
292 | if(this.sqywInfo.sqywdylx=="1"){ | ||
293 | const bdcdysz = this.bdcdysz | ||
294 | this.$refs.table.clearSelection() | ||
295 | if( bdcdysz.length == 1 ) { | ||
296 | bdcdysz.forEach(item => { | ||
297 | // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中 | ||
298 | if (item == row) { | ||
299 | this.$refs.table.toggleRowSelection(row, false); | ||
300 | } | ||
301 | // 不然就让当前的一行勾选 | ||
302 | else { | ||
303 | this.$refs.table.toggleRowSelection(row, true); | ||
304 | } | ||
305 | }) | ||
306 | } | ||
307 | else { | ||
308 | this.$refs.table.toggleRowSelection(row, true); | ||
309 | } | ||
310 | }else{ | ||
311 | const bdcdysz = this.bdcdysz | ||
312 | this.$refs.table.clearSelection() | ||
313 | if( bdcdysz.length >=1 ) { | ||
314 | bdcdysz.forEach(item => { | ||
315 | // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中 | ||
316 | if (item == row) { | ||
317 | this.$refs.table.toggleRowSelection(row, false); | ||
318 | } | ||
319 | // 不然就让当前的一行勾选 | ||
320 | else { | ||
321 | this.$refs.table.toggleRowSelection(row, true); | ||
322 | } | ||
323 | }) | ||
324 | } | ||
325 | else { | ||
326 | this.$refs.table.toggleRowSelection(row, true); | ||
327 | } | ||
328 | } | ||
329 | }, | ||
280 | } | 330 | } |
281 | } | 331 | } |
282 | </script> | 332 | </script> | ... | ... |
... | @@ -28,7 +28,7 @@ | ... | @@ -28,7 +28,7 @@ |
28 | <!-- 表格 --> | 28 | <!-- 表格 --> |
29 | <div class="from-clues-content loadingtext"> | 29 | <div class="from-clues-content loadingtext"> |
30 | <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" | 30 | <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" |
31 | :current-page.sync="pageData.currentPage" :total="tableData.total" @size-change="handleSizeChange" | 31 | :current-page.sync="pageData.currentPage" :total="tableData.total" @size-change="handleSizeChange" @select="select" |
32 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="tableData.columns" | 32 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="tableData.columns" |
33 | :data="tableData.data"> | 33 | :data="tableData.data"> |
34 | </lb-table> | 34 | </lb-table> |
... | @@ -61,7 +61,6 @@ | ... | @@ -61,7 +61,6 @@ |
61 | columns: datas.columns(), | 61 | columns: datas.columns(), |
62 | data: [], | 62 | data: [], |
63 | }, | 63 | }, |
64 | radioVal: "", | ||
65 | bdcdysz: [], | 64 | bdcdysz: [], |
66 | bsmSqyw: | 65 | bsmSqyw: |
67 | this.sqywInfo.nodetype === "djlx" | 66 | this.sqywInfo.nodetype === "djlx" |
... | @@ -74,6 +73,7 @@ | ... | @@ -74,6 +73,7 @@ |
74 | }, | 73 | }, |
75 | methods: { | 74 | methods: { |
76 | queryClick () { | 75 | queryClick () { |
76 | console.log("国有建设用地使用权首次登记",this.sqywInfo.sqywdylx); | ||
77 | this.$startLoading(); | 77 | this.$startLoading(); |
78 | this.queryForm.sqywbm = this.sqywInfo.djywbm; | 78 | this.queryForm.sqywbm = this.sqywInfo.djywbm; |
79 | selectZdjbxx({ ...this.queryForm, ...this.pageData }).then((res) => { | 79 | selectZdjbxx({ ...this.queryForm, ...this.pageData }).then((res) => { |
... | @@ -82,19 +82,6 @@ | ... | @@ -82,19 +82,6 @@ |
82 | let { total, records } = res.result; | 82 | let { total, records } = res.result; |
83 | this.tableData.total = total; | 83 | this.tableData.total = total; |
84 | this.tableData.data = records; | 84 | this.tableData.data = records; |
85 | // this.tableData.columns.splice(0, 1,{ | ||
86 | // label: '选择', | ||
87 | // width: '50px', | ||
88 | // render: (h, scope) => { | ||
89 | // return ( | ||
90 | // <div class="orgColumn"> | ||
91 | // <el-radio v-model={this.radioVal} label={scope.row.bdcdyh}> | ||
92 | //   | ||
93 | // </el-radio> | ||
94 | // </div> | ||
95 | // ) | ||
96 | // } | ||
97 | // }) | ||
98 | } | 85 | } |
99 | }); | 86 | }); |
100 | }, | 87 | }, |
... | @@ -130,6 +117,37 @@ | ... | @@ -130,6 +117,37 @@ |
130 | handleSelectionChange (val) { | 117 | handleSelectionChange (val) { |
131 | this.bdcdysz = val; | 118 | this.bdcdysz = val; |
132 | }, | 119 | }, |
120 | select(selection, row){ | ||
121 | if(this.sqywInfo.sqywdylx=="1"){ | ||
122 | // 清除 所有勾选项 | ||
123 | this.$refs.table.clearSelection() | ||
124 | // 当表格数据都没有被勾选的时候 就返回 | ||
125 | // 主要用于将当前勾选的表格状态清除 | ||
126 | if(selection.length == 0) return | ||
127 | this.$refs.table.toggleRowSelection(row, true); | ||
128 | } | ||
129 | }, | ||
130 | handleRowClick(row, column){ | ||
131 | if(this.sqywInfo.sqywdylx=="1"){ | ||
132 | const bdcdysz = this.bdcdysz | ||
133 | this.$refs.table.clearSelection() | ||
134 | if( bdcdysz.length == 1 ) { | ||
135 | bdcdysz.forEach(item => { | ||
136 | // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中 | ||
137 | if (item == row) { | ||
138 | this.$refs.table.toggleRowSelection(row, false); | ||
139 | } | ||
140 | // 不然就让当前的一行勾选 | ||
141 | else { | ||
142 | this.$refs.table.toggleRowSelection(row, true); | ||
143 | } | ||
144 | }) | ||
145 | } | ||
146 | else { | ||
147 | this.$refs.table.toggleRowSelection(row, true); | ||
148 | } | ||
149 | } | ||
150 | }, | ||
133 | 151 | ||
134 | }, | 152 | }, |
135 | }; | 153 | }; | ... | ... |
-
Please register or sign in to post a comment