sc
This commit is contained in:
@@ -63,3 +63,21 @@ export const getAllOkrPage = (params) => {
|
|||||||
headers: { 'instance-id': 1016 }
|
headers: { 'instance-id': 1016 }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取节点操作历史
|
||||||
|
export const getOkrNodeHistory = (nodeId) => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/record/list',
|
||||||
|
params: { nodeId },
|
||||||
|
headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取系统默认的关键成果内容
|
||||||
|
export const getDefaultOkrOptions = () => {
|
||||||
|
return request.get({
|
||||||
|
url: '/admin-api/okr/dict-data/get-by-type',
|
||||||
|
params: { dictType: 'key_result_source' },
|
||||||
|
headers: { 'instance-id': 1016 }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -244,23 +244,16 @@
|
|||||||
<el-tab-pane label="进度历史" name="history">
|
<el-tab-pane label="进度历史" name="history">
|
||||||
<div class="overflow-y-auto pl-15px" style="height: calc(100% - 50px)">
|
<div class="overflow-y-auto pl-15px" style="height: calc(100% - 50px)">
|
||||||
<el-timeline class="ml-10px">
|
<el-timeline class="ml-10px">
|
||||||
<el-timeline-item placement="bottom" timestamp="2025-01-20" color="#30d1fc">
|
<el-timeline-item
|
||||||
<div>张三</div>
|
v-for="item in nodeRecords"
|
||||||
|
:key="item.recordId"
|
||||||
|
placement="bottom"
|
||||||
|
:timestamp="formatDate(item.createTime)"
|
||||||
|
color="#30d1fc"
|
||||||
|
>
|
||||||
|
<div>{{ item.creator }}</div>
|
||||||
<div class="mt-10px text-14px" style="line-height: 24px; color: #666">
|
<div class="mt-10px text-14px" style="line-height: 24px; color: #666">
|
||||||
进度变化:40% -> 60%
|
{{ item.content }}
|
||||||
(节点进度是读取目标进度计算的,目标进度根据关键成果计算,关键成果在提交跟新时会有)
|
|
||||||
</div>
|
|
||||||
</el-timeline-item>
|
|
||||||
<el-timeline-item placement="bottom" timestamp="2025-01-15" color="#30d1fc">
|
|
||||||
<div>张三</div>
|
|
||||||
<div class="mt-10px text-14px" style="line-height: 24px; color: #666">
|
|
||||||
更新节点
|
|
||||||
</div>
|
|
||||||
</el-timeline-item>
|
|
||||||
<el-timeline-item placement="bottom" timestamp="2025-01-01" color="#30d1fc">
|
|
||||||
<div>张三</div>
|
|
||||||
<div class="mt-10px text-14px" style="line-height: 24px; color: #666">
|
|
||||||
创建节点
|
|
||||||
</div>
|
</div>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
@@ -274,9 +267,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="DialogOkr">
|
<script setup name="DialogOkr">
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import OkrTable from './OkrTable.vue'
|
import OkrTable from './OkrTable.vue'
|
||||||
|
|
||||||
import { getOkrNodeDetail } from '@/api/okr/okr'
|
import { getOkrNodeDetail, getOkrNodeHistory } from '@/api/okr/okr'
|
||||||
|
|
||||||
const emit = defineEmits(['edit'])
|
const emit = defineEmits(['edit'])
|
||||||
|
|
||||||
@@ -306,6 +300,8 @@ const sideIndex = ref('subNode')
|
|||||||
const okrTableRef = ref(null)
|
const okrTableRef = ref(null)
|
||||||
const nodeInfo = ref({})
|
const nodeInfo = ref({})
|
||||||
|
|
||||||
|
const nodeRecords = ref([])
|
||||||
|
|
||||||
async function open(id) {
|
async function open(id) {
|
||||||
try {
|
try {
|
||||||
getOkrNodeDetail(id).then((resp) => {
|
getOkrNodeDetail(id).then((resp) => {
|
||||||
@@ -323,6 +319,9 @@ async function open(id) {
|
|||||||
okrTableRef.value.prepareData(okrList.value)
|
okrTableRef.value.prepareData(okrList.value)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
getOkrNodeHistory(id).then((resp) => {
|
||||||
|
nodeRecords.value = resp
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
}
|
}
|
||||||
show.value = true
|
show.value = true
|
||||||
|
|||||||
@@ -181,9 +181,9 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="it in krOptions"
|
v-for="it in krOptions"
|
||||||
:key="it.keyResultId"
|
:key="it.value"
|
||||||
:label="it.keyResultName"
|
:label="it.label"
|
||||||
:value="it.keyResultId"
|
:value="it.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="danger" text @click="removeKR(i, index)">
|
<el-button type="danger" text @click="removeKR(i, index)">
|
||||||
@@ -331,7 +331,8 @@ import {
|
|||||||
getOkrNodeDetail,
|
getOkrNodeDetail,
|
||||||
createOkrNode,
|
createOkrNode,
|
||||||
updateOkrNode,
|
updateOkrNode,
|
||||||
getAllOkrPage
|
getAllOkrPage,
|
||||||
|
getDefaultOkrOptions
|
||||||
} from '@/api/okr/okr'
|
} from '@/api/okr/okr'
|
||||||
import { listToTree } from '@/utils/tree'
|
import { listToTree } from '@/utils/tree'
|
||||||
import { getEmployeeSimpleList } from '@/api/pers/employee'
|
import { getEmployeeSimpleList } from '@/api/pers/employee'
|
||||||
@@ -393,6 +394,9 @@ function open(type, val) {
|
|||||||
children: 'children'
|
children: 'children'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
getDefaultOkrOptions().then((resp) => {
|
||||||
|
krOptions.value = resp
|
||||||
|
})
|
||||||
if (val) {
|
if (val) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user