qsh 2 months ago
parent dc449979fa
commit 8f2ac77fd1
  1. 4
      .env.base
  2. 3
      src/views/OKR/Management/Components/AllTarget.vue
  3. 5
      src/views/OKR/Management/Components/DialogOkr.vue
  4. 14
      src/views/OKR/Management/Components/DialogOkrInfo.vue
  5. 17
      src/views/OKR/Management/Components/OkrTable.vue

@ -6,9 +6,9 @@ VITE_DEV=true
# 请求路径 # 请求路径
# VITE_BASE_URL='http://localhost:48080' # VITE_BASE_URL='http://localhost:48080'
VITE_BASE_URL='http://47.98.161.246:48080' # VITE_BASE_URL='http://47.98.161.246:48080'
# VITE_BASE_URL='http://114.55.169.15:48080' # VITE_BASE_URL='http://114.55.169.15:48080'
# VITE_BASE_URL='http://114.215.207.150:48080' VITE_BASE_URL='http://114.215.207.150:48080'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload' VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'

@ -1,5 +1,5 @@
<template> <template>
<div> <div class="flex flex-col w-full h-full p-4 bg-white rounded-lg shadow-md overflow-hidden">
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<el-row> <el-row>
<el-tree-select <el-tree-select
@ -31,7 +31,6 @@
> >
</el-row> </el-row>
</div> </div>
<OkrTable ref="okrTableRef" :canEdit="isCurrentLeafNode" /> <OkrTable ref="okrTableRef" :canEdit="isCurrentLeafNode" />
<DialogOkr ref="dialogOkr" @edit="handleEditOkr" /> <DialogOkr ref="dialogOkr" @edit="handleEditOkr" />
<DialogOkrInfo ref="dialogOkrInfo" @success="handleSearchPeroid" /> <DialogOkrInfo ref="dialogOkrInfo" @success="handleSearchPeroid" />

@ -649,8 +649,9 @@ function handleSendCommnet(idx) {
} }
} }
.content-wrap { .content-wrap {
overflow-y: auto; display: flex;
max-height: calc(100% - 70px); flex-direction: column;
height: calc(100% - 15px);
} }
} }
.dialog-okr-side { .dialog-okr-side {

@ -120,10 +120,20 @@
class="flex items-center w-full" class="flex items-center w-full"
v-for="(item, i) in objectList" v-for="(item, i) in objectList"
:key="item.objectiveId" :key="item.objectiveId"
style="padding-bottom: 5px"
> >
<div class="flex-1 w-100px"> <div class="flex-1 w-100px">
<div class="flex items-center"> <div class="flex items-center">
<el-tag type="success" class="mr-10px">O{{ i + 1 }}</el-tag> <el-tooltip content="点击可折叠/展开目标" placement="top" effect="dark">
<el-tag
type="success"
class="mr-10px"
@click="item.hideChild = !item.hideChild"
>
O{{ i + 1 }}
</el-tag>
</el-tooltip>
<el-input <el-input
v-model="item.objectiveName" v-model="item.objectiveName"
placeholder="目标名称" placeholder="目标名称"
@ -161,7 +171,7 @@
<el-button type="danger" text @click="removeObj(i)">删除目标</el-button> <el-button type="danger" text @click="removeObj(i)">删除目标</el-button>
</div> </div>
</div> </div>
<div style="background: #f0f3fa; padding-bottom: 15px"> <div v-if="!item.hideChild" style="background: #f0f3fa; padding-bottom: 10px">
<div <div
class="ml-50px" class="ml-50px"
v-for="(kr, index) in item.keyResults" v-for="(kr, index) in item.keyResults"

@ -1,11 +1,12 @@
<template> <template>
<div> <div class="flex-1 h-200px overflow-hidden">
<el-table <el-table
ref="tableRef" ref="tableRef"
:data="okrList" :data="okrList"
default-expand-all default-expand-all
row-key="id" row-key="id"
size="large" size="large"
height="100%"
@row-click="handleRowClick" @row-click="handleRowClick"
@expand-change="handleExpand" @expand-change="handleExpand"
> >
@ -19,11 +20,18 @@
height: getHeight(row, $index) height: getHeight(row, $index)
}" }"
></span> ></span>
<span v-if="row.type == '目标'">目标{{ row.name }}</span> <span v-if="row.type == '目标'">
<el-tag type="success" size="small">目标</el-tag>
{{ row.name }}
</span>
<template v-else> <template v-else>
<span class="line2"></span> <span class="line2"></span>
<span> <span>
关键成果{{ row.sourceName }} {{ row.name }} <el-tag type="primary" size="small">关键成果</el-tag>
<span class="font-bold text-black" v-if="row.sourceName">
{{ row.sourceName }}
</span>
<span>{{ row.name }}</span>
<span v-if="row.resultType == 1"> {{ row.targetValue }}</span> <span v-if="row.resultType == 1"> {{ row.targetValue }}</span>
</span> </span>
<div class="flex items-center mt-10px ml-50px"> <div class="flex items-center mt-10px ml-50px">
@ -100,7 +108,8 @@ function prepareData(list) {
type: '关键成果', type: '关键成果',
resultType: child.resultType, resultType: child.resultType,
targetValue: child.targetValue, targetValue: child.targetValue,
currentValue: Number(child.currentValue) currentValue: Number(child.currentValue),
sourceName: child.sourceName
} }
helpList.value.push(kr) helpList.value.push(kr)
return kr return kr

Loading…
Cancel
Save