File tree Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -2040,18 +2040,16 @@ export default {
20402040 this .form .userdataid = undefined
20412041 return
20422042 }
2043+
20432044 this .form .userdataid = id
20442045 this .userDataParams = []
20452046 api (' listUserData' , { id: id }).then (json => {
20462047 const resp = json? .listuserdataresponse ? .userdata || []
20472048 if (resp[0 ]) {
2048- var params = resp[0 ].params
2049- if (params) {
2050- var dataParams = params .split (' ,' )
2051- }
2052- var that = this
2053- dataParams .forEach (function (val , index ) {
2054- that .userDataParams .push ({
2049+ const params = resp[0 ].params
2050+ const dataParams = params ? params .split (' ,' ) : []
2051+ dataParams .forEach ((val , index ) => {
2052+ this .userDataParams .push ({
20552053 id: index,
20562054 key: val
20572055 })
Original file line number Diff line number Diff line change 3030 :rowKey =" record => record.id"
3131 :pagination =" false"
3232 :rowSelection =" rowSelection"
33+ :customRow =" onClickRow"
3334 size =" middle"
3435 :scroll =" { y: 225 }" >
3536 <template #headerCell =" { column } " >
@@ -197,6 +198,14 @@ export default {
197198 this .options .page = page
198199 this .options .pageSize = pageSize
199200 this .$emit (' handle-search-filter' , this .options )
201+ },
202+ onClickRow (record ) {
203+ return {
204+ onClick : () => {
205+ this .selectedRowKeys = [record .id ]
206+ this .$emit (' select-load-balancer-item' , record .id )
207+ }
208+ }
200209 }
201210 }
202211}
Original file line number Diff line number Diff line change 3333 :scroll =" { y: 225 }"
3434 >
3535 <template #headerCell =" { column } " >
36+ <template v-if =" column .key === ' name' " ><solution-outlined /> {{ $t('label.userdata') }}</template >
3637 <template v-if =" column .key === ' account' " ><user-outlined /> {{ $t('label.account') }}</template >
3738 <template v-if =" column .key === ' domain' " ><block-outlined /> {{ $t('label.domain') }}</template >
3839 </template >
@@ -78,6 +79,7 @@ export default {
7879 filter: ' ' ,
7980 columns: [
8081 {
82+ key: ' name' ,
8183 dataIndex: ' name' ,
8284 title: this .$t (' label.userdata' ),
8385 width: ' 40%'
@@ -181,11 +183,9 @@ export default {
181183 },
182184 onClickRow (record ) {
183185 return {
184- on: {
185- click : () => {
186- this .selectedRowKeys = [record .key ]
187- this .$emit (' select-user-data-item' , record .key )
188- }
186+ onClick : () => {
187+ this .selectedRowKeys = [record .key ]
188+ this .$emit (' select-user-data-item' , record .key )
189189 }
190190 }
191191 }
You can’t perform that action at this time.
0 commit comments