sc
This commit is contained in:
@@ -112,7 +112,10 @@ function handleUpdateProcess() {
|
|||||||
|
|
||||||
const dialogOkr = ref(null)
|
const dialogOkr = ref(null)
|
||||||
function handleShowOkr(id) {
|
function handleShowOkr(id) {
|
||||||
dialogOkr.value.open(id)
|
dialogOkr.value.open({
|
||||||
|
nodeId: id,
|
||||||
|
canEdit: isCurrentLeafNode.value
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<el-tabs v-model="workIndex" style="flex: 1">
|
<el-tabs v-model="workIndex" style="flex: 1">
|
||||||
<el-tab-pane label="目标/关键成果" name="okr">
|
<el-tab-pane label="目标/关键成果" name="okr">
|
||||||
<div class="content-wrap">
|
<div class="content-wrap">
|
||||||
<OkrTable ref="okrTableRef" />
|
<OkrTable ref="okrTableRef" :canEdit="canEdit" />
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -275,6 +275,7 @@ import { getOkrNodeDetail, getOkrNodeHistory } from '@/api/okr/okr'
|
|||||||
const emit = defineEmits(['edit'])
|
const emit = defineEmits(['edit'])
|
||||||
|
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
|
const canEdit = ref(false)
|
||||||
|
|
||||||
const toolbarConfig = {
|
const toolbarConfig = {
|
||||||
toolbarKeys: [
|
toolbarKeys: [
|
||||||
@@ -302,9 +303,10 @@ const nodeInfo = ref({})
|
|||||||
|
|
||||||
const nodeRecords = ref([])
|
const nodeRecords = ref([])
|
||||||
|
|
||||||
async function open(id) {
|
async function open(curNode) {
|
||||||
|
canEdit.value = curNode.canEdit
|
||||||
try {
|
try {
|
||||||
getOkrNodeDetail(id).then((resp) => {
|
getOkrNodeDetail(curNode.nodeId).then((resp) => {
|
||||||
nodeInfo.value = resp
|
nodeInfo.value = resp
|
||||||
if (resp.objectives) {
|
if (resp.objectives) {
|
||||||
okrList.value = resp.objectives.map((item) => ({
|
okrList.value = resp.objectives.map((item) => ({
|
||||||
@@ -319,7 +321,7 @@ async function open(id) {
|
|||||||
okrTableRef.value.prepareData(okrList.value)
|
okrTableRef.value.prepareData(okrList.value)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
getOkrNodeHistory(id).then((resp) => {
|
getOkrNodeHistory(curNode.nodeId).then((resp) => {
|
||||||
nodeRecords.value = resp
|
nodeRecords.value = resp
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -378,7 +378,6 @@ const defaultProps = {
|
|||||||
}
|
}
|
||||||
const sourceOptions = ref([])
|
const sourceOptions = ref([])
|
||||||
const objectList = ref([])
|
const objectList = ref([])
|
||||||
|
|
||||||
function open(type, val) {
|
function open(type, val) {
|
||||||
show.value = true
|
show.value = true
|
||||||
title.value = type == 'update' ? '修改Okr' : '新增Okr'
|
title.value = type == 'update' ? '修改Okr' : '新增Okr'
|
||||||
|
|||||||
Reference in New Issue
Block a user