|
@@ -75,8 +75,6 @@
|
|
@cell-mouse-enter="cellMouseEnter"
|
|
@cell-mouse-enter="cellMouseEnter"
|
|
@cell-mouse-leave="cellMouseLeave"
|
|
@cell-mouse-leave="cellMouseLeave"
|
|
:cell-style="cellStyle"
|
|
:cell-style="cellStyle"
|
|
- @cell-click="cellClick"
|
|
|
|
- @cell-dblclick="cellDbClick"
|
|
|
|
@row-click="rowClick"
|
|
@row-click="rowClick"
|
|
height="calc(100vh - 110px)"
|
|
height="calc(100vh - 110px)"
|
|
row-key="id"
|
|
row-key="id"
|
|
@@ -292,6 +290,10 @@ export default {
|
|
tableData: [],
|
|
tableData: [],
|
|
page: 0,
|
|
page: 0,
|
|
total: 0,
|
|
total: 0,
|
|
|
|
+
|
|
|
|
+ clickCount: 0,
|
|
|
|
+ timer: null,
|
|
|
|
+
|
|
open: false,
|
|
open: false,
|
|
form: {},
|
|
form: {},
|
|
feedbacks: [],
|
|
feedbacks: [],
|
|
@@ -434,31 +436,47 @@ export default {
|
|
this.open = true
|
|
this.open = true
|
|
},
|
|
},
|
|
rowClick(row, column, event) {
|
|
rowClick(row, column, event) {
|
|
- if (column.property != "taskName") {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (row.status === '6' && row.auditUserId === this.userId) {
|
|
|
|
- getTask(row.id).then(res => {
|
|
|
|
- if (res.data.ancestorsTask && res.data.ancestorsTask.length === 0) {
|
|
|
|
- this.detailForm = res.data;
|
|
|
|
- this.auditForm = {
|
|
|
|
- taskId: row.id,
|
|
|
|
- auditResult: undefined,
|
|
|
|
- value: undefined,
|
|
|
|
- auditOpinion: undefined
|
|
|
|
|
|
+ if (column.property === "taskName") {
|
|
|
|
+ if (row.status === '6' && row.auditUserId === this.userId) {
|
|
|
|
+ getTask(row.id).then(res => {
|
|
|
|
+ if (res.data.ancestorsTask && res.data.ancestorsTask.length === 0) {
|
|
|
|
+ this.detailForm = res.data;
|
|
|
|
+ this.auditForm = {
|
|
|
|
+ taskId: row.id,
|
|
|
|
+ auditResult: undefined,
|
|
|
|
+ value: undefined,
|
|
|
|
+ auditOpinion: undefined
|
|
|
|
+ }
|
|
|
|
+ this.auditOpen = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.detailForm = res.data
|
|
|
|
+ this.openDetail = true
|
|
}
|
|
}
|
|
- this.auditOpen = true;
|
|
|
|
- } else {
|
|
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ getTask(row.id).then(res => {
|
|
this.detailForm = res.data
|
|
this.detailForm = res.data
|
|
this.openDetail = true
|
|
this.openDetail = true
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.clickCount++;
|
|
|
|
+ // 判断点击次数,如果是首次点击,则启动延时器
|
|
|
|
+ if (this.clickCount === 1) {
|
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
|
+ // 执行单击操作
|
|
|
|
+ this.cellClick(row, column);
|
|
|
|
+ this.clickCount = 0
|
|
|
|
+ }, 300); // 设置延时时间,单位为毫秒
|
|
} else {
|
|
} else {
|
|
- getTask(row.id).then(res => {
|
|
|
|
- this.detailForm = res.data
|
|
|
|
- this.openDetail = true
|
|
|
|
- })
|
|
|
|
|
|
+ // 如果点击次数大于1,则说明是双击操作,清除延时器,并执行双击操作
|
|
|
|
+ clearTimeout(this.timer);
|
|
|
|
+ this.cellDbClick(row, column);
|
|
|
|
+ this.clickCount = 0
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
feedbackTypeChange(val) {
|
|
feedbackTypeChange(val) {
|
|
if (val === '2') {
|
|
if (val === '2') {
|