|
|
@@ -28,6 +28,7 @@
|
|
|
@action-event="handleAction"
|
|
|
@sort-change="handleSortChange"
|
|
|
@pagination-change="handlePaginationChange"
|
|
|
+ @row-click="handleRowClick"
|
|
|
>
|
|
|
<!--自定义查询条件-->
|
|
|
<template v-slot:searchForm>
|
|
|
@@ -472,7 +473,9 @@ export default {
|
|
|
title: ''
|
|
|
},
|
|
|
grooveList: [],
|
|
|
- hadDoSearch: false
|
|
|
+ hadDoSearch: false,
|
|
|
+ clickCount: 0, // 列表点击次数
|
|
|
+ timer: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -1925,7 +1928,57 @@ export default {
|
|
|
this.dialogFormVisible = visible
|
|
|
this.dataTemplate = temp
|
|
|
this.initJTemplate()
|
|
|
- }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description 行点击时触发的事件
|
|
|
+ */
|
|
|
+ handleRowClick (row, event, column) {
|
|
|
+ // if (this.selectionType === 'radio') {
|
|
|
+ // this.setSelectionRadio(row)
|
|
|
+ // this.$emit('selection-change', row)
|
|
|
+ // } else {
|
|
|
+ // this.$refs.elTable.toggleRowSelection(row)
|
|
|
+ // }
|
|
|
+ // this.$emit('row-click', row, event, column)
|
|
|
+ // console.log('1941 row',row)
|
|
|
+ // console.log('1941 event',event)
|
|
|
+ // console.log('1941 column',column)
|
|
|
+ this.clickCount++;
|
|
|
+ // 判断点击次数,如果是首次点击,则启动延时器
|
|
|
+ if (this.clickCount === 1) {
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ // 执行单击操作
|
|
|
+ this.handleRowOneclick(row, event, column)
|
|
|
+ this.clickCount=0
|
|
|
+ }, 300); // 设置延时时间,单位为毫秒
|
|
|
+ } else {
|
|
|
+ // 如果点击次数大于1,则说明是双击操作,清除延时器,并执行双击操作
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.handleRowDblclick(row, event, column)
|
|
|
+ this.clickCount=0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description 行单击时触发的事件
|
|
|
+ */
|
|
|
+ handleRowOneclick (row, event, column) {
|
|
|
+ // this.$emit('row-dblclick', row, event)
|
|
|
+ console.log('1954 一次row',row)
|
|
|
+ console.log('1954 一次event',event)
|
|
|
+ console.log('1954 一次column',column)
|
|
|
+
|
|
|
+ JTemplate._handleRowClickEvent(this, row, event, column,'NO')
|
|
|
+
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @description 行双击时触发的事件
|
|
|
+ */
|
|
|
+ handleRowDblclick (row, event, column) {
|
|
|
+ // this.$emit('row-dblclick', row, event)
|
|
|
+ console.log('1954 双击',row)
|
|
|
+ JTemplate._handleRowClickEvent(this, row, event, column,'YES')
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|