cb6ea2d0 by renchao@pashanhoo.com

Merge branch 'dev'

2 parents 93d851f5 720fe58a
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2024-01-18 08:38:32 4 * @LastEditTime: 2024-01-19 13:40:53
5 --> 5 -->
6 <template> 6 <template>
7 <!-- 抵押权利信息查询 --> 7 <!-- 抵押权利信息查询 -->
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
60 <!-- 表格 --> 60 <!-- 表格 -->
61 <div class="from-clues-content loadingtext"> 61 <div class="from-clues-content loadingtext">
62 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" 62 <lb-table ref="table" @row-click="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300"
63 :current-page.sync="pageData.currentPage" :total="tableData.total" @size-change="handleSizeChange" @select="select" 63 :current-page.sync="pageData.currentPage" :total="tableData.total" @size-change="handleSizeChange"
64 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="tableData.columns" 64 @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="tableData.columns"
65 :data="tableData.data"> 65 :data="tableData.data">
66 </lb-table> 66 </lb-table>
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
88 }, 88 },
89 data () { 89 data () {
90 return { 90 return {
91 radioVal: '',
91 loading: false, 92 loading: false,
92 queryForm: defaultParameters.defaultParameters(), 93 queryForm: defaultParameters.defaultParameters(),
93 qllxs: [], 94 qllxs: [],
...@@ -101,6 +102,28 @@ ...@@ -101,6 +102,28 @@
101 }, 102 },
102 mounted () { 103 mounted () {
103 sendThis(this); 104 sendThis(this);
105 if (this.sqywInfo.sqywdylx == "1") {
106 this.tableData.columns = [{
107 label: '选择',
108 width: '50px',
109 render: (h, scope) => {
110 return (
111 <div class="orgColumn">
112 <el-radio onChange={() => { this.handleChange(scope.row) }} v-model={this.radioVal} label={scope.row.bdcdyid}>
113 &ensp;
114 </el-radio>
115 </div>
116 )
117 }
118 }].concat(datas.columns())
119 } else {
120 this.tableData.columns =
121 [{
122 type: 'selection',
123 label: '全选',
124 width: '50'
125 }].concat(datas.columns())
126 }
104 }, 127 },
105 methods: { 128 methods: {
106 /** 129 /**
...@@ -177,48 +200,22 @@ ...@@ -177,48 +200,22 @@
177 } 200 }
178 }, 201 },
179 /** 202 /**
180 * @description: select
181 * @param {*} selection
182 * @param {*} row
183 * @author: renchao
184 */
185 select (selection, row) {
186 if (this.sqywInfo.sqywdylx == "1") {
187 // 清除 所有勾选项
188 this.$refs.table.clearSelection()
189 // 当表格数据都没有被勾选的时候 就返回
190 // 主要用于将当前勾选的表格状态清除
191 if (selection.length == 0) return
192 this.$refs.table.toggleRowSelection(row, true);
193 }
194 },
195 /**
196 * @description: handleRowClick 203 * @description: handleRowClick
197 * @param {*} row 204 * @param {*} row
198 * @author: renchao 205 * @author: renchao
199 */ 206 */
207 handleChange () {
208 let arr = this.tableData.data.filter(item => item.bdcdyid == this.radioVal)
209 this.bdcdysz = arr
210 },
200 handleRowClick (row) { 211 handleRowClick (row) {
201 // 如果状态是1,那就是单选 212 // 如果状态是1,那就是单选
213 let refs = 'table';
202 if (this.sqywInfo.sqywdylx == "1") { 214 if (this.sqywInfo.sqywdylx == "1") {
203 const bdcdysz = this.bdcdysz 215 this.bdcdysz = [row]
204 this.$refs.table.clearSelection() 216 this.radioVal = row.bdcdyid
205 if (bdcdysz.length == 1) {
206 bdcdysz.forEach(item => {
207 // 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
208 if (item == row) {
209 this.$refs.table.toggleRowSelection(row, false);
210 }
211 // 不然就让当前的一行勾选
212 else {
213 this.$refs.table.toggleRowSelection(row, true);
214 }
215 })
216 }
217 else {
218 this.$refs.table.toggleRowSelection(row, true);
219 }
220 } else { 217 } else {
221 this.$refs.table.toggleRowSelection(row); 218 this.$refs[refs].toggleRowSelection(row)
222 } 219 }
223 }, 220 },
224 /** 221 /**
...@@ -226,7 +223,7 @@ ...@@ -226,7 +223,7 @@
226 * @param {*} row 223 * @param {*} row
227 * @author: renchao 224 * @author: renchao
228 */ 225 */
229 openBook (row) { 226 openDialog (row) {
230 var param = { 227 var param = {
231 bdcdyid: row.bdcdyid, 228 bdcdyid: row.bdcdyid,
232 qllx: row.qllx, 229 qllx: row.qllx,
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2024-01-18 08:37:55 4 * @LastEditTime: 2024-01-19 13:40:07
5 */ 5 */
6 import filter from '@/utils/filter.js' 6 import filter from '@/utils/filter.js'
7 let vm = null 7 let vm = null
...@@ -15,11 +15,11 @@ class data extends filter { ...@@ -15,11 +15,11 @@ class data extends filter {
15 } 15 }
16 columns () { 16 columns () {
17 return [ 17 return [
18 { 18 // {
19 type: 'selection', 19 // type: 'selection',
20 label: '全选', 20 // label: '全选',
21 selectable: this.selected 21 // selectable: this.selected
22 }, 22 // },
23 { 23 {
24 label: '序号', 24 label: '序号',
25 type: 'index', 25 type: 'index',
......