Compare commits
10 Commits
fce1e1b5f4
...
1097000d89
Author | SHA1 | Date | |
---|---|---|---|
1097000d89 | |||
78d39f7f3f | |||
c8d7594858 | |||
e86e145535 | |||
4ebc8f1102 | |||
7c479bb32e | |||
a074e4dca7 | |||
68c0d4789b | |||
698d792782 | |||
0865d6a84c |
16
.vscode/launch.json
vendored
16
.vscode/launch.json
vendored
@ -1,16 +0,0 @@
|
||||
{
|
||||
// 使用 IntelliSense 了解相关属性。
|
||||
// 悬停以查看现有属性的描述。
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"type": "node-terminal",
|
||||
"name": "运行脚本: dev",
|
||||
"request": "launch",
|
||||
"command": "npm run dev",
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@ -1,7 +0,0 @@
|
||||
{
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.background": "#46260E",
|
||||
"titleBar.activeBackground": "#613514",
|
||||
"titleBar.activeForeground": "#FDF9F6"
|
||||
}
|
||||
}
|
2
auto-imports.d.ts
vendored
2
auto-imports.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
const layer: typeof import('@layui/layer-vue')['layer']
|
||||
}
|
||||
|
1
components.d.ts
vendored
1
components.d.ts
vendored
@ -45,6 +45,7 @@ declare module 'vue' {
|
||||
LaySelect: typeof import('@layui/layui-vue')['LaySelect']
|
||||
LaySelectOption: typeof import('@layui/layui-vue')['LaySelectOption']
|
||||
LaySide: typeof import('@layui/layui-vue')['LaySide']
|
||||
LaySkeleton: typeof import('@layui/layui-vue')['LaySkeleton']
|
||||
LaySpace: typeof import('@layui/layui-vue')['LaySpace']
|
||||
LayStep: typeof import('@layui/layui-vue')['LayStep']
|
||||
LayStepItem: typeof import('@layui/layui-vue')['LayStepItem']
|
||||
|
@ -11,7 +11,7 @@ type TAxiosOption = {
|
||||
//记得修改上传路径/api/common/upload
|
||||
const baseURL = 'http://yfyd.hschool.com.cn' // 设置基础URL前缀
|
||||
//const baseURL="http://127.0.0.1";
|
||||
|
||||
|
||||
// 导出baseURL,使其可以在其他页面使用
|
||||
export { baseURL };
|
||||
|
||||
|
@ -263,19 +263,19 @@ export const getQuarterListUpdate= function(date: any) {
|
||||
|
||||
|
||||
|
||||
//当前月度管理tab
|
||||
//当前年末管理tab
|
||||
export const getGroupYear= function(date: any) {
|
||||
return Http.post('/api/backend/Year/getGroupEvaluation', date)
|
||||
}
|
||||
//当前月度管理List
|
||||
//当前年末管理List
|
||||
export const getYearUserList= function(date: any) {
|
||||
return Http.post('/api/backend/Year/getUserList', date)
|
||||
}
|
||||
//当前月度用户详情
|
||||
//当前年末用户详情
|
||||
export const getYearListFind= function(date: any) {
|
||||
return Http.post('/api/backend/Year/getMonthlyListFind', date)
|
||||
}
|
||||
//当前月度用户科室评价
|
||||
//当前年末用户科室评价
|
||||
export const getYearListUpdate= function(date: any) {
|
||||
return Http.post('/api/backend/Year/getMonthlyListUpdate', date)
|
||||
}
|
||||
@ -365,6 +365,33 @@ export function getAnnualFindData(data: any) {
|
||||
return Http.post('/api/backend/Year/getAnnualFindData', data)
|
||||
}
|
||||
|
||||
// 投诉列表
|
||||
export function getPoliticsList(data: any) {
|
||||
return Http.post('/api/backend/Politics/index', data)
|
||||
}
|
||||
// 投诉列表(编辑)
|
||||
export function getPoliticsEdit(data: any) {
|
||||
return Http.post('/api/backend/Politics/update', data)
|
||||
}
|
||||
|
||||
// 个人档案详情
|
||||
export function getPersonalProfile(data: any) {
|
||||
return Http.post('/api/backend/user/personalProfile', data)
|
||||
}
|
||||
|
||||
// 左侧科室列表
|
||||
export function personalProfileList(data: any) {
|
||||
return Http.post('/api/backend/Personal_profile/index', data)
|
||||
}
|
||||
// 右侧人员列表
|
||||
export function personalProfileFind(data: any) {
|
||||
return Http.post('/api/backend/Personal_profile/find', data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -55,6 +55,11 @@ export default [
|
||||
name: 'systemNotice',
|
||||
component: () => import('../../views/system/notice.vue'),
|
||||
meta: { title: '通知公告', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/system/message',
|
||||
name: 'systemMessage',
|
||||
component: () => import('../../views/system/message.vue'),
|
||||
meta: { title: '站内信', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/system/permission',
|
||||
name: 'systemPermission',
|
||||
@ -99,54 +104,123 @@ export default [
|
||||
meta: { title: '日常考评' },
|
||||
children: [
|
||||
{
|
||||
path: '/day_evaluation/index',
|
||||
name: 'dayEvaluationIndex',
|
||||
component: () => import('../../views/day_evaluation/index.vue'),
|
||||
meta: { title: '加减分管理', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/day_evaluation/examine',
|
||||
name: 'dayEvaluationExamine',
|
||||
component: () => import('../../views/day_evaluation/examine.vue'),
|
||||
meta: { title: '加减分审核', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/month_evaluation',
|
||||
redirect: '/month_evaluation/index',
|
||||
component: BasicLayout,
|
||||
meta: { title: '月度考评' },
|
||||
children: [
|
||||
path: '/day_evaluation_assess',
|
||||
meta: { title: '日常填报' },
|
||||
children: [
|
||||
{
|
||||
path: '/day_evaluation/index',
|
||||
name: 'dayEvaluationIndex',
|
||||
component: () => import('../../views/day_evaluation/index.vue'),
|
||||
meta: { title: '加减分管理', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/day_evaluation/examine',
|
||||
name: 'dayEvaluationExamine',
|
||||
component: () => import('../../views/day_evaluation/examine.vue'),
|
||||
meta: { title: '加减分审核', requireAuth: true, closable: true },
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/month_evaluation/index',
|
||||
name: 'monthEvaluationIndex',
|
||||
component: () => import('../../views/month_evaluation/index.vue'),
|
||||
meta: { title: '月度考评填报', requireAuth: true, closable: true },
|
||||
path: '/day_evaluation_self_assess',
|
||||
meta: { title: '自评填报考评' },
|
||||
children: [
|
||||
{
|
||||
path: '/month_evaluation/index',
|
||||
name: 'monthEvaluationIndex',
|
||||
component: () => import('../../views/month_evaluation/index.vue'),
|
||||
meta: { title: '月度自评填报', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/month_evaluation/examine/:id*',
|
||||
name: 'monthEvaluationExamine',
|
||||
component: () => import('../../views/month_evaluation/examine.vue'),
|
||||
meta: { title: '月度自评管理', closable: true },
|
||||
}, {
|
||||
path: '/month_evaluation/examine/:id*',
|
||||
name: 'monthEvaluationExamine',
|
||||
component: () => import('../../views/month_evaluation/examine.vue'),
|
||||
meta: { title: '季度自评管理', closable: true },
|
||||
}, {
|
||||
path: '/season_evaluation/index',
|
||||
name: 'seasonEvaluationIndex',
|
||||
component: () => import('../../views/season_evaluation/index.vue'),
|
||||
meta: { title: '季度自评填报', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/season_evaluation/examine/:id*',
|
||||
name: 'seasonEvaluationExamine',
|
||||
component: () => import('../../views/season_evaluation/examine.vue'),
|
||||
meta: { title: '季度自评管理', closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/month_evaluation/examine',
|
||||
name: 'monthEvaluationExamine',
|
||||
component: () => import('../../views/month_evaluation/examine.vue'),
|
||||
meta: { title: '月度考评管理', requireAuth: true, closable: true },
|
||||
path: '/day_evaluation_system_assess',
|
||||
meta: { title: '考评评价管理' },
|
||||
children: [
|
||||
{
|
||||
path: '/month_evaluation/assess',
|
||||
name: 'monthEvaluationAssess',
|
||||
component: () => import('../../views/month_evaluation/assess.vue'),
|
||||
meta: { title: '月度评价填报', requireAuth: true, closable: true },
|
||||
},
|
||||
{
|
||||
path: '/season_evaluation/assess',
|
||||
name: 'seasonEvaluationAssess',
|
||||
component: () => import('../../views/season_evaluation/assess.vue'),
|
||||
meta: { title: '季度评价填报', requireAuth: true, closable: true },
|
||||
},
|
||||
{
|
||||
path: '/year_evaluation/assess',
|
||||
name: 'yearEvaluationAssess',
|
||||
component: () => import('../../views/year_evaluation/assess.vue'),
|
||||
meta: { title: '年度评价填报', requireAuth: true, closable: true },
|
||||
},
|
||||
{
|
||||
path: '/year_evaluation/list',
|
||||
name: 'yearEvaluationList',
|
||||
component: () => import('../../views/year_evaluation/list.vue'),
|
||||
meta: { title: '评价管理列表', requireAuth: true, closable: true },
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/season_evaluation',
|
||||
redirect: '/season_evaluation/index',
|
||||
component: BasicLayout,
|
||||
meta: { title: '季度考评' },
|
||||
children: [
|
||||
{
|
||||
path: '/season_evaluation/index',
|
||||
name: 'seasonEvaluationIndex',
|
||||
component: () => import('../../views/season_evaluation/index.vue'),
|
||||
meta: { title: '季度考评', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/season_evaluation/examine',
|
||||
name: 'seasonEvaluationExamine',
|
||||
component: () => import('../../views/season_evaluation/examine.vue'),
|
||||
meta: { title: '季度考评管理', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
},
|
||||
// {
|
||||
// path: '/month_evaluation',
|
||||
// redirect: '/month_evaluation/index',
|
||||
// component: BasicLayout,
|
||||
// meta: { title: '月度考评' },
|
||||
// children: [
|
||||
// {
|
||||
// path: '/month_evaluation/index',
|
||||
// name: 'monthEvaluationIndex',
|
||||
// component: () => import('../../views/month_evaluation/index.vue'),
|
||||
// meta: { title: '月度考评填报', requireAuth: true, closable: true },
|
||||
// }, {
|
||||
// path: '/month_evaluation/examine/:id*',
|
||||
// name: 'monthEvaluationExamine',
|
||||
// component: () => import('../../views/month_evaluation/examine.vue'),
|
||||
// meta: { title: '月度考评管理', closable: true },
|
||||
// }
|
||||
// ]
|
||||
// }, {
|
||||
// path: '/season_evaluation',
|
||||
// redirect: '/season_evaluation/index',
|
||||
// component: BasicLayout,
|
||||
// meta: { title: '季度考评' },
|
||||
// children: [
|
||||
// {
|
||||
// path: '/season_evaluation/index',
|
||||
// name: 'seasonEvaluationIndex',
|
||||
// component: () => import('../../views/season_evaluation/index.vue'),
|
||||
// meta: { title: '季度考评', requireAuth: true, closable: true },
|
||||
// }, {
|
||||
// path: '/season_evaluation/examine/:id*',
|
||||
// name: 'seasonEvaluationExamine',
|
||||
// component: () => import('../../views/season_evaluation/examine.vue'),
|
||||
// meta: { title: '季度考评管理', closable: true },
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/outside_evaluation',
|
||||
redirect: '/outside_evaluation/index',
|
||||
component: BasicLayout,
|
||||
@ -176,30 +250,73 @@ export default [
|
||||
component: () => import('../../views/year_evaluation/index.vue'),
|
||||
meta: { title: '年度考评', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/examine',
|
||||
path: '/year_evaluation/examine/:id*',
|
||||
name: 'yearEvaluationExamine',
|
||||
component: () => import('../../views/year_evaluation/examine.vue'),
|
||||
meta: { title: '年度考评管理', requireAuth: true, closable: true },
|
||||
meta: { title: '年度考评管理', closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/department',
|
||||
name: 'yearEvaluationDepartment',
|
||||
component: () => import('../../views/year_evaluation/department.vue'),
|
||||
meta: { title: '年末科室考评管理', closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/branch',
|
||||
name: 'yearEvaluationBranch',
|
||||
component: () => import('../../views/year_evaluation/branch.vue'),
|
||||
meta: { title: '年末支部考评管理', closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/overall',
|
||||
name: 'yearEvaluationOverall',
|
||||
component: () => import('../../views/year_evaluation/overall.vue'),
|
||||
meta: { title: '年末总党支考评管理', closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/hospital',
|
||||
name: 'yearEvaluationHospital',
|
||||
component: () => import('../../views/year_evaluation/hospital.vue'),
|
||||
meta: { title: '年末医院考评管理', closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/file_bag',
|
||||
redirect: '/file_bag/index',
|
||||
redirect: '/file_bag',
|
||||
component: BasicLayout,
|
||||
meta: { title: '医德医风档案' },
|
||||
children: [
|
||||
{
|
||||
path: '/file_bag/index',
|
||||
path: '/file_bag/index/:id?',
|
||||
name: 'fileBagIndex',
|
||||
component: () => import('../../views/day_evaluation/index.vue'),
|
||||
meta: { title: '我的档案', requireAuth: true, closable: true },
|
||||
component: () => import('../../views/file_bag/index.vue'),
|
||||
meta: { title: '我的档案', closable: true },
|
||||
}, {
|
||||
path: '/file_bag/examine',
|
||||
name: 'fileBagExamine',
|
||||
component: () => import('../../views/day_evaluation/examine.vue'),
|
||||
component: () => import('../../views/file_bag/examine.vue'),
|
||||
meta: { title: '员工档案', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/year_evaluation_summary',
|
||||
redirect: '/year_evaluation_summary/index',
|
||||
component: BasicLayout,
|
||||
meta: { title: '年度考评汇总' },
|
||||
children: [
|
||||
{
|
||||
path: '/year_evaluation_summary/index',
|
||||
name: 'yearEvaluationSummaryIndex',
|
||||
component: () => import('../../views/year_evaluation_summary/index.vue'),
|
||||
meta: { title: '自动公示', closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation_summary/examine',
|
||||
name: 'yearEvaluationSummaryExamine',
|
||||
component: () => import('../../views/year_evaluation_summary/examine.vue'),
|
||||
meta: { title: '考评汇总', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation_summary/statistics',
|
||||
name: 'yearEvaluationSummaryStatistics',
|
||||
component: () => import('../../views/year_evaluation_summary/statistics.vue'),
|
||||
meta: { title: '统计分析', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/census',
|
||||
redirect: '/census/index',
|
||||
@ -271,6 +388,24 @@ export default [
|
||||
meta: { title: '医德征求意见管理', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/education',
|
||||
redirect: '/education/index',
|
||||
component: BasicLayout,
|
||||
meta: { title: '党风廉政教育' },
|
||||
children: [
|
||||
{
|
||||
path: '/education/index',
|
||||
name: 'educationIndex',
|
||||
component: () => import('../../views/education/index.vue'),
|
||||
meta: { title: '内容发布', closable: true },
|
||||
}, {
|
||||
path: '/education/question',
|
||||
name: 'educationQuestion',
|
||||
component: () => import('../../views/education/question.vue'),
|
||||
meta: { title: '问卷发布', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/error',
|
||||
component: BasicLayout,
|
||||
|
@ -3,19 +3,12 @@
|
||||
<lay-row :space="10">
|
||||
<!-- 搜索区域 -->
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<!-- <lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="患者姓名:" label-width="80">
|
||||
<lay-input v-model="searchQuery.patientName" placeholder="请输入患者姓名"
|
||||
:allow-clear="true">
|
||||
</lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="投诉类型:" label-width="80">
|
||||
<lay-select v-model="searchQuery.complaintType" placeholder="请选择类型" :allow-clear="true">
|
||||
<lay-form-item label="科室" label-width="80">
|
||||
<lay-select v-model="searchQuery.group_id" placeholder="请选择类型" :allow-clear="true">
|
||||
<lay-select-option value="服务态度" label="服务态度"></lay-select-option>
|
||||
<lay-select-option value="医疗质量" label="医疗质量"></lay-select-option>
|
||||
<lay-select-option value="收费问题" label="收费问题"></lay-select-option>
|
||||
@ -23,15 +16,6 @@
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="处理状态:" label-width="80">
|
||||
<lay-select v-model="searchQuery.status" placeholder="请选择状态" :allow-clear="true">
|
||||
<lay-select-option value="待处理" label="待处理"></lay-select-option>
|
||||
<lay-select-option value="处理中" label="处理中"></lay-select-option>
|
||||
<lay-select-option value="已处理" label="已处理"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toSearch">查询</lay-button>
|
||||
@ -40,7 +24,7 @@
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-card> -->
|
||||
</lay-col>
|
||||
|
||||
<!-- 列表区域 -->
|
||||
@ -48,45 +32,137 @@
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">投诉记录列表</span>
|
||||
<lay-button type="primary" @click="changeVisible11('新增', null)" size="sm">新增投诉</lay-button>
|
||||
</div>
|
||||
<lay-table :height="600" size="lg" :columns="columns" :data-source="dataSource" :page="page" @change="change">
|
||||
<lay-table height="600px" :columns="columns" :data-source="dataSource" :page="page" @change="change">
|
||||
<template #status="{ row }">
|
||||
<span v-if="row.status === '待处理'" style="color: #1E9FFF">待处理</span>
|
||||
<span v-if="row.status === '处理中'" style="color: #FFB800">处理中</span>
|
||||
<span v-if="row.status === '已处理'" style="color: #009688">已处理</span>
|
||||
<span v-if="row.acceptance_status == 1" style="color: #FFB800">待处理</span>
|
||||
<span v-if="row.acceptance_status == 2" style="color: #00CC66">已回复</span>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space size="lg">
|
||||
<span style="color: #00A394;cursor: pointer" @click="changeVisible11('编辑', row)">编辑</span>
|
||||
<lay-popconfirm content="确定要删除此投诉记录吗?" @confirm="confirm" @cancel="cancel">
|
||||
<span style="color: #00A394;cursor: pointer">删除</span>
|
||||
</lay-popconfirm>
|
||||
<span v-if="row.acceptance_status == 1" style="color: #00A394;cursor: pointer" @click="addUpdate(row)">处理</span>
|
||||
<span style="color: #00A394;cursor: pointer" @click="changeVisible11(row)">详情</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
|
||||
<lay-layer v-model="addShow" title="投诉处理" :shade="true" :area="['800px', '80%']" :btn="addButton">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-form :model="addData" label-position="top">
|
||||
<lay-form-item required label="投诉内容:" prop="politics_content">
|
||||
<div>{{ info.politics_content }}</div>
|
||||
<div v-if="info.politics_images != '' && info.politics_images != null" style="margin-top: 10px">
|
||||
<a :href="info.politics_images" target="_blank"><img :src="info.politics_images" style="width: 100px;"></a>
|
||||
</div>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="处理结果:" prop="acceptance_content">
|
||||
<lay-textarea placeholder="请输入处理结果" v-model="addData.acceptance_content"></lay-textarea>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<!-- 添加详情弹窗 -->
|
||||
<lay-layer v-model="detailShow" title="投诉建议详情" :type="4" :shade="true" :area="['700px', '100%']">
|
||||
<div class="detail-container">
|
||||
<div class="detail-content">
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">姓名:</div>
|
||||
<div class="detail-value">{{ detailInfo.user_name }}</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">科室:</div>
|
||||
<div class="detail-value">{{ detailInfo.user_group_name }}</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">投诉时间:</div>
|
||||
<div class="detail-value">{{ detailInfo.createtime }}</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">处理状态:</div>
|
||||
<div class="detail-value">
|
||||
<span v-if="detailInfo.acceptance_status == 1" class="status-pending">待处理</span>
|
||||
<span v-if="detailInfo.acceptance_status == 2" class="status-replied">已回复</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-item detail-item-full">
|
||||
<div class="detail-label">投诉内容:</div>
|
||||
<div class="detail-value">{{ detailInfo.politics_content }}</div>
|
||||
</div>
|
||||
<div class="detail-item detail-item-full" v-if="detailInfo.politics_images && detailInfo.politics_images !== ''">
|
||||
<div class="detail-label">投诉图片:</div>
|
||||
<div class="detail-value">
|
||||
<a :href="detailInfo.politics_images" target="_blank">
|
||||
<img :src="detailInfo.politics_images" class="complaint-image">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-item detail-item-full" v-if="detailInfo.acceptance_status == 2">
|
||||
<div class="detail-label">处理结果:</div>
|
||||
<div class="detail-value">{{ detailInfo.acceptance_content }}</div>
|
||||
</div>
|
||||
<div class="detail-item" v-if="detailInfo.acceptance_status == 2">
|
||||
<div class="detail-label">处理时间:</div>
|
||||
<div class="detail-value">{{ detailInfo.acceptance_time }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import {
|
||||
getPoliticsList,getPoliticsEdit
|
||||
} from "@/api/module/home";
|
||||
import { layer } from '@layui/layui-vue';
|
||||
|
||||
const addData = reactive({
|
||||
acceptance_content: '',
|
||||
id:0
|
||||
})
|
||||
|
||||
// 添加详情弹窗相关变量和方法
|
||||
const detailShow = ref(false)
|
||||
const detailInfo = ref({})
|
||||
const changeVisible11 = (row: any) => {
|
||||
detailInfo.value = row
|
||||
detailShow.value = true
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
})
|
||||
|
||||
const addShow = ref(false)
|
||||
const info = ref({});
|
||||
const addUpdate = (row: any) => {
|
||||
info.value = row;
|
||||
addData.id = row.id;
|
||||
addShow.value = true
|
||||
}
|
||||
const dataSource = ref([])
|
||||
const getList = () => {
|
||||
getPoliticsList({ size: page.limit, page: page.current, ...searchQuery.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.list;
|
||||
page.total = res.data.total;
|
||||
} else {
|
||||
dataSource.value = [];
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const searchQuery = ref({
|
||||
patientName: '',
|
||||
complaintType: '',
|
||||
status: '',
|
||||
department: ''
|
||||
group_id: '',
|
||||
})
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
patientName: '',
|
||||
complaintType: '',
|
||||
status: '',
|
||||
department: ''
|
||||
group_id: '',
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,15 +174,14 @@ function toSearch() {
|
||||
const loading = ref(false)
|
||||
const page = reactive({ current: 1, limit: 10, total: 100 })
|
||||
const columns = ref([
|
||||
{ title: '编号', width: '90px', key: 'id' },
|
||||
{ title: '患者姓名', width: '120px', key: 'patientName', align: 'center' },
|
||||
{ title: '投诉类型', width: '120px', key: 'complaintType', align: 'center' },
|
||||
{ title: '投诉内容', width: '300px', key: 'content', align: 'center' },
|
||||
{ title: '科室', width: '120px', key: 'department', align: 'center' },
|
||||
{ title: '相关医生', width: '120px', key: 'doctorName', align: 'center' },
|
||||
{ title: '投诉时间', width: '160px', key: 'complaintTime', align: 'center' },
|
||||
{ title: '编号', width: '90px', key: 'id', align: 'center' },
|
||||
{ title: '姓名', width: '120px', key: 'user_name', align: 'center' },
|
||||
{ title: '投诉内容', width: '300px', key: 'politics_content', align: 'center' },
|
||||
{ title: '科室', width: '120px', key: 'user_group_name', align: 'center' },
|
||||
{ title: '投诉时间', width: '160px', key: 'createtime', align: 'center' },
|
||||
{ title: '处理状态', width: '120px', key: 'status', align: 'center', customSlot: 'status' },
|
||||
{ title: '处理结果', width: '300px', key: 'result', align: 'center' },
|
||||
{ title: '处理结果', width: '300px', key: 'acceptance_content', align: 'center' },
|
||||
{ title: '处理时间', width: '200px', key: 'acceptance_time', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '150px',
|
||||
@ -116,56 +191,39 @@ const columns = ref([
|
||||
align: 'center'
|
||||
}
|
||||
])
|
||||
const change = (page: any) => {
|
||||
const change = (p: any) => {
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
dataSource.value = loadDataSource(page.current, page.limit)
|
||||
loading.value = false
|
||||
}, 1000)
|
||||
page.current = p.current;
|
||||
page.limit = p.limit;
|
||||
getList();
|
||||
}
|
||||
const dataSource = ref([
|
||||
const addButton = ref([
|
||||
{
|
||||
id: '1',
|
||||
patientName: '张三',
|
||||
complaintType: '服务态度',
|
||||
content: '医生服务态度不好,说话很不耐烦',
|
||||
department: '内科',
|
||||
doctorName: '李医生',
|
||||
complaintTime: '2024-03-20 09:34:56',
|
||||
status: '待处理',
|
||||
result: ''
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
console.log(addData);
|
||||
if (addData.acceptance_content == '') {
|
||||
layer.msg('处理结果不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
var res = await getPoliticsEdit(addData);
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('处理成功!', { icon: 1 })
|
||||
addShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
patientName: '李四',
|
||||
complaintType: '医疗质量',
|
||||
content: '开的药物对症状没有改善',
|
||||
department: '外科',
|
||||
doctorName: '王医生',
|
||||
complaintTime: '2024-03-19 15:24:31',
|
||||
status: '已处理',
|
||||
result: '已与患者沟通,重新进行诊断并调整用药方案'
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
const loadDataSource = (page: number, pageSize: number) => {
|
||||
var response = []
|
||||
var startIndex = (page - 1) * pageSize + 1
|
||||
var endIndex = page * pageSize
|
||||
for (var i = startIndex; i <= endIndex; i++) {
|
||||
response.push({
|
||||
id: `${i}`,
|
||||
patientName: `患者${i}`,
|
||||
complaintType: '服务态度',
|
||||
content: '医生服务态度不好,说话很不耐烦',
|
||||
department: '内科',
|
||||
doctorName: '李医生',
|
||||
complaintTime: '2024-03-20 09:34:56',
|
||||
status: '待处理',
|
||||
result: ''
|
||||
})
|
||||
}
|
||||
return response
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -178,4 +236,70 @@ const loadDataSource = (page: number, pageSize: number) => {
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.detail-header {
|
||||
padding: 15px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.detail-header h3 {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
width: 50%;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.detail-item-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
width: 100px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
flex: 1;
|
||||
color: #333;
|
||||
line-height: 24px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.complaint-image {
|
||||
max-width: 300px;
|
||||
max-height: 300px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.complaint-image:hover {
|
||||
transform: scale(1.02);
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.status-pending {
|
||||
color: #1E9FFF;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-replied {
|
||||
color: #FFB800;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
@ -111,9 +111,9 @@ const getHierarchicalTwoList = () => {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const getHierarchicalData = () => {
|
||||
scoringGetHierarchicalData({}).then((res) => {
|
||||
scoringGetHierarchicalData({page:1,size:1000}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
|
@ -149,12 +149,11 @@ const addButton = ref([
|
||||
console.log(addData);
|
||||
if (addData.project_name == '') {
|
||||
layer.msg('项目名称不能为空!', {icon: 2})
|
||||
}
|
||||
if (addData.project_code == '') {
|
||||
layer.msg('项目代码不能为空!', {icon: 2})
|
||||
return;
|
||||
}
|
||||
if (addData.base_score == '' || addData.base_score == 0) {
|
||||
layer.msg('基础分值不能为空或为0!', {icon: 2, time: 1000})
|
||||
return;
|
||||
}
|
||||
if(addIsEdit.value==1){
|
||||
var res = await homeGetHierarchicalDataCreate(addData);
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">登录日志列表</span>
|
||||
</div>
|
||||
<lay-table height="600px" @change="changePage" :page="page" size="lg" ref="tableRef" :columns="columns" :data-source="dataSource">
|
||||
<lay-table height="680px" @change="changePage" :page="page" size="lg" ref="tableRef" :columns="columns" :data-source="dataSource">
|
||||
<template v-slot:event_type="{ data }">
|
||||
<span :style="{ color: data.event_type === '登录' ? '#67C23A' : '#409EFF' }">
|
||||
{{ data.event_type }}
|
||||
@ -92,45 +92,9 @@ const columns = [
|
||||
]
|
||||
|
||||
onMounted(() => {
|
||||
getLoginLogs()
|
||||
getLogList()
|
||||
})
|
||||
|
||||
// 获取登录日志数据
|
||||
const getLoginLogs = () => {
|
||||
// 这里替换为实际的API调用
|
||||
// getLoginLogList().then((res) => {
|
||||
// if (res.code === 1) {
|
||||
// dataSource.value = res.data
|
||||
// } else {
|
||||
// layer.msg(res.msg, {icon: 2})
|
||||
// }
|
||||
// })
|
||||
|
||||
// 模拟数据
|
||||
dataSource.value = [
|
||||
{
|
||||
id: 1,
|
||||
user_id: 10,
|
||||
ip_code: '192.168.1.100',
|
||||
createtime: '2024-03-20 10:30:45',
|
||||
content: '用户登录成功',
|
||||
nickname: '张三',
|
||||
work_number: '111111',
|
||||
name: '大腿骨折2'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
department: '外科',
|
||||
record_time: '2024-03-20 09:15:22',
|
||||
login_name: 'user1',
|
||||
username: '张医生',
|
||||
ip_address: '192.168.1.101',
|
||||
event_type: '登出',
|
||||
event_content: '用户主动登出',
|
||||
device_info: 'Firefox 123.0 / MacOS'
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
@ -129,7 +129,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import { getAdditionIndexManage, getAdditionIndexManageExamine, getDoctorName, userGroupData } from '@/api/module/home';
|
||||
import { getAdditionIndexManage, getAdditionIndexManageExamine, getDoctorName, getUserGroupNew } from '@/api/module/home';
|
||||
import { useUserStore } from '@/store/user';
|
||||
const userStore = useUserStore()
|
||||
onMounted(() => {
|
||||
@ -147,7 +147,7 @@ const getUserAllList = () => {
|
||||
const leftId = ref(0);
|
||||
const data = ref()
|
||||
const getLeftList = () => {
|
||||
userGroupData({}).then((res) => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
|
@ -80,7 +80,7 @@
|
||||
:label="item.project_name"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="分值" prop="score_value">
|
||||
<lay-form-item required label="分值" :tips="selectedItemTipsScore" prop="score_value">
|
||||
<lay-input-number :max="maxInput.single_score_max" :min="maxInput.single_score_min" v-model="formData.score_value" placeholder="请输入分值"></lay-input-number>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="发生时间" prop="fsdate">
|
||||
@ -223,14 +223,17 @@ const getFileDone = (res: UploadResponse) => {
|
||||
console.log("getFileDone", date)
|
||||
formData.fj_url = date.data.fullurl
|
||||
}
|
||||
|
||||
const selectedItemTipsScore = ref('');
|
||||
// 修改 handleItemChange 的实现
|
||||
const handleItemChange = (value: string | number | object) => {
|
||||
const selectedItem = evaluationItems.value.find(item => item.id === Number(value))
|
||||
|
||||
const selectedItem = evaluationItems.value.find(item => item.id == value)
|
||||
console.log(selectedItem);
|
||||
if (selectedItem) {
|
||||
maxInput.single_score_max = selectedItem.single_score_max
|
||||
maxInput.single_score_min = selectedItem.single_score_min
|
||||
selectedItemTips.value = selectedItem.scoring_criteria || ''
|
||||
maxInput.value.single_score_max = selectedItem.single_score_max
|
||||
maxInput.value.single_score_min = selectedItem.single_score_min
|
||||
selectedItemTips.value = selectedItem.scoring_criteria || '';
|
||||
selectedItemTipsScore.value = selectedItem.single_score_max + '分,最低' + selectedItem.single_score_min + '分';
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,7 +284,7 @@ const evaluationItems = ref<EvaluationItem[]>([])
|
||||
const selectedItemTips = ref('')
|
||||
|
||||
const getHierarchicalData = () => {
|
||||
scoringGetHierarchicalData({}).then((res) => {
|
||||
scoringGetHierarchicalData({page:1,size:1000}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
evaluationItems.value = res.data;
|
||||
@ -375,7 +378,7 @@ const change = ({ current, limit }: { current: number, limit: number }) => {
|
||||
}
|
||||
|
||||
|
||||
const maxInput = reactive({
|
||||
const maxInput = ref({
|
||||
single_score_max:10,
|
||||
single_score_min:0,
|
||||
});
|
||||
|
466
src/views/education/index.vue
Normal file
466
src/views/education/index.vue
Normal file
@ -0,0 +1,466 @@
|
||||
<template>
|
||||
<lay-container style="padding: 20px">
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">党风廉政教育</span>
|
||||
<lay-button type="primary" @click="openNew()" size="sm">新增教育</lay-button>
|
||||
</div>
|
||||
<lay-table :page="page" height="600px" size="lg" @change="changePage" :columns="columns" :data-source="dataSource">
|
||||
<!-- <template v-slot:content="{ data }">
|
||||
<div v-html="data.content"></div>
|
||||
</template> -->
|
||||
<template v-slot:status="{ data }">
|
||||
<span v-if="data.status == 1">已发布</span>
|
||||
<span v-if="data.status == 0">已隐藏</span>
|
||||
</template>
|
||||
<template v-slot:operator="{ data }">
|
||||
<lay-space size="lg">
|
||||
<span style="color: #00A394;cursor: pointer" @click="editShowMsd(data)">编辑</span>
|
||||
<lay-popconfirm trigger="click" content="确定要删除吗?" @confirm="delShowMsd(data)">
|
||||
<span style="color: #00A394;cursor: pointer">删除</span>
|
||||
</lay-popconfirm>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
<lay-layer v-model="addShow" :title="addIsEdit == 1 ? '新增' : '编辑'" :type="4" :shade="true"
|
||||
:area="['950px', '100%']" :btn="addButton">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-form :model="addData">
|
||||
<lay-form-item required label="内容标题" prop="title">
|
||||
<lay-input v-model="addData.title" placeholder="请输入教育标题"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="发布人" prop="author">
|
||||
<lay-input v-model="addData.author" placeholder="请输入发布人"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="教育内容" prop="content">
|
||||
<div class="editor">
|
||||
<!-- 这两个都是获取值的必要条件: v-model:content contentType="html" -->
|
||||
<quill-editor ref="editorRef" v-model:content="content" :options="options"
|
||||
contentType="html"></quill-editor>
|
||||
</div>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="状态" prop="status">
|
||||
<lay-select v-model="addData.status" placeholder="请选择">
|
||||
<lay-select-option :value="0" label="隐藏"></lay-select-option>
|
||||
<lay-select-option :value="1" label="显示"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
uploadImage
|
||||
} from '../../api/module/home'
|
||||
import { ref, onMounted, reactive, shallowRef, watch, nextTick, toRaw } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
import { baseURL } from '@/api/http'
|
||||
// Update editor configuration
|
||||
// 引入富文本编辑器与样式
|
||||
import { Quill, QuillEditor } from '@vueup/vue-quill'
|
||||
import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
|
||||
const content = ref('')
|
||||
const editorRef = ref<any>(null)
|
||||
// !!!如果方法报错,把imageHandler 方法放到options的上面
|
||||
// 处理富文本图片上传
|
||||
const imageHandler = () => {
|
||||
// 创建一个文件输入元素
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', 'image/*');
|
||||
// 模拟点击,打开文件选择对话框
|
||||
input.click();
|
||||
|
||||
// 当用户选择文件后触发的事件
|
||||
input.onchange = async () => {
|
||||
// 获取用户选择的文件
|
||||
const file = input.files ? input.files[0] : null;
|
||||
if (file) {
|
||||
// 创建一个 FormData 对象,用于文件上传
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
try {
|
||||
/**
|
||||
* @todo 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
* 这里的abc替换成你的请求接口方法,也可以使用 axios 发送 POST 请求
|
||||
* */
|
||||
// todo
|
||||
// 使用 axios 发送 POST 请求,将文件上传到服务器,这里的abc替换成你的请求接口方法
|
||||
// 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
const res = await uploadImage(formData);
|
||||
|
||||
// 确保获取到 Quill 编辑器实例
|
||||
const quill = toRaw(editorRef.value).getQuill()
|
||||
if (quill) {
|
||||
// 获取当前光标位置
|
||||
const range = quill.getSelection(true);
|
||||
// 在当前光标位置插入上传的图片
|
||||
quill.insertEmbed(range.index, 'image', res.data.fullurl);
|
||||
}
|
||||
} catch (error) {
|
||||
alert('图片上传失败')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// 处理富文本图片上传
|
||||
const videoHandler = () => {
|
||||
// 创建一个文件输入元素
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', 'video/*');
|
||||
// 模拟点击,打开文件选择对话框
|
||||
input.click();
|
||||
|
||||
// 当用户选择文件后触发的事件
|
||||
input.onchange = async () => {
|
||||
// 获取用户选择的文件
|
||||
const file = input.files ? input.files[0] : null;
|
||||
if (file) {
|
||||
// 创建一个 FormData 对象,用于文件上传
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
try {
|
||||
/**
|
||||
* @todo 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
* 这里的abc替换成你的请求接口方法,也可以使用 axios 发送 POST 请求
|
||||
* */
|
||||
// todo
|
||||
// 使用 axios 发送 POST 请求,将文件上传到服务器,这里的abc替换成你的请求接口方法
|
||||
// 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
const res = await uploadImage(formData);
|
||||
|
||||
// 确保获取到 Quill 编辑器实例
|
||||
const quill = toRaw(editorRef.value).getQuill()
|
||||
if (quill) {
|
||||
// 获取当前光标位置
|
||||
const range = quill.getSelection(true);
|
||||
// 在当前光标位置插入上传的图片
|
||||
quill.insertEmbed(range.index, 'video', res.data.fullurl);
|
||||
}
|
||||
} catch (error) {
|
||||
alert('图片上传失败')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// 富文本配置
|
||||
const options = ref({
|
||||
theme: 'bubble', // 使用snow主题
|
||||
modules: {
|
||||
// 富文本头部栏的功能配置
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
|
||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||
[{ align: [] }], // 对齐方式
|
||||
[{ size: ['small', false, 'large', 'huge'] }], // 字体大小
|
||||
[{ font: [] }], // 字体种类
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||
[{ direction: 'ltl' }], // 文本方向
|
||||
[{ direction: 'rtl' }], // 文本方向
|
||||
[{ indent: '-1' }, { indent: '+1' }], // 缩进
|
||||
[{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
|
||||
[{ script: 'sub' }, { script: 'super' }], // 上标/下标
|
||||
['blockquote', 'code-block'], // 引用 代码块
|
||||
['clean'], // 清除文本格式
|
||||
['link', 'image', 'video'], // 链接、图片、视频
|
||||
],
|
||||
handlers: {
|
||||
image: imageHandler, // 点击图片触发事件
|
||||
video: videoHandler, // 点击视频触发事件
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// toolbar标题,划过富文本头部提示信息
|
||||
const titleConfig = [
|
||||
{ Choice: '.ql-insertMetric', title: '跳转配置' },
|
||||
{ Choice: '.ql-bold', title: '加粗' },
|
||||
{ Choice: '.ql-italic', title: '斜体' },
|
||||
{ Choice: '.ql-underline', title: '下划线' },
|
||||
{ Choice: '.ql-header', title: '段落格式' },
|
||||
{ Choice: '.ql-strike', title: '删除线' },
|
||||
{ Choice: '.ql-blockquote', title: '块引用' },
|
||||
{ Choice: '.ql-code', title: '插入代码' },
|
||||
{ Choice: '.ql-code-block', title: '插入代码段' },
|
||||
{ Choice: '.ql-font', title: '字体' },
|
||||
{ Choice: '.ql-size', title: '字体大小' },
|
||||
{ Choice: '.ql-list[value="ordered"]', title: '编号列表' },
|
||||
{ Choice: '.ql-list[value="bullet"]', title: '项目列表' },
|
||||
{ Choice: '.ql-direction', title: '文本方向' },
|
||||
{ Choice: '.ql-header[value="1"]', title: 'h1' },
|
||||
{ Choice: '.ql-header[value="2"]', title: 'h2' },
|
||||
{ Choice: '.ql-align', title: '对齐方式' },
|
||||
{ Choice: '.ql-color', title: '字体颜色' },
|
||||
{ Choice: '.ql-background', title: '背景颜色' },
|
||||
{ Choice: '.ql-image', title: '图像' },
|
||||
{ Choice: '.ql-video', title: '视频' },
|
||||
{ Choice: '.ql-link', title: '添加链接' },
|
||||
{ Choice: '.ql-formula', title: '插入公式' },
|
||||
{ Choice: '.ql-clean', title: '清除字体格式' },
|
||||
{ Choice: '.ql-script[value="sub"]', title: '下标' },
|
||||
{ Choice: '.ql-script[value="super"]', title: '上标' },
|
||||
{ Choice: '.ql-indent[value="-1"]', title: '向左缩进' },
|
||||
{ Choice: '.ql-indent[value="+1"]', title: '向右缩进' },
|
||||
{ Choice: '.ql-header .ql-picker-label', title: '标题大小' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="1"]', title: '标题一' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="2"]', title: '标题二' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="3"]', title: '标题三' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="4"]', title: '标题四' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="5"]', title: '标题五' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="6"]', title: '标题六' },
|
||||
{ Choice: '.ql-header .ql-picker-item:last-child', title: '标准' },
|
||||
{ Choice: '.ql-size .ql-picker-item[data-value="small"]', title: '小号' },
|
||||
{ Choice: '.ql-size .ql-picker-item[data-value="large"]', title: '大号' },
|
||||
{ Choice: '.ql-size .ql-picker-item[data-value="huge"]', title: '超大号' },
|
||||
{ Choice: '.ql-size .ql-picker-item:nth-child(2)', title: '标准' },
|
||||
{ Choice: '.ql-align .ql-picker-item:first-child', title: '居左对齐' },
|
||||
{ Choice: '.ql-align .ql-picker-item[data-value="center"]', title: '居中对齐' },
|
||||
{ Choice: '.ql-align .ql-picker-item[data-value="right"]', title: '居右对齐' },
|
||||
{ Choice: '.ql-align .ql-picker-item[data-value="justify"]', title: '两端对齐' }
|
||||
]
|
||||
// 给富文本框工具栏加上鼠标悬浮中文提示
|
||||
const initTitle = () => {
|
||||
for (let item of titleConfig) {
|
||||
// .editor 是富文本编辑器的类名
|
||||
let tip = document.querySelector('.editor ' + item.Choice);
|
||||
if (tip) {
|
||||
tip.setAttribute('title', item.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 自定义粘贴事件
|
||||
const customPaste = (e: ClipboardEvent) => {
|
||||
// Prevent default paste behavior
|
||||
e.preventDefault()
|
||||
|
||||
const clipboardData = e.clipboardData
|
||||
if (!clipboardData) return
|
||||
|
||||
const types = clipboardData.types
|
||||
if (types.includes('Files')) {
|
||||
Array.from(clipboardData.files).forEach(file => {
|
||||
// Handle file paste
|
||||
// Add your file handling logic here
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
interface EducationData {
|
||||
id?: number;
|
||||
title: string;
|
||||
author: string;
|
||||
content: string;
|
||||
status: number;
|
||||
}
|
||||
// 分页变化
|
||||
const changePage = (ppc) => {
|
||||
page.current = ppc.current;
|
||||
page.limit = ppc.limit;
|
||||
getNoticeList();
|
||||
}
|
||||
// 列表数据
|
||||
const dataSource = ref<EducationData[]>([]);
|
||||
const addShow = ref(false);
|
||||
// 1 add 2 edit
|
||||
const addIsEdit = ref(1);
|
||||
|
||||
// 修改分页参数定义
|
||||
const page = reactive({
|
||||
current: 1,
|
||||
limit: 10,
|
||||
total: 1
|
||||
});
|
||||
|
||||
const addData = reactive<EducationData>({
|
||||
title: '',
|
||||
author: '',
|
||||
content: '',
|
||||
status: 1
|
||||
});
|
||||
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
//getNoticeList()
|
||||
|
||||
// Wait for editor to be mounted and initialized
|
||||
// nextTick(() => {
|
||||
// // Add null check before accessing editor
|
||||
// if (editorRef.value && editorRef.value.getQuill()) {
|
||||
// // Initialize title tooltips
|
||||
// initTitle()
|
||||
|
||||
// // Add paste event listener
|
||||
// const editor = editorRef.value.getQuill()
|
||||
// editor.root.addEventListener('paste', customPaste, false)
|
||||
// }
|
||||
// })
|
||||
});
|
||||
|
||||
const openNew = () => {
|
||||
addData.id = undefined;
|
||||
addData.title = '';
|
||||
addData.author = '';
|
||||
addData.content = '';
|
||||
content.value = '';
|
||||
addData.status = 1;
|
||||
addIsEdit.value = 1;
|
||||
addShow.value = true;
|
||||
}
|
||||
|
||||
const getNoticeList = () => {
|
||||
noticeList({ page: page.current, size: page.limit }).then((res) => {
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.data;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const editShowMsd = (data: EducationData) => {
|
||||
addShow.value = true;
|
||||
addData.id = data.id;
|
||||
addData.title = data.title;
|
||||
addData.author = data.author;
|
||||
addData.content = data.content;
|
||||
content.value = data.content;
|
||||
addData.status = parseInt(data.status.toString());
|
||||
addIsEdit.value = 2;
|
||||
}
|
||||
|
||||
// Watch for changes in valueHtml and update addData.content
|
||||
watch(content, (newValue) => {
|
||||
addData.content = newValue;
|
||||
})
|
||||
|
||||
const delShowMsd = async (data: EducationData) => {
|
||||
const res = await noticeDelete({ id: data.id });
|
||||
if (res.code == 1) {
|
||||
layer.msg('删除成功!', { icon: 1 })
|
||||
getNoticeList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: "教育标题",
|
||||
width: "180px",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "发布人",
|
||||
width: "120px",
|
||||
key: "author"
|
||||
},
|
||||
{
|
||||
title: "教育内容",
|
||||
width: "280px",
|
||||
key: "content",
|
||||
ellipsisTooltip: true
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
width: "180px",
|
||||
key: "createtime"
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: "100px",
|
||||
customSlot: 'status',
|
||||
key: "status"
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '120px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
align: 'center',
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
const onCreated = (editor: any) => {
|
||||
editorRef.value = Object.seal(editor);
|
||||
}
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
console.log(addData);
|
||||
return;
|
||||
if (addData.title == '') {
|
||||
layer.msg('教育标题不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
if (addData.author == '') {
|
||||
layer.msg('发布人不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
if (addData.content == '') {
|
||||
layer.msg('教育内容不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
|
||||
const res = addIsEdit.value == 1
|
||||
? await noticeAdd(addData)
|
||||
: await noticeEdit(addData);
|
||||
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
addShow.value = false;
|
||||
getNoticeList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.w-e-text-container) {
|
||||
min-height: 400px !important;
|
||||
}
|
||||
|
||||
:deep(.w-e-toolbar) {
|
||||
border: 1px solid #ddd !important;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
:deep(.w-e-text-container) {
|
||||
border: 1px solid #ddd !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
:deep(.ql-editor) {
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
}
|
||||
:deep(.layui-input-block){
|
||||
max-width: 85%;
|
||||
}
|
||||
</style>
|
||||
|
7
src/views/education/question.vue
Normal file
7
src/views/education/question.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>问卷发布</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
327
src/views/file_bag/examine.vue
Normal file
327
src/views/file_bag/examine.vue
Normal file
@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `300px` }" class="left-tree">
|
||||
<!-- tree -->
|
||||
<div v-show="!isFold">
|
||||
科室列表
|
||||
</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="leftId"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="leftId == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</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; overflow: auto">
|
||||
<!-- table -->
|
||||
<lay-card>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="姓名" label-width="80">
|
||||
<lay-input v-model="searchQuery.nickname" placeholder="请输入" :allow-clear="true"
|
||||
style="width: 98%"></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="手机号" label-width="80px">
|
||||
<lay-input v-model="searchQuery.mobile" placeholder="请输入" :allow-clear="true"
|
||||
style="width: 98%"></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="normal" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-table :page="page" height="600px" :columns="columns" :data-source="dataSource"
|
||||
@change="changePage">
|
||||
<template #gender="{ row }">
|
||||
<span v-if="row.gender == 0">未选择</span>
|
||||
<span v-if="row.gender == 1">男</span>
|
||||
<span v-if="row.gender == 2">女</span>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-button size="xs" border="green" border-style="dashed" @click="getInfo(row)">
|
||||
员工档案
|
||||
</lay-button>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { layer } from '@layui/layui-vue';
|
||||
import {
|
||||
authGroupData,
|
||||
userData, partyGroupData,
|
||||
userGroupData,
|
||||
personalProfileFind,
|
||||
personalProfileList
|
||||
} from "@/api/module/home";
|
||||
import { useUserStore } from "@/store/user";
|
||||
import { useRouter } from 'vue-router';
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore()
|
||||
onMounted(() => {
|
||||
getLeftList();
|
||||
})
|
||||
|
||||
const dataSource = ref([])
|
||||
const getUserList = () => {
|
||||
personalProfileFind({ group_id: leftId.value, size: page.limit, page: page.current, ...searchQuery.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.data;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
dataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const changePage = (ppc) => {
|
||||
page.current = ppc.current;
|
||||
page.limit = ppc.limit;
|
||||
getUserList();
|
||||
}
|
||||
|
||||
const leftId = ref(0);
|
||||
const getLeftList = () => {
|
||||
personalProfileList({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
leftId.value = res.data[0].id;
|
||||
getUserList();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//左侧
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
nickname: '',
|
||||
mobile: '',
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
nickname: '',
|
||||
mobile: '',
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
console.log(node);
|
||||
leftId.value = node.id
|
||||
getUserList();
|
||||
}
|
||||
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const columns = ref([
|
||||
{ title: '编号', width: '80px', key: 'id', align: 'center' },
|
||||
{ title: '工号/帐号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '姓名', width: '100px', key: 'nickname', align: 'center' },
|
||||
{ title: '手机号', width: '120px', key: 'mobile', align: 'center' },
|
||||
{ title: '性别', width: '80px', key: 'gender', customSlot: 'gender', align: 'center' },
|
||||
{ title: '身份证号', width: '180px', key: 'member_code', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'status', customSlot: 'status', align: 'center' },
|
||||
{ title: '操作', width: '250px', customSlot: 'operator', key: 'operator', fixed: 'right', align: 'center' }
|
||||
])
|
||||
|
||||
|
||||
// 搜索功leftId能
|
||||
const toSearch = () => {
|
||||
page.current = 1;
|
||||
getUserList();
|
||||
}
|
||||
const getInfo = (row) => {
|
||||
console.log(row.id);
|
||||
router.push({ path: '/file_bag/index/' + row.id });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.file-detail-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loading-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.detail-section {
|
||||
margin-bottom: 30px;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 15px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.user-header {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.basic-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #666;
|
||||
min-width: 90px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.user-header {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.layui-card-body {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
</style>
|
505
src/views/file_bag/index.vue
Normal file
505
src/views/file_bag/index.vue
Normal file
@ -0,0 +1,505 @@
|
||||
<template>
|
||||
<div class="file-detail-container">
|
||||
<lay-card title="员工档案详情" shadow="always">
|
||||
<template #title>
|
||||
<div class="card-title">
|
||||
<div>员工档案详情</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="user-detail">
|
||||
<!-- 基本信息区域 -->
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">基本信息</h3>
|
||||
<div class="user-header">
|
||||
<div class="avatar-container">
|
||||
<img :src="userInfo.avatar || defaultAvatar" alt="用户头像" class="user-avatar">
|
||||
</div>
|
||||
<div class="basic-info">
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">姓名:</span>
|
||||
<span class="value">{{ userInfo.nickname }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">工号:</span>
|
||||
<span class="value">{{ userInfo.code }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">性别:</span>
|
||||
<span class="value">{{ userInfo.gender == 1 ? '男' : '女' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">手机号:</span>
|
||||
<span class="value">{{ userInfo.mobile }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">邮箱:</span>
|
||||
<span class="value">{{ userInfo.email || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">生日:</span>
|
||||
<span class="value">{{ userInfo.birthday || '暂无' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 工作信息区域 -->
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">工作信息</h3>
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">科室:</span>
|
||||
<span class="value">{{ groupName || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">党支部:</span>
|
||||
<span class="value">{{ partyName || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">岗位名称:</span>
|
||||
<span class="value">{{ userInfo.position || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">行政职务:</span>
|
||||
<span class="value">{{ userInfo.administrative_position || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">业务性质:</span>
|
||||
<span class="value">{{ userInfo.business_nature || '暂无' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 证件信息区域 -->
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">证件信息</h3>
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">身份证号码:</span>
|
||||
<span class="value">{{ userInfo.member_code || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">资格证编码:</span>
|
||||
<span class="value">{{ userInfo.certificate_code || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">执业证编码:</span>
|
||||
<span class="value">{{ userInfo.license_code || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">执业证图片:</span>
|
||||
<span class="value">
|
||||
<a v-if="userInfo.license_image" style="color:blue;" :href="userInfo.license_image" target="_blank">
|
||||
<img :src="userInfo.license_image" style="width: 100px;" />
|
||||
</a>
|
||||
<span v-else>暂无</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">年度考评汇总</h3>
|
||||
<div>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="auto">
|
||||
<lay-date-picker type="year" v-model="yearmonthHz" placeholder="年度"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item :label-width="0">
|
||||
<lay-button type="primary" @click="toSearchHz">
|
||||
查询
|
||||
</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</div>
|
||||
<div>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns"
|
||||
:data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<!-- <template v-slot:operator="{ row }">
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template> -->
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">加分/扣分情况</h3>
|
||||
<div>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="auto">
|
||||
<lay-date-picker type="year" v-model="yearmonthJia" placeholder="年度"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item :label-width="0">
|
||||
<lay-button type="primary" @click="toSearchJJ">
|
||||
查询
|
||||
</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="100">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>加分</th>
|
||||
<th>考评项目</th>
|
||||
<th>原因</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="item in jiaList">
|
||||
<tr v-if="item.assessment_type == 1">
|
||||
<td>{{ item.score_value }}</td>
|
||||
<td>{{ item.project_name }}</td>
|
||||
<td>{{ item.notes }}</td>
|
||||
<td>{{ item.createtime }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="margin-top: 20px;">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="100">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>加分</th>
|
||||
<th>考评项目</th>
|
||||
<th>原因</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="item in jiaList">
|
||||
<tr v-if="item.assessment_type == 2">
|
||||
<td>{{ item.score_value }}</td>
|
||||
<td>{{ item.project_name }}</td>
|
||||
<td>{{ item.notes }}</td>
|
||||
<td>{{ item.createtime }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</lay-card>
|
||||
<lay-card>
|
||||
|
||||
</lay-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import {
|
||||
getAnnualFindData, getPersonalProfile, getGroupYear
|
||||
} from "@/api/module/home";
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute()
|
||||
// const userId = ref(route.query.id || '1');
|
||||
const userInfo = ref({});
|
||||
const loading = ref(true);
|
||||
const defaultAvatar = ref('/src/assets/default-avatar.png');
|
||||
const groupName = ref('');
|
||||
const partyName = ref('');
|
||||
const roleName = ref('');
|
||||
|
||||
const yearmonthJia = ref(dayjs().year());
|
||||
|
||||
// 计算性别显示文本
|
||||
const genderText = computed(() => {
|
||||
if (userInfo.value.gender === 1) {
|
||||
return '男';
|
||||
} else if (userInfo.value.gender === 2) {
|
||||
return '女';
|
||||
} else {
|
||||
return '未知';
|
||||
}
|
||||
});
|
||||
|
||||
const jiaList = ref([]);
|
||||
// 获取用户详情(使用模拟数据)
|
||||
const getUserDetail = () => {
|
||||
getPersonalProfile({
|
||||
'user_id': user_id.value,
|
||||
'time': yearmonthJia.value
|
||||
}).then((res) => {
|
||||
if (res.code == 1) {
|
||||
console.log(res.data);
|
||||
userInfo.value = res.data.user;
|
||||
jiaList.value = res.data.date;
|
||||
getTabList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
};
|
||||
const toSearchJJ = () => {
|
||||
getUserDetail();
|
||||
}
|
||||
const toSearchHz = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
// 使用模拟数据,延迟一秒模拟加载效果
|
||||
onMounted(() => {
|
||||
//查询是否有query参数,没有则使用userStore.userInfo.id
|
||||
console.log(route.params.id);
|
||||
if (route.params.id != '') {
|
||||
user_id.value = route.params.id;
|
||||
} else {
|
||||
user_id.value = userStore.userInfo.id;
|
||||
}
|
||||
console.log(user_id.value)
|
||||
getUserDetail();
|
||||
//getUserListInfo();
|
||||
//getTabList();
|
||||
});
|
||||
const tabList = ref([]);
|
||||
const userDataSource = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const yearmonthHz = ref(dayjs().year());
|
||||
const user_id = ref(0);
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': user_id.value,
|
||||
'evaluation_id': tab_id.value,
|
||||
'time': yearmonthHz.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const getTabList = () => {
|
||||
getGroupYear({ 'group_id': userInfo.value.group_id }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
getUserListInfo();
|
||||
//userTabId.value = res.data[0].id;
|
||||
// getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const userColumns = ref([
|
||||
{ title: '年度', width: '80px', key: 'year', align: 'center' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ title: '参评时间', width: '100px', key: 'createtime', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '支部评分', width: '100px', key: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
])
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.file-detail-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loading-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.user-detail {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.detail-section {
|
||||
margin-bottom: 30px;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 15px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.user-header {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.basic-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #666;
|
||||
min-width: 90px;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.user-header {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.layui-table thead tr th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layui-table tbody tr {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layui-table td,
|
||||
.layui-table th {
|
||||
position: relative;
|
||||
padding: 9px 8px;
|
||||
min-height: 20px;
|
||||
height: 40px;
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
vertical-align: middle;
|
||||
unicode-bidi: isolate;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.layui-table td {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #eee;
|
||||
}
|
||||
|
||||
.layui-table {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
</style>
|
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
<lay-tab type="brief" v-model="method">
|
||||
<lay-tab-item title="帐号登陆" id="1">
|
||||
<div style="height: 250px">
|
||||
<div style="height: 250px;padding-top: 20px;">
|
||||
<lay-form-item :label-width="0">
|
||||
<lay-input :allow-clear="true" size="lg" prefix-icon="layui-icon-username" placeholder="用户名"
|
||||
v-model="loginForm.username"></lay-input>
|
||||
|
142
src/views/month_evaluation/assess.vue
Normal file
142
src/views/month_evaluation/assess.vue
Normal file
@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toSearch">查询</lay-button>
|
||||
<lay-button @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">月度评价填报</span>
|
||||
<lay-button type="primary" @click="addShow = true" size="sm">新增自我评价</lay-button>
|
||||
</div>
|
||||
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px"
|
||||
size="lg"></lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
<lay-layer v-model="addShow" title="月度自评详情" :shade="true" :area="['500px', '500px']"
|
||||
:btn="addIsInfo == 1 ? addButton : ''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<div style="margin-bottom: 20px">填报月份:{{ month }}月</div>
|
||||
<lay-form :pane="true">
|
||||
<lay-form-item label="自评内容" prop="desc">
|
||||
<lay-textarea :rows="10" placeholder="请输入评价内容" v-model="addModel.desc"></lay-textarea>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
import {
|
||||
MonthlyList,
|
||||
MonthlyContent
|
||||
} from '../../api/module/home'
|
||||
import { useUserStore } from "@/store/user";
|
||||
import dayjs from "dayjs";
|
||||
const addIsInfo = ref(1);
|
||||
const dataSource = ref([]);
|
||||
const addShow = ref(false);
|
||||
const month = ref(dayjs().format('MM'));
|
||||
const addModel = reactive({
|
||||
desc: ''
|
||||
})
|
||||
onMounted(() => {
|
||||
//getMonthlyList();
|
||||
//getMonthlyContent();
|
||||
})
|
||||
|
||||
const searchAccount = ref(dayjs().year())
|
||||
|
||||
function toReset() {
|
||||
searchAccount.value = dayjs().year()
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '月度',
|
||||
width: '120px',
|
||||
align: 'center',
|
||||
key: 'month'
|
||||
},
|
||||
{
|
||||
title: '考评对象',
|
||||
width: '150px',
|
||||
align: 'center',
|
||||
key: 'user'
|
||||
},
|
||||
{
|
||||
title: '评价时间',
|
||||
width: '250px',
|
||||
align: 'center',
|
||||
key: 'createtime'
|
||||
},
|
||||
{
|
||||
title: '我的评价',
|
||||
key: 'self_score',
|
||||
align: 'center',
|
||||
}, {
|
||||
title: '科室评价',
|
||||
key: 'department_score',
|
||||
customSlot: 'department_score',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
align: 'center',
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
// var json = JSON.stringify(dataSource6.value);
|
||||
// var res = await MonthlyCreate({ 'json': json, 'user_id': userStore.userInfo.id, evaluation_schedule_id: current1.value });
|
||||
// console.log(res)
|
||||
// if (res.code == 1) {
|
||||
// layer.msg('提交成功!', { icon: 1 })
|
||||
// visible11.value = false;
|
||||
// getMonthlyList();
|
||||
// //getMonthlyContent();
|
||||
// } else {
|
||||
// layer.msg(res.msg, { icon: 2 })
|
||||
// }
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
</script>
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
</style>
|
@ -2,6 +2,7 @@
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
@ -25,6 +26,14 @@
|
||||
<lay-date-picker type="yearmonth" v-model="yearmonth" placeholder="月度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="120">
|
||||
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<lay-select-option v-for="item in dataSerSource" :value="item.id"
|
||||
:label="item.nickname"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<!-- <lay-col :md="5">-->
|
||||
<!-- <lay-form-item label="考评对象" label-width="80">-->
|
||||
<!-- <lay-input v-model="searchQuery.evaluateTarget" placeholder="请输入" size="sm" :allow-clear="true"-->
|
||||
@ -43,7 +52,7 @@
|
||||
<!-- </lay-col>-->
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="normal" size="sm" @click="toSearch">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
@ -52,50 +61,62 @@
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<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:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</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 v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
<lay-table :page="page" height="600px" :columns="columns" :loading="loading" :data-source="dataSource"
|
||||
@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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<!-- <lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag> -->
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 3)">医院评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px', '100%']"
|
||||
:btn="addIsInfo == 1 ? addButton : ''">
|
||||
: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>
|
||||
<template v-slot:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<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>
|
||||
<template v-slot:content_score="{ row, column, rowIndex }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
|
||||
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
<template v-slot:department_score="{ row, rowIndex }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number :disabled="addIsInfo==1" @change="inputKsChange(row)" v-if="row.pid != 0" :min="0" :max="row.base_score" v-model="row.department_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- <template v-slot:yyinput="{ data, rowIndex }">
|
||||
<template v-if="userStore.userInfo.level == 3 || thisInfo.scoringrecord_status == 4">
|
||||
<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 != 3" :min="0" :max="data.base_score"
|
||||
v-model="data.hospital_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
</template> -->
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
@ -114,8 +135,8 @@
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button @click="toReset">重置</lay-button>
|
||||
<lay-button type="primary" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
@ -123,20 +144,23 @@
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="brief" @change="openUserTab">
|
||||
<lay-tab v-model="userTabId" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table :default-expand-all="true" :columns="userColumns"
|
||||
:data-source="userDataSource">
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if ==2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed"
|
||||
v-if="row.if ==1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
|
||||
</lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
<lay-table :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
@ -155,10 +179,65 @@ import {
|
||||
MonthlyInfo
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputListKsShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
});
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
//找到row的index
|
||||
//dataSource6.value[index].avg_score = total;
|
||||
//dataSource6.value[index].content_score = total;
|
||||
}
|
||||
const userShow = ref(false);
|
||||
const userColumns = ref([
|
||||
{ title: '月度', width: '80px', key: 'month', align: 'center' },
|
||||
@ -166,7 +245,8 @@ const userColumns = ref([
|
||||
{ title: '参评时间', width: '100px', key: 'createtime', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
// { title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
@ -185,9 +265,9 @@ const getUserListInfo = () => {
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if(res.code==1){
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
}else{
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
@ -198,12 +278,24 @@ const openUserTab = (d) => {
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item) => {
|
||||
addIsInfo.value=2;
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time=item.month;
|
||||
item.time = item.month;
|
||||
thisInfo.value = item;
|
||||
getInfoMode(item);
|
||||
// if (item.scoringrecord_status == 4) {
|
||||
// columns6.push({
|
||||
// title: "医院评分",
|
||||
// width: "100px",
|
||||
// align: 'center',
|
||||
// customSlot: 'yyinput',
|
||||
// key: "yyinput"
|
||||
// });
|
||||
// }
|
||||
console.log(columns6);
|
||||
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
@ -227,6 +319,7 @@ const infoShow = ref(false);
|
||||
const yearmonth = ref();
|
||||
const getList = () => {
|
||||
getMonthlyUserList({
|
||||
'user_id': userId.value,
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
@ -242,6 +335,22 @@ const getList = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getMonthlyUserList({
|
||||
'group_id': group_id.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 999
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
@ -249,6 +358,18 @@ const getInfo = (row, type) => {
|
||||
console.log(row);
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
|
||||
// if (row.scoringrecord_status == 4 && userStore.userInfo.level != 3) {
|
||||
// columns6.push({
|
||||
// title: "医院评分",
|
||||
// width: "100px",
|
||||
// align: 'center',
|
||||
// customSlot: 'yyinput',
|
||||
// key: "yyinput"
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getMonthlyListFind({
|
||||
@ -259,6 +380,8 @@ const getInfoMode = (row) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
@ -287,6 +410,7 @@ const getLeftList = () => {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
@ -308,13 +432,6 @@ function toReset() {
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
@ -323,16 +440,15 @@ function toSearch() {
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ 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', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'work_number', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
// { title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
@ -379,25 +495,31 @@ const columns6 = [
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'ksinput',
|
||||
key: "ksinput"
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
const dataSource6 = ref([])
|
||||
</script>
|
||||
|
||||
@ -457,4 +579,8 @@ const dataSource6 = ref([])
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,8 +7,7 @@
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
@ -27,20 +26,14 @@
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">月度自评列表</span>
|
||||
<lay-button type="primary" size="sm">导出Excel</lay-button>
|
||||
</div>
|
||||
<lay-tab v-model="current1" type="brief" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:even="true"
|
||||
height="500px"
|
||||
size="md"
|
||||
>
|
||||
<lay-tab v-model="current1" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px" size="lg">
|
||||
<template v-slot:id="{ data }">
|
||||
{{ data.id }}
|
||||
</template>
|
||||
<template v-slot:department_score="{ data }">
|
||||
{{ data.department_score==0?'-':data.department_score }}
|
||||
{{ data.department_score == 0 ? '-' : data.department_score }}
|
||||
</template>
|
||||
<template v-slot:username="{ data }">
|
||||
{{ data.username }}
|
||||
@ -49,9 +42,9 @@
|
||||
{{ data.password }}
|
||||
</template>
|
||||
<template v-slot:operator="{ data }">
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_month==1" @click="getMonthlyInfo(data)">详情</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_month==2"
|
||||
@click="openZp(data)">开始自评</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_month == 1"
|
||||
@click="getMonthlyInfo(data)">详情</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_month == 2" @click="openZp(data)">开始自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-tab-item>
|
||||
@ -61,15 +54,19 @@
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
<lay-layer v-model="visible11" title="月度自评详情" :type="4" :shade="true" :area="['950px','100%']" :btn="addIsInfo==1?addButton:''">
|
||||
<lay-layer v-model="visible11" 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>
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目总分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<template v-slot:content_score="{ row, column, rowIndex }">
|
||||
<div v-if="row.pid == 0">已评总分:{{ row.avg_score?row.avg_score:0 }}</div>
|
||||
<lay-input-number @change="inputChange(row, rowIndex, column)" v-if="row.pid != 0" :disabled="addIsInfo == 2"
|
||||
:min="0" :max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
@ -77,40 +74,62 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted} from 'vue'
|
||||
import {layer} from '@layui/layer-vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
import {
|
||||
MonthlyList,
|
||||
MonthlyContent, MonthlyCreate,MonthlyInfo,userEvaluationData
|
||||
MonthlyContent, MonthlyCreate, MonthlyInfo, userEvaluationData
|
||||
} from '../../api/module/home'
|
||||
import {useUserStore} from "@/store/user";
|
||||
import { useUserStore } from "@/store/user";
|
||||
import dayjs from "dayjs";
|
||||
const current1=ref(1);
|
||||
const tabList=ref([]);
|
||||
const current1 = ref(1);
|
||||
const tabList = ref([]);
|
||||
const userStore = useUserStore()
|
||||
const active = ref(-1);
|
||||
const visible11 = ref(false);
|
||||
|
||||
const page = ref({total: 1, limit: 10, current: 1});
|
||||
|
||||
const dataSource = ref([]);
|
||||
|
||||
const addIsInfo=ref(1);
|
||||
const addIsInfo = ref(1);
|
||||
|
||||
onMounted(() => {
|
||||
//getMonthlyList();
|
||||
//getMonthlyContent();
|
||||
getUserEvaluationData();
|
||||
})
|
||||
const openZp = (item) => {
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const openZp = () => {
|
||||
visible11.value = true;
|
||||
addIsInfo.value=1
|
||||
addIsInfo.value = 1
|
||||
getMonthlyContent();
|
||||
}
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
current1.value=d;
|
||||
dataSource.value=[];
|
||||
current1.value = d;
|
||||
dataSource.value = [];
|
||||
getMonthlyList();
|
||||
}
|
||||
const getUserEvaluationData = () => {
|
||||
@ -118,22 +137,23 @@ const getUserEvaluationData = () => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
current1.value=res.data[0].id;
|
||||
current1.value = res.data[0].id;
|
||||
getMonthlyList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const getMonthlyInfo = (item) => {
|
||||
visible11.value=true;
|
||||
addIsInfo.value=2;
|
||||
MonthlyInfo({'evaluation_schedule_id':current1.value,'user_id': userStore.userInfo.id, 'month': item.month}).then((res) => {
|
||||
visible11.value = true;
|
||||
addIsInfo.value = 2;
|
||||
MonthlyInfo({ 'evaluation_schedule_id': current1.value, 'user_id': userStore.userInfo.id, 'month': item.month }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -146,26 +166,26 @@ function toSearch() {
|
||||
const searchAccount = ref(dayjs().year())
|
||||
|
||||
function toReset() {
|
||||
searchAccount.value =dayjs().year()
|
||||
searchAccount.value = dayjs().year()
|
||||
}
|
||||
const getMonthlyList = () => {
|
||||
MonthlyList({'id': current1.value,time:searchAccount.value}).then((res) => {
|
||||
MonthlyList({ 'id': current1.value, time: searchAccount.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSource6 = ref([]);
|
||||
const getMonthlyContent = () => {
|
||||
MonthlyContent({'id': current1.value}).then((res) => {
|
||||
MonthlyContent({ 'id': current1.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -179,21 +199,24 @@ const columns6 = [
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
]
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '月度',
|
||||
width: '100px',
|
||||
width: '120px',
|
||||
align: 'center',
|
||||
key: 'month'
|
||||
},
|
||||
@ -205,7 +228,7 @@ const columns = [
|
||||
},
|
||||
{
|
||||
title: '参评时间',
|
||||
width: '180px',
|
||||
width: '250px',
|
||||
align: 'center',
|
||||
key: 'createtime'
|
||||
},
|
||||
@ -219,11 +242,11 @@ const columns = [
|
||||
customSlot: 'department_score',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '医院评分',
|
||||
key: 'hospital_score',
|
||||
align: 'center',
|
||||
},
|
||||
// {
|
||||
// title: '医院评分',
|
||||
// key: 'hospital_score',
|
||||
// align: 'center',
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
@ -241,15 +264,15 @@ const addButton = ref([
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await MonthlyCreate({'json': json,'user_id': userStore.userInfo.id,evaluation_schedule_id: current1.value});
|
||||
var res = await MonthlyCreate({ 'json': json, 'user_id': userStore.userInfo.id, evaluation_schedule_id: current1.value });
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', {icon: 1})
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
visible11.value = false;
|
||||
getMonthlyList();
|
||||
//getMonthlyContent();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
148
src/views/season_evaluation/assess.vue
Normal file
148
src/views/season_evaluation/assess.vue
Normal file
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toSearch">查询</lay-button>
|
||||
<lay-button @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">季度评价填报</span>
|
||||
<lay-button type="primary" @click="addShow = true" size="sm">新增自我评价</lay-button>
|
||||
</div>
|
||||
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px"
|
||||
size="lg"></lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
<lay-layer v-model="addShow" title="季度自评详情" :shade="true" :area="['500px', '500px']"
|
||||
:btn="addIsInfo == 1 ? addButton : ''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<div style="margin-bottom: 20px">填报季度:第 {{ quarter }} 季度</div>
|
||||
<lay-form :pane="true">
|
||||
<lay-form-item label="自评内容" prop="desc">
|
||||
<lay-textarea :rows="10" placeholder="请输入评价内容" v-model="addModel.desc"></lay-textarea>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
import {
|
||||
MonthlyList,
|
||||
MonthlyContent
|
||||
} from '../../api/module/home'
|
||||
import { useUserStore } from "@/store/user";
|
||||
import dayjs from "dayjs";
|
||||
const addIsInfo = ref(1);
|
||||
const dataSource = ref([]);
|
||||
const addShow = ref(false);
|
||||
//
|
||||
|
||||
const addModel = reactive({
|
||||
desc: ''
|
||||
})
|
||||
const getQuarter = () => {
|
||||
//帮我改造一下
|
||||
return dayjs().month() < 3 ? 1 : dayjs().month() < 6 ? 2 : dayjs().month() < 9 ? 3 : 4;
|
||||
}
|
||||
const quarter = ref(getQuarter());
|
||||
onMounted(() => {
|
||||
//getMonthlyList();
|
||||
//getMonthlyContent();
|
||||
})
|
||||
|
||||
const searchAccount = ref(dayjs().year())
|
||||
|
||||
function toReset() {
|
||||
searchAccount.value = dayjs().year()
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '季度',
|
||||
width: '120px',
|
||||
align: 'center',
|
||||
key: 'quarter'
|
||||
},
|
||||
{
|
||||
title: '考评对象',
|
||||
width: '150px',
|
||||
align: 'center',
|
||||
key: 'user'
|
||||
},
|
||||
{
|
||||
title: '评价时间',
|
||||
width: '250px',
|
||||
align: 'center',
|
||||
key: 'createtime'
|
||||
},
|
||||
{
|
||||
title: '我的评价',
|
||||
key: 'self_score',
|
||||
align: 'center',
|
||||
}, {
|
||||
title: '科室评价',
|
||||
key: 'department_score',
|
||||
customSlot: 'department_score',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
align: 'center',
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
// var json = JSON.stringify(dataSource6.value);
|
||||
// var res = await MonthlyCreate({ 'json': json, 'user_id': userStore.userInfo.id, evaluation_schedule_id: current1.value });
|
||||
// console.log(res)
|
||||
// if (res.code == 1) {
|
||||
// layer.msg('提交成功!', { icon: 1 })
|
||||
// visible11.value = false;
|
||||
// getMonthlyList();
|
||||
// //getMonthlyContent();
|
||||
// } else {
|
||||
// layer.msg(res.msg, { icon: 2 })
|
||||
// }
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
</script>
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
</style>
|
@ -2,8 +2,9 @@
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
@ -22,8 +23,7 @@
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="year" placeholder="年"
|
||||
allow-clear></lay-date-picker>
|
||||
<lay-date-picker type="year" v-model="year" placeholder="年" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
@ -36,9 +36,16 @@
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<lay-select-option v-for="item in dataSerSource" :value="item.id" :label="item.nickname"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="normal" size="sm" @click="toSearch">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
@ -47,48 +54,53 @@
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<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:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</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 v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
<lay-table :page="page" height="600px" :columns="columns" :loading="loading" :data-source="dataSource"
|
||||
@change="pageChange">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag>
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 3)">医院评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px','100%']"
|
||||
:btn="addIsInfo==1?addButton:''">
|
||||
<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>
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<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>
|
||||
<template v-slot:content_score="{ row, column, rowIndex }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
|
||||
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
<template v-slot:department_score="{ row, rowIndex }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number :disabled="addIsInfo==1" @change="inputKsChange(row)" v-if="row.pid != 0" :min="0" :max="row.base_score" v-model="row.department_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
@ -108,8 +120,8 @@
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button @click="toReset">重置</lay-button>
|
||||
<lay-button type="primary" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
@ -117,20 +129,23 @@
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="brief" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns"
|
||||
<lay-tab v-model="userTabId" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns"
|
||||
:data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if ==2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed"
|
||||
v-if="row.if ==1">未自评</span>
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
@ -138,8 +153,8 @@
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref, reactive, onMounted} from 'vue'
|
||||
import {layer} from '@layui/layui-vue'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupQuarter,
|
||||
@ -149,8 +164,17 @@ import {
|
||||
getQuarterlyFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if(route.params.id){
|
||||
console.log(route.params.id);
|
||||
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const userShow = ref(false);
|
||||
@ -161,6 +185,7 @@ const userColumns = ref([
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
@ -172,6 +197,51 @@ const openUserListShow = (row) => {
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputListKsShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
});
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getQuarterlyFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
@ -179,9 +249,9 @@ const getUserListInfo = () => {
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if(res.code==1){
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
}else{
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
@ -192,11 +262,11 @@ const openUserTab = (d) => {
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item) => {
|
||||
addIsInfo.value=2;
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time=item.quarter;
|
||||
item.time = item.quarter;
|
||||
getInfoMode(item);
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
@ -209,8 +279,8 @@ const openTab = (d) => {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({current: 1, limit: 10, total: 1})
|
||||
const change = (d) => {
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const pageChange = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
page.limit = d.limit;
|
||||
@ -225,6 +295,7 @@ const quarter = ref(1);
|
||||
const yearmonth = ref();
|
||||
const getList = () => {
|
||||
getQuarterUserList({
|
||||
'user_id': userId.value,
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
@ -236,18 +307,48 @@ const getList = () => {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSerSource = ref([]);
|
||||
const getSserList = () => {
|
||||
getQuarterUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 999
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row,type) => {
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
console.log(row);
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
// if (row.scoringrecord_status == 4 && userStore.userInfo.level != 3) {
|
||||
// columns6.push({
|
||||
// title: "医院评分",
|
||||
// width: "100px",
|
||||
// align: 'center',
|
||||
// customSlot: 'yyinput',
|
||||
// key: "yyinput"
|
||||
// });
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
const getInfoMode = (row) => {
|
||||
getQuarterListFind({
|
||||
evaluation_schedule_id: tab_id.value,
|
||||
@ -257,15 +358,17 @@ const getInfoMode = (row) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupQuarter({'group_id': group_id.value}).then((res) => {
|
||||
getGroupQuarter({ 'group_id': group_id.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
@ -273,7 +376,7 @@ const getTabList = () => {
|
||||
userTabId.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -285,8 +388,9 @@ const getLeftList = () => {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
getSserList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -315,23 +419,23 @@ function handleClick(node: any) {
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
yearmonth.value=year.value+'-'+quarter.value;
|
||||
yearmonth.value = year.value + '-' + quarter.value;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{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',customSlot:'nickname', align: 'center'},
|
||||
{title: '工号', width: '100px', key: 'work_number', align: 'center'},
|
||||
{title: '部门', width: '120px', key: 'group_name', align: 'center'},
|
||||
{title: '医院评分', width: '100px', key: 'hospital_score', 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'},
|
||||
{ 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', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', 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' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
@ -354,12 +458,12 @@ const addButton = ref([
|
||||
});
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', {icon: 1})
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
thisInfo.value = {};
|
||||
infoShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -378,25 +482,39 @@ const columns6 = [
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'ksinput',
|
||||
key: "ksinput"
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}
|
||||
]
|
||||
// 根据用户级别动态添加医院评分列
|
||||
// if (userStore.userInfo.level == 3) {
|
||||
// columns6.push({
|
||||
// title: "医院评分",
|
||||
// width: "100px",
|
||||
// align: 'center',
|
||||
// customSlot: 'yyinput',
|
||||
// key: "yyinput"
|
||||
// });
|
||||
// }
|
||||
const dataSource6 = ref([])
|
||||
</script>
|
||||
|
||||
@ -456,5 +574,7 @@ const dataSource6 = ref([])
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content{
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,8 +7,7 @@
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
@ -27,21 +26,15 @@
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">季度自评列表</span>
|
||||
<lay-button type="primary" size="sm">导出Excel</lay-button>
|
||||
</div>
|
||||
<lay-tab v-model="current1" type="brief" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
<lay-tab v-model="current1" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:even="true"
|
||||
height="500px"
|
||||
size="md"
|
||||
>
|
||||
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px" size="lg">
|
||||
<template v-slot:id="{ data }">
|
||||
{{ data.id }}
|
||||
</template>
|
||||
<template v-slot:department_score="{ data }">
|
||||
{{ data.department_score==0?'-':data.department_score }}
|
||||
{{ data.department_score == 0 ? '-' : data.department_score }}
|
||||
</template>
|
||||
<template v-slot:username="{ data }">
|
||||
{{ data.username }}
|
||||
@ -50,43 +43,27 @@
|
||||
{{ data.password }}
|
||||
</template>
|
||||
<template v-slot:operator="{ data }">
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if==2" @click="getMonthlyInfo(data)">详情</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if==1"
|
||||
@click="insZp(data)">开始自评</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if == 2" @click="getMonthlyInfo(data)">详情</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if == 1" @click="insZp(data)">开始自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
<lay-layer v-model="visible11" title="季度自评" :type="4" :shade="true" :area="['950px','100%']" :btn="addIsInfo==1?addButton:''">
|
||||
<lay-layer v-model="visible11" title="季度自评" :type="4" :shade="true" :area="['950px', '100%']"
|
||||
:btn="addIsInfo == 1 ? addButton : ''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-card shadow="always">
|
||||
<div style="height: 70px;width: 100%;">
|
||||
<lay-step current-status="primary" style="margin: 0 auto" direction="horizontal" :active="active" space="100%"
|
||||
:center="true">
|
||||
<lay-step-item>
|
||||
<template v-slot:default>
|
||||
<div style="font-size: 18px;font-weight: bold;color: #009688">个人自评</div>
|
||||
<!-- <div style="color: #999999">2025-01-01 14:35:33</div>-->
|
||||
</template>
|
||||
</lay-step-item>
|
||||
<lay-step-item>
|
||||
<template v-slot:default>
|
||||
<div style="font-size: 18px;font-weight: bold;color: #009688">科室考评</div>
|
||||
<div style="color: #999999"></div>
|
||||
</template>
|
||||
</lay-step-item>
|
||||
</lay-step>
|
||||
</div>
|
||||
</lay-card>
|
||||
<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>
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目总分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<template v-slot:content_score="{ row, column, rowIndex }">
|
||||
<div v-if="row.pid == 0">已评总分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row, rowIndex, column)" v-if="row.pid != 0" :disabled="addIsInfo == 2"
|
||||
:min="0" :max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
@ -94,36 +71,60 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted} from 'vue'
|
||||
import {layer} from '@layui/layer-vue'
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { layer } from '@layui/layer-vue';
|
||||
import {
|
||||
QuarterList, QuarterContent, QuarterCreate, QuarterInfo, userEvaluationData, userQuarterData
|
||||
} from '../../api/module/home'
|
||||
import {useUserStore} from "@/store/user";
|
||||
QuarterList, QuarterContent, QuarterCreate, QuarterInfo, userQuarterData
|
||||
} from '../../api/module/home';
|
||||
import { useUserStore } from "@/store/user";
|
||||
import dayjs from "dayjs";
|
||||
const current1=ref(1);
|
||||
const tabList=ref([]);
|
||||
const current1 = ref(1);
|
||||
const tabList = ref([]);
|
||||
const userStore = useUserStore()
|
||||
const active = ref(-1);
|
||||
const visible11 = ref(false);
|
||||
|
||||
const page = ref({total: 100, limit: 10, current: 2});
|
||||
const page = ref({ total: 100, limit: 10, current: 2 });
|
||||
|
||||
const dataSource = ref([]);
|
||||
|
||||
const addIsInfo=ref(1);
|
||||
const addIsInfo = ref(1);
|
||||
|
||||
const quarterName=ref('');
|
||||
const quarterName = ref('');
|
||||
|
||||
onMounted(() => {
|
||||
//getQuarterList();
|
||||
//getQuarterContent();
|
||||
getUserEvaluationData();
|
||||
})
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
current1.value=d;
|
||||
dataSource.value=[];
|
||||
current1.value = d;
|
||||
dataSource.value = [];
|
||||
getQuarterList();
|
||||
}
|
||||
const getUserEvaluationData = () => {
|
||||
@ -131,49 +132,50 @@ const getUserEvaluationData = () => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
current1.value=res.data[0].id;
|
||||
current1.value = res.data[0].id;
|
||||
getQuarterList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const insZp = (item) => {
|
||||
visible11.value = true;
|
||||
addIsInfo.value=1;
|
||||
quarterName.value=item.quarter;
|
||||
addIsInfo.value = 1;
|
||||
quarterName.value = item.quarter;
|
||||
getQuarterContent();
|
||||
}
|
||||
const getMonthlyInfo = (item) => {
|
||||
visible11.value=true;
|
||||
addIsInfo.value=2;
|
||||
QuarterInfo({'user_id': userStore.userInfo.id, 'quarter': item.quarter,'evaluation_schedule_id':current1.value}).then((res) => {
|
||||
visible11.value = true;
|
||||
addIsInfo.value = 2;
|
||||
QuarterInfo({ 'user_id': userStore.userInfo.id, 'quarter': item.quarter, 'evaluation_schedule_id': current1.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const getQuarterList = () => {
|
||||
QuarterList({'id': current1.value,time:searchAccount.value}).then((res) => {
|
||||
QuarterList({ 'id': current1.value, time: searchAccount.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSource6 = ref([]);
|
||||
const getQuarterContent = () => {
|
||||
QuarterContent({'id': current1.value}).then((res) => {
|
||||
QuarterContent({ 'id': current1.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -187,21 +189,23 @@ const columns6 = [
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
]
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '季度',
|
||||
width: '100px',
|
||||
width: '120px',
|
||||
align: 'center',
|
||||
key: 'quarter'
|
||||
},
|
||||
@ -213,7 +217,7 @@ const columns = [
|
||||
},
|
||||
{
|
||||
title: '参评时间',
|
||||
width: '180px',
|
||||
width: '250px',
|
||||
align: 'center',
|
||||
key: 'createtime'
|
||||
},
|
||||
@ -226,11 +230,12 @@ const columns = [
|
||||
key: 'department_score',
|
||||
customSlot: 'department_score',
|
||||
align: 'center',
|
||||
}, {
|
||||
title: '医院评分',
|
||||
key: 'hospital_score',
|
||||
align: 'center',
|
||||
},
|
||||
// {
|
||||
// title: '医院评分',
|
||||
// key: 'hospital_score',
|
||||
// align: 'center',
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
@ -250,22 +255,22 @@ function toSearch() {
|
||||
const searchAccount = ref(dayjs().year())
|
||||
|
||||
function toReset() {
|
||||
searchAccount.value =dayjs().year()
|
||||
searchAccount.value = dayjs().year()
|
||||
}
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await QuarterCreate({'evaluation_schedule_id':current1.value,'term':quarterName.value,'json': json,'user_id': userStore.userInfo.id});
|
||||
var res = await QuarterCreate({ 'evaluation_schedule_id': current1.value, 'term': quarterName.value, 'json': json, 'user_id': userStore.userInfo.id });
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', {icon: 1})
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
visible11.value = false;
|
||||
getQuarterList();
|
||||
//getQuarterContent();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -6,8 +6,8 @@
|
||||
<div v-show="!isFold">
|
||||
科室列表
|
||||
</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="leftId"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="leftId" :showLine="false"
|
||||
@node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="leftId == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
@ -25,21 +25,21 @@
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="用户名" label-width="80">
|
||||
<lay-input v-model="searchQuery.username" placeholder="请输入" size="sm" :allow-clear="true"
|
||||
style="width: 98%"></lay-input>
|
||||
<lay-form-item label="姓名" label-width="80">
|
||||
<lay-input v-model="searchQuery.nickname" 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-input v-model="searchQuery.mobile" placeholder="请输入" size="sm" :allow-clear="true"
|
||||
style="width: 98%"></lay-input>
|
||||
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.gender" :allow-clear="true"
|
||||
placeholder="请选择">
|
||||
placeholder="请选择">
|
||||
<lay-select-option :value="0" label="未知"></lay-select-option>
|
||||
<lay-select-option :value="1" label="男"></lay-select-option>
|
||||
<lay-select-option :value="2" label="女"></lay-select-option>
|
||||
@ -58,7 +58,7 @@
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-table :page="page" height="600px" :columns="columns" :loading="loading" :default-toolbar="false"
|
||||
:data-source="dataSource" @change="changePage">
|
||||
:data-source="dataSource" @change="changePage">
|
||||
<template #status="{ row }">
|
||||
<lay-tag type="danger" v-if="row.status == 0">已禁用</lay-tag>
|
||||
<lay-tag type="primary" v-if="row.status == 1">正常</lay-tag>
|
||||
@ -84,69 +84,92 @@
|
||||
</div>
|
||||
<lay-layer v-model="addShow" :title="title" :area="['750px', '100%']" :type="4" :shade="true" :btn="addButton">
|
||||
<div style="padding: 20px">
|
||||
<lay-form :model="model11" ref="layFormRef11" required mode="inline">
|
||||
<!-- <lay-form-item label="头像" prop="username">-->
|
||||
<!-- <lay-upload ref="uploadRef" :number="1" field="file" :size="1000" :headers="{ token: userStore.token }"-->
|
||||
<!-- url="/api/common/upload" @cutdone="getCutDone" v-model="file1" :auto="true" acceptMime="images"-->
|
||||
<!-- :cut="false" :cutOptions="cutOptions" @done="getFileDone">-->
|
||||
<!-- <template #preview>-->
|
||||
<!-- <div class="easy-wrap" v-if="model11.avatar">-->
|
||||
<!-- <img :src="model11.avatar" style="width: 100px;height: 100px"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </lay-upload>-->
|
||||
<!-- </lay-form-item>-->
|
||||
<lay-form-item label="登陆账户" prop="username">
|
||||
<lay-input v-model="model11.username" size="lg" placeholder="请输入登陆账户"></lay-input>
|
||||
<lay-form :model="model11" ref="layFormRef11" mode="inline">
|
||||
<lay-form-item label="证件照" prop="username">
|
||||
<lay-upload style="width:180px;" ref="uploadRefA" :number="1" field="file" :size="1000" :headers="{ token: userStore.token }"
|
||||
url="http://yfyd.hschool.com.cn/api/common/upload" @cutdone="getCutDone2" v-model="file2" :auto="true" acceptMime="images"
|
||||
:cut="false" :cutOptions="cutOptions" @done="getFileDone2">
|
||||
<template #preview>
|
||||
<div class="easy-wrap" v-if="model11.avatar">
|
||||
<img :src="model11.avatar" style="width: 100px;" />
|
||||
</div>
|
||||
</template>
|
||||
</lay-upload>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="密码" prop="password">
|
||||
<lay-form-item label="工号" prop="code" required>
|
||||
<lay-input v-model="model11.code" size="lg" placeholder="请输入工号"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="密码" prop="password" required>
|
||||
<lay-input v-model="model11.password" size="lg" placeholder="请输入密码"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="姓名" prop="nickname">
|
||||
<lay-form-item label="姓名" prop="nickname" required>
|
||||
<lay-input v-model="model11.nickname" size="lg" placeholder="请输入姓名"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="手机号" prop="mobile">
|
||||
<lay-form-item label="手机号" prop="mobile" required>
|
||||
<lay-input v-model="model11.mobile" size="lg" placeholder="请输入手机号"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="身份证号" prop="member_code">
|
||||
<lay-form-item label="身份证号" prop="member_code" required>
|
||||
<lay-input v-model="model11.member_code" size="lg" placeholder="请输入身份证号"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="生日" prop="birthday">
|
||||
<lay-date-picker v-model="model11.birthday" placeholder="请选择生日" allow-clear
|
||||
style="width:180px;"></lay-date-picker>
|
||||
style="width:180px;"></lay-date-picker>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="邮箱" prop="email">
|
||||
<lay-input v-model="model11.email" size="lg" placeholder="请输入邮箱"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="工号" prop="work_number">
|
||||
<lay-input v-model="model11.work_number" size="lg" placeholder="请输入工号"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="性别" prop="gender">
|
||||
<lay-form-item label="性别" prop="gender" required>
|
||||
<lay-select v-model="model11.gender" style="width:180px;">
|
||||
<lay-select-option :value="0" label="未选择"></lay-select-option>
|
||||
<lay-select-option :value="1" label="男"></lay-select-option>
|
||||
<lay-select-option :value="2" label="女"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="科室" prop="group_id">
|
||||
<lay-cascader :checkStrictly="false" size="lg" style="width:180px;" :options="data" search
|
||||
:replaceFields="replaceFields"
|
||||
v-model="model11.group_id"
|
||||
placeholder="选择科室" allow-clear></lay-cascader>
|
||||
<!-- 新增字段 -->
|
||||
<lay-form-item label="岗位名称" prop="position">
|
||||
<lay-input v-model="model11.position" size="lg" placeholder="请输入岗位名称"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="党支部" prop="party_id">
|
||||
<lay-form-item label="业务性质" prop="business_nature">
|
||||
<lay-input v-model="model11.business_nature" size="lg" placeholder="请输入业务性质"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="资格证图片" prop="username">
|
||||
<lay-upload style="width:180px;" ref="uploadRef" :number="1" field="file" :size="1000" :headers="{ token: userStore.token }"
|
||||
url="http://yfyd.hschool.com.cn/api/common/upload" @cutdone="getCutDone" v-model="file1" :auto="true" acceptMime="images"
|
||||
:cut="false" :cutOptions="cutOptions" @done="getFileDone">
|
||||
<template #preview>
|
||||
<div class="easy-wrap" v-if="model11.license_image">
|
||||
<img :src="model11.license_image" style="width: 100px;" />
|
||||
</div>
|
||||
</template>
|
||||
</lay-upload>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="资格证编码" prop="certificate_code">
|
||||
<lay-input v-model="model11.certificate_code" size="lg" placeholder="请输入资格证编码"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="执业证编码" prop="license_code">
|
||||
<lay-input v-model="model11.license_code" size="lg" placeholder="请输入执业证编码"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="行政职务" prop="administrative_position">
|
||||
<lay-input v-model="model11.administrative_position" size="lg" placeholder="请输入行政职务名称"></lay-input>
|
||||
</lay-form-item>
|
||||
<!-- 新增字段结束 -->
|
||||
<lay-form-item label="科室" prop="group_id" required>
|
||||
<lay-cascader :checkStrictly="false" size="lg" style="width:180px;" :options="data" search
|
||||
:replaceFields="replaceFields" v-model="model11.group_id" placeholder="选择科室" allow-clear></lay-cascader>
|
||||
</lay-form-item>
|
||||
<!-- <lay-form-item label="党支部" prop="party_id">
|
||||
<lay-cascader size="lg" style="width:180px;" :options="partyList" search
|
||||
:replaceFields="replaceFields"
|
||||
v-model="model11.party_id"
|
||||
placeholder="选择党支部" allow-clear></lay-cascader>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="角色组" prop="auth_group_id">
|
||||
</lay-form-item> -->
|
||||
<lay-form-item label="角色组" prop="auth_group_id" required>
|
||||
<lay-select v-model="model11.auth_group_id" style="width:180px;" placeholder="选择角色组">
|
||||
<lay-select-option size="lg" v-for="item in authList" :value="item.id"
|
||||
:label="item.name"></lay-select-option>
|
||||
:label="item.name"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="状态" prop="status">
|
||||
<lay-form-item label="状态" prop="status" required>
|
||||
<lay-select v-model="model11.status" placeholder="请选择" size="lg" style="width:180px;">
|
||||
<lay-select-option :value="0" label="禁用"></lay-select-option>
|
||||
<lay-select-option :value="1" label="启用"></lay-select-option>
|
||||
@ -158,8 +181,8 @@
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref, reactive, onMounted} from 'vue'
|
||||
import {layer} from '@layui/layui-vue'
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { layer } from '@layui/layui-vue';
|
||||
import {
|
||||
authGroupData,
|
||||
userData,
|
||||
@ -169,11 +192,10 @@ import {
|
||||
partyGroupData,
|
||||
userGroupData
|
||||
} from "@/api/module/home";
|
||||
import { useUserStore } from "@/store/user";
|
||||
|
||||
const cutUrl = ref("");
|
||||
const uploadRef = ref(null)
|
||||
import {useRouter} from 'vue-router'
|
||||
import {useUserStore} from "@/store/user";
|
||||
|
||||
const userStore = useUserStore()
|
||||
const replaceFields = {
|
||||
@ -187,7 +209,20 @@ const cutOptions = {
|
||||
aspectRatio: 1,
|
||||
}
|
||||
}
|
||||
const file2 = ref([]);
|
||||
const getCutDone2 = (res) => {
|
||||
console.log("getCutDone", res);
|
||||
cutUrl.value = res.msg;
|
||||
};
|
||||
const getFileDone2 = (res) => {
|
||||
var date = JSON.parse(res.data);
|
||||
console.log("getFileDone", date);
|
||||
model11.avatar = date.data.fullurl;
|
||||
//uploadRef.value.submit()
|
||||
};
|
||||
|
||||
const file1 = ref([]);
|
||||
|
||||
const getCutDone = (res) => {
|
||||
console.log("getCutDone", res);
|
||||
cutUrl.value = res.msg;
|
||||
@ -195,7 +230,7 @@ const getCutDone = (res) => {
|
||||
const getFileDone = (res) => {
|
||||
var date = JSON.parse(res.data);
|
||||
console.log("getFileDone", date);
|
||||
model11.avatar = date.data.fullurl;
|
||||
model11.license_image = date.data.fullurl;
|
||||
//uploadRef.value.submit()
|
||||
};
|
||||
onMounted(() => {
|
||||
@ -204,14 +239,17 @@ onMounted(() => {
|
||||
getPartyList();
|
||||
getAuthList();
|
||||
})
|
||||
const dataSource = ref([])
|
||||
|
||||
const getUserList = () => {
|
||||
userData({group_id: leftId.value, size: page.limit, page: page.current}).then((res) => {
|
||||
userData({ group_id: leftId.value, size: page.limit, page: page.current }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.data;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
dataSource.value = [];
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -227,7 +265,7 @@ const getPartyList = () => {
|
||||
if (res.code == 1) {
|
||||
partyList.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -237,13 +275,13 @@ const getLeftList = () => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
if(userStore.userInfo.level == 1){
|
||||
data.value.unshift({id: 0,name: '全部',children: []})
|
||||
}
|
||||
leftId.value=res.data[0].id;
|
||||
// if (userStore.userInfo.level == 1) {
|
||||
// data.value.unshift({ id: 0, name: '全部', children: [] })
|
||||
// }
|
||||
leftId.value = res.data[0].id;
|
||||
getUserList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -252,9 +290,10 @@ const getAuthList = () => {
|
||||
authGroupData({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
authList.value = res.data;
|
||||
//去除数组第一个值
|
||||
authList.value = res.data.slice(1);
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -263,14 +302,14 @@ const data = ref([])
|
||||
const selectedKey = ref('')
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
username: '',
|
||||
nickname: '',
|
||||
mobile: '',
|
||||
gender: 0
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
username: '',
|
||||
nickname: '',
|
||||
mobile: '',
|
||||
gender: 0
|
||||
}
|
||||
@ -283,22 +322,20 @@ function handleClick(node: any) {
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const page = reactive({current: 1, limit: 10, total: 1})
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const columns = ref([
|
||||
{title: '编号', width: '80px', key: 'id',align: 'center'},
|
||||
{title: '帐号', width: '100px', key: 'username',align: 'center'},
|
||||
{title: '姓名', width: '100px', key: 'nickname',align: 'center'},
|
||||
{title: '手机号', width: '120px', key: 'mobile',align: 'center'},
|
||||
{title: '工号', width: '150px', key: 'work_number',align: 'center'},
|
||||
{title: '性别', width: '80px', key: 'gender', customSlot: 'gender',align: 'center'},
|
||||
{title: '身份证号', width: '180px', key: 'member_code',align: 'center'},
|
||||
{title: '状态', width: '100px', key: 'status', customSlot: 'status',align: 'center'},
|
||||
{title: '操作', width: '150px', customSlot: 'operator', key: 'operator', fixed: 'right',align: 'center'}
|
||||
{ title: '编号', width: '80px', key: 'id', align: 'center' },
|
||||
{ title: '工号/帐号', width: '150px', key: 'code', align: 'center' },
|
||||
{ title: '姓名', width: '100px', key: 'nickname', align: 'center' },
|
||||
{ title: '手机号', width: '120px', key: 'mobile', align: 'center' },
|
||||
{ title: '性别', width: '80px', key: 'gender', customSlot: 'gender', align: 'center' },
|
||||
{ title: '身份证号', width: '180px', key: 'member_code', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'status', customSlot: 'status', align: 'center' },
|
||||
{ title: '操作', width: '150px', customSlot: 'operator', key: 'operator', fixed: 'right', align: 'center' }
|
||||
])
|
||||
const change = (page: any) => {
|
||||
|
||||
}
|
||||
const dataSource = ref([])
|
||||
|
||||
const model11 = reactive({
|
||||
username: '',
|
||||
@ -306,7 +343,7 @@ const model11 = reactive({
|
||||
mobile: '',
|
||||
email: '',
|
||||
member_code: '',
|
||||
work_number: '',
|
||||
code: '',
|
||||
gender: 0,
|
||||
password: '',
|
||||
status: 1,
|
||||
@ -314,9 +351,16 @@ const model11 = reactive({
|
||||
group_id: [],
|
||||
party_id: [],
|
||||
avatar: '',
|
||||
license_image:'',
|
||||
birthday: '',
|
||||
group_level: '',
|
||||
party_level: '',
|
||||
// 新增字段
|
||||
position: '',
|
||||
business_nature: '',
|
||||
certificate_code: '',
|
||||
license_code: '',
|
||||
administrative_position: '',
|
||||
})
|
||||
const layFormRef11 = ref()
|
||||
const addShow = ref(false)
|
||||
@ -330,8 +374,10 @@ const changeAddShow = () => {
|
||||
mobile: '',
|
||||
email: '',
|
||||
member_code: '',
|
||||
work_number: '',
|
||||
license_image:'',
|
||||
code: '',
|
||||
gender: 0,
|
||||
id: 0,
|
||||
password: '',
|
||||
status: 1,
|
||||
auth_group_id: '',
|
||||
@ -341,6 +387,12 @@ const changeAddShow = () => {
|
||||
birthday: '',
|
||||
group_level: '',
|
||||
party_level: '',
|
||||
// 新增字段
|
||||
position: '',
|
||||
business_nature: '',
|
||||
certificate_code: '',
|
||||
license_code: '',
|
||||
administrative_position: '',
|
||||
});
|
||||
addShow.value = true;
|
||||
}
|
||||
@ -353,54 +405,51 @@ const addButton = ref([
|
||||
console.log(model11);
|
||||
//return;
|
||||
// 字段空值判断
|
||||
if (!model11.username) {
|
||||
layer.msg('用户名不能为空!', {icon: 2});
|
||||
return;
|
||||
}
|
||||
if (!model11.nickname) {
|
||||
layer.msg('姓名不能为空!', {icon: 2});
|
||||
layer.msg('姓名不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
if (!model11.mobile) {
|
||||
layer.msg('手机号不能为空!', {icon: 2});
|
||||
return;
|
||||
}
|
||||
if (!model11.email) {
|
||||
layer.msg('邮箱不能为空!', {icon: 2});
|
||||
layer.msg('手机号不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
// if (!model11.email) {
|
||||
// layer.msg('邮箱不能为空!', {icon: 2});
|
||||
// return;
|
||||
// }
|
||||
if (!model11.member_code) {
|
||||
layer.msg('身份证号不能为空!', {icon: 2});
|
||||
layer.msg('身份证号不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
if (!model11.birthday) {
|
||||
layer.msg('请选择生日!', {icon: 2});
|
||||
return;
|
||||
}
|
||||
if (!model11.work_number) {
|
||||
layer.msg('工号不能为空!', {icon: 2});
|
||||
// if (!model11.birthday) {
|
||||
// layer.msg('请选择生日!', {icon: 2});
|
||||
// return;
|
||||
// }
|
||||
if (!model11.code) {
|
||||
layer.msg('工号不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
if (!model11.gender) {
|
||||
layer.msg('性别不能为空!', {icon: 2});
|
||||
layer.msg('性别不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
if (!model11.auth_group_id) {
|
||||
layer.msg('角色组不能为空!', {icon: 2});
|
||||
layer.msg('角色组不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
if (!model11.status) {
|
||||
layer.msg('状态不能为空!', {icon: 2});
|
||||
layer.msg('状态不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
if (!model11.group_id) {
|
||||
layer.msg('科室不能为空!', {icon: 2});
|
||||
return;
|
||||
}
|
||||
if (!model11.party_id) {
|
||||
layer.msg('党支部不能为空!', {icon: 2});
|
||||
layer.msg('科室不能为空!', { icon: 2 });
|
||||
return;
|
||||
}
|
||||
// if (!model11.party_id) {
|
||||
// layer.msg('党支部不能为空!', {icon: 2});
|
||||
// return;
|
||||
// }
|
||||
model11.username = model11.code;
|
||||
model11.group_level = JSON.stringify(model11.group_id);
|
||||
model11.group_id = model11.group_id[model11.group_id.length - 1];
|
||||
console.log(model11.group_id)
|
||||
@ -414,18 +463,18 @@ const addButton = ref([
|
||||
}
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', {icon: 1})
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
addShow.value = false;
|
||||
getUserList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
//addShow.value = false;
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
@ -438,12 +487,12 @@ const toSearch = () => {
|
||||
|
||||
// 删除用户
|
||||
const del = async (row: any) => {
|
||||
const res = await userDataDel({id: row.id});
|
||||
const res = await userDataDel({ id: row.id });
|
||||
if (res.code === 1) {
|
||||
layer.msg('删除成功', {icon: 1});
|
||||
layer.msg('删除成功', { icon: 1 });
|
||||
getUserList()
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2});
|
||||
layer.msg(res.msg, { icon: 2 });
|
||||
}
|
||||
}
|
||||
|
||||
@ -456,8 +505,8 @@ const edit = (row: any) => {
|
||||
|
||||
model11.group_id = JSON.parse(row.group_level);
|
||||
model11.party_id = JSON.parse(row.party_level);
|
||||
|
||||
model11.username = row.username;
|
||||
model11.code = row.code;
|
||||
model11.username = row.code;
|
||||
model11.nickname = row.nickname;
|
||||
model11.mobile = row.mobile;
|
||||
model11.email = row.email;
|
||||
@ -466,7 +515,16 @@ const edit = (row: any) => {
|
||||
model11.birthday = row.birthday;
|
||||
|
||||
model11.avatar = row.avatar;
|
||||
model11.license_image = row.license_image;
|
||||
model11.id = row.id;
|
||||
|
||||
// 新增字段赋值
|
||||
model11.position = row.position;
|
||||
model11.business_nature = row.business_nature;
|
||||
model11.certificate_code = row.certificate_code;
|
||||
model11.license_code = row.license_code;
|
||||
model11.administrative_position = row.administrative_position;
|
||||
|
||||
console.log(model11)
|
||||
addShow.value = true;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
</template>
|
||||
<template v-slot:operator="{ data }">
|
||||
<lay-space size="lg">
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.pid==0"
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
@click="addShowMsd(data, data.id)">子级新增</span>
|
||||
<span style="color: #00A394;cursor: pointer" @click="editShowMsd(data)">编辑</span>
|
||||
<lay-popconfirm trigger="click" content="确定要删除吗?" @confirm="delShowMsd(data)">
|
||||
|
87
src/views/system/message.vue
Normal file
87
src/views/system/message.vue
Normal file
@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<lay-container style="padding: 20px">
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">站内信通知</span>
|
||||
</div>
|
||||
<lay-table size="lg" :columns="columns" :data-source="dataSource">
|
||||
<template v-slot:operator="{ data }">
|
||||
<lay-space>
|
||||
<span style="color: #00A394;cursor: pointer" @click="viewMessage(data)">查看</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
|
||||
// 列表数据
|
||||
const dataSource = ref([
|
||||
{
|
||||
id: 1,
|
||||
title: '系统维护通知',
|
||||
content: '系统将于今晚22:00-23:00进行例行维护,请提前做好相关工作安排。',
|
||||
sender: '系统管理员',
|
||||
receiver: 1,
|
||||
status: 0,
|
||||
createTime: '2024-03-20 10:00:00'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '会议提醒',
|
||||
content: '请于明天下午14:00准时参加月度工作总结会议。',
|
||||
sender: '办公室',
|
||||
receiver: 1,
|
||||
status: 1,
|
||||
createTime: '2024-03-19 15:30:00'
|
||||
}
|
||||
])
|
||||
|
||||
// 表格列配置
|
||||
const columns = [
|
||||
{
|
||||
title: "标题",
|
||||
width: "200px",
|
||||
key: "title",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "发送人",
|
||||
width: "120px",
|
||||
key: "sender",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "发送时间",
|
||||
width: "180px",
|
||||
key: "createTime",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: "100px",
|
||||
customSlot: 'status',
|
||||
key: "status",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '120px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
align: 'center',
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
<style scoped>
|
||||
.lay-table :deep(.layui-table-cell) {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
@ -48,8 +48,20 @@
|
||||
{{ data.password }}
|
||||
</template>
|
||||
<template v-slot:level="{ data }">
|
||||
<span :style="{ color: data.level == 1 ? '#1E9FFF' : '#FF5722' }">
|
||||
{{ data.level == 1 ? '有审核权限' : '没有审核权限' }}
|
||||
<span v-if="data.level == 1" style="color: #FF0033">
|
||||
科室审核
|
||||
</span>
|
||||
<span v-if="data.level == 2" style="color: #00A394">
|
||||
普通员工
|
||||
</span>
|
||||
<span v-if="data.level == 3" style="color: #FF0033">
|
||||
院级审核
|
||||
</span>
|
||||
<span v-if="data.level == 4" style="color: #FF0033">
|
||||
支部审核
|
||||
</span>
|
||||
<span v-if="data.level == 5" style="color: #FF0033">
|
||||
总党支审核
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:operator="{ data }">
|
||||
@ -78,8 +90,11 @@
|
||||
</lay-form-item>
|
||||
<lay-form-item label="审核权限" prop="level">
|
||||
<lay-radio-group v-model="addData.level">
|
||||
<lay-radio value="1">有审核权限</lay-radio>
|
||||
<lay-radio value="2">没有审核权限</lay-radio>
|
||||
<lay-radio value="2">普通员工</lay-radio>
|
||||
<lay-radio value="1">科室审核</lay-radio>
|
||||
<lay-radio value="3">院级审核</lay-radio>
|
||||
<lay-radio value="4">支部审核</lay-radio>
|
||||
<lay-radio value="5">总党支审核</lay-radio>
|
||||
</lay-radio-group>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="角色权限" prop="desc">
|
||||
|
143
src/views/year_evaluation/assess.vue
Normal file
143
src/views/year_evaluation/assess.vue
Normal file
@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toSearch">查询</lay-button>
|
||||
<lay-button @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">年度评价填报</span>
|
||||
<lay-button type="primary" @click="addShow = true" size="sm">新增自我评价</lay-button>
|
||||
</div>
|
||||
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px"
|
||||
size="lg"></lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
<lay-layer v-model="addShow" title="年度自评详情" :shade="true" :area="['500px', '500px']"
|
||||
:btn="addIsInfo == 1 ? addButton : ''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<div style="margin-bottom: 20px">填报年度:{{ searchAccount }} 年度</div>
|
||||
<lay-form :pane="true">
|
||||
<lay-form-item label="自评内容" prop="desc">
|
||||
<lay-textarea :rows="10" placeholder="请输入评价内容" v-model="addModel.desc"></lay-textarea>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
import {
|
||||
MonthlyList,
|
||||
MonthlyContent
|
||||
} from '../../api/module/home'
|
||||
import { useUserStore } from "@/store/user";
|
||||
import dayjs from "dayjs";
|
||||
const addIsInfo = ref(1);
|
||||
const dataSource = ref([]);
|
||||
const addShow = ref(false);
|
||||
//
|
||||
|
||||
const addModel = reactive({
|
||||
desc: ''
|
||||
})
|
||||
onMounted(() => {
|
||||
//getMonthlyList();
|
||||
//getMonthlyContent();
|
||||
})
|
||||
|
||||
const searchAccount = ref(dayjs().year())
|
||||
|
||||
function toReset() {
|
||||
searchAccount.value = dayjs().year()
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '年度',
|
||||
width: '120px',
|
||||
align: 'center',
|
||||
key: 'year'
|
||||
},
|
||||
{
|
||||
title: '考评对象',
|
||||
width: '150px',
|
||||
align: 'center',
|
||||
key: 'user'
|
||||
},
|
||||
{
|
||||
title: '评价时间',
|
||||
width: '250px',
|
||||
align: 'center',
|
||||
key: 'createtime'
|
||||
},
|
||||
{
|
||||
title: '我的评价',
|
||||
key: 'self_score',
|
||||
align: 'center',
|
||||
}, {
|
||||
title: '科室评价',
|
||||
key: 'department_score',
|
||||
customSlot: 'department_score',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
align: 'center',
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
// var json = JSON.stringify(dataSource6.value);
|
||||
// var res = await MonthlyCreate({ 'json': json, 'user_id': userStore.userInfo.id, evaluation_schedule_id: current1.value });
|
||||
// console.log(res)
|
||||
// if (res.code == 1) {
|
||||
// layer.msg('提交成功!', { icon: 1 })
|
||||
// visible11.value = false;
|
||||
// getMonthlyList();
|
||||
// //getMonthlyContent();
|
||||
// } else {
|
||||
// layer.msg(res.msg, { icon: 2 })
|
||||
// }
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
</script>
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
</style>
|
856
src/views/year_evaluation/branch.vue
Normal file
856
src/views/year_evaluation/branch.vue
Normal file
@ -0,0 +1,856 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</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">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<lay-select-option v-for="item in dataSerSource" :value="item.id"
|
||||
:label="item.nickname"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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 }">
|
||||
<!-- 1.已自评 2.未自评 3.科室已评 4.医院已评 5.支部已评 6.总党支已评 -->
|
||||
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 5 && userStore.userInfo.level == 5"
|
||||
@click="getInfo(row, 4)">总党支评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 4"
|
||||
@click="getInfo(row, 3)">支部评分</span>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 1 && userStore.userInfo.level == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<!-- 自评评分 -->
|
||||
<template v-slot:content_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
|
||||
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 科室评分 -->
|
||||
<template v-slot:department_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.department_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 支部评分 -->
|
||||
<template v-slot:party_branch_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.party_branch_score ? row.party_branch_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :min="0" :max="row.base_score" v-model="row.party_branch_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 党总支评分 -->
|
||||
<template v-slot:overall_party_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.overall_party_score ? row.overall_party_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccountUser" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputZbChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputListZbShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
});
|
||||
}
|
||||
//医院评分总分
|
||||
const inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListZdzShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
});
|
||||
}
|
||||
//科室评分总分
|
||||
const inputListKsShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
});
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const userShow = ref(false);
|
||||
const userColumns = ref([
|
||||
{ title: '年度', width: '80px', key: 'year', align: 'center' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ title: '参评时间', width: '100px', key: 'createtime', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '支部评分', width: '100px', key: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
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(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'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 dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
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;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ '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;
|
||||
userTabId.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();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ 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', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
{ title: '党支部评分', width: '100px', key: 'party_score_scoringrecord', align: 'center' },
|
||||
{ title: '党总支评分', width: '100px', key: 'overall_score_scoringrecord', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await getYearListUpdate({
|
||||
'type': thisInfo.value.scoringrecord_status,
|
||||
'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 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const layerEnd = () => {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
856
src/views/year_evaluation/department.vue
Normal file
856
src/views/year_evaluation/department.vue
Normal file
@ -0,0 +1,856 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</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; overflow: auto">
|
||||
<!-- table -->
|
||||
<lay-card>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<lay-select-option v-for="item in dataSerSource" :value="item.id"
|
||||
:label="item.nickname"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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 }">
|
||||
<!-- 1.已自评 2.未自评 3.科室已评 4.医院已评 5.支部已评 6.总党支已评 -->
|
||||
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 5 && userStore.userInfo.level == 5"
|
||||
@click="getInfo(row, 4)">总党支评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 4"
|
||||
@click="getInfo(row, 3)">支部评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 1 && userStore.userInfo.level == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<!-- 自评评分 -->
|
||||
<template v-slot:content_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
|
||||
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 科室评分 -->
|
||||
<template v-slot:department_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.department_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 支部评分 -->
|
||||
<template v-slot:party_branch_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.party_branch_score ? row.party_branch_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :min="0" :max="row.base_score" v-model="row.party_branch_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 党总支评分 -->
|
||||
<template v-slot:overall_party_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.overall_party_score ? row.overall_party_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccountUser" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputZbChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputListZbShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
});
|
||||
}
|
||||
//医院评分总分
|
||||
const inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListZdzShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
});
|
||||
}
|
||||
//科室评分总分
|
||||
const inputListKsShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
});
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const userShow = ref(false);
|
||||
const userColumns = ref([
|
||||
{ title: '年度', width: '80px', key: 'year', align: 'center' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ title: '参评时间', width: '100px', key: 'createtime', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '支部评分', width: '100px', key: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
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(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'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 dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
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;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ '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;
|
||||
userTabId.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();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ 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', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
{ title: '党支部评分', width: '100px', key: 'party_score_scoringrecord', align: 'center' },
|
||||
{ title: '党总支评分', width: '100px', key: 'overall_score_scoringrecord', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await getYearListUpdate({
|
||||
'type': thisInfo.value.scoringrecord_status,
|
||||
'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 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const layerEnd = () => {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
@ -23,13 +23,20 @@
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度"
|
||||
allow-clear></lay-date-picker>
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<lay-select-option v-for="item in dataSerSource" :value="item.id"
|
||||
:label="item.nickname"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="normal" size="sm" @click="toSearch">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
@ -38,55 +45,100 @@
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<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:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span style="color: #00A394;cursor: pointer;padding-right: 10px;" 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,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 v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
<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 }">
|
||||
<!-- 1.已自评 2.未自评 3.科室已评 4.医院已评 5.支部已评 6.总党支已评 -->
|
||||
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 5 && userStore.userInfo.level == 5"
|
||||
@click="getInfo(row, 4)">总党支评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 4"
|
||||
@click="getInfo(row, 3)">支部评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 1 && userStore.userInfo.level == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px','100%']"
|
||||
:btn="addIsInfo==1?addButton:''">
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['70%', '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>
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<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>
|
||||
<!-- 自评评分 -->
|
||||
<template v-slot:content_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
|
||||
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 科室评分 -->
|
||||
<template v-slot:department_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.department_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 支部评分 -->
|
||||
<template v-slot:party_branch_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.party_branch_score ? row.party_branch_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :min="0" :max="row.base_score" v-model="row.party_branch_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 党总支评分 -->
|
||||
<template v-slot:overall_party_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.overall_party_score ? row.overall_party_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="季度自评列表" :shade="true" :area="['90%', '90%']">
|
||||
<lay-layer v-model="userShow" title="年度自评列表" :shade="true" :area="['90%', '90%']">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
@ -101,8 +153,8 @@
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button @click="toReset">重置</lay-button>
|
||||
<lay-button type="primary" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
@ -110,20 +162,24 @@
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="brief" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns"
|
||||
:data-source="userDataSource">
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if ==2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed"
|
||||
v-if="row.if ==1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-tab-item>
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
@ -131,8 +187,8 @@
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {ref, reactive, onMounted} from 'vue'
|
||||
import {layer} from '@layui/layui-vue'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
@ -141,11 +197,146 @@ import {
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputZbChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputListZbShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
});
|
||||
}
|
||||
//医院评分总分
|
||||
const inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListZdzShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
});
|
||||
}
|
||||
//科室评分总分
|
||||
const inputListKsShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
});
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const userShow = ref(false);
|
||||
const userColumns = ref([
|
||||
{ title: '年度', width: '80px', key: 'year', align: 'center' },
|
||||
@ -154,6 +345,7 @@ const userColumns = ref([
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
@ -172,9 +364,9 @@ const getUserListInfo = () => {
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if(res.code==1){
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
}else{
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
@ -185,11 +377,11 @@ const openUserTab = (d) => {
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item) => {
|
||||
addIsInfo.value=2;
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time=item.year;
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
@ -202,7 +394,7 @@ const openTab = (d) => {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({current: 1, limit: 10, total: 1})
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const change = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
@ -214,6 +406,7 @@ const infoShow = ref(false);
|
||||
const yearmonth = ref();
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
@ -225,7 +418,24 @@ const getList = () => {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -233,9 +443,99 @@ const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
console.log(row);
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
@ -246,15 +546,20 @@ const getInfoMode = (row) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({'group_id': group_id.value}).then((res) => {
|
||||
getGroupYear({ 'group_id': group_id.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
@ -262,7 +567,7 @@ const getTabList = () => {
|
||||
userTabId.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -274,8 +579,9 @@ const getLeftList = () => {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -310,16 +616,18 @@ function toSearch() {
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{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', customSlot: 'nickname', align: 'center'},
|
||||
{title: '工号', width: '100px', key: 'work_number', align: 'center'},
|
||||
{title: '部门', width: '120px', key: 'group_name', align: 'center'},
|
||||
{title: '医院评分', width: '100px', key: 'hospital_score', 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'},
|
||||
{ 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', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
{ title: '党支部评分', width: '100px', key: 'party_score_scoringrecord', align: 'center' },
|
||||
{ title: '党总支评分', width: '100px', key: 'overall_score_scoringrecord', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
@ -335,6 +643,7 @@ const addButton = ref([
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await getYearListUpdate({
|
||||
'type': thisInfo.value.scoringrecord_status,
|
||||
'term': thisInfo.value.time,
|
||||
'json': json,
|
||||
'user_id': thisInfo.value.id,
|
||||
@ -342,12 +651,12 @@ const addButton = ref([
|
||||
});
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', {icon: 1})
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
thisInfo.value = {};
|
||||
infoShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -358,7 +667,9 @@ const addButton = ref([
|
||||
}
|
||||
}
|
||||
])
|
||||
const columns6 = [
|
||||
|
||||
const layerEnd = () => {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
@ -366,26 +677,24 @@ const columns6 = [
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
},
|
||||
{
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'ksinput',
|
||||
key: "ksinput"
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
]
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -445,4 +754,7 @@ const dataSource6 = ref([])
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
854
src/views/year_evaluation/hospital.vue
Normal file
854
src/views/year_evaluation/hospital.vue
Normal file
@ -0,0 +1,854 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</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">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<lay-select-option v-for="item in dataSerSource" :value="item.id"
|
||||
:label="item.nickname"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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 }">
|
||||
<!-- 1.已自评 2.未自评 3.科室已评 4.医院已评 5.支部已评 6.总党支已评 -->
|
||||
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 5 && userStore.userInfo.level == 5"
|
||||
@click="getInfo(row, 4)">总党支评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 4"
|
||||
@click="getInfo(row, 3)">支部评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 1 && userStore.userInfo.level == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<!-- 自评评分 -->
|
||||
<template v-slot:content_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
|
||||
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 科室评分 -->
|
||||
<template v-slot:department_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.department_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 支部评分 -->
|
||||
<template v-slot:party_branch_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.party_branch_score ? row.party_branch_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :min="0" :max="row.base_score" v-model="row.party_branch_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 党总支评分 -->
|
||||
<template v-slot:overall_party_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.overall_party_score ? row.overall_party_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccountUser" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputZbChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputListZbShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
});
|
||||
}
|
||||
//医院评分总分
|
||||
const inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListZdzShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
});
|
||||
}
|
||||
//科室评分总分
|
||||
const inputListKsShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
});
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const userShow = ref(false);
|
||||
const userColumns = ref([
|
||||
{ title: '年度', width: '80px', key: 'year', align: 'center' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ title: '参评时间', width: '100px', key: 'createtime', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
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(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'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 dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
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;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ '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;
|
||||
userTabId.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();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ 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', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
{ title: '党支部评分', width: '100px', key: 'party_score_scoringrecord', align: 'center' },
|
||||
{ title: '党总支评分', width: '100px', key: 'overall_score_scoringrecord', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await getYearListUpdate({
|
||||
'type': thisInfo.value.scoringrecord_status,
|
||||
'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 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const layerEnd = () => {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,8 +7,7 @@
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
@ -27,20 +26,14 @@
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">年度自评列表</span>
|
||||
<lay-button type="primary" size="sm">导出Excel</lay-button>
|
||||
</div>
|
||||
<lay-tab v-model="current1" type="brief" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:even="true"
|
||||
height="500px"
|
||||
size="md"
|
||||
>
|
||||
<lay-tab v-model="current1" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px" size="lg">
|
||||
<template v-slot:id="{ data }">
|
||||
{{ data.id }}
|
||||
</template>
|
||||
<template v-slot:department_score="{ data }">
|
||||
{{ data.department_score==0?'-':data.department_score }}
|
||||
{{ data.department_score == 0 ? '-' : data.department_score }}
|
||||
</template>
|
||||
<template v-slot:username="{ data }">
|
||||
{{ data.username }}
|
||||
@ -49,9 +42,10 @@
|
||||
{{ data.password }}
|
||||
</template>
|
||||
<template v-slot:operator="{ data }">
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_period==1" @click="getMonthlyInfo(data)">详情</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_period==2"
|
||||
@click="insZp(data)">开始自评</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_period == 1"
|
||||
@click="getMonthlyInfo(data)">详情</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="data.if_period == 2"
|
||||
@click="insZp(data)">开始自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-tab-item>
|
||||
@ -61,34 +55,19 @@
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
<lay-layer v-model="visible11" title="月度自评详情" :type="4" :shade="true" :area="['950px','100%']" :btn="addIsInfo==1?addButton:''">
|
||||
<lay-layer v-model="visible11" title="年末自评" :type="4" :shade="true" :area="['950px', '100%']"
|
||||
:btn="addIsInfo == 1 ? addButton : ''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-card shadow="always">
|
||||
<div style="height: 70px;width: 100%;">
|
||||
<lay-step current-status="primary" style="margin: 0 auto" direction="horizontal" :active="active" space="100%"
|
||||
:center="true">
|
||||
<lay-step-item>
|
||||
<template v-slot:default>
|
||||
<div style="font-size: 18px;font-weight: bold;color: #009688">个人自评</div>
|
||||
<!-- <div style="color: #999999">2025-01-01 14:35:33</div>-->
|
||||
</template>
|
||||
</lay-step-item>
|
||||
<lay-step-item>
|
||||
<template v-slot:default>
|
||||
<div style="font-size: 18px;font-weight: bold;color: #009688">科室考评</div>
|
||||
<div style="color: #999999"></div>
|
||||
</template>
|
||||
</lay-step-item>
|
||||
</lay-step>
|
||||
</div>
|
||||
</lay-card>
|
||||
<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>
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目总分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<template v-slot:content_score="{ row, column, rowIndex }">
|
||||
<div v-if="row.pid == 0">已评总分:{{ row.avg_score?row.avg_score:0 }}</div>
|
||||
<lay-input-number @change="inputChange(row, rowIndex, column)" v-if="row.pid != 0" :disabled="addIsInfo == 2"
|
||||
:min="0" :max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
@ -96,88 +75,112 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted} from 'vue'
|
||||
import {layer} from '@layui/layer-vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
import {
|
||||
YearList,
|
||||
YearContent, YearCreate, YearInfo, userYearData
|
||||
} from '../../api/module/home'
|
||||
import {useUserStore} from "@/store/user";
|
||||
import { useUserStore } from "@/store/user";
|
||||
import dayjs from "dayjs";
|
||||
const current1=ref(1);
|
||||
const tabList=ref([]);
|
||||
const current1 = ref(1);
|
||||
const tabList = ref([]);
|
||||
const userStore = useUserStore()
|
||||
const active = ref(-1);
|
||||
const visible11 = ref(false);
|
||||
|
||||
const page = ref({total: 100, limit: 10, current: 2});
|
||||
|
||||
const dataSource = ref([]);
|
||||
|
||||
const addIsInfo=ref(1);
|
||||
const addIsInfo = ref(1);
|
||||
|
||||
const yearName=ref('');
|
||||
const yearName = ref('');
|
||||
|
||||
onMounted(() => {
|
||||
//getYearList();
|
||||
//getYearContent();
|
||||
getUserEvaluationData();
|
||||
})
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
const inputListShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item,index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
//找到row的index
|
||||
//dataSource6.value[index].avg_score = total;
|
||||
//dataSource6.value[index].content_score = total;
|
||||
}
|
||||
const getUserEvaluationData = () => {
|
||||
userYearData({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
current1.value=res.data[0].id;
|
||||
current1.value = res.data[0].id;
|
||||
getYearList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
current1.value=d;
|
||||
dataSource.value=[];
|
||||
current1.value = d;
|
||||
dataSource.value = [];
|
||||
getYearList();
|
||||
}
|
||||
const insZp = (item) => {
|
||||
visible11.value = true;
|
||||
addIsInfo.value=1;
|
||||
yearName.value=item.year;
|
||||
addIsInfo.value = 1;
|
||||
yearName.value = item.year;
|
||||
getYearContent();
|
||||
}
|
||||
const getMonthlyInfo = (item) => {
|
||||
visible11.value=true;
|
||||
addIsInfo.value=2;
|
||||
visible11.value = true;
|
||||
addIsInfo.value = 2;
|
||||
console.log(item)
|
||||
YearInfo({'evaluation_schedule_id':current1.value,'user_id': userStore.userInfo.id, 'year': item.year}).then((res) => {
|
||||
YearInfo({ 'evaluation_schedule_id': current1.value, 'user_id': userStore.userInfo.id, 'year': item.year }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListShow();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const getYearList = () => {
|
||||
YearList({'id': current1.value,time:searchAccount.value}).then((res) => {
|
||||
YearList({ 'id': current1.value, time: searchAccount.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSource6 = ref([]);
|
||||
const getYearContent = () => {
|
||||
YearContent({'id': current1.value}).then((res) => {
|
||||
YearContent({ 'id': current1.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -191,17 +194,21 @@ const columns6 = [
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '年度',
|
||||
@ -217,7 +224,7 @@ const columns = [
|
||||
},
|
||||
{
|
||||
title: '参评时间',
|
||||
width: '180px',
|
||||
width: '250px',
|
||||
align: 'center',
|
||||
key: 'createtime'
|
||||
},
|
||||
@ -228,9 +235,17 @@ const columns = [
|
||||
}, {
|
||||
title: '科室评分',
|
||||
key: 'department_score',
|
||||
customSlot: 'department_score',
|
||||
align: 'center',
|
||||
}, {
|
||||
title: '党支部评分',
|
||||
key: 'department_score',
|
||||
align: 'center',
|
||||
}, {
|
||||
title: '总党支评分',
|
||||
key: 'department_score',
|
||||
align: 'center',
|
||||
}
|
||||
, {
|
||||
title: '医院评分',
|
||||
key: 'hospital_score',
|
||||
align: 'center',
|
||||
@ -254,7 +269,7 @@ function toSearch() {
|
||||
const searchAccount = ref(dayjs().year())
|
||||
|
||||
function toReset() {
|
||||
searchAccount.value =dayjs().year()
|
||||
searchAccount.value = dayjs().year()
|
||||
}
|
||||
|
||||
const addButton = ref([
|
||||
@ -262,14 +277,14 @@ const addButton = ref([
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await YearCreate({'term': yearName.value,'json': json,'user_id': userStore.userInfo.id,evaluation_schedule_id: current1.value});
|
||||
var res = await YearCreate({ 'term': yearName.value, 'json': json, 'user_id': userStore.userInfo.id, evaluation_schedule_id: current1.value });
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', {icon: 1})
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
visible11.value = false;
|
||||
getYearList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
200
src/views/year_evaluation/list.vue
Normal file
200
src/views/year_evaluation/list.vue
Normal file
@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</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; overflow: auto">
|
||||
<!-- table -->
|
||||
<lay-card>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="类型" label-width="80">
|
||||
<lay-select v-model="type" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<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>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="时间" label-width="80">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="考评对象" label-width="120">
|
||||
<lay-input v-model="nickname" placeholder="请输入考评对象"></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-table :page="page" height="600px" :columns="columns" :loading="loading" :data-source="dataSource"
|
||||
@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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<!-- <lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag> -->
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 3)">医院评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed"
|
||||
v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupEvaluation,
|
||||
getMonthlyUserList,
|
||||
MonthlyCreate,
|
||||
getMonthlyListFind, getMonthlyListUpdate, getMonthlyFindData,
|
||||
MonthlyInfo
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
const isFold = ref(false)
|
||||
const yearmonth = ref(dayjs().format('YYYY'));
|
||||
onMounted(() => {
|
||||
|
||||
getLeftList();
|
||||
})
|
||||
const group_id = ref(1);
|
||||
const data = ref([]);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const loading = ref(false)
|
||||
const columns = ref([
|
||||
{ title: '时间', width: '80px', key: 'time', align: 'center' },
|
||||
{ title: '考评对象', width: '100px', key: 'nickname', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '自我评价', width: '100px', key: 'user_scoringrecord', align: 'center' },
|
||||
{ title: '科室评价', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
856
src/views/year_evaluation/overall.vue
Normal file
856
src/views/year_evaluation/overall.vue
Normal file
@ -0,0 +1,856 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</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">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
|
||||
<lay-select-option v-for="item in dataSerSource" :value="item.id"
|
||||
:label="item.nickname"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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 }">
|
||||
<!-- 1.已自评 2.未自评 3.科室已评 4.医院已评 5.支部已评 6.总党支已评 -->
|
||||
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:nickname="{ row }">
|
||||
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 5 && userStore.userInfo.level == 5"
|
||||
@click="getInfo(row, 4)">总党支评分</span>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 4"
|
||||
@click="getInfo(row, 3)">支部评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 1 && userStore.userInfo.level == 1"
|
||||
@click="getInfo(row, 2)">科室评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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:base_score="{ data }">
|
||||
<div v-if="data.pid == 0">题目分:{{ data.base_score }}</div>
|
||||
<div v-if="data.pid != 0">{{ data.base_score }}</div>
|
||||
</template>
|
||||
<!-- 自评评分 -->
|
||||
<template v-slot:content_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.avg_score ? row.avg_score : 0 }}</div>
|
||||
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
|
||||
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 科室评分 -->
|
||||
<template v-slot:department_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.department_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 支部评分 -->
|
||||
<template v-slot:party_branch_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.party_branch_score ? row.party_branch_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :min="0" :max="row.base_score" v-model="row.party_branch_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 党总支评分 -->
|
||||
<template v-slot:overall_party_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.overall_party_score ? row.overall_party_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-row :space="10">
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度:" label-width="50">
|
||||
<lay-date-picker type="year" v-model="searchAccountUser" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<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>
|
||||
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputZbChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
}
|
||||
//支部评分总分
|
||||
const inputListZbShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.party_branch_score);
|
||||
});
|
||||
dataSource6.value[index].party_branch_score = total;
|
||||
});
|
||||
}
|
||||
//医院评分总分
|
||||
const inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListZdzShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.overall_party_score);
|
||||
});
|
||||
dataSource6.value[index].overall_party_score = total;
|
||||
});
|
||||
}
|
||||
//科室评分总分
|
||||
const inputListKsShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.department_score);
|
||||
});
|
||||
dataSource6.value[index].department_score = total;
|
||||
});
|
||||
}
|
||||
//自评列表总分
|
||||
const inputListZpShow = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.content_score);
|
||||
});
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
});
|
||||
}
|
||||
const userShow = ref(false);
|
||||
const userColumns = ref([
|
||||
{ title: '年度', width: '80px', key: 'year', align: 'center' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ title: '参评时间', width: '100px', key: 'createtime', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
|
||||
{ title: '支部评分', width: '100px', key: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
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(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'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 dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
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;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ '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;
|
||||
userTabId.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();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ 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', customSlot: 'nickname', align: 'center' },
|
||||
{ title: '工号', width: '100px', key: 'code', align: 'center' },
|
||||
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
|
||||
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
|
||||
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
|
||||
{ title: '党支部评分', width: '100px', key: 'party_score_scoringrecord', align: 'center' },
|
||||
{ title: '党总支评分', width: '100px', key: 'overall_score_scoringrecord', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await getYearListUpdate({
|
||||
'type': thisInfo.value.scoringrecord_status,
|
||||
'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 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const layerEnd = () => {
|
||||
columns6.value = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "80px",
|
||||
align: 'center',
|
||||
key: "base_score",
|
||||
customSlot: 'base_score',
|
||||
totalRow: true
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
7
src/views/year_evaluation_summary/examine.vue
Normal file
7
src/views/year_evaluation_summary/examine.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>年度考评汇总管理</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
7
src/views/year_evaluation_summary/index.vue
Normal file
7
src/views/year_evaluation_summary/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>年度考评汇总</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
7
src/views/year_evaluation_summary/statistics.vue
Normal file
7
src/views/year_evaluation_summary/statistics.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>统计分析</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -20,7 +20,7 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1/',
|
||||
target: 'http://yfyd.hschool.com.cn',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user