sc
This commit is contained in:
@@ -112,7 +112,10 @@ function handleUpdateProcess() {
|
||||
|
||||
const dialogOkr = ref(null)
|
||||
function handleShowOkr(id) {
|
||||
dialogOkr.value.open(id)
|
||||
dialogOkr.value.open({
|
||||
nodeId: id,
|
||||
canEdit: isCurrentLeafNode.value
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -378,7 +378,6 @@ const defaultProps = {
|
||||
}
|
||||
const sourceOptions = ref([])
|
||||
const objectList = ref([])
|
||||
|
||||
function open(type, val) {
|
||||
show.value = true
|
||||
title.value = type == 'update' ? '修改Okr' : '新增Okr'
|
||||
|
||||
Reference in New Issue
Block a user