|
|
|
@ -18,7 +18,7 @@ |
|
|
|
|
<span class="text-14px ml-0.25">ork落地</span> |
|
|
|
|
<div class="ml-20px text-14px"> |
|
|
|
|
<span>【节点】</span> |
|
|
|
|
<span>寻驾全年目标 -> 1月</span> |
|
|
|
|
<span>{{ nodeInfo.nodeName }}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex items-center"> |
|
|
|
@ -43,25 +43,25 @@ |
|
|
|
|
<div class="detail-basic-title"> |
|
|
|
|
<div class="basic-title-item"> |
|
|
|
|
<div class="basic-title-label">创建人</div> |
|
|
|
|
<div class="basic-title-value">张三</div> |
|
|
|
|
<div class="basic-title-value">{{ nodeInfo.creator }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="basic-title-item"> |
|
|
|
|
<div class="basic-title-label">执行人</div> |
|
|
|
|
<div class="basic-title-value">张三、李四</div> |
|
|
|
|
<div class="basic-title-value">{{ nodeInfo.executorName }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="basic-title-item"> |
|
|
|
|
<div class="basic-title-label">目标数</div> |
|
|
|
|
<div class="basic-title-value">3</div> |
|
|
|
|
<div class="basic-title-value">{{ okrList.length }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="basic-title-item" style="min-width: 200px"> |
|
|
|
|
<div class="basic-title-label">总体进度</div> |
|
|
|
|
<el-progress :percentage="60" :stroke-width="8" /> |
|
|
|
|
<el-progress :percentage="nodeInfo.progress || 0" :stroke-width="8" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex detail-basic-info"> |
|
|
|
|
<span>开始日期:2025-01-01</span> |
|
|
|
|
<span>截止日期:2025-01-31</span> |
|
|
|
|
<span>最新更新时间:2025-01-15</span> |
|
|
|
|
<span>开始日期:{{ nodeInfo.startTime }}</span> |
|
|
|
|
<span>截止日期:{{ nodeInfo.endTime }}</span> |
|
|
|
|
<span>最新更新时间:{{ nodeInfo.updateTime }}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex" style="position: relative; flex: 1; height: 100px"> |
|
|
|
@ -82,8 +82,8 @@ |
|
|
|
|
<el-tab-pane label="子节点" name="subNode"> |
|
|
|
|
<div class="overflow-y-auto" style="height: calc(100% - 50px)"> |
|
|
|
|
<div |
|
|
|
|
v-for="index in 12" |
|
|
|
|
:key="index" |
|
|
|
|
v-for="item in childNodeList" |
|
|
|
|
:key="item.nodeId" |
|
|
|
|
class="border-b-1 child-item" |
|
|
|
|
style="padding: 10px 5px; cursor: pointer" |
|
|
|
|
@click="handleChildItem" |
|
|
|
@ -92,33 +92,33 @@ |
|
|
|
|
class="flex justify-between items-center overflow-hidden text-16px" |
|
|
|
|
style="line-height: 30px" |
|
|
|
|
> |
|
|
|
|
<div class="child-label">【节点】子节点{{ index }}</div> |
|
|
|
|
<div class="child-label">【节点】{{ item.nodeName }}</div> |
|
|
|
|
<el-progress |
|
|
|
|
type="line" |
|
|
|
|
:percentage="0" |
|
|
|
|
:percentage="item.progress || 0" |
|
|
|
|
:stroke-width="6" |
|
|
|
|
style="width: 120px" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
<div class="ml-10px flex items-center text-13px" style="line-height: 30px"> |
|
|
|
|
<span>目标数:</span> |
|
|
|
|
<span style="color: #aaa">4</span> |
|
|
|
|
<span style="color: #aaa">{{ item.objectiveCount }}</span> |
|
|
|
|
<el-divider direction="vertical" style="margin: 0 20px" /> |
|
|
|
|
<div |
|
|
|
|
class="flex-1 overflow-hidden h-30px" |
|
|
|
|
style="text-overflow: ellipsis; white-space: nowrap" |
|
|
|
|
> |
|
|
|
|
<span>执行人:</span> |
|
|
|
|
<span style="color: #aaa">张三、李四、王二</span> |
|
|
|
|
<span style="color: #aaa">{{ item.executorName }}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div |
|
|
|
|
class="ml-10px flex items-center text-12px" |
|
|
|
|
style="line-height: 20px; color: #aaa" |
|
|
|
|
> |
|
|
|
|
<span>开始日期:2025-01-01</span> |
|
|
|
|
<span>开始日期:{{ item.startTime }}</span> |
|
|
|
|
<el-divider direction="vertical" style="margin: 0 20px" /> |
|
|
|
|
<span>截止日期:2025-01-31</span> |
|
|
|
|
<span>截止日期:{{ item.endTime }}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -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> |
|
|
|
|
<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> |
|
|
|
|
<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"> |
|
|
|
|
创建节点 |
|
|
|
|
{{ item.content }} |
|
|
|
|
</div> |
|
|
|
|
</el-timeline-item> |
|
|
|
|
</el-timeline> |
|
|
|
@ -274,8 +267,11 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup name="DialogOkr"> |
|
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
import OkrTable from './OkrTable.vue' |
|
|
|
|
|
|
|
|
|
import { getOkrNodeDetail, getOkrNodeHistory } from '@/api/okr/okr' |
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['edit']) |
|
|
|
|
|
|
|
|
|
const show = ref(false) |
|
|
|
@ -298,123 +294,38 @@ const toolbarConfig = { |
|
|
|
|
|
|
|
|
|
const workIndex = ref('okr') |
|
|
|
|
const okrList = ref([]) |
|
|
|
|
const childNodeList = ref([]) |
|
|
|
|
const sideIndex = ref('subNode') |
|
|
|
|
|
|
|
|
|
const okrTableRef = ref(null) |
|
|
|
|
const nodeInfo = ref({}) |
|
|
|
|
|
|
|
|
|
const nodeRecords = ref([]) |
|
|
|
|
|
|
|
|
|
async function open(id) { |
|
|
|
|
show.value = true |
|
|
|
|
// 获取数据详情 |
|
|
|
|
console.log(id) |
|
|
|
|
okrList.value = [ |
|
|
|
|
{ |
|
|
|
|
id: 1, |
|
|
|
|
name: '销售成交额达到1000万,总体成交率15%', |
|
|
|
|
process: 60, |
|
|
|
|
type: 'object', |
|
|
|
|
children: [ |
|
|
|
|
{ |
|
|
|
|
id: 11, |
|
|
|
|
type: 'keyresult', |
|
|
|
|
channelName: '抖音', |
|
|
|
|
target: '线索目标', |
|
|
|
|
targetType: 'value', |
|
|
|
|
isSystem: true, |
|
|
|
|
targetNum: 10000, |
|
|
|
|
targetValue: false, |
|
|
|
|
currentNum: 5000, |
|
|
|
|
currentValue: false, |
|
|
|
|
process: 60, |
|
|
|
|
users: '张三、李四' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 12, |
|
|
|
|
type: 'keyresult', |
|
|
|
|
channelName: '抖音', |
|
|
|
|
target: '成交数', |
|
|
|
|
isSystem: true, |
|
|
|
|
targetType: 'value', |
|
|
|
|
targetNum: 2500, |
|
|
|
|
targetValue: false, |
|
|
|
|
currentNum: 500, |
|
|
|
|
currentValue: false, |
|
|
|
|
process: 60, |
|
|
|
|
users: '张三、李四' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 2, |
|
|
|
|
name: '运营消耗预算控制在20万以内,获得10万条线索', |
|
|
|
|
process: 80, |
|
|
|
|
type: 'object', |
|
|
|
|
children: [ |
|
|
|
|
{ |
|
|
|
|
id: 21, |
|
|
|
|
type: 'keyresult', |
|
|
|
|
target: '本月抖音运营投入相较上月少10%', |
|
|
|
|
targetType: 'radio', |
|
|
|
|
isSystem: false, |
|
|
|
|
targetNum: 0, |
|
|
|
|
targetValue: false, |
|
|
|
|
currentNum: 0, |
|
|
|
|
currentValue: false, |
|
|
|
|
process: 0, |
|
|
|
|
users: '' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 22, |
|
|
|
|
type: 'keyresult', |
|
|
|
|
target: '累计输出作品', |
|
|
|
|
process: 15, |
|
|
|
|
users: '', |
|
|
|
|
isSystem: false, |
|
|
|
|
targetType: 'value', |
|
|
|
|
targetNum: 200, |
|
|
|
|
targetValue: false, |
|
|
|
|
currentNum: 30, |
|
|
|
|
currentValue: false |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 3, |
|
|
|
|
name: '目标3', |
|
|
|
|
process: 40, |
|
|
|
|
type: 'object', |
|
|
|
|
children: [ |
|
|
|
|
{ |
|
|
|
|
id: 31, |
|
|
|
|
type: 'keyresult', |
|
|
|
|
target: '关键成果1', |
|
|
|
|
process: 100, |
|
|
|
|
users: '', |
|
|
|
|
isSystem: false, |
|
|
|
|
targetType: 'radio', |
|
|
|
|
targetNum: 0, |
|
|
|
|
targetValue: false, |
|
|
|
|
currentNum: 0, |
|
|
|
|
currentValue: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 22, |
|
|
|
|
type: 'keyresult', |
|
|
|
|
target: '关键成果2', |
|
|
|
|
process: 15, |
|
|
|
|
users: '', |
|
|
|
|
isSystem: false, |
|
|
|
|
targetType: 'value', |
|
|
|
|
targetNum: 200, |
|
|
|
|
targetValue: false, |
|
|
|
|
currentNum: 30, |
|
|
|
|
currentValue: false |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
try { |
|
|
|
|
getOkrNodeDetail(id).then((resp) => { |
|
|
|
|
nodeInfo.value = resp |
|
|
|
|
if (resp.objectives) { |
|
|
|
|
okrList.value = resp.objectives.map((item) => ({ |
|
|
|
|
...item, |
|
|
|
|
keyResults: item.keyResults || [] |
|
|
|
|
})) |
|
|
|
|
} else { |
|
|
|
|
okrList.value = [] |
|
|
|
|
} |
|
|
|
|
childNodeList.value = [...resp.children] |
|
|
|
|
nextTick(() => { |
|
|
|
|
okrTableRef.value.prepareData(okrList.value) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
getOkrNodeHistory(id).then((resp) => { |
|
|
|
|
nodeRecords.value = resp |
|
|
|
|
}) |
|
|
|
|
} finally { |
|
|
|
|
} |
|
|
|
|
show.value = true |
|
|
|
|
// 获取数据详情 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function close() { |
|
|
|
|