|
|
@ -100,6 +100,7 @@ |
|
|
|
findOneById, |
|
|
|
updateIssueState, |
|
|
|
addToknowledge, |
|
|
|
syncIssue, |
|
|
|
} from '@/api/issue'; |
|
|
|
import { computed, nextTick, ref, watch, onMounted } from 'vue'; |
|
|
|
import { message, Alert, Modal } from 'ant-design-vue'; |
|
|
@ -243,6 +244,21 @@ |
|
|
|
visible.value = false; |
|
|
|
}; |
|
|
|
|
|
|
|
const handleSync = async (record: TableListItem) => { |
|
|
|
if (!record.id) return; |
|
|
|
const res = await syncIssue({ |
|
|
|
id: record.id, |
|
|
|
}); |
|
|
|
console.log('res: ', res); |
|
|
|
|
|
|
|
if (res.code === 200) { |
|
|
|
message.success('同步到禅道成功'); |
|
|
|
dynamicTableInstance?.reload(); |
|
|
|
} else { |
|
|
|
message.error('同步到禅道失败'); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
const columns: any = [ |
|
|
|
...baseColumns, |
|
|
|
{ |
|
|
@ -262,6 +278,17 @@ |
|
|
|
// label: '查看', |
|
|
|
// onClick: () => handleView(record), |
|
|
|
// }, |
|
|
|
{ |
|
|
|
icon: 'sync', |
|
|
|
color: '#3b82f6', |
|
|
|
size: '15', |
|
|
|
label: '同步到禅道', |
|
|
|
ifShow: !record.zentaoNos, |
|
|
|
onClick: (e) => { |
|
|
|
e.stopPropagation(); |
|
|
|
handleSync(record); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
icon: 'edit', |
|
|
|
color: '#3b82f6', |
|
|
|