This commit is contained in:
Air 2025-03-19 18:01:50 +08:00
parent 68c0d4789b
commit a074e4dca7
13 changed files with 1259 additions and 272 deletions

1
components.d.ts vendored
View File

@ -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']

View File

@ -324,22 +324,22 @@ export const getAdditionIndexManageExamine= function(date: any) {
// 获取通知公告列表
export function noticeList(data: any) {
return Http.post('/api/backend/public_announcement/getPublicAnnouncementData', data)
return Http.post('/api/backend/publicAnnouncement/getPublicAnnouncementData', data)
}
// 新增通知公告
export function noticeAdd(data: any) {
return Http.post('/api/backend/public_announcement/create', data)
return Http.post('/api/backend/publicAnnouncement/create', data)
}
// 编辑通知公告
export function noticeEdit(data: any) {
return Http.post('/api/backend/public_announcement/update', data)
return Http.post('/api/backend/publicAnnouncement/update', data)
}
// 删除通知公告
export function noticeDelete(data: any) {
return Http.post('/api/backend/public_announcement/delete', data)
return Http.post('/api/backend/publicAnnouncement/delete', data)
}
// 上传图片

View File

@ -122,10 +122,10 @@ export default [
component: () => import('../../views/month_evaluation/index.vue'),
meta: { title: '月度考评填报', requireAuth: true, closable: true },
}, {
path: '/month_evaluation/examine',
path: '/month_evaluation/examine/:id*',
name: 'monthEvaluationExamine',
component: () => import('../../views/month_evaluation/examine.vue'),
meta: { title: '月度考评管理', requireAuth: true, closable: true },
meta: { title: '月度考评管理', closable: true },
}
]
}, {
@ -140,10 +140,10 @@ export default [
component: () => import('../../views/season_evaluation/index.vue'),
meta: { title: '季度考评', requireAuth: true, closable: true },
}, {
path: '/season_evaluation/examine',
path: '/season_evaluation/examine/:id*',
name: 'seasonEvaluationExamine',
component: () => import('../../views/season_evaluation/examine.vue'),
meta: { title: '季度考评管理', requireAuth: true, closable: true },
meta: { title: '季度考评管理', closable: true },
}
]
}, {
@ -176,10 +176,10 @@ 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 },
}
]
}, {
@ -191,12 +191,12 @@ export default [
{
path: '/file_bag/index',
name: 'fileBagIndex',
component: () => import('../../views/day_evaluation/index.vue'),
component: () => import('../../views/file_bag/index.vue'),
meta: { title: '我的档案', requireAuth: true, 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 },
}
]

View File

@ -0,0 +1,485 @@
<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">
&nbsp;<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" :loading="loading" :default-toolbar="false"
: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>
</template>
<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:toolbar>
<!-- 移除了新增按钮 -->
</template>
<template v-slot:operator="{ row }">
<lay-button size="xs" border="green" border-style="dashed" @click="getInfo(row)">
员工档案
</lay-button>
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,1)">
月度考评
</lay-button>
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,2)">
季度考评
</lay-button>
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,3)">
年度考评
</lay-button>
<!-- 移除了删除按钮 -->
</template>
</lay-table>
</div>
</div>
<lay-layer v-model="addShow" :title="title" :area="['90%', '90%']" :shade="true">
<div>
<div class="file-detail-container">
<div>
<!-- 基本信息区域 -->
<div class="detail-section">
<h3 class="section-title">基本信息</h3>
<div class="user-header">
<!-- <div class="avatar-container">
<img :src="userInfo.avatar" 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 ? '男' : userInfo.gender == 2 ? '女' : '未知' }}</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">{{ userInfo.user_group_name || '暂无' }}</span>
</div>
<div class="info-item">
<span class="label">党支部</span>
<span class="value">{{ userInfo.party_name || '暂无' }}</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.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 style="color: #00A394;" :href="userInfo.license_image" target="_blank">{{ userInfo.license_image || '暂无' }}</a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</lay-layer>
</lay-container>
</template>
<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue';
import { layer } from '@layui/layui-vue';
import {
authGroupData,
userData, partyGroupData,
userGroupData
} from "@/api/module/home";
import { useUserStore } from "@/store/user";
import { useRouter } from 'vue-router';
const router = useRouter();
const userStore = useUserStore()
onMounted(() => {
//getUserList();
getLeftList();
getPartyList();
getAuthList();
//getUserDetail();
})
const getOpenAvg = (row, type) => {
console.log(row, type);
//1 2 3
if(type==1){
///month_evaluation/examinerwo.id
router.push({ path: '/month_evaluation/examine/' + row.id});
}else if(type==2){
///season_evaluation/examinerwo.id
router.push({ path: '/season_evaluation/examine/' + row.id});
}else if(type==3){
///annual_evaluation/examinerwo.id
router.push('/year_evaluation/examine/' + row.id)
}
}
const dataSource = ref([])
const getUserList = () => {
userData({ 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 = [];
layer.msg(res.msg, { icon: 2 })
}
})
}
const changePage = (ppc) => {
page.current = ppc.current;
page.limit = ppc.limit;
getUserList();
}
const partyList = ref([])
const getPartyList = () => {
partyGroupData({}).then((res) => {
console.log(res)
if (res.code == 1) {
partyList.value = res.data;
} else {
layer.msg(res.msg, { icon: 2 })
}
})
}
const leftId = ref(0);
const getLeftList = () => {
userGroupData({}).then((res) => {
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;
getUserList();
} else {
layer.msg(res.msg, { icon: 2 })
}
})
}
const authList = ref([])
const getAuthList = () => {
authGroupData({}).then((res) => {
console.log(res)
if (res.code == 1) {
authList.value = res.data;
} else {
layer.msg(res.msg, { icon: 2 })
}
})
}
//
const data = ref([])
const selectedKey = 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 loading = ref(false)
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' }
])
const addShow = ref(false)
const title = ref('新增')
// leftId
const toSearch = () => {
page.current = 1;
leftId.value = 0;
getUserList();
}
const userInfo = ref();
const getInfo = (row) => {
addShow.value = true;
userInfo.value = row;
}
</script>
<style scoped>
.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;
}
</style>

View File

@ -0,0 +1,331 @@
<template>
<div class="file-detail-container">
<lay-card title="员工档案详情" shadow="always">
<template #title>
<div class="card-title">
<div>员工档案详情</div>
<lay-button type="primary" size="sm" @click="goBack">返回</lay-button>
</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.work_number || userInfo.code || '暂无' }}</span>
</div>
<div class="info-item">
<span class="label">性别</span>
<span class="value">{{ genderText }}</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">{{ userInfo.group_level || '暂无' }}</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.party_level || '暂无' }}</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 class="info-item">
<span class="label">角色</span>
<span class="value">{{ roleName || '暂无' }}</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>
</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.username || '暂无' }}</span>
</div>
<div class="info-item">
<span class="label">状态</span>
<span class="value">
<lay-tag :type="userInfo.status === 'normal' ? 'success' : 'danger'">
{{ userInfo.status === 'normal' ? '正常' : '禁用' }}
</lay-tag>
</span>
</div>
<div class="info-item">
<span class="label">创建时间</span>
<span class="value">{{ formatDate(userInfo.createtime) }}</span>
</div>
<div class="info-item">
<span class="label">更新时间</span>
<span class="value">{{ formatDate(userInfo.updatetime) }}</span>
</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';
const route = useRoute();
const router = useRouter();
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 genderText = computed(() => {
if (userInfo.value.gender === 1) {
return '男';
} else if (userInfo.value.gender === 2) {
return '女';
} else {
return '未知';
}
});
//
const formatDate = (dateString) => {
if (!dateString) return '暂无';
return dateString;
};
// 使
const getUserDetail = () => {
//
userInfo.value = {
id: 1,
code: 'GH001',
auth_group_id: 2,
group_id: 3,
party_id: 1,
work_number: 'GH001',
nickname: '张医生',
email: 'zhangdoctor@example.com',
mobile: '13800138000',
avatar: 'https://picsum.photos/200',
member_code: '110101199001011234',
gender: 1,
birthday: '1990-01-01',
createtime: '2023-01-01 08:00:00',
updatetime: '2023-06-15 14:30:00',
token: 'abcdef123456',
status: 'normal',
username: 'zhangdoctor',
password: '******',
group_level: '三级',
party_level: '二级',
position: '主治医师',
business_nature: '临床',
certificate_code: 'ZG20150001',
license_code: 'ZY20150001',
administrative_position: '科室副主任'
};
//
groupName.value = '内科';
partyName.value = '医院第一党支部';
roleName.value = '医生';
loading.value = false;
};
//
const goBack = () => {
router.go(-1);
};
// 使
onMounted(() => {
getUserDetail();
});
</script>
<style scoped>
.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;
}
}
</style>

View File

@ -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>

View File

@ -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,13 @@
<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"-->
@ -52,35 +60,33 @@
</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"
@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>
</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%']"
@ -137,22 +143,22 @@
<lay-col :md="24">
<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: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, 1)">考评详情</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>
<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, 1)">考评详情</span>
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
</template>
</lay-table>
</lay-col>
</lay-row>
</lay-container>
@ -172,8 +178,14 @@ import {
} 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 userShow = ref(false);
@ -184,6 +196,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([]);
@ -220,7 +233,19 @@ const getMonthlyInfo = (item, type) => {
infoShow.value = true;
console.log(item);
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();
@ -244,6 +269,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,
@ -259,6 +285,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;
@ -267,7 +309,7 @@ const getInfo = (row, type) => {
thisInfo.value = row;
getInfoMode(row);
if (row.scoringrecord_status == 4) {
if (row.scoringrecord_status == 4 && userStore.userInfo.level != 3) {
columns6.push({
title: "医院评分",
width: "100px",
@ -316,6 +358,7 @@ const getLeftList = () => {
data.value = res.data;
group_id.value = res.data[0].id;
getTabList();
getSerList();
} else {
layer.msg(res.msg, { icon: 2 })
}
@ -420,16 +463,7 @@ const columns6 = [
}
]
//
if (userStore.userInfo.level == 3) {
columns6.push({
title: "医院评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
}
const dataSource6 = ref([])
</script>
@ -489,4 +523,8 @@ const dataSource6 = ref([])
background-color: #e8f1ff;
color: red;
}
.layui-tab-content {
padding: 0;
}
</style>

View File

@ -27,7 +27,7 @@
<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 v-model="current1" @change="openTab">
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
<lay-table
:columns="columns"

View File

@ -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,6 +36,13 @@
</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="primary" size="sm" @click="toSearch">
@ -47,43 +54,41 @@
</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>
<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>
</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 }">
: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="true" :min="0" :max="data.base_score"
@ -130,19 +135,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, 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>
@ -150,8 +159,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,
@ -161,8 +170,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);
@ -173,6 +191,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([]);
@ -191,9 +210,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 = [];
}
})
@ -204,11 +223,11 @@ const openUserTab = (d) => {
userDataSource.value = [];
getUserListInfo();
}
const getMonthlyInfo = (item,type) => {
addIsInfo.value=type;
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 = () => {
@ -221,8 +240,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;
@ -237,6 +256,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,
@ -248,18 +268,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,
@ -270,14 +320,14 @@ const getInfoMode = (row) => {
if (res.code == 1) {
dataSource6.value = res.data;
} 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;
@ -285,7 +335,7 @@ const getTabList = () => {
userTabId.value = res.data[0].id;
getList();
} else {
layer.msg(res.msg, {icon: 2})
layer.msg(res.msg, { icon: 2 })
}
})
}
@ -297,8 +347,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 })
}
})
}
@ -327,23 +378,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',
@ -366,12 +417,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 })
}
}
},
@ -409,6 +460,16 @@ const columns6 = [
key: "ksinput"
}
]
//
if (userStore.userInfo.level == 3) {
columns6.push({
title: "医院评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
}
const dataSource6 = ref([])
</script>
@ -468,5 +529,7 @@ const dataSource6 = ref([])
background-color: #e8f1ff;
color: red;
}
.layui-tab-content{
padding: 0;
}
</style>

View File

@ -27,7 +27,7 @@
<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 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

View File

@ -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 }}
@ -27,19 +27,19 @@
<lay-col :md="5">
<lay-form-item label="姓名" label-width="80">
<lay-input v-model="searchQuery.nickname" 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-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>
@ -85,17 +85,6 @@
<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" 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="code" required>
<lay-input v-model="model11.code" size="lg" placeholder="请输入工号"></lay-input>
</lay-form-item>
@ -111,9 +100,9 @@
<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-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>
@ -132,6 +121,17 @@
<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>
@ -144,9 +144,7 @@
<!-- 新增字段结束 -->
<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>
: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
@ -157,7 +155,7 @@
<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" required>
@ -172,8 +170,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,
@ -186,8 +184,8 @@ import {
const cutUrl = ref("");
const uploadRef = ref(null)
import {useRouter} from 'vue-router'
import {useUserStore} from "@/store/user";
import { useRouter } from 'vue-router'
import { useUserStore } from "@/store/user";
const userStore = useUserStore()
const replaceFields = {
@ -209,7 +207,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(() => {
@ -221,14 +219,14 @@ onMounted(() => {
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 {
dataSource.value = [];
layer.msg(res.msg, {icon: 2})
layer.msg(res.msg, { icon: 2 })
}
})
}
@ -244,7 +242,7 @@ const getPartyList = () => {
if (res.code == 1) {
partyList.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
layer.msg(res.msg, { icon: 2 })
}
})
}
@ -254,13 +252,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: []})
if (userStore.userInfo.level == 1) {
data.value.unshift({ id: 0, name: '全部', children: [] })
}
leftId.value=res.data[0].id;
leftId.value = res.data[0].id;
getUserList();
} else {
layer.msg(res.msg, {icon: 2})
layer.msg(res.msg, { icon: 2 })
}
})
}
@ -271,7 +269,7 @@ const getAuthList = () => {
if (res.code == 1) {
authList.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
layer.msg(res.msg, { icon: 2 })
}
})
}
@ -300,16 +298,16 @@ 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: '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'}
{ 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) => {
@ -329,6 +327,7 @@ const model11 = reactive({
group_id: [],
party_id: [],
avatar: '',
license_image:'',
birthday: '',
group_level: '',
party_level: '',
@ -351,9 +350,10 @@ const changeAddShow = () => {
mobile: '',
email: '',
member_code: '',
license_image:'',
code: '',
gender: 0,
id:0,
id: 0,
password: '',
status: 1,
auth_group_id: '',
@ -382,11 +382,11 @@ const addButton = ref([
//return;
//
if (!model11.nickname) {
layer.msg('姓名不能为空!', {icon: 2});
layer.msg('姓名不能为空!', { icon: 2 });
return;
}
if (!model11.mobile) {
layer.msg('手机号不能为空!', {icon: 2});
layer.msg('手机号不能为空!', { icon: 2 });
return;
}
// if (!model11.email) {
@ -394,7 +394,7 @@ const addButton = ref([
// return;
// }
if (!model11.member_code) {
layer.msg('身份证号不能为空!', {icon: 2});
layer.msg('身份证号不能为空!', { icon: 2 });
return;
}
// if (!model11.birthday) {
@ -402,30 +402,30 @@ const addButton = ref([
// return;
// }
if (!model11.code) {
layer.msg('工号不能为空!', {icon: 2});
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});
layer.msg('科室不能为空!', { icon: 2 });
return;
}
// if (!model11.party_id) {
// layer.msg('', {icon: 2});
// return;
// }
model11.username=model11.code;
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)
@ -439,11 +439,11 @@ 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 })
}
}
},
@ -463,12 +463,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 });
}
}
@ -491,15 +491,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;
}

View File

@ -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,8 +23,14 @@
<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">
@ -38,50 +44,59 @@
</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>
<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 }">
<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 }">
<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>
<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 && 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>
</lay-tab-item>
</lay-tab>
</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: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="true" :min="0" :max="data.base_score"
v-model="data.content_score" position="right"></lay-input-number>
</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: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>
<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>
@ -113,15 +128,19 @@
<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: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>
<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>
</lay-table>
<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>
@ -129,8 +148,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,
@ -139,8 +158,15 @@ 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();
})
@ -152,6 +178,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([]);
@ -170,9 +197,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 = [];
}
})
@ -183,11 +210,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 = () => {
@ -200,7 +227,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;
@ -212,6 +239,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,
@ -223,7 +251,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 })
}
})
}
@ -234,6 +279,16 @@ 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) => {
getYearListFind({
@ -245,14 +300,14 @@ const getInfoMode = (row) => {
if (res.code == 1) {
dataSource6.value = res.data;
} 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;
@ -260,7 +315,7 @@ const getTabList = () => {
userTabId.value = res.data[0].id;
getList();
} else {
layer.msg(res.msg, {icon: 2})
layer.msg(res.msg, { icon: 2 })
}
})
}
@ -272,8 +327,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 })
}
})
}
@ -308,16 +364,16 @@ 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: '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',
@ -340,12 +396,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 })
}
}
},
@ -383,6 +439,16 @@ const columns6 = [
key: "ksinput"
}
]
//
if (userStore.userInfo.level == 3) {
columns6.push({
title: "医院评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
}
const dataSource6 = ref([])
</script>
@ -442,5 +508,7 @@ const dataSource6 = ref([])
background-color: #e8f1ff;
color: red;
}
.layui-tab-content{
padding: 0;
}
</style>

View File

@ -27,7 +27,7 @@
<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 v-model="current1" @change="openTab">
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
<lay-table
:columns="columns"