2025-02-07 16:12:06 +08:00
|
|
|
<template>
|
|
|
|
|
<lay-container fluid="true" class="organization-box">
|
|
|
|
|
<div style="display: flex">
|
2025-02-19 18:03:41 +08:00
|
|
|
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
|
|
|
|
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
|
|
|
|
:showLine="false" @node-click="handleClick">
|
2025-02-07 16:12:06 +08:00
|
|
|
<template #title="{ data }">
|
2025-02-19 18:03:41 +08:00
|
|
|
<span :class="group_id == data.id ? 'isChecked' : ''">
|
|
|
|
|
{{ data.name }}
|
2025-02-07 16:12:06 +08:00
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</lay-tree>
|
|
|
|
|
<div class="isFold" @click="isFold = !isFold">
|
|
|
|
|
<lay-icon v-if="!isFold" class="layui-icon-left"></lay-icon>
|
|
|
|
|
<lay-icon v-else class="layui-icon-right"></lay-icon>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="flex: 1; padding: 10px; over-flow: auto">
|
|
|
|
|
<!-- table -->
|
|
|
|
|
<lay-card>
|
|
|
|
|
<lay-form>
|
|
|
|
|
<lay-row>
|
|
|
|
|
<lay-col :md="5">
|
2025-02-19 18:03:41 +08:00
|
|
|
<lay-form-item label="月度" label-width="80">
|
|
|
|
|
<lay-date-picker type="yearmonth" v-model="yearmonth" placeholder="月度"
|
|
|
|
|
allow-clear></lay-date-picker>
|
2025-02-07 16:12:06 +08:00
|
|
|
</lay-form-item>
|
|
|
|
|
</lay-col>
|
2025-02-19 18:03:41 +08:00
|
|
|
<!-- <lay-col :md="5">-->
|
|
|
|
|
<!-- <lay-form-item label="考评对象" label-width="80">-->
|
|
|
|
|
<!-- <lay-input v-model="searchQuery.evaluateTarget" placeholder="请输入" size="sm" :allow-clear="true"-->
|
|
|
|
|
<!-- style="width: 98%"></lay-input>-->
|
|
|
|
|
<!-- </lay-form-item>-->
|
|
|
|
|
<!-- </lay-col>-->
|
|
|
|
|
<!-- <lay-col :md="5">-->
|
|
|
|
|
<!-- <lay-form-item label="状态" label-width="80">-->
|
|
|
|
|
<!-- <lay-select class="search-input" size="sm" v-model="searchQuery.status" :allow-clear="true"-->
|
|
|
|
|
<!-- placeholder="请选择">-->
|
|
|
|
|
<!-- <lay-select-option value="1" label="待自评"></lay-select-option>-->
|
|
|
|
|
<!-- <lay-select-option value="2" label="已自评"></lay-select-option>-->
|
|
|
|
|
<!-- <lay-select-option value="3" label="已科室考评"></lay-select-option>-->
|
|
|
|
|
<!-- </lay-select>-->
|
|
|
|
|
<!-- </lay-form-item>-->
|
|
|
|
|
<!-- </lay-col>-->
|
2025-02-07 16:12:06 +08:00
|
|
|
<lay-col :md="5">
|
|
|
|
|
<lay-form-item label-width="20">
|
2025-02-19 18:03:41 +08:00
|
|
|
<lay-button style="margin-left: 20px" type="normal" size="sm" @click="toSearch">
|
2025-02-07 16:12:06 +08:00
|
|
|
查询
|
|
|
|
|
</lay-button>
|
2025-02-19 18:03:41 +08:00
|
|
|
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
2025-02-07 16:12:06 +08:00
|
|
|
</lay-form-item>
|
|
|
|
|
</lay-col>
|
|
|
|
|
</lay-row>
|
|
|
|
|
</lay-form>
|
|
|
|
|
</lay-card>
|
2025-02-19 18:03:41 +08:00
|
|
|
<lay-tab v-model="tab_id" type="brief" @change="openTab">
|
|
|
|
|
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
|
|
|
|
<lay-table :page="page" height="600px" :columns="columns" :loading="loading"
|
|
|
|
|
:data-source="dataSource" v-model:selected-keys="selectedKeys" @change="change">
|
|
|
|
|
<template v-slot:scoringrecord_status="{row}">
|
|
|
|
|
<lay-tag v-if="row.scoringrecord_status==1" type="primary">已自评</lay-tag>
|
|
|
|
|
<lay-tag v-if="row.scoringrecord_status==2">未自评</lay-tag>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:operator="{ row }">
|
|
|
|
|
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==1"
|
|
|
|
|
@click="getInfo(row,1)">科室评分</span>
|
|
|
|
|
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord!=0 && row.scoringrecord_status==1"
|
|
|
|
|
@click="getInfo(row,2)">考评详情</span>
|
|
|
|
|
<span style="color: #999999;cursor: not-allowed" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==2">考评详情</span>
|
|
|
|
|
</template>
|
|
|
|
|
</lay-table>
|
|
|
|
|
</lay-tab-item>
|
|
|
|
|
</lay-tab>
|
2025-02-07 16:12:06 +08:00
|
|
|
|
2025-02-19 18:03:41 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px','100%']"
|
|
|
|
|
:btn="addIsInfo==1?addButton:''">
|
|
|
|
|
<lay-container fluid="true" style="padding: 20px">
|
|
|
|
|
<lay-table :default-expand-all="true" ref="tableRef6" children-column-name="children" :columns="columns6"
|
|
|
|
|
:data-source="dataSource6">
|
|
|
|
|
<template v-slot:input="{ data,rowIndex}">
|
|
|
|
|
<lay-input-number v-if="data.pid==0" :disabled="true" :min="0" :max="data.base_score"
|
|
|
|
|
v-model="data.base_score" position="right"></lay-input-number>
|
|
|
|
|
<lay-input-number v-if="data.pid!=0" :disabled="addIsInfo==2" :min="0" :max="data.base_score"
|
|
|
|
|
v-model="data.content_score"
|
|
|
|
|
position="right"></lay-input-number>
|
2025-02-07 16:12:06 +08:00
|
|
|
</template>
|
2025-02-19 18:03:41 +08:00
|
|
|
<template v-slot:ksinput="{ data,rowIndex}">
|
|
|
|
|
<lay-input-number v-if="data.pid==0" :disabled="true" :min="0" :max="data.base_score"
|
|
|
|
|
v-model="data.base_score" position="right"></lay-input-number>
|
|
|
|
|
<lay-input-number v-if="data.pid!=0" :disabled="addIsInfo==2" :min="0" :max="data.base_score"
|
|
|
|
|
v-model="data.department_score"
|
|
|
|
|
position="right"></lay-input-number>
|
2025-02-07 16:12:06 +08:00
|
|
|
</template>
|
|
|
|
|
</lay-table>
|
2025-02-19 18:03:41 +08:00
|
|
|
</lay-container>
|
2025-02-07 16:12:06 +08:00
|
|
|
</lay-layer>
|
|
|
|
|
</lay-container>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
2025-02-19 18:03:41 +08:00
|
|
|
import {ref, reactive, onMounted} from 'vue'
|
|
|
|
|
import {layer} from '@layui/layui-vue'
|
|
|
|
|
import {
|
|
|
|
|
getUserGroupNew,
|
|
|
|
|
getGroupEvaluation,
|
|
|
|
|
getMonthlyUserList,
|
|
|
|
|
MonthlyCreate,
|
|
|
|
|
getMonthlyListFind, getMonthlyListUpdate
|
|
|
|
|
} from "@/api/module/home";
|
|
|
|
|
import dayjs from "dayjs";
|
2025-02-07 16:12:06 +08:00
|
|
|
|
2025-02-19 18:03:41 +08:00
|
|
|
onMounted(() => {
|
|
|
|
|
getLeftList();
|
2025-02-07 16:12:06 +08:00
|
|
|
})
|
2025-02-19 18:03:41 +08:00
|
|
|
const openTab = (d) => {
|
|
|
|
|
console.log(d)
|
|
|
|
|
tab_id.value = d;
|
|
|
|
|
dataSource.value = [];
|
|
|
|
|
page.current = 1;
|
|
|
|
|
getList();
|
|
|
|
|
}
|
|
|
|
|
const page = reactive({current: 1, limit: 10, total: 1})
|
|
|
|
|
const change = (d) => {
|
|
|
|
|
console.log(d);
|
|
|
|
|
page.current = d.current;
|
|
|
|
|
page.limit = d.limit;
|
|
|
|
|
getList();
|
|
|
|
|
}
|
|
|
|
|
const addIsInfo = ref(1);
|
|
|
|
|
const infoShow = ref(false);
|
|
|
|
|
const yearmonth = ref();
|
|
|
|
|
const getList = () => {
|
|
|
|
|
getMonthlyUserList({
|
|
|
|
|
'group_id': group_id.value,
|
|
|
|
|
'time': yearmonth.value,
|
|
|
|
|
'evaluation_schedule_id': tab_id.value,
|
|
|
|
|
page: page.current,
|
|
|
|
|
size: page.limit
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.code == 1) {
|
|
|
|
|
dataSource.value = res.data.result;
|
|
|
|
|
page.total = res.data.count;
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(res.msg, {icon: 2})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const thisInfo = ref();
|
|
|
|
|
const getInfo = (row, type) => {
|
|
|
|
|
infoShow.value = true;
|
|
|
|
|
addIsInfo.value = type;
|
|
|
|
|
console.log(row);
|
|
|
|
|
thisInfo.value = row;
|
|
|
|
|
getInfoMode(row);
|
|
|
|
|
}
|
|
|
|
|
const getInfoMode = (row) => {
|
|
|
|
|
getMonthlyListFind({
|
|
|
|
|
evaluation_schedule_id: tab_id.value,
|
|
|
|
|
month: row.time,
|
|
|
|
|
user_id: row.id
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.code == 1) {
|
|
|
|
|
dataSource6.value = res.data;
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(res.msg, {icon: 2})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const tabList = ref([]);
|
|
|
|
|
const tab_id = ref(0);
|
|
|
|
|
const getTabList = () => {
|
|
|
|
|
getGroupEvaluation({'group_id': group_id.value}).then((res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.code == 1) {
|
|
|
|
|
tabList.value = res.data;
|
|
|
|
|
tab_id.value = res.data[0].id;
|
|
|
|
|
getList();
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(res.msg, {icon: 2})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const group_id = ref(1);
|
|
|
|
|
const getLeftList = () => {
|
|
|
|
|
getUserGroupNew({}).then((res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.code == 1) {
|
|
|
|
|
data.value = res.data;
|
|
|
|
|
group_id.value = res.data[0].id;
|
|
|
|
|
getTabList();
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(res.msg, {icon: 2})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const data = ref([])
|
2025-02-07 16:12:06 +08:00
|
|
|
const isFold = ref(false)
|
|
|
|
|
const searchQuery = ref({
|
2025-02-19 18:03:41 +08:00
|
|
|
year: '',
|
|
|
|
|
evaluateTarget: '',
|
|
|
|
|
status: ''
|
2025-02-07 16:12:06 +08:00
|
|
|
})
|
2025-02-19 18:03:41 +08:00
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
function toReset() {
|
|
|
|
|
searchQuery.value = {
|
2025-02-19 18:03:41 +08:00
|
|
|
year: '',
|
|
|
|
|
evaluateTarget: '',
|
|
|
|
|
status: ''
|
2025-02-07 16:12:06 +08:00
|
|
|
}
|
|
|
|
|
}
|
2025-02-19 18:03:41 +08:00
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
function handleClick(node: any) {
|
2025-02-19 18:03:41 +08:00
|
|
|
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
|
|
|
|
page.current = 1;
|
|
|
|
|
getList();
|
|
|
|
|
// change(page)
|
2025-02-07 16:12:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toSearch() {
|
2025-02-19 18:03:41 +08:00
|
|
|
page.current = 1;
|
|
|
|
|
getList();
|
2025-02-07 16:12:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const selectedKeys = ref()
|
|
|
|
|
const columns = ref([
|
2025-02-19 18:03:41 +08:00
|
|
|
{title: '选项', width: '55px', type: 'checkbox', align: 'center'},
|
|
|
|
|
{title: '序号', width: '60px', key: 'id', align: 'center'},
|
|
|
|
|
{title: '月度', width: '80px', key: 'time', align: 'center'},
|
|
|
|
|
{title: '考评对象', width: '100px', key: 'nickname', align: 'center'},
|
|
|
|
|
{title: '工号', width: '100px', key: 'work_number', align: 'center'},
|
|
|
|
|
{title: '部门', width: '120px', key: 'group_name', align: 'center'},
|
|
|
|
|
{title: '季度总加分', width: '100px', key: 'zongjiafen', align: 'center'},
|
|
|
|
|
{title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center'},
|
|
|
|
|
{title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center'},
|
|
|
|
|
{title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center'},
|
2025-02-07 16:12:06 +08:00
|
|
|
{
|
|
|
|
|
title: '操作',
|
2025-02-19 18:03:41 +08:00
|
|
|
width: '180px',
|
2025-02-07 16:12:06 +08:00
|
|
|
customSlot: 'operator',
|
|
|
|
|
key: 'operator',
|
2025-02-19 18:03:41 +08:00
|
|
|
fixed: 'right', align: 'center'
|
2025-02-07 16:12:06 +08:00
|
|
|
}
|
|
|
|
|
])
|
2025-02-19 18:03:41 +08:00
|
|
|
const dataSource = ref()
|
|
|
|
|
const addButton = ref([
|
2025-02-07 16:12:06 +08:00
|
|
|
{
|
2025-02-19 18:03:41 +08:00
|
|
|
text: "确认",
|
|
|
|
|
callback: async () => {
|
|
|
|
|
var json = JSON.stringify(dataSource6.value);
|
|
|
|
|
var res = await getMonthlyListUpdate({
|
|
|
|
|
'term': thisInfo.value.time,
|
|
|
|
|
'json': json,
|
|
|
|
|
'user_id': thisInfo.value.id,
|
|
|
|
|
evaluation_schedule_id: tab_id.value
|
|
|
|
|
});
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.code == 1) {
|
|
|
|
|
layer.msg('提交成功!', {icon: 1})
|
|
|
|
|
thisInfo.value = {};
|
|
|
|
|
infoShow.value = false;
|
|
|
|
|
getList();
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(res.msg, {icon: 2})
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-07 16:12:06 +08:00
|
|
|
},
|
|
|
|
|
{
|
2025-02-19 18:03:41 +08:00
|
|
|
text: "取消",
|
|
|
|
|
callback: () => {
|
|
|
|
|
infoShow.value = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
const columns6 = [
|
2025-02-07 16:12:06 +08:00
|
|
|
{
|
2025-02-19 18:03:41 +08:00
|
|
|
title: "考评项目",
|
|
|
|
|
width: "300px",
|
|
|
|
|
key: "project_name"
|
2025-02-07 16:12:06 +08:00
|
|
|
},
|
|
|
|
|
{
|
2025-02-19 18:03:41 +08:00
|
|
|
title: "分值",
|
|
|
|
|
width: "100px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
key: "base_score"
|
2025-02-07 16:12:06 +08:00
|
|
|
},
|
|
|
|
|
{
|
2025-02-19 18:03:41 +08:00
|
|
|
title: "自评分",
|
|
|
|
|
width: "100px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
customSlot: 'input',
|
|
|
|
|
key: "input"
|
2025-02-07 16:12:06 +08:00
|
|
|
},
|
|
|
|
|
{
|
2025-02-19 18:03:41 +08:00
|
|
|
title: "科室评分",
|
|
|
|
|
width: "100px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
customSlot: 'ksinput',
|
|
|
|
|
key: "ksinput"
|
2025-02-07 16:12:06 +08:00
|
|
|
}
|
2025-02-19 18:03:41 +08:00
|
|
|
]
|
|
|
|
|
const dataSource6 = ref([])
|
2025-02-07 16:12:06 +08:00
|
|
|
</script>
|
|
|
|
|
|
2025-02-19 18:03:41 +08:00
|
|
|
<style>
|
|
|
|
|
.layui-table-header .layui-table-cell {
|
|
|
|
|
background-color: #ECF8FA !important;
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
.organization-box {
|
|
|
|
|
width: calc(100vw - 240px);
|
|
|
|
|
height: calc(100vh - 110px);
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
2025-02-19 18:03:41 +08:00
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
.left-tree {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 20px 15px 0 5px;
|
|
|
|
|
height: 1200px;
|
|
|
|
|
border-right: 1px solid #e6e6e6;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
2025-02-19 18:03:41 +08:00
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
/* todo layui-tree-entry 设置无效 */
|
|
|
|
|
.layui-tree-entry {
|
|
|
|
|
position: relative;
|
|
|
|
|
padding: 10px 0;
|
|
|
|
|
height: 20px;
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
2025-02-19 18:03:41 +08:00
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
.isFold {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 36%;
|
|
|
|
|
right: -10px;
|
|
|
|
|
width: 26px;
|
|
|
|
|
height: 26px;
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
border-radius: 13px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border: 1px solid #e6e6e6;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
2025-02-19 18:03:41 +08:00
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
.search-input {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 98%;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.isChecked {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
background-color: #e8f1ff;
|
|
|
|
|
color: red;
|
|
|
|
|
}
|
2025-02-19 18:03:41 +08:00
|
|
|
|
2025-02-07 16:12:06 +08:00
|
|
|
</style>
|