|
|
|
@ -68,7 +68,7 @@ |
|
|
|
|
<el-tabs v-model="workIndex" style="flex: 1"> |
|
|
|
|
<el-tab-pane label="目标/关键成果" name="okr"> |
|
|
|
|
<div class="content-wrap"> |
|
|
|
|
<OkrTable ref="okrTableRef" /> |
|
|
|
|
<OkrTable ref="okrTableRef" :canEdit="canEdit" /> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
@ -275,6 +275,7 @@ import { getOkrNodeDetail, getOkrNodeHistory } from '@/api/okr/okr' |
|
|
|
|
const emit = defineEmits(['edit']) |
|
|
|
|
|
|
|
|
|
const show = ref(false) |
|
|
|
|
const canEdit = ref(false) |
|
|
|
|
|
|
|
|
|
const toolbarConfig = { |
|
|
|
|
toolbarKeys: [ |
|
|
|
@ -302,9 +303,10 @@ const nodeInfo = ref({}) |
|
|
|
|
|
|
|
|
|
const nodeRecords = ref([]) |
|
|
|
|
|
|
|
|
|
async function open(id) { |
|
|
|
|
async function open(curNode) { |
|
|
|
|
canEdit.value = curNode.canEdit |
|
|
|
|
try { |
|
|
|
|
getOkrNodeDetail(id).then((resp) => { |
|
|
|
|
getOkrNodeDetail(curNode.nodeId).then((resp) => { |
|
|
|
|
nodeInfo.value = resp |
|
|
|
|
if (resp.objectives) { |
|
|
|
|
okrList.value = resp.objectives.map((item) => ({ |
|
|
|
@ -319,7 +321,7 @@ async function open(id) { |
|
|
|
|
okrTableRef.value.prepareData(okrList.value) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
getOkrNodeHistory(id).then((resp) => { |
|
|
|
|
getOkrNodeHistory(curNode.nodeId).then((resp) => { |
|
|
|
|
nodeRecords.value = resp |
|
|
|
|
}) |
|
|
|
|
} finally { |
|
|
|
|