Compare commits
8 Commits
1413ce44c7
...
6d08fd8390
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d08fd8390 | |||
|
|
8f20e04701 | ||
|
|
e007be1f2d | ||
|
|
1f29e02135 | ||
|
|
8f2ac77fd1 | ||
|
|
dc449979fa | ||
|
|
ff3f4d9e47 | ||
|
|
5098a5cf01 |
@@ -4,10 +4,11 @@ VITE_NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
#VITE_BASE_URL='http://118.31.23.45:48080'
|
||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# VITE_BASE_URL='http://47.98.161.246:48080'
|
||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||
#VITE_BASE_URL='http://114.215.207.150:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
|
||||
@@ -54,3 +54,8 @@ export const getLinkHistorySalary = async () => {
|
||||
export const getCommissionDetail = async (params) => {
|
||||
return await request.get({ url: '/admin-api/oa/user-salary-grant/detail', params })
|
||||
}
|
||||
|
||||
// 发送工资条通知
|
||||
export const sendSalaryNotice = (data) => {
|
||||
return request.post({ url: '/admin-api/oa/user-salary-grant/pushUserSalaryGrantDetail', data })
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ const resetForm = () => {
|
||||
/** 获得部门树 */
|
||||
const getTree = async () => {
|
||||
deptTree.value = []
|
||||
const data = await DeptApi.getSimpleDeptList({ allFlag: false })
|
||||
const data = await DeptApi.getSimpleDeptList({ allFlag: true })
|
||||
let dept: Tree = { id: 0, name: '顶级部门', children: [] }
|
||||
dept.children = handleTree(data)
|
||||
deptTree.value.push(dept)
|
||||
|
||||
@@ -308,9 +308,24 @@
|
||||
<span v-if="row.status == 0">封存</span>
|
||||
<span v-else-if="row.status == 1">已封存</span>
|
||||
</el-button>
|
||||
<el-button type="primary" v-if="row.grantId" text @click="handleDetail(row)">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="row.grantId"
|
||||
style="padding: 0"
|
||||
text
|
||||
@click="handleDetail(row)"
|
||||
>
|
||||
提成明细
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
v-hasPermi="['home:salary:send']"
|
||||
style="padding: 0"
|
||||
@click="handelSendNotic(row)"
|
||||
>
|
||||
发送工资条
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -468,6 +483,20 @@ async function handleDetail(row) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
function handelSendNotic(row) {
|
||||
const name = row.grantId ? row.name : row.period
|
||||
const params = row.grantId ? { grantId: row.grantId } : { period: row.period }
|
||||
message.confirm('确认要发送"' + name + '"工资条吗?').then(async () => {
|
||||
try {
|
||||
await SalaryApi.sendSalaryNotice(params)
|
||||
message.success('发送成功!')
|
||||
} catch (error) {
|
||||
message.error(error)
|
||||
console.log(error)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<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">
|
||||
<el-row>
|
||||
<el-tree-select
|
||||
@@ -31,7 +31,6 @@
|
||||
>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<OkrTable ref="okrTableRef" :canEdit="isCurrentLeafNode" />
|
||||
<DialogOkr ref="dialogOkr" @edit="handleEditOkr" />
|
||||
<DialogOkrInfo ref="dialogOkrInfo" @success="handleSearchPeroid" />
|
||||
@@ -86,16 +85,18 @@ function handleSearchPeroid() {
|
||||
}
|
||||
|
||||
function nodeChange(nodeId) {
|
||||
searchForm.value.nodeId = nodeId
|
||||
getOkrList()
|
||||
const currentNode = findNode(peroidList.value, (node) => {
|
||||
return node.nodeId == nodeId
|
||||
})
|
||||
searchForm.value.creatorId = currentNode.creatorId
|
||||
if (!currentNode.children || currentNode.children.length == 0) {
|
||||
isCurrentLeafNode.value = true
|
||||
} else {
|
||||
isCurrentLeafNode.value = false
|
||||
if (nodeId) {
|
||||
searchForm.value.nodeId = nodeId
|
||||
getOkrList()
|
||||
const currentNode = findNode(peroidList.value, (node) => {
|
||||
return node.nodeId == nodeId
|
||||
})
|
||||
searchForm.value.creatorId = currentNode.creatorId
|
||||
if (!currentNode.children || currentNode.children.length == 0) {
|
||||
isCurrentLeafNode.value = true
|
||||
} else {
|
||||
isCurrentLeafNode.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
</div>
|
||||
<div class="dialog-okr-side pl-10px">
|
||||
<el-tabs v-model="sideIndex" style="flex: 1; height: 100%">
|
||||
<el-tab-pane label="子节点" name="subNode">
|
||||
<el-tab-pane label="子节点" name="subNode" key=" ">
|
||||
<div class="overflow-y-auto" style="height: calc(100% - 50px)">
|
||||
<div
|
||||
v-for="item in childNodeList"
|
||||
@@ -143,42 +143,43 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="评论" name="conclusion">
|
||||
<el-tab-pane label="评论" name="conclusion" key="conclusion">
|
||||
<div class="relative overflow-y-auto" style="height: calc(100% - 50px)">
|
||||
<div class="flex justify-between items-center">
|
||||
<el-select
|
||||
v-if="addNewComment"
|
||||
v-model="form.commentType"
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
@change="getCommentTemplate"
|
||||
>
|
||||
<el-option
|
||||
v-for="it in commentTypeOptions"
|
||||
:label="it.label"
|
||||
:value="it.id"
|
||||
:key="it.id"
|
||||
/>
|
||||
</el-select>
|
||||
<div v-if="addNewComment">
|
||||
<div class="flex justify-between items-center">
|
||||
<el-select
|
||||
v-model="form.commentType"
|
||||
filterable
|
||||
size="small"
|
||||
style="width: 120px"
|
||||
@change="getCommentTemplate"
|
||||
>
|
||||
<el-option
|
||||
v-for="it in commentTypeOptions"
|
||||
:label="it.label"
|
||||
:value="it.id"
|
||||
:key="it.id"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<div v-if="addNewComment">
|
||||
<el-button size="small" @click="addNewComment = false"> 取消 </el-button>
|
||||
<el-button type="primary" size="small" @click="handleSaveComment">
|
||||
发布
|
||||
</el-button>
|
||||
<div>
|
||||
<el-button size="small" @click="addNewComment = false"> 取消 </el-button>
|
||||
<el-button type="primary" size="small" @click="handleSaveComment">
|
||||
发布
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-10px" v-if="addNewComment">
|
||||
<Editor
|
||||
v-model:modelValue="form.commentValue"
|
||||
height="300px"
|
||||
:toolbarConfig="toolbarConfig"
|
||||
/>
|
||||
</div>
|
||||
<el-button v-else type="primary" size="small" @click="handleInsertComment">
|
||||
新增评论
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="mt-10px" v-if="addNewComment">
|
||||
<Editor
|
||||
v-model:modelValue="form.commentValue"
|
||||
height="300px"
|
||||
:toolbarConfig="toolbarConfig"
|
||||
/>
|
||||
</div>
|
||||
<el-button v-else type="primary" size="small" @click="handleInsertComment">
|
||||
新增评论
|
||||
</el-button>
|
||||
<div
|
||||
v-for="(it, index) in commentList"
|
||||
:key="it.commentId"
|
||||
@@ -296,7 +297,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="进度历史" name="history">
|
||||
<el-tab-pane label="进度历史" name="history" key="history">
|
||||
<div class="overflow-y-auto pl-15px" style="height: calc(100% - 50px)">
|
||||
<el-timeline class="ml-10px">
|
||||
<el-timeline-item
|
||||
@@ -649,8 +650,9 @@ function handleSendCommnet(idx) {
|
||||
}
|
||||
}
|
||||
.content-wrap {
|
||||
overflow-y: auto;
|
||||
max-height: calc(100% - 70px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100% - 15px);
|
||||
}
|
||||
}
|
||||
.dialog-okr-side {
|
||||
|
||||
@@ -120,10 +120,20 @@
|
||||
class="flex items-center w-full"
|
||||
v-for="(item, i) in objectList"
|
||||
:key="item.objectiveId"
|
||||
style="padding-bottom: 5px"
|
||||
>
|
||||
<div class="flex-1 w-100px">
|
||||
<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
|
||||
v-model="item.objectiveName"
|
||||
placeholder="目标名称"
|
||||
@@ -135,6 +145,7 @@
|
||||
placeholder="选择执行人,可多选"
|
||||
multiple
|
||||
clearable
|
||||
collapse-tags
|
||||
filterable
|
||||
style="width: 240px; margin-left: 10px"
|
||||
>
|
||||
@@ -161,7 +172,7 @@
|
||||
<el-button type="danger" text @click="removeObj(i)">删除目标</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background: #f0f3fa; padding-bottom: 15px">
|
||||
<div v-if="!item.hideChild" style="background: #f0f3fa; padding-bottom: 10px">
|
||||
<div
|
||||
class="ml-50px"
|
||||
v-for="(kr, index) in item.keyResults"
|
||||
@@ -192,7 +203,7 @@
|
||||
</div>
|
||||
<div class="mt-5px flex items-center">
|
||||
<el-tree-select
|
||||
v-model="kr.sourceId"
|
||||
v-model="kr.source"
|
||||
:data="sourceOptions"
|
||||
:props="defaultProps"
|
||||
check-strictly
|
||||
@@ -202,10 +213,10 @@
|
||||
node-key="sourceId"
|
||||
placeholder="请选择渠道"
|
||||
/>
|
||||
<el-radio-group v-model="kr.resultType" class="ml-10px">
|
||||
<!-- <el-radio-group v-model="kr.resultType" class="ml-10px">
|
||||
<el-radio-button :value="1">目标值</el-radio-button>
|
||||
<el-radio-button :value="2">是/否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-radio-group> -->
|
||||
|
||||
<el-input
|
||||
v-if="kr.resultType == 1"
|
||||
@@ -521,6 +532,7 @@ async function handleSave() {
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
|
||||
form.value.executor = form.value.executor || []
|
||||
if (form.value.executor.length > 1) {
|
||||
message
|
||||
.confirm('是否按照当前节点所选的多个执行人自动新增对应的员工节点?', {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="h-full flex flex-col">
|
||||
<div class="flex items-center justify-between">
|
||||
<el-row>
|
||||
<el-tree-select
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="h-full flex flex-col">
|
||||
<div class="flex items-center justify-between">
|
||||
<el-row>
|
||||
<el-tree-select
|
||||
|
||||
@@ -30,9 +30,11 @@
|
||||
</div>
|
||||
|
||||
<vue3-tree-org
|
||||
ref="treeOrgRef"
|
||||
:data="dataList"
|
||||
center
|
||||
collapsable
|
||||
:default-expand-keys="lastExpendKeys"
|
||||
:props="treeProps"
|
||||
@on-node-click="handleClickNode"
|
||||
>
|
||||
@@ -74,7 +76,7 @@
|
||||
</template>
|
||||
</vue3-tree-org>
|
||||
<DialogOkr ref="dialogOkr" @edit="handleEditOkr" />
|
||||
<DialogOkrInfo ref="dialogOkrInfo" @close="openOkr" />
|
||||
<DialogOkrInfo ref="dialogOkrInfo" @close="openOkr" @success="resetTreeData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -89,6 +91,7 @@ import { listToTree } from '@/utils/tree'
|
||||
|
||||
const dataList = ref({})
|
||||
const helpDataList = ref([])
|
||||
const lastExpendKeys = ref([])
|
||||
const treeProps = {
|
||||
children: 'children',
|
||||
label: 'nodeName',
|
||||
@@ -106,6 +109,7 @@ const peroidList = ref([])
|
||||
handleSearchPeroid()
|
||||
|
||||
function handleSearchPeroid() {
|
||||
lastExpendKeys.value = []
|
||||
getOkrRelationTree().then((resp) => {
|
||||
peroidList.value = resp
|
||||
if (resp && resp.length && !searchForm.value.nodeId) {
|
||||
@@ -116,6 +120,43 @@ function handleSearchPeroid() {
|
||||
})
|
||||
}
|
||||
|
||||
const treeOrgRef = ref(null)
|
||||
function resetTreeData() {
|
||||
if (treeOrgRef.value) {
|
||||
lastExpendKeys.value = treeOrgRef.value.getExpandKeys()
|
||||
}
|
||||
|
||||
// 重新获取tree数据
|
||||
getOkrRelationTree().then((resp) => {
|
||||
peroidList.value = resp
|
||||
if (resp && resp.length) {
|
||||
if (!searchForm.value.nodeId) {
|
||||
searchForm.value.nodeId = resp[0].nodeId
|
||||
searchForm.value.nodeName = resp[0].nodeName
|
||||
}
|
||||
getOkrRelationTreeChildren({
|
||||
nodeId: searchForm.value.nodeId
|
||||
}).then((resp) => {
|
||||
const tree = listToTree(resp, {
|
||||
id: 'nodeId',
|
||||
pid: 'parentId',
|
||||
children: 'children'
|
||||
})
|
||||
// // 设置展开的keys
|
||||
// if (treeOrgRef.value) {
|
||||
// treeOrgRef.value.setExpandKeys(lastExpendKeys.value)
|
||||
// }
|
||||
helpDataList.value = resp
|
||||
if (tree && tree.length) {
|
||||
dataList.value = tree[0]
|
||||
} else {
|
||||
dataList.value = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getOkrList() {
|
||||
getOkrRelationTreeChildren({
|
||||
nodeId: searchForm.value.nodeId
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex-1 h-200px overflow-hidden">
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="okrList"
|
||||
default-expand-all
|
||||
row-key="id"
|
||||
size="large"
|
||||
height="100%"
|
||||
@row-click="handleRowClick"
|
||||
@expand-change="handleExpand"
|
||||
>
|
||||
@@ -19,11 +20,18 @@
|
||||
height: getHeight(row, $index)
|
||||
}"
|
||||
></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>
|
||||
<span class="line2"></span>
|
||||
<span>
|
||||
【关键成果】{{ row.channelName }} {{ 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>
|
||||
<div class="flex items-center mt-10px ml-50px">
|
||||
@@ -94,13 +102,14 @@ function prepareData(list) {
|
||||
nodeId: child.nodeId,
|
||||
isSys: child.isSys,
|
||||
processId: child.id,
|
||||
name: child.keyResultName,
|
||||
name: child.keyResultShowName,
|
||||
progress: child.progress,
|
||||
executorName: child.executorName,
|
||||
type: '关键成果',
|
||||
resultType: child.resultType,
|
||||
targetValue: child.targetValue,
|
||||
currentValue: Number(child.currentValue)
|
||||
currentValue: Number(child.currentValue),
|
||||
sourceName: child.sourceName
|
||||
}
|
||||
helpList.value.push(kr)
|
||||
return kr
|
||||
|
||||
Reference in New Issue
Block a user