1
This commit is contained in:
parent
2485b8981a
commit
57c33605ae
1
components.d.ts
vendored
1
components.d.ts
vendored
@ -14,6 +14,7 @@ declare module 'vue' {
|
||||
LayButton: typeof import('@layui/layui-vue')['LayButton']
|
||||
LayCard: typeof import('@layui/layui-vue')['LayCard']
|
||||
LayCascader: typeof import('@layui/layui-vue')['LayCascader']
|
||||
LayCheckbox: typeof import('@layui/layui-vue')['LayCheckbox']
|
||||
LayCol: typeof import('@layui/layui-vue')['LayCol']
|
||||
LayConfigProvider: typeof import('@layui/layui-vue')['LayConfigProvider']
|
||||
LayContainer: typeof import('@layui/layui-vue')['LayContainer']
|
||||
|
@ -8,11 +8,11 @@ type TAxiosOption = {
|
||||
baseURL: string;
|
||||
}
|
||||
|
||||
const baseURL = '/api' // 设置基础URL前缀
|
||||
const baseURL = 'http://yfyd.hschool.com.cn' // 设置基础URL前缀
|
||||
|
||||
const config: TAxiosOption = {
|
||||
timeout: 5000,
|
||||
baseURL: "http://yfyd.hschool.com.cn",
|
||||
baseURL: baseURL,
|
||||
}
|
||||
|
||||
class Http {
|
||||
|
@ -219,6 +219,73 @@ export const userYearData= function(date: any) {
|
||||
}
|
||||
|
||||
|
||||
//根据用户判断当前科室
|
||||
export const getUserGroupNew= function(date: any) {
|
||||
return Http.post('/api/backend/Monthly/getUserGroup', date)
|
||||
}
|
||||
|
||||
|
||||
//当前月度管理tab
|
||||
export const getGroupEvaluation= function(date: any) {
|
||||
return Http.post('/api/backend/Monthly/getGroupEvaluation', date)
|
||||
}
|
||||
//当前月度管理List
|
||||
export const getMonthlyUserList= function(date: any) {
|
||||
return Http.post('/api/backend/Monthly/getUserList', date)
|
||||
}
|
||||
//当前月度用户详情
|
||||
export const getMonthlyListFind= function(date: any) {
|
||||
return Http.post('/api/backend/Monthly/getMonthlyListFind', date)
|
||||
}
|
||||
//当前月度用户科室评价
|
||||
export const getMonthlyListUpdate= function(date: any) {
|
||||
return Http.post('/api/backend/Monthly/getMonthlyListUpdate', date)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//当前季度管理tab
|
||||
export const getGroupQuarter= function(date: any) {
|
||||
return Http.post('/api/backend/Quarter/getGroupEvaluation', date)
|
||||
}
|
||||
//当前季度管理List
|
||||
export const getQuarterUserList= function(date: any) {
|
||||
return Http.post('/api/backend/Quarter/getUserList', date)
|
||||
}
|
||||
//当前季度用户详情
|
||||
export const getQuarterListFind= function(date: any) {
|
||||
return Http.post('/api/backend/Quarter/getMonthlyListFind', date)
|
||||
}
|
||||
//当前季度用户科室评价
|
||||
export const getQuarterListUpdate= function(date: any) {
|
||||
return Http.post('/api/backend/Quarter/getMonthlyListUpdate', date)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//当前月度管理tab
|
||||
export const getGroupYear= function(date: any) {
|
||||
return Http.post('/api/backend/Year/getGroupEvaluation', date)
|
||||
}
|
||||
//当前月度管理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)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ export default [
|
||||
name: 'systemIndex',
|
||||
component: () => import('../../views/system/index.vue'),
|
||||
meta: {
|
||||
title: '人员管理',
|
||||
title: '人员管理',
|
||||
requireAuth: true,
|
||||
closable: true,
|
||||
permissions: ['sys:user:add']
|
||||
@ -88,7 +88,7 @@ export default [
|
||||
{
|
||||
path: '/packet/index',
|
||||
name: 'Packet',
|
||||
component: () => import('../../views/home/index.vue'),
|
||||
component: () => import('../../views/packet/index.vue'),
|
||||
meta: { title: '拒收红包', requireAuth: true, closable: true },
|
||||
},
|
||||
]
|
||||
@ -142,7 +142,7 @@ export default [
|
||||
},{
|
||||
path: '/season_evaluation/examine',
|
||||
name: 'seasonEvaluationExamine',
|
||||
component: () => import('../../views/day_evaluation/examine.vue'),
|
||||
component: () => import('../../views/season_evaluation/examine.vue'),
|
||||
meta: {title: '季度考评管理', requireAuth: true, closable: true},
|
||||
}
|
||||
]
|
||||
@ -178,7 +178,7 @@ export default [
|
||||
},{
|
||||
path: '/year_evaluation/examine',
|
||||
name: 'yearEvaluationExamine',
|
||||
component: () => import('../../views/day_evaluation/examine.vue'),
|
||||
component: () => import('../../views/year_evaluation/examine.vue'),
|
||||
meta: {title: '年度考评管理', requireAuth: true, closable: true},
|
||||
}
|
||||
]
|
||||
|
@ -1,32 +1,12 @@
|
||||
<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">
|
||||
<lay-button type="normal" size="sm" @click="toAdd">
|
||||
<lay-icon type="layui-icon-addition"></lay-icon>新建
|
||||
</lay-button>
|
||||
<lay-button type="warm" size="sm" @click="toEdit">
|
||||
<lay-icon type="layui-icon-edit"></lay-icon>修改
|
||||
</lay-button>
|
||||
<lay-button type="danger" size="sm" @click="toDelete">
|
||||
<lay-icon type="layui-icon-delete"></lay-icon>删除
|
||||
</lay-button>
|
||||
</div>
|
||||
|
||||
<lay-tree
|
||||
v-show="!isFold"
|
||||
style="margin-top: 10px"
|
||||
:data="data"
|
||||
v-model:selectedKey="selectedKey"
|
||||
:showLine="showLine"
|
||||
:expandKeys="[1, 3, 4]"
|
||||
@node-click="handleClick"
|
||||
>
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="selectedKey == data.id ? 'isChecked' : ''">
|
||||
{{ data.title }} {{ data.id }}
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</span>
|
||||
</template>
|
||||
</lay-tree>
|
||||
@ -41,609 +21,295 @@
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="用户账号" label-width="80">
|
||||
<lay-input
|
||||
v-model="searchQuery.userAccount"
|
||||
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.userName"
|
||||
placeholder="请输入"
|
||||
size="sm"
|
||||
:allow-clear="true"
|
||||
style="width: 98%"
|
||||
></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="性别" label-width="80">
|
||||
<lay-select
|
||||
class="search-input"
|
||||
size="sm"
|
||||
v-model="searchQuery.sex"
|
||||
:allow-clear="true"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<lay-select-option
|
||||
value="man"
|
||||
label="男"
|
||||
></lay-select-option>
|
||||
<lay-select-option
|
||||
value="woman"
|
||||
label="女"
|
||||
></lay-select-option>
|
||||
</lay-select>
|
||||
<lay-form-item label="月度" label-width="80">
|
||||
<lay-date-picker type="yearmonth" v-model="yearmonth" placeholder="月度"
|
||||
allow-clear></lay-date-picker>
|
||||
</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"-->
|
||||
<!-- style="width: 98%"></lay-input>-->
|
||||
<!-- </lay-form-item>-->
|
||||
<!-- </lay-col>-->
|
||||
<!-- <lay-col :md="5">-->
|
||||
<!-- <lay-form-item label="状态" label-width="80">-->
|
||||
<!-- <lay-select class="search-input" size="sm" v-model="searchQuery.status" :allow-clear="true"-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <lay-select-option value="1" label="待自评"></lay-select-option>-->
|
||||
<!-- <lay-select-option value="2" label="已自评"></lay-select-option>-->
|
||||
<!-- <lay-select-option value="3" label="已科室考评"></lay-select-option>-->
|
||||
<!-- </lay-select>-->
|
||||
<!-- </lay-form-item>-->
|
||||
<!-- </lay-col>-->
|
||||
<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="normal" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置 </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="'100%'"
|
||||
:columns="columns"
|
||||
:loading="loading"
|
||||
:default-toolbar="true"
|
||||
:data-source="dataSource"
|
||||
v-model:selected-keys="selectedKeys"
|
||||
@change="change"
|
||||
@sortChange="sortChange"
|
||||
>
|
||||
<template #status="{ row }">
|
||||
<lay-switch
|
||||
:model-value="row.status"
|
||||
@change="changeStatus($event, row)"
|
||||
></lay-switch>
|
||||
</template>
|
||||
<template #role="{ row }">
|
||||
<lay-tag color="#165DFF" variant="light">{{ row.role }}</lay-tag>
|
||||
</template>
|
||||
<lay-tab v-model="tab_id" type="brief" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table :page="page" height="600px" :columns="columns" :loading="loading"
|
||||
:data-source="dataSource" v-model:selected-keys="selectedKeys" @change="change">
|
||||
<template v-slot:scoringrecord_status="{row}">
|
||||
<lay-tag v-if="row.scoringrecord_status==1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status==2">未自评</lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==1"
|
||||
@click="getInfo(row,1)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord!=0 && row.scoringrecord_status==1"
|
||||
@click="getInfo(row,2)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==2">考评详情</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
<template v-slot:toolbar>
|
||||
<lay-button
|
||||
size="sm"
|
||||
type="primary"
|
||||
@click="changeVisible11('新增', null)"
|
||||
>新增</lay-button
|
||||
>
|
||||
<lay-button size="sm" @click="toRemove">删除</lay-button>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-button
|
||||
size="xs"
|
||||
border="green"
|
||||
border-style="dashed"
|
||||
@click="changeVisible11('编辑', row)"
|
||||
>编辑</lay-button
|
||||
>
|
||||
<lay-popconfirm
|
||||
content="确定要删除此用户吗?"
|
||||
@confirm="confirm"
|
||||
@cancel="cancel"
|
||||
>
|
||||
<lay-button size="xs" border="red" border-style="dashed"
|
||||
>删除</lay-button
|
||||
>
|
||||
</lay-popconfirm>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="visible11" :title="title" :area="['500px', '450px']">
|
||||
<div style="padding: 20px">
|
||||
<lay-form :model="model11" ref="layFormRef11" required>
|
||||
<lay-form-item label="用户账号" prop="account">
|
||||
<lay-input v-model="model11.account"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="用户名" prop="name">
|
||||
<lay-input v-model="model11.name"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="性别" prop="sex">
|
||||
<lay-select v-model="model11.sex" style="width: 100%">
|
||||
<lay-select-option value="男" label="男"></lay-select-option>
|
||||
<lay-select-option value="女" label="女"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="角色" prop="role">
|
||||
<lay-input v-model="model11.role"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="状态" prop="status">
|
||||
<lay-switch :model-value="model11.status"></lay-switch>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
<div style="width: 100%; text-align: center">
|
||||
<lay-button size="sm" type="primary" @click="toSubmit"
|
||||
>保存</lay-button
|
||||
>
|
||||
<lay-button size="sm" @click="toCancel">取消</lay-button>
|
||||
</div>
|
||||
</div>
|
||||
</lay-layer>
|
||||
|
||||
<lay-layer v-model="visible22" :title="title22" :area="['700px', '400px']">
|
||||
<div style="padding: 20px">
|
||||
<lay-form :model="model22" ref="layFormRef11" required>
|
||||
<lay-row>
|
||||
<lay-col md="12">
|
||||
<lay-form-item label="上级机构" prop="organization">
|
||||
<lay-select v-model="model22.organization" style="width: 100%">
|
||||
<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-option value="4" label="市场部">
|
||||
</lay-select-option>
|
||||
<lay-select-option value="5" label="运维部">
|
||||
</lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="机构名称" prop="name">
|
||||
<lay-input v-model="model22.name"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="机构全称" prop="fullName">
|
||||
<lay-input v-model="model22.fullName"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="机构代码" prop="code">
|
||||
<lay-input v-model="model22.code"></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col md="12">
|
||||
<lay-form-item label="机构类型" prop="type">
|
||||
<lay-select v-model="model22.type" style="width: 100%">
|
||||
<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-option value="4" label="小组"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="排序号" prop="sort">
|
||||
<lay-input-number
|
||||
style="width: 100%"
|
||||
v-model="model22.sort"
|
||||
position="right"
|
||||
></lay-input-number>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="备注" prop="remark">
|
||||
<lay-textarea
|
||||
placeholder="请输入备注"
|
||||
v-model="model22.remark"
|
||||
:rows="4"
|
||||
></lay-textarea>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
<div style="width: 100%; text-align: center">
|
||||
<lay-button size="sm" type="primary" @click="toSubmit"
|
||||
>保存</lay-button
|
||||
>
|
||||
<lay-button size="sm" @click="toCancel">取消</lay-button>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px','100%']"
|
||||
:btn="addIsInfo==1?addButton:''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-table :default-expand-all="true" ref="tableRef6" children-column-name="children" :columns="columns6"
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:input="{ data,rowIndex}">
|
||||
<lay-input-number v-if="data.pid==0" :disabled="true" :min="0" :max="data.base_score"
|
||||
v-model="data.base_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="data.pid!=0" :disabled="addIsInfo==2" :min="0" :max="data.base_score"
|
||||
v-model="data.content_score"
|
||||
position="right"></lay-input-number>
|
||||
</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>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</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 {layer} from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupEvaluation,
|
||||
getMonthlyUserList,
|
||||
MonthlyCreate,
|
||||
getMonthlyListFind, getMonthlyListUpdate
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const data = ref([
|
||||
{
|
||||
title: 'xxxx公司',
|
||||
id: 1,
|
||||
checked: true,
|
||||
children: [
|
||||
{
|
||||
title: '研发部',
|
||||
id: 2,
|
||||
children: [
|
||||
{
|
||||
title: '研发一部',
|
||||
id: 3
|
||||
},
|
||||
{
|
||||
title: '研发二部',
|
||||
id: 4
|
||||
},
|
||||
{
|
||||
title: '研发三部',
|
||||
id: 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '测试部',
|
||||
id: 6,
|
||||
children: [
|
||||
{
|
||||
title: '测试一部',
|
||||
id: 7,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
title: '测试二部',
|
||||
id: 8
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '设计部',
|
||||
id: 9
|
||||
},
|
||||
{
|
||||
title: '市场部',
|
||||
id: 10
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
const showLine = ref(false)
|
||||
const selectedKey = ref('')
|
||||
const selectedNode = ref({
|
||||
id: 0,
|
||||
title: ''
|
||||
onMounted(() => {
|
||||
getLeftList();
|
||||
})
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
tab_id.value = d;
|
||||
dataSource.value = [];
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({current: 1, limit: 10, total: 1})
|
||||
const change = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
page.limit = d.limit;
|
||||
getList();
|
||||
}
|
||||
const addIsInfo = ref(1);
|
||||
const infoShow = ref(false);
|
||||
const yearmonth = ref();
|
||||
const getList = () => {
|
||||
getMonthlyUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: page.current,
|
||||
size: page.limit
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
console.log(row);
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getMonthlyListFind({
|
||||
evaluation_schedule_id: tab_id.value,
|
||||
month: row.time,
|
||||
user_id: row.id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupEvaluation({'group_id': group_id.value}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const group_id = ref(1);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
userAccount: '',
|
||||
userName: '',
|
||||
sex: ''
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
userAccount: '',
|
||||
userName: '',
|
||||
sex: ''
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = selectedNode.value.id
|
||||
change(page)
|
||||
}
|
||||
function toAdd() {
|
||||
visible22.value = true
|
||||
}
|
||||
function toEdit() {
|
||||
model22.value = {
|
||||
organization: '1',
|
||||
name: '研发部',
|
||||
fullName: 'xxxx公司-研发部',
|
||||
code: '001',
|
||||
type: '1',
|
||||
sort: 1,
|
||||
remark: '备注'
|
||||
}
|
||||
visible22.value = true
|
||||
}
|
||||
function toDelete() {
|
||||
if (selectedKey.value == '') {
|
||||
layer.msg('您未选择组织机构,请先选择要删除的组织机构', {
|
||||
icon: 3,
|
||||
time: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
layer.confirm(
|
||||
'您将删除所选中的组织机构 [ ' + selectedNode.value.title + ' ] ?',
|
||||
{
|
||||
title: '提示',
|
||||
btn: [
|
||||
{
|
||||
text: '确定',
|
||||
callback: (id: any) => {
|
||||
layer.msg('您已成功删除')
|
||||
layer.close(id)
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '取消',
|
||||
callback: (id: any) => {
|
||||
layer.msg('您已取消操作')
|
||||
layer.close(id)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1
|
||||
change(page)
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const page = reactive({ current: 1, limit: 10, total: 100 })
|
||||
const columns = ref([
|
||||
{ title: '选项', width: '55px', type: 'checkbox', fixed: 'left' },
|
||||
{ title: '编号', width: '80px', key: 'id', fixed: 'left', sort: 'id' },
|
||||
{ title: '用户账号', width: '80px', key: 'account', sort: 'account' },
|
||||
{ title: '用户名', width: '80px', key: 'name', sort: 'name' },
|
||||
{ title: '性别', width: '80px', key: 'sex', sort: 'sex' },
|
||||
{ title: '角色', width: '120px', key: 'role', customSlot: 'role' },
|
||||
{
|
||||
title: '创建时间',
|
||||
width: '120px',
|
||||
key: 'joinTime'
|
||||
},
|
||||
{ title: '状态', width: '120px', key: 'status', sort: 'status' },
|
||||
|
||||
{title: '选项', width: '55px', type: 'checkbox', align: 'center'},
|
||||
{title: '序号', width: '60px', key: 'id', align: 'center'},
|
||||
{title: '月度', width: '80px', key: 'time', align: 'center'},
|
||||
{title: '考评对象', width: '100px', key: 'nickname', align: 'center'},
|
||||
{title: '工号', width: '100px', key: 'work_number', align: 'center'},
|
||||
{title: '部门', width: '120px', key: 'group_name', align: 'center'},
|
||||
{title: '季度总加分', width: '100px', key: 'zongjiafen', align: 'center'},
|
||||
{title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center'},
|
||||
{title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center'},
|
||||
{title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center'},
|
||||
{
|
||||
title: '操作',
|
||||
width: '150px',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right'
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const change = (page: any) => {
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
dataSource.value = loadDataSource(page.current, page.limit)
|
||||
loading.value = false
|
||||
}, 1000)
|
||||
}
|
||||
const sortChange = (key: any, sort: number) => {
|
||||
layer.msg(`字段${key} - 排序${sort}, 你可以利用 sort-change 实现服务端排序`)
|
||||
}
|
||||
const dataSource = ref([
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
id: '1',
|
||||
name: '管理员',
|
||||
sex: '男',
|
||||
role: '管理员',
|
||||
account: 'admin',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '张三2',
|
||||
sex: '男',
|
||||
role: '普通用户',
|
||||
account: '用户2',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '李四3',
|
||||
sex: '男',
|
||||
role: '普通用户',
|
||||
account: '用户3',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: '用户4',
|
||||
sex: '男',
|
||||
role: '普通用户',
|
||||
account: '用户4',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
name: '王五5',
|
||||
sex: '男',
|
||||
role: '普通用户',
|
||||
account: '用户5',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
name: '赵六6',
|
||||
sex: '男',
|
||||
role: '普通用户',
|
||||
account: '用户6',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
name: '黄齐7',
|
||||
sex: '男',
|
||||
role: '普通用户',
|
||||
account: '用户7',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '8',
|
||||
name: '用户8',
|
||||
sex: '男',
|
||||
role: '普通用户',
|
||||
account: '用户8',
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '9',
|
||||
name: '游客9',
|
||||
sex: '男',
|
||||
role: '游客',
|
||||
account: '游客9',
|
||||
joinTime: '用户22-02-09 18:34:56',
|
||||
status: true
|
||||
},
|
||||
{
|
||||
id: '10',
|
||||
name: '用户10',
|
||||
sex: '女',
|
||||
role: '普通用户',
|
||||
account: 'user10',
|
||||
joinTime: '2022-02-09 18:34:56 18:34:56',
|
||||
status: true
|
||||
}
|
||||
])
|
||||
const changeStatus = (isChecked: boolean, row: any) => {
|
||||
dataSource.value.forEach((item) => {
|
||||
if (item.id === row.id) {
|
||||
layer.msg('Success', { icon: 1 }, () => {
|
||||
item.status = isChecked
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const remove = () => {
|
||||
layer.msg(selectedKeys.value, { area: '50%' })
|
||||
}
|
||||
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}`,
|
||||
account: `user${i}`,
|
||||
sex: '男',
|
||||
name: `用户${i}`,
|
||||
joinTime: '2022-02-09 18:34:56',
|
||||
role: '普通用户',
|
||||
status: true
|
||||
})
|
||||
}
|
||||
return response
|
||||
}
|
||||
const model11 = ref({
|
||||
name: '',
|
||||
role: '',
|
||||
sex: '',
|
||||
status: '',
|
||||
account: ''
|
||||
})
|
||||
const layFormRef11 = ref()
|
||||
const visible11 = ref(false)
|
||||
const title = ref('新增')
|
||||
const changeVisible11 = (text: any, row: any) => {
|
||||
title.value = text
|
||||
if (row != null) {
|
||||
let info = JSON.parse(JSON.stringify(row))
|
||||
model11.value = info
|
||||
} else {
|
||||
model11.value = {
|
||||
name: '',
|
||||
role: '',
|
||||
sex: '',
|
||||
status: '',
|
||||
account: ''
|
||||
}
|
||||
}
|
||||
visible11.value = !visible11.value
|
||||
}
|
||||
const submit11 = function () {
|
||||
layFormRef11.value.validate((isValidate: any, model: any, errors: any) => {
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '表单提交结果',
|
||||
content: `<div style="padding: 10px"><p>是否通过 : ${isValidate}</p> <p>表单数据 : ${JSON.stringify(
|
||||
model
|
||||
)} </p> <p>错误信息 : ${JSON.stringify(errors)}</p></div>`,
|
||||
shade: false,
|
||||
isHtmlFragment: true,
|
||||
btn: [
|
||||
{
|
||||
text: '确认',
|
||||
callback(index: any) {
|
||||
layer.close(index)
|
||||
}
|
||||
}
|
||||
],
|
||||
area: '500px'
|
||||
})
|
||||
})
|
||||
}
|
||||
// 清除校验
|
||||
const clearValidate11 = function () {
|
||||
layFormRef11.value.clearValidate()
|
||||
}
|
||||
// 重置表单
|
||||
const reset11 = function () {
|
||||
layFormRef11.value.reset()
|
||||
}
|
||||
function toRemove() {
|
||||
if (selectedKeys.value.length == 0) {
|
||||
layer.msg('您未选择数据,请先选择要删除的数据', { icon: 3, time: 2000 })
|
||||
return
|
||||
}
|
||||
layer.confirm('您将删除所有选中的数据?', {
|
||||
title: '提示',
|
||||
btn: [
|
||||
{
|
||||
text: '确定',
|
||||
callback: (id: any) => {
|
||||
layer.msg('您已成功删除')
|
||||
layer.close(id)
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '取消',
|
||||
callback: (id: any) => {
|
||||
layer.msg('您已取消操作')
|
||||
layer.close(id)
|
||||
}
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
var json = JSON.stringify(dataSource6.value);
|
||||
var res = await getMonthlyListUpdate({
|
||||
'term': thisInfo.value.time,
|
||||
'json': json,
|
||||
'user_id': thisInfo.value.id,
|
||||
evaluation_schedule_id: tab_id.value
|
||||
});
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', {icon: 1})
|
||||
thisInfo.value = {};
|
||||
infoShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
function toSubmit() {
|
||||
layer.msg('保存成功!', { icon: 1, time: 1000 })
|
||||
visible11.value = false
|
||||
visible22.value = false
|
||||
}
|
||||
function toCancel() {
|
||||
visible11.value = false
|
||||
visible22.value = false
|
||||
}
|
||||
function confirm() {
|
||||
layer.msg('您已成功删除')
|
||||
}
|
||||
function cancel() {
|
||||
layer.msg('您已取消操作')
|
||||
}
|
||||
|
||||
const model22 = ref({
|
||||
organization: '',
|
||||
name: '',
|
||||
fullName: '',
|
||||
code: '',
|
||||
type: '',
|
||||
sort: 0,
|
||||
remark: ''
|
||||
})
|
||||
const layFormRef22 = ref()
|
||||
const visible22 = ref(false)
|
||||
const title22 = ref('新建')
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
const columns6 = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
},
|
||||
{
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'ksinput',
|
||||
key: "ksinput"
|
||||
}
|
||||
]
|
||||
const dataSource6 = ref([])
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
@ -652,6 +318,7 @@ const title22 = ref('新建')
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
@ -660,6 +327,7 @@ const title22 = ref('新建')
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
@ -668,6 +336,7 @@ const title22 = ref('新建')
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.isFold {
|
||||
position: absolute;
|
||||
top: 36%;
|
||||
@ -680,6 +349,7 @@ const title22 = ref('新建')
|
||||
border: 1px solid #e6e6e6;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
@ -691,4 +361,5 @@ const title22 = ref('新建')
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -63,25 +63,6 @@
|
||||
</lay-container>
|
||||
<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}">
|
||||
|
241
src/views/packet/index.vue
Normal file
241
src/views/packet/index.vue
Normal file
@ -0,0 +1,241 @@
|
||||
<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="searchForm.year" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="发生时间:" label-width="80">
|
||||
<lay-date-picker v-model="searchForm.occurDate" placeholder="请选择"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="考评对象:" label-width="80">
|
||||
<lay-input v-model="searchForm.evaluateObject" placeholder="请输入"></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="审核状态:" label-width="80">
|
||||
<lay-select v-model="searchForm.status" placeholder="请选择">
|
||||
<lay-select-option :value="1" label="待审核"></lay-select-option>
|
||||
<lay-select-option :value="2" label="已通过"></lay-select-option>
|
||||
<lay-select-option :value="3" label="已驳回"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<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" size="sm" @click="openAdd">新增</lay-button>
|
||||
<lay-button type="primary" size="sm">导出Excel</lay-button>
|
||||
</div>
|
||||
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px" size="md">
|
||||
<template v-slot:checkbox="{ data }">
|
||||
<lay-checkbox v-model="data.checked"></lay-checkbox>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
|
||||
<!-- 新增/编辑弹窗 -->
|
||||
<lay-layer v-model="visible" :title="formTitle" :area="['600px', '80%']" :shade="true">
|
||||
<div style="padding: 20px">
|
||||
<lay-form :model="form">
|
||||
<lay-form-item label="考评对象" required>
|
||||
<lay-input v-model="form.evaluateObject"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="人员编号" required>
|
||||
<lay-input v-model="form.staffNo"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="科室" required>
|
||||
<lay-input v-model="form.department"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="发生日期" required>
|
||||
<lay-date-picker v-model="form.occurDate"></lay-date-picker>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="证明人" required>
|
||||
<lay-input v-model="form.witness"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="患者姓名" required>
|
||||
<lay-input v-model="form.patientName"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="退还金额" required>
|
||||
<lay-input-number v-model="form.refundAmount"></lay-input-number>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="退还日期" required>
|
||||
<lay-date-picker v-model="form.refundDate"></lay-date-picker>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="退还方式" required>
|
||||
<lay-select v-model="form.refundType">
|
||||
<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="附件">
|
||||
<lay-upload></lay-upload>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="备注">
|
||||
<lay-textarea v-model="form.remark"></lay-textarea>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
<div style="text-align: center; margin-top: 20px;">
|
||||
<lay-button type="primary" @click="submitForm">确定</lay-button>
|
||||
<lay-button @click="visible = false">取消</lay-button>
|
||||
</div>
|
||||
</div>
|
||||
</lay-layer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import dayjs from "dayjs";
|
||||
|
||||
// 搜索表单
|
||||
const searchForm = ref({
|
||||
year: dayjs().year(),
|
||||
occurDate: '',
|
||||
evaluateObject: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
// 表格列配置
|
||||
const columns = [
|
||||
{
|
||||
title: '',
|
||||
width: '50px',
|
||||
customSlot: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: '80px',
|
||||
key: 'index'
|
||||
},
|
||||
{
|
||||
title: '发生日期',
|
||||
width: '120px',
|
||||
key: 'occurDate'
|
||||
},
|
||||
{
|
||||
title: '考评对象',
|
||||
width: '120px',
|
||||
key: 'evaluateObject'
|
||||
},
|
||||
{
|
||||
title: '工号',
|
||||
width: '100px',
|
||||
key: 'staffNo'
|
||||
},
|
||||
{
|
||||
title: '科室',
|
||||
width: '120px',
|
||||
key: 'department'
|
||||
},
|
||||
{
|
||||
title: '患者姓名',
|
||||
width: '120px',
|
||||
key: 'patientName'
|
||||
},
|
||||
{
|
||||
title: '退还金额',
|
||||
width: '100px',
|
||||
key: 'refundAmount'
|
||||
},
|
||||
{
|
||||
title: '退还日期',
|
||||
width: '120px',
|
||||
key: 'refundDate'
|
||||
},
|
||||
{
|
||||
title: '退还方式',
|
||||
width: '100px',
|
||||
key: 'refundType'
|
||||
}
|
||||
]
|
||||
|
||||
// 表格数据
|
||||
const dataSource = ref([])
|
||||
|
||||
// 弹窗控制
|
||||
const visible = ref(false)
|
||||
const formTitle = ref('新增拒收红包')
|
||||
|
||||
// 表单数据
|
||||
const form = ref({
|
||||
evaluateObject: '',
|
||||
staffNo: '',
|
||||
department: '',
|
||||
occurDate: '',
|
||||
witness: '',
|
||||
patientName: '',
|
||||
refundAmount: 0,
|
||||
refundDate: '',
|
||||
refundType: '',
|
||||
remark: ''
|
||||
})
|
||||
|
||||
// 搜索方法
|
||||
const toSearch = () => {
|
||||
// TODO: 实现搜索逻辑
|
||||
}
|
||||
|
||||
// 重置方法
|
||||
const toReset = () => {
|
||||
searchForm.value = {
|
||||
year: dayjs().year(),
|
||||
occurDate: '',
|
||||
evaluateObject: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
// 打开新增弹窗
|
||||
const openAdd = () => {
|
||||
formTitle.value = '新增拒收红包'
|
||||
form.value = {
|
||||
evaluateObject: '',
|
||||
staffNo: '',
|
||||
department: '',
|
||||
occurDate: '',
|
||||
witness: '',
|
||||
patientName: '',
|
||||
refundAmount: 0,
|
||||
refundDate: '',
|
||||
refundType: '',
|
||||
remark: ''
|
||||
}
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const submitForm = () => {
|
||||
// TODO: 实现表单提交逻辑
|
||||
visible.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
</style>
|
363
src/views/season_evaluation/examine.vue
Normal file
363
src/views/season_evaluation/examine.vue
Normal file
@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<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="year" placeholder="年"
|
||||
allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="季度" label-width="80px">
|
||||
<lay-select v-model="quarter" placeholder="请选择">
|
||||
<lay-select-option :value="1" label="第一季度"></lay-select-option>
|
||||
<lay-select-option :value="2" label="第二季度"></lay-select-option>
|
||||
<lay-select-option :value="3" label="第三季度"></lay-select-option>
|
||||
<lay-select-option :value="4" label="第四季度"></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>
|
||||
<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" type="brief" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table :page="page" height="600px" :columns="columns" :loading="loading"
|
||||
:data-source="dataSource" v-model:selected-keys="selectedKeys" @change="change">
|
||||
<template v-slot:scoringrecord_status="{row}">
|
||||
<lay-tag v-if="row.scoringrecord_status==1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status==2">未自评</lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==1"
|
||||
@click="getInfo(row,1)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord!=0 && row.scoringrecord_status==1"
|
||||
@click="getInfo(row,2)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==2">考评详情</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px','100%']"
|
||||
:btn="addIsInfo==1?addButton:''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-table :default-expand-all="true" ref="tableRef6" children-column-name="children" :columns="columns6"
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:input="{ data,rowIndex}">
|
||||
<lay-input-number v-if="data.pid==0" :disabled="true" :min="0" :max="data.base_score"
|
||||
v-model="data.base_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="data.pid!=0" :disabled="addIsInfo==2" :min="0" :max="data.base_score"
|
||||
v-model="data.content_score"
|
||||
position="right"></lay-input-number>
|
||||
</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>
|
||||
</lay-table>
|
||||
</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,
|
||||
getGroupQuarter,
|
||||
getQuarterUserList,
|
||||
getQuarterListFind,
|
||||
getQuarterListUpdate
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
onMounted(() => {
|
||||
getLeftList();
|
||||
})
|
||||
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 year = ref(dayjs().year());
|
||||
const quarter = ref(1);
|
||||
|
||||
|
||||
const yearmonth = ref();
|
||||
const getList = () => {
|
||||
getQuarterUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: page.current,
|
||||
size: page.limit
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row) => {
|
||||
infoShow.value = true;
|
||||
console.log(row);
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getQuarterListFind({
|
||||
evaluation_schedule_id: tab_id.value,
|
||||
month: row.time,
|
||||
user_id: row.id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupQuarter({'group_id': group_id.value}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const group_id = ref(1);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
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;
|
||||
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', align: 'center'},
|
||||
{title: '工号', width: '100px', key: 'work_number', align: 'center'},
|
||||
{title: '部门', width: '120px', key: 'group_name', align: 'center'},
|
||||
{title: '季度总加分', width: '100px', key: 'zongjiafen', align: 'center'},
|
||||
{title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center'},
|
||||
{title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center'},
|
||||
{title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status',align: 'center'},
|
||||
{
|
||||
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 getQuarterListUpdate({
|
||||
'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 columns6 = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
},
|
||||
{
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'ksinput',
|
||||
key: "ksinput"
|
||||
}
|
||||
]
|
||||
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;
|
||||
}
|
||||
|
||||
</style>
|
@ -147,7 +147,7 @@ const insZp = (item) => {
|
||||
const getMonthlyInfo = (item) => {
|
||||
visible11.value=true;
|
||||
addIsInfo.value=2;
|
||||
QuarterInfo({'user_id': userStore.userInfo.id, 'quarter': item.quarter}).then((res) => {
|
||||
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;
|
||||
|
@ -6,10 +6,10 @@
|
||||
<div v-show="!isFold">
|
||||
科室列表
|
||||
</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="selectedKey"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="leftId"
|
||||
:showLine="false" :default-expand-all="true" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="selectedKey == data.id ? 'isChecked' : ''">
|
||||
<span :class="leftId == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</span>
|
||||
</template>
|
||||
@ -85,19 +85,19 @@
|
||||
<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-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-item>
|
||||
<lay-form-item label="密码" prop="password">
|
||||
<lay-input v-model="model11.password" size="lg" placeholder="请输入密码"></lay-input>
|
||||
@ -141,7 +141,7 @@
|
||||
placeholder="选择党支部" allow-clear></lay-cascader>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="角色组" prop="auth_group_id">
|
||||
<lay-select v-model="model11.auth_group_id" style="width:180px;" placeholder="选择党角色组">
|
||||
<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>
|
||||
</lay-select>
|
||||
@ -199,7 +199,7 @@ const getFileDone = (res) => {
|
||||
//uploadRef.value.submit()
|
||||
};
|
||||
onMounted(() => {
|
||||
getUserList();
|
||||
//getUserList();
|
||||
getLeftList();
|
||||
getPartyList();
|
||||
getAuthList();
|
||||
@ -231,6 +231,8 @@ const getLeftList = () => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
leftId.value=res.data[0].id;
|
||||
getUserList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
|
348
src/views/year_evaluation/examine.vue
Normal file
348
src/views/year_evaluation/examine.vue
Normal file
@ -0,0 +1,348 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<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="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-tab v-model="tab_id" type="brief" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
|
||||
<lay-table :page="page" height="600px" :columns="columns" :loading="loading"
|
||||
:data-source="dataSource" v-model:selected-keys="selectedKeys" @change="change">
|
||||
<template v-slot:scoringrecord_status="{row}">
|
||||
<lay-tag v-if="row.scoringrecord_status==1" type="primary">已自评</lay-tag>
|
||||
<lay-tag v-if="row.scoringrecord_status==2">未自评</lay-tag>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==1"
|
||||
@click="getInfo(row,1)">科室评分</span>
|
||||
<span style="color: #00A394;cursor: pointer" v-if="row.department_score_scoringrecord!=0 && row.scoringrecord_status==1"
|
||||
@click="getInfo(row,2)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.department_score_scoringrecord==0 && row.scoringrecord_status==2">考评详情</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-tab-item>
|
||||
</lay-tab>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px','100%']"
|
||||
:btn="addIsInfo==1?addButton:''">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-table :default-expand-all="true" ref="tableRef6" children-column-name="children" :columns="columns6"
|
||||
:data-source="dataSource6">
|
||||
<template v-slot:input="{ data,rowIndex}">
|
||||
<lay-input-number v-if="data.pid==0" :disabled="true" :min="0" :max="data.base_score"
|
||||
v-model="data.base_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="data.pid!=0" :disabled="addIsInfo==2" :min="0" :max="data.base_score"
|
||||
v-model="data.content_score"
|
||||
position="right"></lay-input-number>
|
||||
</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>
|
||||
</lay-table>
|
||||
</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
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
onMounted(() => {
|
||||
getLeftList();
|
||||
})
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
tab_id.value = d;
|
||||
dataSource.value = [];
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({current: 1, limit: 10, total: 1})
|
||||
const change = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
page.limit = d.limit;
|
||||
getList();
|
||||
}
|
||||
const addIsInfo = ref(1);
|
||||
const infoShow = ref(false);
|
||||
const yearmonth = ref();
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: page.current,
|
||||
size: page.limit
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
console.log(row);
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
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;
|
||||
} 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;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const group_id = ref(1);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2})
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
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', align: 'center'},
|
||||
{title: '工号', width: '100px', key: 'work_number', align: 'center'},
|
||||
{title: '部门', width: '120px', key: 'group_name', align: 'center'},
|
||||
{title: '年度总加分', width: '100px', key: 'zongjiafen', align: 'center'},
|
||||
{title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center'},
|
||||
{title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center'},
|
||||
{title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center'},
|
||||
{
|
||||
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({
|
||||
'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 columns6 = [
|
||||
{
|
||||
title: "考评项目",
|
||||
width: "300px",
|
||||
key: "project_name"
|
||||
},
|
||||
{
|
||||
title: "分值",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
key: "base_score"
|
||||
},
|
||||
{
|
||||
title: "自评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'input',
|
||||
key: "input"
|
||||
},
|
||||
{
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'ksinput',
|
||||
key: "ksinput"
|
||||
}
|
||||
]
|
||||
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;
|
||||
}
|
||||
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user