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