forked from integrated_whb/integrated_whb_vue
init
parent
7ed384d478
commit
e181a0ef35
|
@ -641,6 +641,42 @@ export default [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/performance_appraisal",
|
||||||
|
redirect: "/performance_appraisal/departmental",
|
||||||
|
meta: { title: "绩效考核", model: MODEL["1"] },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/performance_appraisal/departmental",
|
||||||
|
meta: { title: "部门绩效", isSubMenu: false },
|
||||||
|
component: "performance_appraisal/departmental/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/performance_appraisal/personnel",
|
||||||
|
meta: { title: "人员绩效", isSubMenu: false },
|
||||||
|
component: "performance_appraisal/personnel/index",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/workforce_management",
|
||||||
|
meta: { title: "排班管理", model: MODEL["1"], isSubMenu: false },
|
||||||
|
component: "workforce_management/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/off_duty_management",
|
||||||
|
redirect: "/off_duty_management/leave",
|
||||||
|
meta: { title: "离岗管理", model: MODEL["1"] },
|
||||||
|
component: "children",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/off_duty_management/leave",
|
||||||
|
meta: { title: "离岗管理", isSubMenu: false },
|
||||||
|
component: "off_duty_management/leave/index",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/platform_resource_library",
|
path: "/platform_resource_library",
|
||||||
redirect: "/platform_resource_library/courseware",
|
redirect: "/platform_resource_library/courseware",
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-card>
|
<layout-card>
|
||||||
<div
|
<div v-for="item in 2" :key="item" :id="item === 2 ? 'printContent' : ''">
|
||||||
v-for="print in 2"
|
|
||||||
:key="print"
|
|
||||||
:id="print === 2 ? 'printContent' : ''"
|
|
||||||
>
|
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="tc mt-10" v-if="entrance === 'archive'">
|
<div class="tc mt-10" v-if="print">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-print="printObj"
|
v-print="printObj"
|
||||||
|
@ -18,27 +14,42 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="fnPrint">打印</el-button>
|
<el-button type="primary" @click="fnPrint">打印</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-html="PRINT_STYLE" v-if="direction === 'horizontal'" />
|
||||||
</layout-card>
|
</layout-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import usePrint from "@/assets/js/usePrint.js";
|
import usePrint from "@/assets/js/usePrint.js";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "LayoutPrintTablePackage",
|
name: "LayoutPrintTablePackage",
|
||||||
});
|
});
|
||||||
defineProps({
|
const props = defineProps({
|
||||||
entrance: {
|
print: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
direction: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "vertical",
|
||||||
|
validator: (value) => {
|
||||||
|
if (["vertical", "horizontal"].includes(value)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
throw new Error('direction必须是"vertical"或"horizontal"');
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const width = ref(props.direction === "vertical" ? "210mm" : "297mm");
|
||||||
const { fnPrint, printObj, buttonRef } = usePrint();
|
const { fnPrint, printObj, buttonRef } = usePrint();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
#printContent {
|
#printContent {
|
||||||
width: 210mm;
|
width: v-bind(width);
|
||||||
margin: auto;
|
margin: auto;
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -57,7 +68,8 @@ const { fnPrint, printObj, buttonRef } = usePrint();
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
td {
|
td,
|
||||||
|
th {
|
||||||
border: 1px solid var(--el-border-color);
|
border: 1px solid var(--el-border-color);
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getLeaveList = (params) => post("/offduty/list", params); // 离岗管理列表
|
||||||
|
export const getLeaveView = (params) => post("/offduty/goEdit", params); // 离岗管理查看
|
||||||
|
export const setLeaveEdit = (params) => post("/offduty/edit", params); // 离岗管理修改
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getDepartmentalList = (params) =>
|
||||||
|
post("/performanceexamine_dept/list", params); // 部门绩效列表
|
||||||
|
export const getPersonnelList = (params) =>
|
||||||
|
post("/performanceexamine_user/list", params); // 人员绩效列表
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getWorkforceManagementList = (params) =>
|
||||||
|
post("/shiftworkrules/list", params); // 排班管理列表
|
||||||
|
export const setWorkforceManagementDeleteOne = (params) =>
|
||||||
|
post("/shiftworkrules/deleteOne", params); // 排班管理一级列表删除
|
||||||
|
export const setWorkforceManagementDeleteTwo = (params) =>
|
||||||
|
post("/shiftworkrules/deleteTwo", params); // 排班管理二级列表删除
|
||||||
|
export const setWorkforceManagementAdd = (params) =>
|
||||||
|
post("/shiftworkrules/add", params); // 排班管理添加
|
||||||
|
export const setWorkforceManagementEdit = (params) =>
|
||||||
|
post("/shiftworkrules/edit", params); // 排班管理修改
|
||||||
|
export const getWorkforceManagementView = (params) =>
|
||||||
|
post("/shiftworkrules/goEdit", params); // 排班管理查看
|
||||||
|
export const getWorkforceManagementIsUse = (params) =>
|
||||||
|
post("/shiftworkrules/isUseTwo", params); // 排班管理查看是否正在使用
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package entrance="archive">
|
<layout-print-table-package>
|
||||||
<div class="print_use">
|
<div class="print_use">
|
||||||
<div class="tr mt-30">
|
<div class="tr mt-30">
|
||||||
<span>档案编号:</span>
|
<span>档案编号:</span>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -368,7 +368,7 @@
|
||||||
<td>{{ month }}</td>
|
<td>{{ month }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{
|
{{
|
||||||
computeLevel(
|
fnComputeLevel(
|
||||||
item.SCORE1 +
|
item.SCORE1 +
|
||||||
item.SCORE2 +
|
item.SCORE2 +
|
||||||
item.SCORE3 +
|
item.SCORE3 +
|
||||||
|
@ -423,7 +423,7 @@
|
||||||
<td>{{ showDate }}</td>
|
<td>{{ showDate }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{
|
{{
|
||||||
computeLevel(
|
fnComputeLevel(
|
||||||
item.SCORE1 +
|
item.SCORE1 +
|
||||||
item.SCORE2 +
|
item.SCORE2 +
|
||||||
item.SCORE3 +
|
item.SCORE3 +
|
||||||
|
@ -585,7 +585,7 @@ const fnGetConclusion = async () => {
|
||||||
data.corp_advice_all = resDataAll.varList.map((item) => item.ADVICE_DATE);
|
data.corp_advice_all = resDataAll.varList.map((item) => item.ADVICE_DATE);
|
||||||
};
|
};
|
||||||
fnGetConclusion();
|
fnGetConclusion();
|
||||||
const computeLevel = (total) => {
|
const fnComputeLevel = (total) => {
|
||||||
if (total >= 75) return "一级";
|
if (total >= 75) return "一级";
|
||||||
else if (total >= 50) return "二级";
|
else if (total >= 50) return "二级";
|
||||||
else if (total >= 25) return "三级";
|
else if (total >= 25) return "三级";
|
||||||
|
|
|
@ -179,8 +179,6 @@
|
||||||
<el-radio label="0">否</el-radio>
|
<el-radio label="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="item"
|
|
||||||
effect="dark"
|
|
||||||
content="温馨提示:部门领导可以审核离岗申请,查看同部门清单数据"
|
content="温馨提示:部门领导可以审核离岗申请,查看同部门清单数据"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
title="离岗时间调整"
|
||||||
|
:on-close="fnClose"
|
||||||
|
width="600"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="离岗申请时间" prop="offdutyDates">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.offdutyDates"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">关闭</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { setLeaveEdit } from "@/request/off_duty_management.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const rules = {
|
||||||
|
offdutyDates: [
|
||||||
|
{ required: true, message: "请选择离岗申请时间", trigger: "change" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
await setLeaveEdit({
|
||||||
|
OFFDUTY_ID: form.value.OFFDUTY_ID,
|
||||||
|
STARTTIME: form.value.offdutyDates[0],
|
||||||
|
ENDTIME: form.value.offdutyDates[1],
|
||||||
|
});
|
||||||
|
fnClose();
|
||||||
|
ElMessage.success("提交成功");
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,66 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog title="离岗详情" v-model="visible">
|
||||||
|
<el-descriptions :column="1" border>
|
||||||
|
<el-descriptions-item label="部门">
|
||||||
|
{{ info.DEPARTMENTNAME_ALL }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="岗位">
|
||||||
|
{{ info.POSTNAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="姓名">
|
||||||
|
{{ info.USER_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="离岗申请时间">
|
||||||
|
{{ info.STARTTIME }}-{{ info.ENDTIME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="离岗原因">
|
||||||
|
{{ info.DESCR }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="审批状态">
|
||||||
|
<div v-if="info.REVIEW_STATUS === '0'">待审批</div>
|
||||||
|
<div v-else-if="info.REVIEW_STATUS === '1'">审批通过</div>
|
||||||
|
<div v-else-if="info.ISDELETE === '1' && info.REVIEW_STATUS === '-1'">
|
||||||
|
<div v-if="info.CREATOR === info.OPERATOR">申请人取消</div>
|
||||||
|
<div v-else>审批人取消</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="info.REVIEW_STATUS === '-1'">审批打回</div>
|
||||||
|
<div v-else-if="info.REVIEW_STATUS === '2'">无需审批</div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="审批人" v-if="info.REVIEW_STATUS !== '2'">
|
||||||
|
{{
|
||||||
|
info.REVIEW_USER_NAME + " [" + info.REVIEW_USER_DEPARTMENTNAME + "]"
|
||||||
|
}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
:label="info.ISDELETE === '0' ? '审批意见' : '取消原因'"
|
||||||
|
v-if="info.REVIEW_STATUS === '1' || info.REVIEW_STATUS === '-1'"
|
||||||
|
>
|
||||||
|
{{ info.REVIEW_DESC }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,243 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="90px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="申请人" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="离岗时间" prop="dates">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.dates"
|
||||||
|
type="daterange"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
range-separator="至"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="离岗状态" prop="REVIEW_STATUS">
|
||||||
|
<el-select v-model="searchForm.REVIEW_STATUS">
|
||||||
|
<el-option
|
||||||
|
v-for="item in stateList"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.ID"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="审批人" prop="REVIEW_USER_NAME">
|
||||||
|
<el-input v-model="searchForm.REVIEW_USER_NAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="DEPARTMENTNAME_ALL" label="部门" />
|
||||||
|
<el-table-column prop="POSTNAME" label="岗位" />
|
||||||
|
<el-table-column prop="USER_NAME" label="姓名" />
|
||||||
|
<el-table-column label="申请状态">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<div v-if="row.REVIEW_STATUS === '0'">待审批</div>
|
||||||
|
<div v-else-if="row.REVIEW_STATUS === '1'">审批通过</div>
|
||||||
|
<div v-else-if="row.ISDELETE === '1' && row.REVIEW_STATUS === '-1'">
|
||||||
|
<div v-if="row.CREATOR === row.OPERATOR">申请人取消</div>
|
||||||
|
<div v-else>审批人取消</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="row.REVIEW_STATUS === '-1'">审批打回</div>
|
||||||
|
<div v-else-if="row.REVIEW_STATUS === '2'">无需审批</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="离岗时间">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<div>{{ row.STARTTIME }} 至 {{ row.ENDTIME }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="指定审批人">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<div v-if="row.REVIEW_USER_ID">
|
||||||
|
{{
|
||||||
|
row.REVIEW_USER_NAME +
|
||||||
|
" [" +
|
||||||
|
row.REVIEW_USER_DEPARTMENTNAME +
|
||||||
|
"]"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="260">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" text link @click="fnView(row)">
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="
|
||||||
|
buttonJurisdiction.edit &&
|
||||||
|
row.REVIEW_STATUS === '0' &&
|
||||||
|
row.STARTTIME >= currentDate &&
|
||||||
|
row.USER_ID === USER_ID
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnEdit(row.OFFDUTY_ID)"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="
|
||||||
|
buttonJurisdiction.edit &&
|
||||||
|
ISMAIN === '1' &&
|
||||||
|
row.ENDTIME >= currentDate
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnTimeAdjustment(row.OFFDUTY_ID)"
|
||||||
|
>
|
||||||
|
时间调整
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="
|
||||||
|
row.REVIEW_STATUS === '0' &&
|
||||||
|
row.ENDTIME >= currentDate &&
|
||||||
|
(row.REVIEW_USER_ID === USER_ID ||
|
||||||
|
(!row.REVIEW_USER_ID && ISLEADER === '1'))
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="handleReview(row.OFFDUTY_ID)"
|
||||||
|
>
|
||||||
|
审批
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="
|
||||||
|
row.REVIEW_STATUS === '0' &&
|
||||||
|
row.STARTTIME >= currentDate &&
|
||||||
|
(row.REVIEW_USER_ID === USER_ID || row.USER_ID === USER_ID)
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="handleCancel(row.OFFDUTY_ID)"
|
||||||
|
>
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<view-info
|
||||||
|
v-model:visible="data.viewDialog.visible"
|
||||||
|
:info="data.viewDialog.info"
|
||||||
|
/>
|
||||||
|
<time-adjustment
|
||||||
|
v-model:visible="data.timeAdjustmentDialog.visible"
|
||||||
|
v-model:form="data.timeAdjustmentDialog.form"
|
||||||
|
@get-data="fnResetPaginationTransfer"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { getLeaveList, getLeaveView } from "@/request/off_duty_management.js";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { useUserStore } from "@/pinia/user.js";
|
||||||
|
import { nextTick, reactive } from "vue";
|
||||||
|
import ViewInfo from "./components/view.vue";
|
||||||
|
import TimeAdjustment from "./components/time_adjustment.vue";
|
||||||
|
|
||||||
|
const stateList = [
|
||||||
|
{ ID: "0", NAME: "待审批" },
|
||||||
|
{ ID: "1", NAME: "审批通过" },
|
||||||
|
{ ID: "-1", NAME: "审批打回" },
|
||||||
|
{ ID: "2", NAME: "无需审批" },
|
||||||
|
{ ID: "3", NAME: "申请人取消" },
|
||||||
|
{ ID: "4", NAME: "审批人取消" },
|
||||||
|
];
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const currentDate = dayjs().format("YYYY-MM-DD");
|
||||||
|
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||||
|
const ISLEADER = userStore.getUserInfo.ISLEADER;
|
||||||
|
const ISMAIN = userStore.getUserInfo.ISMAIN;
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getLeaveList, {
|
||||||
|
otherParams: { TYPE: "edit" },
|
||||||
|
});
|
||||||
|
const data = reactive({
|
||||||
|
viewDialog: {
|
||||||
|
visible: false,
|
||||||
|
info: {},
|
||||||
|
},
|
||||||
|
timeAdjustmentDialog: {
|
||||||
|
visible: false,
|
||||||
|
form: {
|
||||||
|
offdutyDates: [],
|
||||||
|
OFFDUTY_ID: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("offduty");
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
STARTTIME: searchForm.value.dates?.[0],
|
||||||
|
ENDTIME: searchForm.value.dates?.[1],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
STARTTIME: searchForm.value.dates?.[0],
|
||||||
|
ENDTIME: searchForm.value.dates?.[1],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnView = (row) => {
|
||||||
|
data.viewDialog.visible = true;
|
||||||
|
data.viewDialog.info = row;
|
||||||
|
};
|
||||||
|
const fnTimeAdjustment = async (OFFDUTY_ID) => {
|
||||||
|
data.timeAdjustmentDialog.visible = true;
|
||||||
|
await nextTick();
|
||||||
|
const resData = await getLeaveView({ OFFDUTY_ID });
|
||||||
|
data.timeAdjustmentDialog.form.offdutyDates = [
|
||||||
|
resData.pd.STARTTIME,
|
||||||
|
resData.pd.ENDTIME,
|
||||||
|
];
|
||||||
|
data.timeAdjustmentDialog.form.OFFDUTY_ID = OFFDUTY_ID;
|
||||||
|
};
|
||||||
|
const fnEdit = async () => {};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="考核标准">
|
||||||
|
<layout-table :data="list" :show-pagination="false">
|
||||||
|
<el-table-column prop="index" label="序号" width="80" />
|
||||||
|
<el-table-column prop="item" label="考核项" width="150" />
|
||||||
|
<el-table-column prop="rules" label="考核细则" />
|
||||||
|
<el-table-column prop="score" label="分值设定" width="80" />
|
||||||
|
</layout-table>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
|
const list = [
|
||||||
|
{
|
||||||
|
index: 1,
|
||||||
|
item: "发现隐患",
|
||||||
|
rules: "部门发现隐患数除以部门人数,乘以设定分值,最高分不可超过设定分值。",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 2,
|
||||||
|
item: "隐患整改",
|
||||||
|
rules: "部门整改隐患数除以部门人数,乘以设定分数,最高分不可超过设定分值。",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 3,
|
||||||
|
item: "检查得分",
|
||||||
|
rules: "部门清单检查率乘以设定分值",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 4,
|
||||||
|
item: "培训得分",
|
||||||
|
rules: "部门人员数除以参与培训人员数,乘以设定分值。",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 5,
|
||||||
|
item: "风险辨识完善得分",
|
||||||
|
rules: "部门内人员通过隐患辨识重新辨识风险数,乘以设定分值,",
|
||||||
|
score: "2",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,217 @@
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="70px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" placeholder="请输入关键字" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="部门" prop="DEPTIDS">
|
||||||
|
<layout-department
|
||||||
|
v-model="searchForm.DEPTIDS"
|
||||||
|
multiple
|
||||||
|
show-checkbox
|
||||||
|
collapse-tags
|
||||||
|
root-disabled="Y"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="等级" label-width="50px">
|
||||||
|
<el-select v-model="searchForm.LEVEL">
|
||||||
|
<el-option label="一级" value="1" />
|
||||||
|
<el-option label="二级" value="2" />
|
||||||
|
<el-option label="三级" value="3" />
|
||||||
|
<el-option label="四级" value="4" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<slot :searchForm="searchForm" />
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="type === 'season' ? 2 : 4">
|
||||||
|
<el-form-item label-width="10px" class="end">
|
||||||
|
<el-button @click="emits('assessment-standards')">
|
||||||
|
考核标准
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="70">
|
||||||
|
<template v-slot="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="DEPT_NAME_ALL" label="部门" />
|
||||||
|
<el-table-column label="发现隐患">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
发现隐患
|
||||||
|
<el-tooltip
|
||||||
|
content="部门发现隐患数除以部门人数,乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE1.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="隐患整改">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
隐患整改
|
||||||
|
<el-tooltip
|
||||||
|
content="部门整改隐患数除以部门人数,乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE2.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检查得分">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
检查得分
|
||||||
|
<el-tooltip
|
||||||
|
content="部门清单检查率乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE3.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="培训得分">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
培训得分
|
||||||
|
<el-tooltip
|
||||||
|
content="部门人员数除以参与培训人员数,乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE4.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="风险辨识完善得分">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
风险辨识完善得分
|
||||||
|
<el-tooltip
|
||||||
|
content="部门内人员通过隐患辨识重新辨识风险数,乘以2。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE5.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考核日期">
|
||||||
|
{{ currentDate }}
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考核等级" width="200">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
{{
|
||||||
|
fnComputeLevel(
|
||||||
|
row.SCORE1 + row.SCORE2 + row.SCORE3 + row.SCORE4 + row.SCORE5
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计" width="200">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
{{
|
||||||
|
(
|
||||||
|
row.SCORE1 +
|
||||||
|
row.SCORE2 +
|
||||||
|
row.SCORE3 +
|
||||||
|
row.SCORE4 +
|
||||||
|
row.SCORE5
|
||||||
|
).toFixed(2)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import { serialNumber } from "@/assets/js/utils.js";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { getDepartmentalList } from "@/request/performance_appraisal.js";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
||||||
|
|
||||||
|
dayjs.extend(quarterOfYear);
|
||||||
|
const props = defineProps({
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["assessment-standards"]);
|
||||||
|
const currentDate = ref("");
|
||||||
|
const defaultSearchForm = {};
|
||||||
|
if (props.type === "month") {
|
||||||
|
currentDate.value = dayjs().format("YYYY-MM");
|
||||||
|
defaultSearchForm.MONTH = currentDate.value;
|
||||||
|
} else if (props.type === "year") {
|
||||||
|
currentDate.value = dayjs().format("YYYY");
|
||||||
|
defaultSearchForm.YEAR = currentDate.value;
|
||||||
|
} else if (props.type === "season") {
|
||||||
|
defaultSearchForm.YEAR = dayjs().format("YYYY");
|
||||||
|
defaultSearchForm.QUARTER = dayjs().quarter();
|
||||||
|
}
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData } =
|
||||||
|
useListData(getDepartmentalList, {
|
||||||
|
defaultSearchForm,
|
||||||
|
callbackFn: () => {
|
||||||
|
currentDate.value = searchForm.value.MONTH;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnComputeLevel = (total) => {
|
||||||
|
if (total >= 75) return "一级";
|
||||||
|
else if (total >= 50) return "二级";
|
||||||
|
else if (total >= 25) return "三级";
|
||||||
|
else return "四级";
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,101 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-tabs v-model="name" @tab-change="fnTabChange">
|
||||||
|
<el-tab-pane label="年度考核" name="year" lazy>
|
||||||
|
<list @assessment-standards="fnAssessmentStandards" type="year">
|
||||||
|
<template v-slot="{ searchForm }">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="时间" prop="YEAR">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.YEAR"
|
||||||
|
type="year"
|
||||||
|
range-separator="至"
|
||||||
|
value-format="YYYY"
|
||||||
|
format="YYYY"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</list>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="季度考核" name="season" lazy>
|
||||||
|
<list @assessment-standards="fnAssessmentStandards" type="season">
|
||||||
|
<template v-slot="{ searchForm }">
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-form-item label="年" prop="YEAR">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.YEAR"
|
||||||
|
type="year"
|
||||||
|
range-separator="至"
|
||||||
|
value-format="YYYY"
|
||||||
|
format="YYYY"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-form-item label="季度" prop="QUARTER">
|
||||||
|
<el-select v-model="searchForm.QUARTER">
|
||||||
|
<el-option label="一季度" :value="1" />
|
||||||
|
<el-option label="二季度" :value="2" />
|
||||||
|
<el-option label="三季度" :value="3" />
|
||||||
|
<el-option label="四季度" :value="4" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</list>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="月度考核" name="month" lazy>
|
||||||
|
<list @assessment-standards="fnAssessmentStandards" type="month">
|
||||||
|
<template v-slot="{ searchForm }">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="时间" prop="MONTH">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.MONTH"
|
||||||
|
type="month"
|
||||||
|
range-separator="至"
|
||||||
|
value-format="YYYY-MM"
|
||||||
|
format="YYYY-MM"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</list>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<assessment-standards v-model:visible="assessmentStandardsVisible" />
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
import List from "./components/list.vue";
|
||||||
|
import AssessmentStandards from "./components/assessment_standards.vue";
|
||||||
|
import { useRouter, useRoute, onBeforeRouteUpdate } from "vue-router";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const defaultName = "month";
|
||||||
|
const name = ref(route.query.name || defaultName);
|
||||||
|
const assessmentStandardsVisible = ref(false);
|
||||||
|
onBeforeRouteUpdate((to, from, next) => {
|
||||||
|
name.value = to.query.name || defaultName;
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
const fnTabChange = (name) => {
|
||||||
|
router.push({
|
||||||
|
path: "/performance_appraisal/departmental",
|
||||||
|
query: {
|
||||||
|
name,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnAssessmentStandards = () => {
|
||||||
|
assessmentStandardsVisible.value = true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,61 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="考核标准">
|
||||||
|
<layout-table :data="list" :show-pagination="false">
|
||||||
|
<el-table-column prop="index" label="序号" width="80" />
|
||||||
|
<el-table-column prop="item" label="考核项" width="150" />
|
||||||
|
<el-table-column prop="rules" label="考核细则" />
|
||||||
|
<el-table-column prop="score" label="分值设定" width="80" />
|
||||||
|
</layout-table>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
|
const list = [
|
||||||
|
{
|
||||||
|
index: 1,
|
||||||
|
item: "发现隐患",
|
||||||
|
rules: "发现隐患数,乘以设定分值,最高分不可超过设定分值。",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 2,
|
||||||
|
item: "隐患整改",
|
||||||
|
rules: "整改隐患数,乘以设定分数,最高分不可超过设定分值。",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 3,
|
||||||
|
item: "检查得分",
|
||||||
|
rules: "负责清单检查完成率乘以设定分值数。",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 4,
|
||||||
|
item: "培训得分",
|
||||||
|
rules: "培训通过次数除以参与培训次数,乘以设定分值数。",
|
||||||
|
score: "20",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: 5,
|
||||||
|
item: "风险辨识完善得分",
|
||||||
|
rules: "通过隐患辨识重新辨识风险数,乘以设定分值,",
|
||||||
|
score: "2",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,218 @@
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="70px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" placeholder="请输入关键字" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="部门" prop="DEPTIDS">
|
||||||
|
<layout-department
|
||||||
|
v-model="searchForm.DEPTIDS"
|
||||||
|
multiple
|
||||||
|
show-checkbox
|
||||||
|
collapse-tags
|
||||||
|
root-disabled="Y"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="等级" label-width="50px">
|
||||||
|
<el-select v-model="searchForm.LEVEL">
|
||||||
|
<el-option label="一级" value="1" />
|
||||||
|
<el-option label="二级" value="2" />
|
||||||
|
<el-option label="三级" value="3" />
|
||||||
|
<el-option label="四级" value="4" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<slot :searchForm="searchForm" />
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="type === 'season' ? 2 : 4">
|
||||||
|
<el-form-item label-width="10px" class="end">
|
||||||
|
<el-button @click="emits('assessment-standards')">
|
||||||
|
考核标准
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="70">
|
||||||
|
<template v-slot="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="DEPT_NAME_ALL" label="部门" />
|
||||||
|
<el-table-column prop="USER_NAME" label="人员" />
|
||||||
|
<el-table-column label="发现隐患">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
发现隐患
|
||||||
|
<el-tooltip
|
||||||
|
content="发现隐患数,乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE1.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="隐患整改">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
隐患整改
|
||||||
|
<el-tooltip
|
||||||
|
content="整改隐患数,乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE2.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检查得分">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
检查得分
|
||||||
|
<el-tooltip
|
||||||
|
content="负责清单检查完成率乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE3.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="培训得分">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
培训得分
|
||||||
|
<el-tooltip
|
||||||
|
content="培训通过次数除以参与培训次数,乘以20,最高分不可超过20。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE4.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="风险辨识完善得分">
|
||||||
|
<template v-slot:header>
|
||||||
|
<span>
|
||||||
|
风险辨识完善得分
|
||||||
|
<el-tooltip
|
||||||
|
content="通过隐患辨识重新辨识风险数,乘以2。"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-slot="{ row }">{{ row.SCORE5.toFixed(2) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考核日期">
|
||||||
|
{{ currentDate }}
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="考核等级" width="200">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
{{
|
||||||
|
fnComputeLevel(
|
||||||
|
row.SCORE1 + row.SCORE2 + row.SCORE3 + row.SCORE4 + row.SCORE5
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计" width="200">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
{{
|
||||||
|
(
|
||||||
|
row.SCORE1 +
|
||||||
|
row.SCORE2 +
|
||||||
|
row.SCORE3 +
|
||||||
|
row.SCORE4 +
|
||||||
|
row.SCORE5
|
||||||
|
).toFixed(2)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import { serialNumber } from "@/assets/js/utils.js";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { getPersonnelList } from "@/request/performance_appraisal.js";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
||||||
|
|
||||||
|
dayjs.extend(quarterOfYear);
|
||||||
|
const props = defineProps({
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["assessment-standards"]);
|
||||||
|
const currentDate = ref("");
|
||||||
|
const defaultSearchForm = {};
|
||||||
|
if (props.type === "month") {
|
||||||
|
currentDate.value = dayjs().format("YYYY-MM");
|
||||||
|
defaultSearchForm.MONTH = currentDate.value;
|
||||||
|
} else if (props.type === "year") {
|
||||||
|
currentDate.value = dayjs().format("YYYY");
|
||||||
|
defaultSearchForm.YEAR = currentDate.value;
|
||||||
|
} else if (props.type === "season") {
|
||||||
|
defaultSearchForm.YEAR = dayjs().format("YYYY");
|
||||||
|
defaultSearchForm.QUARTER = dayjs().quarter();
|
||||||
|
}
|
||||||
|
const { list, pagination, searchForm, fnResetPagination, fnGetData } =
|
||||||
|
useListData(getPersonnelList, {
|
||||||
|
defaultSearchForm,
|
||||||
|
callbackFn: () => {
|
||||||
|
currentDate.value = searchForm.value.MONTH;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnComputeLevel = (total) => {
|
||||||
|
if (total >= 75) return "一级";
|
||||||
|
else if (total >= 50) return "二级";
|
||||||
|
else if (total >= 25) return "三级";
|
||||||
|
else return "四级";
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,101 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>
|
||||||
|
<el-tabs v-model="name" @tab-change="fnTabChange">
|
||||||
|
<el-tab-pane label="年度考核" name="year" lazy>
|
||||||
|
<list @assessment-standards="fnAssessmentStandards" type="year">
|
||||||
|
<template v-slot="{ searchForm }">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="时间" prop="YEAR">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.YEAR"
|
||||||
|
type="year"
|
||||||
|
range-separator="至"
|
||||||
|
value-format="YYYY"
|
||||||
|
format="YYYY"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</list>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="季度考核" name="season" lazy>
|
||||||
|
<list @assessment-standards="fnAssessmentStandards" type="season">
|
||||||
|
<template v-slot="{ searchForm }">
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-form-item label="年" prop="YEAR">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.YEAR"
|
||||||
|
type="year"
|
||||||
|
range-separator="至"
|
||||||
|
value-format="YYYY"
|
||||||
|
format="YYYY"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-form-item label="季度" prop="QUARTER">
|
||||||
|
<el-select v-model="searchForm.QUARTER">
|
||||||
|
<el-option label="一季度" :value="1" />
|
||||||
|
<el-option label="二季度" :value="2" />
|
||||||
|
<el-option label="三季度" :value="3" />
|
||||||
|
<el-option label="四季度" :value="4" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</list>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="月度考核" name="month" lazy>
|
||||||
|
<list @assessment-standards="fnAssessmentStandards" type="month">
|
||||||
|
<template v-slot="{ searchForm }">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="时间" prop="MONTH">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchForm.MONTH"
|
||||||
|
type="month"
|
||||||
|
range-separator="至"
|
||||||
|
value-format="YYYY-MM"
|
||||||
|
format="YYYY-MM"
|
||||||
|
:clearable="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</list>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<assessment-standards v-model:visible="assessmentStandardsVisible" />
|
||||||
|
</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
import List from "./components/list.vue";
|
||||||
|
import AssessmentStandards from "./components/assessment_standards.vue";
|
||||||
|
import { useRouter, useRoute, onBeforeRouteUpdate } from "vue-router";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const defaultName = "month";
|
||||||
|
const name = ref(route.query.name || defaultName);
|
||||||
|
const assessmentStandardsVisible = ref(false);
|
||||||
|
onBeforeRouteUpdate((to, from, next) => {
|
||||||
|
name.value = to.query.name || defaultName;
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
const fnTabChange = (name) => {
|
||||||
|
router.push({
|
||||||
|
path: "/performance_appraisal/departmental",
|
||||||
|
query: {
|
||||||
|
name,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnAssessmentStandards = () => {
|
||||||
|
assessmentStandardsVisible.value = true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -23,7 +23,7 @@
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import useListData from "@/assets/js/useListData.js";
|
import useListData from "@/assets/js/useListData.js";
|
||||||
import { getRiskControlLedgerAllocationList } from "@/request/risk_control.js";
|
import { getRiskControlLedgerAllocationList } from "@/request/risk_control.js";
|
||||||
import { reactive } from "vue";
|
import { nextTick, reactive } from "vue";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import AllocationEdit from "./components/allocation_edit.vue";
|
import AllocationEdit from "./components/allocation_edit.vue";
|
||||||
|
|
||||||
|
@ -41,8 +41,9 @@ const data = reactive({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const fnEdit = (row) => {
|
const fnEdit = async (row) => {
|
||||||
data.editDialog.visible = true;
|
data.editDialog.visible = true;
|
||||||
|
await nextTick();
|
||||||
data.editDialog.form = cloneDeep(row);
|
data.editDialog.form = cloneDeep(row);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<layout-print-table-package :entrance="entrance">
|
<layout-print-table-package :print="entrance === 'archive'">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
:title="type === 'add' ? '新增' : '修改'"
|
||||||
|
:on-close="fnClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||||
|
<el-form-item label="名称" prop="NAME">
|
||||||
|
<el-input v-model="form.NAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">关闭</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit">提交</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import {
|
||||||
|
setWorkforceManagementAdd,
|
||||||
|
setWorkforceManagementEdit,
|
||||||
|
} from "@/request/workforce_management.js";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const rules = {
|
||||||
|
NAME: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||||
|
};
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
const params = {
|
||||||
|
...form.value,
|
||||||
|
ISCUSTOM: "0",
|
||||||
|
LEVEL: "1",
|
||||||
|
PARENTID: "0",
|
||||||
|
};
|
||||||
|
if (props.type === "add") await setWorkforceManagementAdd(params);
|
||||||
|
else await setWorkforceManagementEdit(params);
|
||||||
|
fnClose();
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,162 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
:title="type === 'add' ? '新增' : '修改'"
|
||||||
|
:on-close="fnClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="名称" prop="NAME">
|
||||||
|
<el-input v-model="form.NAME" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="自定义周期" prop="ISCUSTOM">
|
||||||
|
<el-radio-group v-model="form.ISCUSTOM" @change="fnIsCustomChange">
|
||||||
|
<el-radio label="0">否</el-radio>
|
||||||
|
<el-radio label="1">是</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<template v-if="form.ISCUSTOM === '1'">
|
||||||
|
<el-col
|
||||||
|
:span="24"
|
||||||
|
v-for="(item, index) in form.periodList"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item
|
||||||
|
label="上班天数"
|
||||||
|
:prop="'periodList.' + index + '.ONDAY'"
|
||||||
|
:rules="{
|
||||||
|
required: true,
|
||||||
|
message: '上班天数不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<el-input-number v-model="item.ONDAY" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item
|
||||||
|
label="休班天数"
|
||||||
|
:prop="'periodList.' + index + '.OFFDAY'"
|
||||||
|
:rules="{
|
||||||
|
required: true,
|
||||||
|
message: '休班天数不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<el-input-number v-model="item.OFFDAY" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button
|
||||||
|
v-if="index === 0"
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddSchedulingList"
|
||||||
|
>
|
||||||
|
添加
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="danger"
|
||||||
|
@click="form.periodList.splice(index, 1)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">关闭</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import {
|
||||||
|
setWorkforceManagementAdd,
|
||||||
|
setWorkforceManagementEdit,
|
||||||
|
} from "@/request/workforce_management.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
parentId: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const rules = {
|
||||||
|
NAME: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||||
|
ISCUSTOM: [
|
||||||
|
{ required: true, message: "自定义周期不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const formRef = ref(null);
|
||||||
|
const fnIsCustomChange = (event) => {
|
||||||
|
if (event === "0") form.value.periodList = [];
|
||||||
|
else fnAddSchedulingList();
|
||||||
|
};
|
||||||
|
const fnAddSchedulingList = () => {
|
||||||
|
form.value.periodList.push({
|
||||||
|
ONDAY: "",
|
||||||
|
OFFDAY: "",
|
||||||
|
id: Math.random(),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
const params = {
|
||||||
|
...form.value,
|
||||||
|
LEVEL: "2",
|
||||||
|
PARENTID: props.parentId,
|
||||||
|
periodList: JSON.stringify(form.value.periodList),
|
||||||
|
};
|
||||||
|
if (props.type === "add") await setWorkforceManagementAdd(params);
|
||||||
|
else await setWorkforceManagementEdit(params);
|
||||||
|
fnClose();
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,49 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="查看">
|
||||||
|
<el-descriptions border :column="2">
|
||||||
|
<el-descriptions-item label="名称">
|
||||||
|
{{ info.NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="自定义周期">
|
||||||
|
{{ info.ISCUSTOM === "0" ? "否" : "是" }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<template v-for="(item, index) in periodList" :key="index">
|
||||||
|
<el-descriptions-item label="上班天数">
|
||||||
|
{{ item.ONDAY }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="休班天数">
|
||||||
|
{{ item.OFFDAY }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</template>
|
||||||
|
</el-descriptions>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
periodList: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,255 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="50px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="名称" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="名称">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="parentId === '0'"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
router.push({
|
||||||
|
path: '/workforce_management',
|
||||||
|
query: {
|
||||||
|
parentId: row.SHIFTWORKRULES_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ row.NAME }}<el-icon><ArrowRight /></el-icon>
|
||||||
|
</el-button>
|
||||||
|
<span v-else>{{ row.NAME }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
v-if="parentId !== '0'"
|
||||||
|
@click="fnView(row.SHIFTWORKRULES_ID)"
|
||||||
|
>
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.edit"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.SHIFTWORKRULES_ID, 'edit')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.del"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnDelete(row.SHIFTWORKRULES_ID)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button
|
||||||
|
v-if="buttonJurisdiction.add"
|
||||||
|
type="primary"
|
||||||
|
@click="fnAddOrEdit('', 'add')"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="parentId !== '0'" @click="router.back">
|
||||||
|
返回
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<view-info
|
||||||
|
:period-list="data.viewDialog.periodList"
|
||||||
|
:info="data.viewDialog.info"
|
||||||
|
v-model:visible="data.viewDialog.visible"
|
||||||
|
/>
|
||||||
|
<add-one
|
||||||
|
v-model:visible="data.addOrEditOneDialog.visible"
|
||||||
|
v-model:form="data.addOrEditOneDialog.form"
|
||||||
|
:type="data.addOrEditOneDialog.type"
|
||||||
|
@get-data="fnResetPaginationTransfer"
|
||||||
|
/>
|
||||||
|
<add-two
|
||||||
|
v-model:visible="data.addOrEditTwoDialog.visible"
|
||||||
|
v-model:form="data.addOrEditTwoDialog.form"
|
||||||
|
:type="data.addOrEditTwoDialog.type"
|
||||||
|
:parent-id="parentId"
|
||||||
|
@get-data="fnResetPaginationTransfer"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { nextTick, reactive, ref } from "vue";
|
||||||
|
import LayoutTable from "@/components/table/index";
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import LayoutCard from "@/components/card/index.vue";
|
||||||
|
import {
|
||||||
|
getWorkforceManagementIsUse,
|
||||||
|
getWorkforceManagementList,
|
||||||
|
getWorkforceManagementView,
|
||||||
|
setWorkforceManagementDeleteOne,
|
||||||
|
setWorkforceManagementDeleteTwo,
|
||||||
|
} from "@/request/workforce_management.js";
|
||||||
|
import { ArrowRight } from "@element-plus/icons-vue";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
|
import { onBeforeRouteUpdate, useRoute, useRouter } from "vue-router";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import ViewInfo from "./components/view.vue";
|
||||||
|
import AddOne from "./components/add_one.vue";
|
||||||
|
import AddTwo from "./components/add_two.vue";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const parentIdDefault = "0";
|
||||||
|
const parentId = ref(route.query.parentId || parentIdDefault);
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getWorkforceManagementList, {
|
||||||
|
otherParams: {
|
||||||
|
PARENTID: parentId.value,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const data = reactive({
|
||||||
|
viewDialog: {
|
||||||
|
visible: false,
|
||||||
|
info: {},
|
||||||
|
periodList: [],
|
||||||
|
},
|
||||||
|
addOrEditOneDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {
|
||||||
|
NAME: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
addOrEditTwoDialog: {
|
||||||
|
visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {
|
||||||
|
NAME: "",
|
||||||
|
ISCUSTOM: "0",
|
||||||
|
periodList: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
PARENTID: parentId.value,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
PARENTID: parentId.value,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onBeforeRouteUpdate((to) => {
|
||||||
|
parentId.value = to.query.parentId || parentIdDefault;
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
});
|
||||||
|
const buttonJurisdiction = await useButtonJurisdiction("shiftworkrules");
|
||||||
|
const fnDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async (SHIFTWORKRULES_ID) => {
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
let resData = {};
|
||||||
|
if (parentId.value === "0")
|
||||||
|
resData = await setWorkforceManagementDeleteOne({
|
||||||
|
SHIFTWORKRULES_ID,
|
||||||
|
});
|
||||||
|
else
|
||||||
|
resData = await setWorkforceManagementDeleteTwo({
|
||||||
|
SHIFTWORKRULES_ID,
|
||||||
|
});
|
||||||
|
if (resData.type === "success") {
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
}
|
||||||
|
if (resData.type === "error")
|
||||||
|
ElMessage.error(
|
||||||
|
parentId.value === "0"
|
||||||
|
? "该类型还有下级类型,无法删除"
|
||||||
|
: "该类型还在使用中,无法删除"
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnView = async (SHIFTWORKRULES_ID) => {
|
||||||
|
const resData = await getWorkforceManagementView({ SHIFTWORKRULES_ID });
|
||||||
|
data.viewDialog.info = resData.pd;
|
||||||
|
data.viewDialog.periodList = resData.periodList;
|
||||||
|
data.viewDialog.visible = true;
|
||||||
|
};
|
||||||
|
const fnAddOrEdit = async (SHIFTWORKRULES_ID, type) => {
|
||||||
|
if (parentId.value === "0") {
|
||||||
|
data.addOrEditOneDialog.visible = true;
|
||||||
|
await nextTick();
|
||||||
|
data.addOrEditOneDialog.type = type;
|
||||||
|
if (type === "edit") {
|
||||||
|
const resData = await getWorkforceManagementView({ SHIFTWORKRULES_ID });
|
||||||
|
data.addOrEditOneDialog.form = resData.pd;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data.addOrEditTwoDialog.visible = true;
|
||||||
|
await nextTick();
|
||||||
|
data.addOrEditTwoDialog.type = type;
|
||||||
|
data.addOrEditTwoDialog.form.periodList = [];
|
||||||
|
if (type === "edit") {
|
||||||
|
const resData = await getWorkforceManagementIsUse({ SHIFTWORKRULES_ID });
|
||||||
|
if (resData.type === "success") {
|
||||||
|
const resData = await getWorkforceManagementView({ SHIFTWORKRULES_ID });
|
||||||
|
data.addOrEditTwoDialog.form = resData.pd;
|
||||||
|
data.addOrEditTwoDialog.form.periodList = resData.periodList;
|
||||||
|
}
|
||||||
|
if (resData.type === "error") {
|
||||||
|
ElMessage.error("该类型还在使用中,无法编辑");
|
||||||
|
data.addOrEditTwoDialog.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
Reference in New Issue