forked from integrated_whb/integrated_whb_vue
合并菜单
parent
edc013140f
commit
cabb170582
|
@ -188,6 +188,20 @@ export const layoutFnGetRiskClassification = async () => {
|
|||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 风险等级
|
||||
export const layoutFnGetRiskLevel = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "a178357ce6ce4d6a9ac95def6aca3a14",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 风险成因
|
||||
export const layoutFnGetRiskCauses = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "1bacbc4c1f6544718519c0d470dfeb62",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 排查项类型
|
||||
export const layoutFnGetDrivingType = async () => {
|
||||
const resData = await getLevels({
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
|
||||
export const setHazardAnalysisSubmit = (params) =>
|
||||
post("/riskpointanalysis/add", params); // 隐患分析提交
|
||||
export const getRiskAnalysisList = (params) =>
|
||||
post("/riskpointanalysis/list", params); // 风险分析列表
|
||||
export const setRiskAnalysisRepulse = (params) =>
|
||||
post("/riskpointanalysis/delete", params); // 风险分析打回
|
||||
export const setRiskAnalysisAdopt = (params) =>
|
||||
post("/riskpointanalysis/apply", params); // 风险分析通过
|
||||
export const getRiskAnalysisRecordList = (params) =>
|
||||
post("/riskpoint/getLogs", params); // 风险分析记录列表
|
||||
export const getRiskAnalysisRecordView = (params) =>
|
||||
post("/riskpointanalysis/getInfo", params); // 风险分析记录查看
|
||||
// 企业报告 start
|
||||
export const getEnterpriseReport1 = (params) =>
|
||||
post("/corpinfo/getDiagnosis", params);
|
||||
export const getEnterpriseReport2 = (params) =>
|
||||
post("/jobEvaluation/counlistPaget?showCount=1000¤tPage=1", params);
|
||||
export const getEnterpriseReport3 = (params) =>
|
||||
post("/studytask/list?showCount=100¤tPage=1", params);
|
||||
export const getEnterpriseReport4 = (params) =>
|
||||
post("/eightWork/getDiagnosis", params);
|
||||
export const getEnterpriseReport5 = (params) =>
|
||||
post("/performanceexamine_dept/listAll", params);
|
||||
export const getEnterpriseReport6 = (params) =>
|
||||
post("/performanceexamine_user/listAll", params);
|
||||
export const getEnterpriseReportConclusion = (params) =>
|
||||
post("/corpadvice/listAll", params); // 企业报告结论
|
||||
export const setEnterpriseReportConclusionEdit = (params) =>
|
||||
post("/corpadvice/edit", params); // 企业报告结论编辑
|
||||
export const setEnterpriseReportConclusionAdd = (params) =>
|
||||
post("/corpadvice/add", params); // 企业报告结论新增
|
||||
// 企业报告 end
|
|
@ -0,0 +1,14 @@
|
|||
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); // 离岗管理修改
|
||||
export const getApprovedByList = (params) =>
|
||||
post("/app/sys/listUserLeader", params); // 离岗管理获取审批人
|
||||
export const setLeaveReview = (params) => post("/offduty/review", params); // 离岗管理审批
|
||||
export const setLeaveCancel = (params) => post("/offduty/cancel", params); // 离岗管理取消
|
||||
export const getSettingList = (params) => post("/offdutySetup/list", params); // 离岗设置列表
|
||||
export const setSettingChange = (params) =>
|
||||
post("/offdutySetup/editSetup", params); // 离岗设置切换
|
||||
export const getRecordList = (params) => post("/offduty/list", params); // 离岗记录列表
|
||||
export const getLoginRecordList = (params) => post("/fhlog/getList", params); // 登录记录列表
|
|
@ -0,0 +1,17 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
|
||||
export const getChecklistInspectionRecordList = (params) =>
|
||||
post("/listmanager/recordListAll", params); // 清单检查记录列表
|
||||
export const getChecklistInspectionRecordDayInspectionList = (params) =>
|
||||
post("/listmanager/statisticsListCheckDay", params); // 清单检查记录日检列表-风险管控清单
|
||||
export const getCustomChecklistInspectionRecordDayInspectionList = (params) =>
|
||||
post("/hiddenstandardCustom/statisticsListCheckDay", params); // 清单检查记录日检列表-隐患排查清单
|
||||
export const getChecklistInspectionRecordWeekInspectionList = (params) =>
|
||||
post("/listmanager/statisticsListCheckWeek", params); // 清单检查记录周检列表-风险管控清单
|
||||
export const getCustomChecklistInspectionRecordWeekInspectionList = (params) =>
|
||||
post("/hiddenstandardCustom/statisticsListCheckWeek", params); // 清单检查记录周检列表-隐患排查清单
|
||||
export const getChecklistInspectionRecordTenDayInspectionList = (params) =>
|
||||
post("/listmanager/statisticsListCheckTenday", params); // 清单检查记录旬检列表-风险管控清单
|
||||
export const getCustomChecklistInspectionRecordTenDayInspectionList = (
|
||||
params
|
||||
) => post("/hiddenstandardCustom/statisticsListCheckTenday", 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); // 排班管理查看是否正在使用
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="请填写结论建议" @close="fnClose">
|
||||
<div>
|
||||
<el-input
|
||||
v-model="advice"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<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 { debounce } from "throttle-debounce";
|
||||
import {
|
||||
setEnterpriseReportConclusionAdd,
|
||||
setEnterpriseReportConclusionEdit,
|
||||
} from "@/request/continuous_improvement.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
advice: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
corpAdvice: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
month: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:advice", "submit"]);
|
||||
const { visible, advice } = useVModels(props, emits);
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
if (props.corpAdvice.CORPADVICE_ID) {
|
||||
await setEnterpriseReportConclusionEdit({
|
||||
...props.corpAdvice,
|
||||
ADVICE: advice.value,
|
||||
});
|
||||
} else {
|
||||
await setEnterpriseReportConclusionAdd({
|
||||
ADVICE_DATE: props.month,
|
||||
ADVICE: advice.value,
|
||||
});
|
||||
}
|
||||
fnClose();
|
||||
emits("submit");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,76 @@
|
|||
<template>
|
||||
<el-drawer v-model="visible" title="查看其他诊断书">
|
||||
<el-row>
|
||||
<el-col
|
||||
v-for="(item, index) in dateList"
|
||||
:key="index"
|
||||
:span="6"
|
||||
:offset="1"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
margin-top: 10px;
|
||||
border-radius: 10px;
|
||||
"
|
||||
:style="{
|
||||
background: adviceDate?.includes(item)
|
||||
? 'var(--el-border-color)'
|
||||
: 'var(--el-fill-color-light)',
|
||||
}"
|
||||
@click="fnCheck(item)"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
color: var(--el-text-color-regular);
|
||||
padding: 10px 0;
|
||||
border-radius: 10px;
|
||||
"
|
||||
:style="{
|
||||
background: item === month ? 'var(--el-color-primary)' : '',
|
||||
}"
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
dateList: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
adviceDate: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
month: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:month", "check"]);
|
||||
const { visible, month } = useVModels(props, emits);
|
||||
const fnCheck = (item) => {
|
||||
visible.value = false;
|
||||
month.value = item;
|
||||
emits("check");
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,781 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<div class="tr">
|
||||
<el-button v-print="'#printContainer'" type="primary">打印</el-button>
|
||||
</div>
|
||||
<div id="printContainer">
|
||||
<div class="cover print_use page_break">
|
||||
<div class="top">
|
||||
<h1>{{ data.cpd.CORP_NAME }}</h1>
|
||||
<h1>秦安双重预防机制建设平台</h1>
|
||||
<h1>体系运行报告</h1>
|
||||
</div>
|
||||
<div class="bot">
|
||||
<h1>{{ data.cpd.CORP_NAME }}</h1>
|
||||
<h1>{{ dayjs(startDate).format("YYYY年MM月") }}</h1>
|
||||
</div>
|
||||
<img src="/src/assets/images/print/cover-bg.png" alt="" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<h1>1.概述</h1>
|
||||
<p>
|
||||
{{ data.cpd.CORP_NAME }}公司统一社会信用代码为:{{
|
||||
data.cpd.CODE
|
||||
}},公司地址:{{ data.cpd.COMPANY_AREA }},所属行业:{{
|
||||
data.cpd.CORP_TYPE_NAME
|
||||
}},主要负责人:{{ data.cpd.LR_NAME }}。
|
||||
</p>
|
||||
<p>
|
||||
本体系运行报告的数据来源于{{
|
||||
data.cpd.CORP_NAME
|
||||
}}秦安双重预防机制建设平台相关数据,如企业信息、风险管控、隐患排查、隐患治理、教育培训、高危作业管理等均取自数据库实际数据。
|
||||
</p>
|
||||
<p>
|
||||
本体系运行报告的数据统计时间范围:{{
|
||||
dayjs(startDate).format("YYYY年MM月DD日")
|
||||
}}-{{ dayjs(lastDate).format("YYYY年MM月DD日") }}。
|
||||
</p>
|
||||
|
||||
<h1>2.风险管控</h1>
|
||||
<h4>2.1 风险点(单元)</h4>
|
||||
<p>
|
||||
截至到{{ dayjs(lastDate).format("YYYY年MM月DD日") }},公司共建立{{
|
||||
data.riskpd.unit_count
|
||||
}}个风险点(单元)。
|
||||
</p>
|
||||
<h4>2.2 辨识部位</h4>
|
||||
<p>
|
||||
截至到{{ dayjs(lastDate).format("YYYY年MM月DD日") }},公司共辨识了{{
|
||||
data.riskpd.id_count
|
||||
}}个辨识部位。
|
||||
</p>
|
||||
<h4>2.3 风险管控信息台账</h4>
|
||||
<p>
|
||||
截至到{{ dayjs(lastDate).format("YYYY年MM月DD日") }},公司建立了{{
|
||||
data.riskpd.risk_count
|
||||
}}个风险管控信息台账,其中,重大风险{{ data.riskpd.a_count }}个,
|
||||
较大风险{{ data.riskpd.b_count }}个,一般风险{{
|
||||
data.riskpd.c_count
|
||||
}}个,低风险{{ data.riskpd.d_count }}个。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h1>3.隐患排查</h1>
|
||||
<h4>3.1清单管理</h4>
|
||||
<p>
|
||||
截至到{{ dayjs(lastDate).format("YYYY年MM月DD日") }},公司共建立{{
|
||||
data.lists.length
|
||||
}}个隐患排查清单,其中,日常隐患排查清单{{ data.listType0001 }}个,
|
||||
综合性隐患排查清单{{ data.listType0002 }}个,季节性隐患排查清单{{
|
||||
data.listType0004
|
||||
}}个,节假日隐患排查清单{{
|
||||
data.listType0005
|
||||
}}个,专业性隐患排查清单{{ data.listType0003 }}个。
|
||||
</p>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
dayjs(lastDate).format("YYYY年MM月DD日")
|
||||
}},公司新建了{{ data.monthlist.length }}个排查清单,详细情况如下:
|
||||
</p>
|
||||
<table class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="60" align="center">序号</td>
|
||||
<td>清单类型</td>
|
||||
<td>清单名称</td>
|
||||
<td>清单负责人</td>
|
||||
<td>清单建立时间</td>
|
||||
<td>清单排查周期</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in data.lists" :key="index">
|
||||
<td align="center">{{ index + 1 }}</td>
|
||||
<td>{{ typeMap[item.TYPE] }}</td>
|
||||
<td>{{ item.NAME }}</td>
|
||||
<td>{{ item.USER_NAME }}</td>
|
||||
<td>{{ dayjs(item.CREATTIME).format("YYYY年MM月DD日") }}</td>
|
||||
<td>{{ periodMap[item.PERIOD] }}</td>
|
||||
</tr>
|
||||
<tr v-if="data.lists.length === 0">
|
||||
<td colspan="6" align="center">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>3.2清单排查情况</h4>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
dayjs(lastDate).format("YYYY年MM月DD日")
|
||||
}},公司已建立清单用户,详细排查情况见表1:
|
||||
</p>
|
||||
<table class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="60" align="center">序号</td>
|
||||
<td>部门</td>
|
||||
<td>岗位</td>
|
||||
<td>姓名</td>
|
||||
<td>负责的清单数</td>
|
||||
<td>应排查清单的次数</td>
|
||||
<td>实际排查次数</td>
|
||||
<td>排查率</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in data.checkList" :key="index">
|
||||
<td align="center">{{ index + 1 }}</td>
|
||||
<td>{{ item.DEPARTNAME_ALL }}</td>
|
||||
<td>{{ item.POSTNAME }}</td>
|
||||
<td>{{ item.USERNAME }}</td>
|
||||
<td>{{ item.listCount }}</td>
|
||||
<td>{{ item.staCount }}</td>
|
||||
<td>{{ item.cheCount }}</td>
|
||||
<td>{{ item.percent }}</td>
|
||||
</tr>
|
||||
<tr v-if="data.checkList.length === 0">
|
||||
<td colspan="8" align="center">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>3.3隐患治理情况</h4>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
dayjs(lastDate).format("YYYY年MM月DD日")
|
||||
}},公司共发现隐患{{ data.hdlist.length }}项, 其中重大隐患{{
|
||||
data.zd_count
|
||||
}}项,一般隐患{{ data.yb_count }}项,其中,待整改{{
|
||||
data.dzg_count
|
||||
}}项,待验收{{ data.dys_count }}项,已验收{{
|
||||
data.yys_count
|
||||
}}项,已超期{{ data.cq_count }}项。
|
||||
</p>
|
||||
<p class="subtitle">隐患治理情况见表2</p>
|
||||
<table class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="60" align="center">序号</td>
|
||||
<td width="120" align="center">隐患发现时间</td>
|
||||
<td width="80" align="center">检查人</td>
|
||||
<td width="80">检查部门</td>
|
||||
<td width="80">问题描述</td>
|
||||
<td>整改措施</td>
|
||||
<td width="80">整改情况</td>
|
||||
<td width="100">整改前照片</td>
|
||||
<td width="100">整改后照片</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in data.hdlist" :key="index">
|
||||
<td align="center">{{ index + 1 }}</td>
|
||||
<td>{{ item.CREATTIME }}</td>
|
||||
<td>{{ item.USER_NAME }}</td>
|
||||
<td>{{ item.DEPARTMENT_NAME }}</td>
|
||||
<td>{{ item.HIDDENDESCR }}</td>
|
||||
<td>{{ item.RECTIFYDESCR }}</td>
|
||||
<td>
|
||||
<span v-if="item.STATE === '1'">
|
||||
{{
|
||||
item.HIDDENLEVEL === "hiddenLevel0001" ? "待整改" : "整改中"
|
||||
}}
|
||||
</span>
|
||||
<span v-else-if="item.STATE === '3'"> 已整改 </span>
|
||||
<span v-else-if="item.STATE === '4'"> 已验收 </span>
|
||||
<span v-else-if="item.STATE === '-1'"> 已超期 </span>
|
||||
<span v-else-if="item.STATE === '10'"> 验收打回 </span>
|
||||
<span v-else-if="item.STATE === '100'"> 暂存 </span>
|
||||
<span v-else-if="item.STATE === '101'"> 待指派 </span>
|
||||
<span v-else-if="item.STATE === '102'"> 指派中 </span>
|
||||
</td>
|
||||
<td>
|
||||
<viewer :images="[VITE_FILE_URL + item.HD_IMGS]">
|
||||
<img
|
||||
v-if="item.HD_IMGS"
|
||||
:src="VITE_FILE_URL + item.HD_IMGS"
|
||||
alt=""
|
||||
/>
|
||||
</viewer>
|
||||
</td>
|
||||
<td>
|
||||
<viewer :images="[VITE_FILE_URL + item.ZG_IMGS]">
|
||||
<img
|
||||
v-if="item.ZG_IMGS"
|
||||
:src="VITE_FILE_URL + item.ZG_IMGS"
|
||||
alt=""
|
||||
/>
|
||||
</viewer>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="data.hdlist.length === 0">
|
||||
<td colspan="9" align="center">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h1>4.风险分析记录</h1>
|
||||
<p>改进信息显示风险辨识台账更新记录</p>
|
||||
<table class="print_table">
|
||||
<tr>
|
||||
<td align="center">风险点(单元)</td>
|
||||
<td align="center">辨识部位</td>
|
||||
<td align="center">改进类型</td>
|
||||
<td align="center">持续改进</td>
|
||||
<td align="center">存在风险</td>
|
||||
<td align="center">管控措施</td>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in data.riskLog" :key="index">
|
||||
<td v-if="index % 2 === 0" align="center" rowspan="2">
|
||||
{{ item.risk_unit_name }}
|
||||
</td>
|
||||
<td v-if="index % 2 === 0" rowspan="2">{{ item.parts_name }}</td>
|
||||
<td v-if="index % 2 === 0" rowspan="2">{{ item.is_new }}</td>
|
||||
<td>{{ item.label }}</td>
|
||||
<td>{{ item.risk_descr }}</td>
|
||||
<td>{{ item.measures }}</td>
|
||||
</tr>
|
||||
<tr v-if="data.riskLog.length === 0">
|
||||
<td colspan="6" align="center">暂无数据</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h1>5.教育培训情况</h1>
|
||||
<h4>5.1教育培训</h4>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
dayjs(lastDate).format("YYYY年MM月DD日")
|
||||
}},公司共完成建立{{ data.studypd.curriculum_count }}课程, 完成建立{{
|
||||
data.studypd.paper_count
|
||||
}}试卷,完成建立{{
|
||||
data.studypd.task_count
|
||||
}}次学习任务,岗位培训类型分别为{{
|
||||
data.post_type_name_arr.join(",")
|
||||
}},培训时间{{ data.sum_classhour }}分钟, 共有{{
|
||||
data.study_student_count
|
||||
}}名学员参与平台教育培训,考核通过{{
|
||||
data.study_pass_count
|
||||
}}人,通过率{{ data.study_pass_rate || 0 }}%。
|
||||
</p>
|
||||
<table class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="60" align="center">序号</td>
|
||||
<td>课程名称</td>
|
||||
<td>培训类型</td>
|
||||
<td>任务学时(分钟)</td>
|
||||
<td>学员人数</td>
|
||||
<td>任务状态</td>
|
||||
<td>应考人数</td>
|
||||
<td>参考人数/合格人数</td>
|
||||
<td>通过率</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in data.studylist" :key="index">
|
||||
<td align="center">{{ index + 1 }}</td>
|
||||
<td>{{ item.STUDY_NAME }}</td>
|
||||
<td>{{ item.train_type_name }}</td>
|
||||
<td>{{ item.SUM_CLASSHOUR }}</td>
|
||||
<td>{{ item.userCount }}</td>
|
||||
<td v-if="item.PEIXUE_START_TIME > dayjs().format('YYYY-MM-DD')">
|
||||
未开始
|
||||
</td>
|
||||
<td
|
||||
v-else-if="
|
||||
item.PEIXUE_START_TIME <= dayjs().format('YYYY-MM-DD') &&
|
||||
item.PEIXUE_END_TIME >= dayjs().format('YYYY-MM-DD')
|
||||
"
|
||||
>
|
||||
进行中
|
||||
</td>
|
||||
<td
|
||||
v-else-if="item.PEIXUE_END_TIME <= dayjs().format('YYYY-MM-DD')"
|
||||
>
|
||||
已结束
|
||||
</td>
|
||||
<td>{{ item.userCount }}</td>
|
||||
<td>{{ item.cj }}/{{ item.hg }}</td>
|
||||
<td>
|
||||
{{ item.cj === 0 ? 0 : ((item.hg / item.cj) * 100).toFixed(2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tr v-if="data.studylist.length === 0">
|
||||
<td colspan="9" align="center">暂无数据</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>5.2档案建立情况</h4>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
dayjs(lastDate).format("YYYY年MM月DD日")
|
||||
}},公司共完成建立个人档案{{ data.ztask_count }}份, 一期一档{{
|
||||
data.studypd.task_count
|
||||
}}份。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h1>6.特殊作业管理</h1>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
dayjs(lastDate).format("YYYY年MM月DD日")
|
||||
}},公司共新建{{ data.eight_count }}项特殊作业审批, 已存档{{
|
||||
data.eight_pass_count
|
||||
}}项审批数据。其中,受限空间作业{{
|
||||
data.eightlist?.[2]?.pass_count || 0
|
||||
}}项,断路作业{{ data.eightlist?.[4]?.pass_count || 0 }}项,
|
||||
盲板抽堵作业{{ data.eightlist?.[0]?.pass_count || 0 }}项,动土作业{{
|
||||
data.eightlist?.[1]?.pass_count || 0
|
||||
}}项,高处作业{{ data.eightlist?.[5]?.pass_count || 0 }}项,
|
||||
吊装作业{{ data.eightlist?.[6]?.pass_count || 0 }}项,临时用电作业{{
|
||||
data.eightlist?.[3]?.pass_count || 0
|
||||
}}项,动火作业{{ data.eightlist?.[7]?.pass_count || 0 }}项。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h1>7.绩效考核</h1>
|
||||
<p>
|
||||
{{ dayjs(startDate).format("YYYY年MM月DD日") }}-{{
|
||||
dayjs(lastDate).format("YYYY年MM月DD日")
|
||||
}},公司绩效考核详细情况如下:
|
||||
</p>
|
||||
<h4>7.1 部门考核</h4>
|
||||
<table class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="60" align="center">序号</td>
|
||||
<td>部门</td>
|
||||
<td>发现隐患</td>
|
||||
<td>隐患整改</td>
|
||||
<td>检查得分</td>
|
||||
<td>培训得分</td>
|
||||
<td>风险辨识完善得分</td>
|
||||
<td>考核日期</td>
|
||||
<td>考核等级</td>
|
||||
<td>合计</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in data.deptPeList" :key="index">
|
||||
<td align="center">{{ index + 1 }}</td>
|
||||
<td>{{ item.DEPT_NAME_ALL }}</td>
|
||||
<td>{{ item.SCORE1 }}</td>
|
||||
<td>{{ item.SCORE2 }}</td>
|
||||
<td>{{ item.SCORE3 }}</td>
|
||||
<td>{{ item.SCORE4 }}</td>
|
||||
<td>{{ item.SCORE5 }}</td>
|
||||
<td>{{ month }}</td>
|
||||
<td>
|
||||
{{
|
||||
fnComputeLevel(
|
||||
item.SCORE1 +
|
||||
item.SCORE2 +
|
||||
item.SCORE3 +
|
||||
item.SCORE4 +
|
||||
item.SCORE5
|
||||
)
|
||||
}}
|
||||
</td>
|
||||
<td>
|
||||
{{
|
||||
item.SCORE1 +
|
||||
item.SCORE2 +
|
||||
item.SCORE3 +
|
||||
item.SCORE4 +
|
||||
item.SCORE5
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="data.deptPeList.length === 0">
|
||||
<td colspan="10" align="center">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>7.2 人员考核</h4>
|
||||
<table class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="60" align="center">序号</td>
|
||||
<td>部门</td>
|
||||
<td>人员</td>
|
||||
<td>发现隐患</td>
|
||||
<td>隐患整改</td>
|
||||
<td>检查得分</td>
|
||||
<td>培训得分</td>
|
||||
<td>风险辨识完善得分</td>
|
||||
<td>考核日期</td>
|
||||
<td>考核等级</td>
|
||||
<td>合计</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in data.userPeList" :key="index">
|
||||
<td align="center">{{ index + 1 }}</td>
|
||||
<td>{{ item.DEPT_NAME_ALL }}</td>
|
||||
<td>{{ item.USER_NAME }}</td>
|
||||
<td>{{ item.SCORE1 }}</td>
|
||||
<td>{{ item.SCORE2 }}</td>
|
||||
<td>{{ item.SCORE3 }}</td>
|
||||
<td>{{ item.SCORE4 }}</td>
|
||||
<td>{{ item.SCORE5 }}</td>
|
||||
<td>{{ showDate }}</td>
|
||||
<td>
|
||||
{{
|
||||
fnComputeLevel(
|
||||
item.SCORE1 +
|
||||
item.SCORE2 +
|
||||
item.SCORE3 +
|
||||
item.SCORE4 +
|
||||
item.SCORE5
|
||||
)
|
||||
}}
|
||||
</td>
|
||||
<td>
|
||||
{{
|
||||
item.SCORE1 +
|
||||
item.SCORE2 +
|
||||
item.SCORE3 +
|
||||
item.SCORE4 +
|
||||
item.SCORE5
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="data.userPeList.length === 0">
|
||||
<td colspan="11" align="center">暂无数据</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h1>8.结论建议</h1>
|
||||
<p>
|
||||
{{ data.corp_advice.ADVICE }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnConclusion">填写结论</el-button>
|
||||
</div>
|
||||
<div class="fixed_right" @click="data.otherVisible = true">
|
||||
查看其它诊断书
|
||||
</div>
|
||||
<conclusion
|
||||
v-model:visible="data.conclusionDialog.visible"
|
||||
v-model:advice="data.conclusionDialog.advice"
|
||||
:corp-advice="data.corp_advice"
|
||||
:month="month"
|
||||
@submit="fnGetConclusion"
|
||||
/>
|
||||
<other
|
||||
v-model:visible="data.otherVisible"
|
||||
v-model:month="month"
|
||||
:advice-date="data.corp_advice_all"
|
||||
:date-list="dateList"
|
||||
@check="fnGetData"
|
||||
/>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getEnterpriseReport1,
|
||||
getEnterpriseReport2,
|
||||
getEnterpriseReport3,
|
||||
getEnterpriseReport4,
|
||||
getEnterpriseReport5,
|
||||
getEnterpriseReport6,
|
||||
getEnterpriseReportConclusion,
|
||||
} from "@/request/continuous_improvement.js";
|
||||
import { reactive, ref, watchEffect } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import Conclusion from "./components/conclusion.vue";
|
||||
import Other from "./components/other.vue";
|
||||
|
||||
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const typeMap = {
|
||||
listType0001: "日常隐患排查清单",
|
||||
listType0002: "综合隐患排查清单",
|
||||
listType0003: "专业隐患排查清单",
|
||||
listType0004: "季节性隐患排查清单",
|
||||
listType0005: "节假日隐患排查清单",
|
||||
};
|
||||
const periodMap = {
|
||||
checkPeriod0001: "每日",
|
||||
checkPeriod0002: "每周",
|
||||
checkPeriod0003: "每旬",
|
||||
checkPeriod0004: "每月",
|
||||
checkPeriod0005: "每季",
|
||||
checkPeriod0006: "每年",
|
||||
checkPeriod0007: "半年",
|
||||
};
|
||||
const dateList = ref([]);
|
||||
const month = ref("");
|
||||
const startDate = ref("");
|
||||
const lastDate = ref("");
|
||||
const data = reactive({
|
||||
cpd: {},
|
||||
riskpd: {},
|
||||
lists: [],
|
||||
monthlist: [],
|
||||
hdlist: [],
|
||||
studypd: {},
|
||||
riskLog: [],
|
||||
listType0001: 0,
|
||||
listType0002: 0,
|
||||
listType0003: 0,
|
||||
listType0004: 0,
|
||||
listType0005: 0,
|
||||
yb_count: 0,
|
||||
zd_count: 0,
|
||||
dzg_count: 0,
|
||||
dys_count: 0,
|
||||
yys_count: 0,
|
||||
cq_count: 0,
|
||||
checkList: [],
|
||||
studylist: [],
|
||||
study_student_count: 0,
|
||||
sum_classhour: 0,
|
||||
study_pass_count: 0,
|
||||
ztask_count: 0,
|
||||
post_type_name_arr: [],
|
||||
study_pass_rate: 0,
|
||||
eightlist: [],
|
||||
eight_count: 0,
|
||||
eight_pass_count: 0,
|
||||
deptPeList: [],
|
||||
userPeList: [],
|
||||
corp_advice: {},
|
||||
corp_advice_all: [],
|
||||
conclusionDialog: {
|
||||
visible: false,
|
||||
advice: "",
|
||||
},
|
||||
otherVisible: false,
|
||||
});
|
||||
watchEffect(() => {
|
||||
startDate.value = dayjs(month.value).startOf("month").format("YYYY-MM-DD");
|
||||
lastDate.value = dayjs(month.value).endOf("month").format("YYYY-MM-DD");
|
||||
});
|
||||
const fnGetDateList = () => {
|
||||
let tempDate = "2022-06";
|
||||
dateList.value.push(dayjs(tempDate).format("YYYY-MM"));
|
||||
while (dayjs().diff(dayjs(tempDate), "month") > 0) {
|
||||
tempDate = dayjs(tempDate).add(1, "month");
|
||||
dateList.value.push(dayjs(tempDate).format("YYYY-MM"));
|
||||
}
|
||||
month.value = dateList.value[dateList.value.length - 1];
|
||||
};
|
||||
fnGetDateList();
|
||||
const fnGetConclusion = async () => {
|
||||
const resData = await getEnterpriseReportConclusion({ MONTH: month.value });
|
||||
const resDataAll = await getEnterpriseReportConclusion();
|
||||
data.corp_advice = resData.varList[0] || {
|
||||
ADVICE:
|
||||
"公司安全生产情况良好,需继续依据相关标准积极开展风险分级管控和隐患排查治理体系建设,根据公司目前的安全管理情况,须加强隐患排查、隐患整改等方面的安全管理,提高公司的安全管理水平,防止和减少生产安全事故的发生。",
|
||||
};
|
||||
data.corp_advice_all = resDataAll.varList.map((item) => item.ADVICE_DATE);
|
||||
};
|
||||
fnGetConclusion();
|
||||
const fnComputeLevel = (total) => {
|
||||
if (total >= 75) return "一级";
|
||||
else if (total >= 50) return "二级";
|
||||
else if (total >= 25) return "三级";
|
||||
else return "四级";
|
||||
};
|
||||
const fnGetData1 = async () => {
|
||||
const resData = await getEnterpriseReport1({ MONTH: month.value });
|
||||
data.cpd = resData.cpd;
|
||||
data.riskpd = resData.riskpd;
|
||||
data.lists = resData.lists;
|
||||
data.monthlist = resData.monthlist;
|
||||
data.hdlist = resData.hdlist;
|
||||
data.studypd = resData.studypd;
|
||||
data.riskLog = resData.riskLog;
|
||||
data.lists.forEach((item) => {
|
||||
if (item.TYPE === "listType0001") data.listType0001++;
|
||||
else if (item.TYPE === "listType0002") data.listType0002++;
|
||||
else if (item.TYPE === "listType0003") data.listType0003++;
|
||||
else if (item.TYPE === "listType0004") data.listType0004++;
|
||||
else if (item.TYPE === "listType0005") data.listType0005++;
|
||||
});
|
||||
data.hdlist.forEach((item) => {
|
||||
if (item.HIDDENLEVEL === "hiddenLevel0001") data.yb_count++;
|
||||
else data.zd_count++;
|
||||
if (item.STATE === "1") data.dzg_count++;
|
||||
else if (item.STATE === "2" || item.STATE === "3") data.dys_count++;
|
||||
else if (item.STATE === "4") data.yys_count++;
|
||||
else if (item.STATE === "-1") data.cq_count++;
|
||||
});
|
||||
};
|
||||
const fnGetData2 = async () => {
|
||||
const resData = await getEnterpriseReport2({
|
||||
STARTTIME: startDate.value,
|
||||
ENDTIME: lastDate.value,
|
||||
});
|
||||
data.checkList = resData.varList;
|
||||
};
|
||||
const fnGetData3 = async () => {
|
||||
const resData = await getEnterpriseReport3({ MONTH: month.value });
|
||||
data.studylist = resData.varList;
|
||||
const post_type_name_set = new Set();
|
||||
data.study_student_count = 0;
|
||||
data.sum_classhour = 0;
|
||||
data.study_pass_count = 0;
|
||||
data.ztask_count = 0;
|
||||
data.studylist.forEach((item) => {
|
||||
post_type_name_set.add(item.post_type_name);
|
||||
data.sum_classhour += item.SUM_CLASSHOUR;
|
||||
data.study_student_count += item.cj;
|
||||
data.study_pass_count += item.hg;
|
||||
data.ztask_count += item.userCount;
|
||||
});
|
||||
if (post_type_name_set.size > 0) {
|
||||
data.post_type_name_arr = Array.from(post_type_name_set);
|
||||
}
|
||||
if (data.study_student_count > 0) {
|
||||
data.study_pass_rate = (
|
||||
(data.study_pass_count / data.study_student_count) *
|
||||
100
|
||||
).toFixed(2);
|
||||
}
|
||||
};
|
||||
const fnGetData4 = async () => {
|
||||
const resData = await getEnterpriseReport4({ MONTH: month.value });
|
||||
data.eightlist = resData.eightlist;
|
||||
data.eight_count = 0;
|
||||
data.eight_pass_count = 0;
|
||||
data.eightlist.forEach((item) => {
|
||||
data.eight_count += +item.count;
|
||||
data.eight_pass_count += +item.pass_count || 0;
|
||||
});
|
||||
};
|
||||
const fnGetData5 = async () => {
|
||||
const resData = await getEnterpriseReport5({ MONTH: month.value });
|
||||
data.deptPeList = resData.varList;
|
||||
};
|
||||
const fnGetData6 = async () => {
|
||||
const resData = await getEnterpriseReport6({ MONTH: month.value });
|
||||
data.userPeList = resData.varList;
|
||||
};
|
||||
const fnGetData = async () => {
|
||||
await fnGetData1();
|
||||
await fnGetData2();
|
||||
await fnGetData3();
|
||||
await fnGetData4();
|
||||
await fnGetData5();
|
||||
await fnGetData6();
|
||||
};
|
||||
fnGetData();
|
||||
const fnConclusion = () => {
|
||||
data.conclusionDialog.visible = true;
|
||||
data.conclusionDialog.advice = data.corp_advice.ADVICE;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover {
|
||||
position: relative;
|
||||
|
||||
.top {
|
||||
padding-top: 400px;
|
||||
|
||||
h1 {
|
||||
font-size: 34px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bot {
|
||||
padding-top: 200px;
|
||||
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -100px;
|
||||
height: 407px;
|
||||
width: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
|
||||
.subtitle {
|
||||
text-align: center;
|
||||
text-indent: 0;
|
||||
margin-bottom: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
text-indent: 34px;
|
||||
}
|
||||
|
||||
p {
|
||||
text-indent: 34px;
|
||||
margin: 0 0 0.2em;
|
||||
line-height: 1.6;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
p,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.fixed_right {
|
||||
position: fixed;
|
||||
right: -29px;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #ffffff;
|
||||
clip-path: polygon(
|
||||
100% 0%,
|
||||
100% 0%,
|
||||
100% 0%,
|
||||
100% 100%,
|
||||
100% 100%,
|
||||
100% 100%,
|
||||
65% 85%,
|
||||
65% 17%
|
||||
);
|
||||
width: 100px;
|
||||
writing-mode: tb-rl;
|
||||
padding: 50px 10px 50px 0;
|
||||
background-color: var(--el-color-primary);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,76 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="分析" :before-close="fnClose">
|
||||
<layout-risk-add ref="riskAddRef" v-model:form="form" :rules="rules">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否生成新风险因素" prop="IS_NEW">
|
||||
<el-radio-group v-model="form.IS_NEW" disabled>
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</layout-risk-add>
|
||||
<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 { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
import LayoutRiskAdd from "@/components/risk_add/index.vue";
|
||||
import { ref, watch } from "vue";
|
||||
import { setHazardAnalysisSubmit } from "@/request/continuous_improvement.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 = {
|
||||
IS_NEW: [{ required: true, message: "请选择", trigger: "change" }],
|
||||
};
|
||||
const riskAddRef = ref(null);
|
||||
const fnClose = () => {
|
||||
riskAddRef.value.reset();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await riskAddRef.value.formValidate();
|
||||
await setHazardAnalysisSubmit({
|
||||
STATUS: 0,
|
||||
ACCIDENTS: form.value.ACCIDENTS.join(","),
|
||||
ACCIDENTS_NAME: riskAddRef.value.accidentsName(),
|
||||
...form.value,
|
||||
});
|
||||
ElMessage.success("操作成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
watch(
|
||||
() => props.form.IDENTIFICATION_ID,
|
||||
(newValue, oldValue) => {
|
||||
if (oldValue) {
|
||||
form.value.IS_NEW = 1;
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,221 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@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="发现日期" 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="6">
|
||||
<el-form-item label="隐患发现人" prop="CREATORNAME">
|
||||
<el-input v-model="searchForm.CREATORNAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<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="6">
|
||||
<el-form-item label="隐患级别" prop="HIDDENLEVEL">
|
||||
<el-select v-model="searchForm.HIDDENLEVEL">
|
||||
<el-option
|
||||
v-for="item in hazardLevelList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</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
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="HIDDENDESCR"
|
||||
label="隐患描述"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="隐患处置" width="100">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '1'">立即整改</span>
|
||||
<span v-else-if="row.RECTIFICATIONTYPE === '2'">限期整改</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="HIDDENLEVELNAME" label="隐患级别" width="120" />
|
||||
<el-table-column label="隐患状态" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ translationStatus(row.STATE, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CREATTIME" label="发现时间" width="160" />
|
||||
<el-table-column prop="CREATORNAME" label="发现人" width="100" />
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONTIME"
|
||||
label="整改时间"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RECTIFICATIONORNAME"
|
||||
label="整改人"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="验收人" width="100">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.RECTIFICATIONTYPE === '2'">
|
||||
{{ row.CHECKNAME }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/continuous_improvement/hazard_analysis/view',
|
||||
query: { HIDDEN_ID: row.HIDDEN_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="primary" text link @click="fnAnalysis(row)">
|
||||
分析
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<analysis
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
v-model:form="data.analysisDialog.form"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { getHiddenDangerList } from "@/request/hidden_danger_government.js";
|
||||
import { layoutFnGetHazardLevel } from "@/assets/js/data_dictionary.js";
|
||||
import { nextTick, reactive } from "vue";
|
||||
import Analysis from "./components/analysis.vue";
|
||||
import { getRiskControlLedgerView } from "@/request/risk_control.js";
|
||||
|
||||
const stateList = [
|
||||
{ NAME: "未整改", ID: "1" },
|
||||
{ NAME: "已整改", ID: "2" },
|
||||
{ NAME: "已整改", ID: "3" },
|
||||
{ NAME: "已验收", ID: "4" },
|
||||
{ NAME: "已过期", ID: "-1" },
|
||||
];
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getHiddenDangerList, {
|
||||
otherParams: { STATE: 4, DISPOSESTATE: "-1", ANALYSIS: 1 },
|
||||
});
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
DEPARTMENT_ID: "",
|
||||
USER_ID: "",
|
||||
RISK_UNIT_ID: "",
|
||||
IDENTIFICATION_ID: "",
|
||||
RISK_DESCR: "",
|
||||
LIKELIHOOD: "",
|
||||
EXPOSURE: "",
|
||||
CONSEQUENCE: "",
|
||||
LEVEL_NAME: "",
|
||||
DANGER: "",
|
||||
MEASURES: "",
|
||||
ACCIDENTS: [],
|
||||
EME_MEASURES: "",
|
||||
IS_NEW: 1,
|
||||
},
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const hazardLevelList = await layoutFnGetHazardLevel();
|
||||
const fnAnalysis = async ({
|
||||
HIDDEN_ID,
|
||||
RISKPOINT_ID,
|
||||
HIDDENDESCR,
|
||||
RECTIFYDESCR,
|
||||
}) => {
|
||||
data.analysisDialog.visible = true;
|
||||
await nextTick();
|
||||
if (RISKPOINT_ID) {
|
||||
const resData = await getRiskControlLedgerView({ RISKPOINT_ID });
|
||||
resData.pd.IS_NEW = 0;
|
||||
data.analysisDialog.form = resData.pd;
|
||||
data.analysisDialog.form.ACCIDENTS = resData.pd.ACCIDENTS.split(",");
|
||||
data.analysisDialog.form.RISK_DESCR += HIDDENDESCR;
|
||||
data.analysisDialog.form.MEASURES += RECTIFYDESCR;
|
||||
}
|
||||
data.analysisDialog.form.HIDDEN_ID = HIDDEN_ID;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<hidden-view print />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import HiddenView from "@/views/hazard_investigation/checklist_inspection_status/hidden_danger_view.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,83 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="分析" @close="fnClose">
|
||||
<layout-risk-view :info="info">
|
||||
<el-descriptions-item label="是否生成新风险因素" :span="2">
|
||||
{{ info.IS_NEW === 1 ? "是" : "否" }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="风险成因" :span="2">
|
||||
<el-select v-model="riskCauses" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in riskCausesList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
</layout-risk-view>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="fnSubmit(1)">通过</el-button>
|
||||
<el-button type="danger" @click="fnSubmit(0)">打回</el-button>
|
||||
<el-button @click="fnClose">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { layoutFnGetRiskCauses } from "@/assets/js/data_dictionary.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import {
|
||||
setRiskAnalysisAdopt,
|
||||
setRiskAnalysisRepulse,
|
||||
} from "@/request/continuous_improvement.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import LayoutRiskView from "@/components/risk_view/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "get-data"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const riskCauses = ref("");
|
||||
const riskCausesList = await layoutFnGetRiskCauses();
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
riskCauses.value = "";
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async (STATUS) => {
|
||||
if (STATUS === 0) {
|
||||
await setRiskAnalysisRepulse({
|
||||
RISKPOINT_ANALYSIS_ID: props.info.RISKPOINT_ANALYSIS_ID,
|
||||
});
|
||||
} else {
|
||||
if (!riskCauses.value) {
|
||||
ElMessage.warning("风险成因未选择");
|
||||
return;
|
||||
}
|
||||
await setRiskAnalysisAdopt({
|
||||
RISKPOINT_ANALYSIS_ID: props.info.RISKPOINT_ANALYSIS_ID,
|
||||
RISK_CAUSES: riskCauses.value,
|
||||
});
|
||||
}
|
||||
ElMessage.success("操作成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@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="风险分级" prop="LEVELID">
|
||||
<el-select v-model="searchForm.LEVELID">
|
||||
<el-option
|
||||
v-for="item in riskClassificationList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<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="6">
|
||||
<el-form-item label="事故类型">
|
||||
<el-select v-model="searchForm.BIANMA" multiple>
|
||||
<el-option
|
||||
v-for="item in accidentTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="管控责任人" prop="gkzrName">
|
||||
<el-input v-model="searchForm.gkzrName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否审核" prop="STATUS">
|
||||
<el-select v-model="searchForm.STATUS">
|
||||
<el-option label="未审核" value="0" />
|
||||
<el-option label="已审核" value="1" />
|
||||
</el-select>
|
||||
</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
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEPT_NAME_ALL" label="管控部门" width="250" />
|
||||
<el-table-column
|
||||
prop="RISKUNITNAME"
|
||||
label="风险点(单元)"
|
||||
width="250"
|
||||
/>
|
||||
<el-table-column prop="PARTSNAME" label="辨识部位" width="250" />
|
||||
<el-table-column prop="LEVELID" label="风险分级" width="120">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.LEVELID === 'levelD'" class="text-blue">
|
||||
低风险/D级
|
||||
</span>
|
||||
<span v-else-if="row.LEVELID === 'levelC'" class="text-yellow">
|
||||
一般风险/C级
|
||||
</span>
|
||||
<span v-else-if="row.LEVELID === 'levelB'" class="text-orange">
|
||||
较大风险/B级
|
||||
</span>
|
||||
<span v-else-if="row.LEVELID === 'levelA'" class="text-red">
|
||||
重大风险/A级
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="ACCIDENTS_NAME" label="事故类型" />
|
||||
<el-table-column prop="USER_ID" label="管控责任人" width="100" />
|
||||
<el-table-column prop="STATUS" label="状态" width="90">
|
||||
<template #default="{ row }">
|
||||
{{ row.STATUS === 1 ? "已审核" : "未审核" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.STATUS === 0"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnAnalysis(row)"
|
||||
>
|
||||
分析
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<analysis
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
:info="data.analysisDialog.info"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import {
|
||||
layoutFnGetAccidentType,
|
||||
layoutFnGetRiskClassification,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { reactive } from "vue";
|
||||
import { getRiskAnalysisList } from "@/request/continuous_improvement.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import Analysis from "./components/analysis.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getRiskAnalysisList);
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
BIANMA: searchForm.value.BIANMA?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
BIANMA: searchForm.value.BIANMA?.join(","),
|
||||
});
|
||||
};
|
||||
const riskClassificationList = await layoutFnGetRiskClassification();
|
||||
const accidentTypeList = await layoutFnGetAccidentType();
|
||||
const fnAnalysis = (row) => {
|
||||
if (
|
||||
userStore.getUserInfo.ISMAIN === "1" ||
|
||||
userStore.getUserInfo.IS_SAFETY === 1
|
||||
) {
|
||||
data.analysisDialog.visible = true;
|
||||
data.analysisDialog.info = cloneDeep(row);
|
||||
} else {
|
||||
ElMessageBox.alert("您无权进行此项操作");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="查看">
|
||||
<layout-risk-view :info="info">
|
||||
<el-descriptions-item label="是否生成新风险因素" :span="2">
|
||||
{{ info.IS_NEW === 1 ? "是" : "否" }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="风险成因" :span="2">
|
||||
{{ info.RISK_CAUSES }}
|
||||
</el-descriptions-item>
|
||||
</layout-risk-view>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import LayoutRiskView from "@/components/risk_view/index.vue";
|
||||
|
||||
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,165 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<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="风险点" prop="RISK_UNIT_ID">
|
||||
<el-select
|
||||
v-model="searchForm.RISK_UNIT_ID"
|
||||
@change="fnGetPartsList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.unitList"
|
||||
:key="item.RISKUNIT_ID"
|
||||
:label="item.DEPT_NAME + '-' + item.RISKUNITNAME"
|
||||
:value="item.RISKUNIT_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="辨识部位" prop="IDENTIFICATION_ID">
|
||||
<el-select v-model="searchForm.IDENTIFICATION_ID">
|
||||
<el-option
|
||||
v-for="item in data.partsList"
|
||||
:key="item.IDENTIFICATIONPARTS_ID"
|
||||
:label="item.PARTSNAME"
|
||||
:value="item.IDENTIFICATIONPARTS_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</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="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
:span-method="fnSpanMethod"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="risk_unit_name"
|
||||
label="风险点(单元)"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column prop="parts_name" label="辨识部位" width="200px" />
|
||||
<el-table-column prop="is_new" label="改进类型" width="80" />
|
||||
<el-table-column prop="label" label="持续改进" width="100" />
|
||||
<el-table-column
|
||||
prop="risk_causes_name"
|
||||
label="风险成因"
|
||||
width="150px"
|
||||
/>
|
||||
<el-table-column prop="risk_descr" label="存在风险" width="500px" />
|
||||
<el-table-column prop="dname5" label="风险等级" width="100" />
|
||||
<el-table-column prop="measures" label="管控措施" width="500px" />
|
||||
<el-table-column prop="accidents_name" label="事故类型" width="300px" />
|
||||
<el-table-column prop="dept_name_all" label="责任部门" width="150px" />
|
||||
<el-table-column label="责任人" width="150px">
|
||||
<template #default="{ row }">
|
||||
{{ row.dept_user_name ? row.dept_user_name : row.user_id }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creat_time" label="分析时间" width="150px" />
|
||||
<el-table-column prop="creator_name" label="分析人员" width="150px" />
|
||||
<el-table-column prop="inspector_name" label="审批人员" width="150px" />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" text link @click="fnView(row)">
|
||||
查看最新信息
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<view-info
|
||||
v-model:visible="data.viewDialog.visible"
|
||||
:info="data.viewDialog.info"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { reactive } from "vue";
|
||||
import {
|
||||
getRiskAnalysisRecordList,
|
||||
getRiskAnalysisRecordView,
|
||||
} from "@/request/continuous_improvement.js";
|
||||
import {
|
||||
getIdentifyingPartsListAll,
|
||||
getRiskPointListAllById,
|
||||
} from "@/request/risk_control.js";
|
||||
import ViewInfo from "./components/view.vue";
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getRiskAnalysisRecordList, { key: "list" });
|
||||
const data = reactive({
|
||||
unitList: [],
|
||||
partsList: [],
|
||||
viewDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnGetUnitList = async () => {
|
||||
const resData = await getRiskPointListAllById({
|
||||
DEPARTMENT_ID: "",
|
||||
});
|
||||
data.unitList = resData.unitList;
|
||||
};
|
||||
const fnGetPartsList = async () => {
|
||||
searchForm.value.IDENTIFICATION_ID = "";
|
||||
const resData = await getIdentifyingPartsListAll({
|
||||
RISK_UNIT_ID: searchForm.value.RISK_UNIT_ID,
|
||||
});
|
||||
data.partsList = resData.partsList;
|
||||
};
|
||||
fnGetUnitList();
|
||||
const fnView = async (row) => {
|
||||
const resData = await getRiskAnalysisRecordView({
|
||||
RISKPOINT_ANALYSIS_ID: row.riskpoint_analysis_id,
|
||||
});
|
||||
data.viewDialog.visible = true;
|
||||
data.viewDialog.info = resData.form;
|
||||
};
|
||||
const fnSpanMethod = ({ rowIndex, columnIndex }) => {
|
||||
const arr = [0, 1, 2, 14];
|
||||
if (arr.includes(columnIndex)) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return {
|
||||
rowspan: 2,
|
||||
colspan: 1,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -318,7 +318,7 @@ const rules = {
|
|||
],
|
||||
WAYBILLNUMBER: [
|
||||
{ required: true, message: "请输入运单编号", trigger: "blur" },
|
||||
{ min: 7, message: "运单编号不能少于7位", trigger: "blur" },
|
||||
/* { min: 7, message: "运单编号不能少于7位", trigger: "blur" },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!/^[A-Za-z0-9]+$/.test(value)) {
|
||||
|
@ -328,7 +328,7 @@ const rules = {
|
|||
}
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
}, */
|
||||
],
|
||||
TRANSPORTVEHICLE: [
|
||||
{ required: true, message: "请选择运营车辆", trigger: "change" },
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="离岗审批" width="600" @close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="审批" prop="REVIEW_STATUS">
|
||||
<el-radio-group v-model="form.REVIEW_STATUS">
|
||||
<el-radio value="1">通过</el-radio>
|
||||
<el-radio value="-1">打回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="REVIEW_DESC">
|
||||
<el-input
|
||||
v-model="form.REVIEW_DESC"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</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 useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setLeaveReview } 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 = {
|
||||
REVIEW_STATUS: [
|
||||
{ required: true, message: "请选择审批状态", trigger: "change" },
|
||||
],
|
||||
REVIEW_DESC: [{ 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);
|
||||
await setLeaveReview({
|
||||
...form.value,
|
||||
});
|
||||
ElMessage.success("提交成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,64 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="取消申请" width="600" @close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="110px">
|
||||
<el-form-item label="取消原因" prop="REVIEW_DESC">
|
||||
<el-input
|
||||
v-model="form.REVIEW_DESC"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</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 useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { setLeaveCancel } 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 = {
|
||||
REVIEW_DESC: [{ 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);
|
||||
await setLeaveCancel({
|
||||
...form.value,
|
||||
});
|
||||
ElMessage.success("提交成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,108 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="离岗管理" width="600" @close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" 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-item label="离岗原因" prop="DESCR">
|
||||
<el-input
|
||||
v-model="form.DESCR"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批人" prop="REVIEW_USER_ID">
|
||||
<el-select v-model="form.REVIEW_USER_ID">
|
||||
<el-option
|
||||
v-for="item in reviewUserList"
|
||||
:key="item.USER_ID"
|
||||
:value="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
/>
|
||||
</el-select>
|
||||
</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 useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
getApprovedByList,
|
||||
setLeaveEdit,
|
||||
} from "@/request/off_duty_management.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
||||
const userStore = useUserStore();
|
||||
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" },
|
||||
],
|
||||
DESCR: [{ required: true, message: "请输入离岗原因", trigger: "blur" }],
|
||||
REVIEW_USER_ID: [
|
||||
{ required: true, message: "请选择审批人", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const reviewUserList = ref([]);
|
||||
const formRef = ref(null);
|
||||
const fnGetReviewUserList = async () => {
|
||||
const resData = await getApprovedByList({
|
||||
CORPINFO_ID: userStore.getUserInfo.CORPINFO_ID,
|
||||
DEPARTMENT_ID: userStore.getUserInfo.DEPARTMENT_ID,
|
||||
USER_ID: userStore.getUserInfo.USER_ID,
|
||||
});
|
||||
reviewUserList.value = resData.userList;
|
||||
};
|
||||
fnGetReviewUserList();
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
await setLeaveEdit({
|
||||
...form.value,
|
||||
STARTTIME: form.value.offdutyDates[0],
|
||||
ENDTIME: form.value.offdutyDates[1],
|
||||
});
|
||||
ElMessage.success("提交成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
title="离岗时间调整"
|
||||
width="600"
|
||||
@close="fnClose"
|
||||
>
|
||||
<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 v-model="visible" title="离岗详情">
|
||||
<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 v-if="info.REVIEW_STATUS !== '2'" label="审批人">
|
||||
{{
|
||||
info.REVIEW_USER_NAME + " [" + info.REVIEW_USER_DEPARTMENTNAME + "]"
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="info.REVIEW_STATUS === '1' || info.REVIEW_STATUS === '-1'"
|
||||
:label="info.ISDELETE === '0' ? '审批意见' : '取消原因'"
|
||||
>
|
||||
{{ 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,306 @@
|
|||
<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
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<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 #default="{ 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 #default="{ row }">
|
||||
<div>{{ row.STARTTIME }} 至 {{ row.ENDTIME }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="指定审批人">
|
||||
<template #default="{ 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="fnApproval(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="fnCancel(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"
|
||||
/>
|
||||
<edit
|
||||
v-model:visible="data.editDialog.visible"
|
||||
v-model:form="data.editDialog.form"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
<approval
|
||||
v-model:visible="data.approvalDialog.visible"
|
||||
v-model:form="data.approvalDialog.form"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
<cancel
|
||||
v-model:visible="data.cancelDialog.visible"
|
||||
v-model:form="data.cancelDialog.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";
|
||||
import Edit from "./components/edit.vue";
|
||||
import Approval from "./components/approval.vue";
|
||||
import Cancel from "./components/cancel.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: "",
|
||||
},
|
||||
},
|
||||
editDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
OFFDUTY_ID: "",
|
||||
offdutyDates: [],
|
||||
DESCR: "",
|
||||
REVIEW_USER_ID: "",
|
||||
},
|
||||
},
|
||||
approvalDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
OFFDUTY_ID: "",
|
||||
REVIEW_DESC: "",
|
||||
REVIEW_STATUS: "",
|
||||
},
|
||||
},
|
||||
cancelDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
OFFDUTY_ID: "",
|
||||
REVIEW_DESC: "",
|
||||
REVIEW_STATUS: "",
|
||||
},
|
||||
},
|
||||
});
|
||||
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 (OFFDUTY_ID) => {
|
||||
data.editDialog.visible = true;
|
||||
await nextTick();
|
||||
const resData = await getLeaveView({ OFFDUTY_ID });
|
||||
data.editDialog.form = resData.pd;
|
||||
data.timeAdjustmentDialog.form.offdutyDates = [
|
||||
resData.pd.STARTTIME,
|
||||
resData.pd.ENDTIME,
|
||||
];
|
||||
};
|
||||
const fnApproval = async (OFFDUTY_ID) => {
|
||||
data.approvalDialog.visible = true;
|
||||
await nextTick();
|
||||
data.approvalDialog.form.OFFDUTY_ID = OFFDUTY_ID;
|
||||
};
|
||||
const fnCancel = async (OFFDUTY_ID) => {
|
||||
data.cancelDialog.visible = true;
|
||||
await nextTick();
|
||||
data.cancelDialog.form.OFFDUTY_ID = OFFDUTY_ID;
|
||||
data.cancelDialog.form.REVIEW_STATUS = "-1";
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,98 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@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="离岗时间" 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="6">
|
||||
<el-form-item label="部门">
|
||||
<layout-department
|
||||
v-model="searchForm.DEPTIDS"
|
||||
multiple
|
||||
show-checkbox
|
||||
collapse-tags
|
||||
root-disabled="Y"
|
||||
/>
|
||||
</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
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEPARTMENT_ALL" label="部门" />
|
||||
<el-table-column prop="USERNAME" label="用户名" />
|
||||
<el-table-column prop="NAME" label="用户名称" />
|
||||
<el-table-column prop="CZTIME" label="登录时间" />
|
||||
<el-table-column label="登录方式">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.SOURCE === '1'"> 网页端 </span>
|
||||
<span v-else-if="row.SOURCE === '2'"> APP </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getLoginRecordList } from "@/request/off_duty_management.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getLoginRecordList);
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,154 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@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="离岗状态" prop="REVIEW_STATUS">
|
||||
<el-select v-model="searchForm.REVIEW_STATUS">
|
||||
<el-option
|
||||
v-for="item in reviewStatusList"
|
||||
:key="item.ID"
|
||||
:value="item.ID"
|
||||
:label="item.NAME"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="审批人" prop="REVIEW_USER_NAME">
|
||||
<el-input v-model="searchForm.REVIEW_USER_NAME" />
|
||||
</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="6">
|
||||
<el-form-item label="申请人部门">
|
||||
<layout-department
|
||||
v-model="searchForm.DEPTIDS"
|
||||
multiple
|
||||
show-checkbox
|
||||
collapse-tags
|
||||
root-disabled="Y"
|
||||
/>
|
||||
</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
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<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 #default="{ row }">
|
||||
<span v-if="row.REVIEW_STATUS === '0'">待审批</span>
|
||||
<span v-else-if="row.REVIEW_STATUS === '1'">审批通过</span>
|
||||
<span
|
||||
v-else-if="row.ISDELETE === '1' && row.REVIEW_STATUS === '-1'"
|
||||
>
|
||||
<span v-if="row.CREATOR === row.OPERATOR">申请人取消</span>
|
||||
<span v-else>审批人取消</span>
|
||||
</span>
|
||||
<span v-else-if="row.REVIEW_STATUS === '-1'">审批打回</span>
|
||||
<span v-else-if="row.REVIEW_STATUS === '2'">无需审批</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离岗时间">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.STARTTIME }} 至 {{ row.ENDTIME }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="指定审批人">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.REVIEW_USER_ID">
|
||||
{{
|
||||
row.REVIEW_USER_NAME +
|
||||
" [" +
|
||||
row.REVIEW_USER_DEPARTMENTNAME +
|
||||
"]"
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" text link @click="fnView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getRecordList } from "@/request/off_duty_management.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
|
||||
const reviewStatusList = [
|
||||
{ ID: "0", NAME: "待审批" },
|
||||
{ ID: "1", NAME: "审批通过" },
|
||||
{ ID: "-1", NAME: "审批打回" },
|
||||
{ ID: "2", NAME: "无需审批" },
|
||||
{ ID: "3", NAME: "申请人取消" },
|
||||
{ ID: "4", NAME: "审批人取消" },
|
||||
];
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getRecordList, { otherParams: { TYPE: "show" } });
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
STARTTIME: searchForm.value.dates?.[0],
|
||||
ENDTIME: searchForm.value.dates?.[1],
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,56 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<layout-table :data="list" :show-pagination="false">
|
||||
<el-table-column label="序号" width="60" type="index" />
|
||||
<el-table-column prop="CORP_NAME" label="企业名称" />
|
||||
<el-table-column label="离岗是否审批" width="260">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
v-model="SETUP_STATE"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="2"
|
||||
inactive-value="1"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="fnChange(row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import {
|
||||
getSettingList,
|
||||
setSettingChange,
|
||||
} from "@/request/off_duty_management.js";
|
||||
import { ref } from "vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const SETUP_STATE = ref("");
|
||||
const { list, fnResetPagination } = useListData(getSettingList, {
|
||||
usePagination: false,
|
||||
callbackFn: (list) => {
|
||||
if (list.length > 0) SETUP_STATE.value = list[0].SETUP_STATE;
|
||||
},
|
||||
});
|
||||
const fnChange = debounce(
|
||||
1000,
|
||||
async (row) => {
|
||||
await setSettingChange({
|
||||
OFFDUTY_SETUP_ID: row.OFFDUTY_SETUP_ID,
|
||||
CORPINFO_ID: row.CORPINFO_ID,
|
||||
SETUP_STATE: SETUP_STATE.value,
|
||||
});
|
||||
ElMessage.success("设置成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -29,7 +29,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="培训类型" prop="TRAINTYPE">
|
||||
<layout-
|
||||
<layout-learning-train-type
|
||||
ref="trainingTypeRef"
|
||||
v-model="data.form.TRAINTYPE"
|
||||
type="trainingType"
|
||||
|
|
|
@ -0,0 +1,204 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单种类" prop="LIST_TYPE">
|
||||
<el-select v-model="searchForm.LIST_TYPE">
|
||||
<el-option label="风险管控清单" value="1" />
|
||||
<el-option label="隐患排查清单" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<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="6">
|
||||
<el-form-item label="清单类型">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="排查类型">
|
||||
<el-select v-model="searchForm.RISKCHECKLISTTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单级别">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</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
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="70">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="LIST_TYPE" label="清单种类">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.LIST_TYPE === '1'">风险管控清单</span>
|
||||
<span v-if="row.LIST_TYPE === '2'">隐患排查清单</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column prop="USER_NAME" label="人员" width="100" />
|
||||
<el-table-column prop="PERIODNAME" label="排查周期" width="100" />
|
||||
<el-table-column prop="SCREENTYPENAME" label="排查类型" width="100" />
|
||||
<el-table-column prop="TYPENAME" label="清单类型" width="100" />
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.ISDELETE === '0'">启用</span>
|
||||
<span v-else-if="row.ISDELETE === '1'">禁用</span>
|
||||
<span v-else-if="row.ISDELETE === '2'"> 已删除 </span>
|
||||
<span v-else-if="row.ISDELETE === '-1'"> 彻底删除 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: `/troubleshooting_statistics/${type}_inspection/inspection_records`,
|
||||
query: {
|
||||
LISTMANAGER_ID: row.LISTMANAGER_ID,
|
||||
LIST_TYPE: row.LIST_TYPE,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
检查记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import { getChecklistInspectionRecordList } from "@/request/troubleshooting_statistics.js";
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
default: "day",
|
||||
},
|
||||
});
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const PERIOD = {
|
||||
day: "checkPeriod0001",
|
||||
week: "checkPeriod0002",
|
||||
ten_day: "checkPeriod0003",
|
||||
};
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getChecklistInspectionRecordList, {
|
||||
otherParams: { PERIOD: PERIOD[props.type] },
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,214 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="50px"
|
||||
@submit.prevent="fnGetData"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="时间" prop="YEAR">
|
||||
<el-date-picker
|
||||
v-model="searchForm.YEAR"
|
||||
:clearable="false"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
placeholder="选择年"
|
||||
/>
|
||||
</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="fnGetData">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<div id="printContainer">
|
||||
<div class="tc">
|
||||
<h2>{{ info.NAME }}</h2>
|
||||
</div>
|
||||
<div class="mb-20">
|
||||
<div
|
||||
class="ptb-15"
|
||||
style="display: flex; justify-content: space-between"
|
||||
>
|
||||
<div>排查人员:{{ info.USER_NAME }}</div>
|
||||
<div>排查频次:每天</div>
|
||||
</div>
|
||||
<table v-if="LIST_TYPE === '1'" class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px" class="title">序号</th>
|
||||
<th style="width: 150px" class="title">风险单元</th>
|
||||
<th style="width: 150px" class="title">排查部位</th>
|
||||
<th style="width: 150px" class="title">风险管控措施</th>
|
||||
<th style="width: 150px" class="title">
|
||||
风险失控表现(问题隐患)
|
||||
</th>
|
||||
<th style="width: 150px" class="title">失职部门和人员</th>
|
||||
<th style="width: 150px" class="title">排查责任人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.RISKUNITNAME }}</td>
|
||||
<td>{{ item.PARTSNAME }}</td>
|
||||
<td>{{ item.CHECK_CONTENT }}</td>
|
||||
<td>{{ item.RISK_DESCR }}</td>
|
||||
<td>{{ item.DEPARTMENT_NAME }}/{{ item.USERNAME }}</td>
|
||||
<td>{{ info.DEPARTMENT_NAME }}/{{ info.USER_NAME }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table v-if="LIST_TYPE === '2'" class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px" class="title">序号</th>
|
||||
<th style="width: 150px" class="title">检查类别</th>
|
||||
<th style="width: 150px" class="title">检查项目</th>
|
||||
<th style="width: 150px" class="title">检查内容</th>
|
||||
<th style="width: 150px" class="title">检查标准</th>
|
||||
<th style="width: 150px" class="title">参考依据</th>
|
||||
<th style="width: 150px" class="title">失职部门和人员</th>
|
||||
<th style="width: 150px" class="title">排查责任人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.CHECK_CATEGORY_NAME }}</td>
|
||||
<td>{{ item.CHECK_ITEM_NAME }}</td>
|
||||
<td>{{ item.CHECK_CONTENT }}</td>
|
||||
<td>{{ item.CHECK_STANDARD }}</td>
|
||||
<td>{{ item.REFERENCE_BASIS }}</td>
|
||||
<td>{{ item.DEPARTMENT_NAME }}/{{ item.USER_NAME }}</td>
|
||||
<td>{{ info.DEPARTMENT_NAME }}/{{ info.USER_NAME }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tc">
|
||||
<h3>日常隐患排查表</h3>
|
||||
</div>
|
||||
<div class="mb-20">
|
||||
<div class="tr ptb-15">
|
||||
(备注:√ 表示已检查,×表示未检查,<img
|
||||
src="/src/assets/images/print/white/waring.png"
|
||||
alt=""
|
||||
/>表示离岗/休班 ,-表示未建立)
|
||||
</div>
|
||||
<table class="print_table">
|
||||
<tr v-for="(item, index) in recordList" :key="index">
|
||||
<td
|
||||
v-for="(item1, index1) in item.TRLIST"
|
||||
:key="index1"
|
||||
style="width: 100px; vertical-align: baseline"
|
||||
>
|
||||
<table class="print_table">
|
||||
<tbody>
|
||||
<template
|
||||
v-for="(item2, index2) in item1.TDLIST"
|
||||
:key="index2"
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
v-for="(item3, index3) in item2.DAYLIST"
|
||||
:key="index3"
|
||||
>
|
||||
{{ item3.DAY }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
v-for="(item3, index3) in item2.DAYLIST"
|
||||
:key="index3"
|
||||
style="height: 38px"
|
||||
>
|
||||
<div v-if="item3.CHECKDATA === '△'">
|
||||
<img
|
||||
src="/src/assets/images/print/white/waring.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div v-else>{{ item3.CHECKDATA }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<div>{{ item1.MONTH }}月检查发现问题描述:</div>
|
||||
<div
|
||||
v-for="(item4, index4) in item1.HDLIST"
|
||||
:key="index4"
|
||||
>
|
||||
{{ item4 }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-10 tc">
|
||||
<el-button v-print="'#printContainer'" type="primary">打 印</el-button>
|
||||
</div>
|
||||
<div v-html="PRINT_STYLE" />
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import {
|
||||
getChecklistInspectionRecordDayInspectionList,
|
||||
getCustomChecklistInspectionRecordDayInspectionList,
|
||||
} from "@/request/troubleshooting_statistics.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import dayjs from "dayjs";
|
||||
import { ref } from "vue";
|
||||
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||
|
||||
const route = useRoute();
|
||||
const { LISTMANAGER_ID, LIST_TYPE } = route.query;
|
||||
const info = ref({});
|
||||
const recordList = ref([]);
|
||||
const { list, searchForm, fnGetData } =
|
||||
LIST_TYPE === "1"
|
||||
? useListData(getChecklistInspectionRecordDayInspectionList, {
|
||||
otherParams: { LISTMANAGER_ID },
|
||||
defaultSearchForm: { YEAR: dayjs().format("YYYY") },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.pd;
|
||||
recordList.value = resData.recordList;
|
||||
},
|
||||
})
|
||||
: useListData(getCustomChecklistInspectionRecordDayInspectionList, {
|
||||
otherParams: { CUSTOM_ID: LISTMANAGER_ID },
|
||||
defaultSearchForm: { YEAR: dayjs().format("YYYY") },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.pd;
|
||||
recordList.value = resData.recordList;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<index-view type="ten_day" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IndexView from "../day_inspection/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="50px"
|
||||
@submit.prevent="fnGetData"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="时间" prop="YEAR">
|
||||
<el-date-picker
|
||||
v-model="searchForm.YEAR"
|
||||
:clearable="false"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
placeholder="选择年"
|
||||
/>
|
||||
</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="fnGetData">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<div id="printContainer">
|
||||
<div class="tc">
|
||||
<h2>{{ info.NAME }}</h2>
|
||||
</div>
|
||||
<div class="mb-20">
|
||||
<div
|
||||
class="ptb-15"
|
||||
style="display: flex; justify-content: space-between"
|
||||
>
|
||||
<div>排查部门:{{ info.DEPARTMENT_NAME }}</div>
|
||||
</div>
|
||||
<table v-if="LIST_TYPE === '1'" class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px" class="title">序号</th>
|
||||
<th style="width: 150px" class="title">风险单元</th>
|
||||
<th style="width: 150px" class="title">排查部位</th>
|
||||
<th style="width: 150px" class="title">风险管控措施</th>
|
||||
<th style="width: 150px" class="title">
|
||||
风险失控表现(问题隐患)
|
||||
</th>
|
||||
<th style="width: 150px" class="title">失职部门和人员</th>
|
||||
<th style="width: 150px" class="title">排查责任人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.RISKUNITNAME }}</td>
|
||||
<td>{{ item.PARTSNAME }}</td>
|
||||
<td>{{ item.CHECK_CONTENT }}</td>
|
||||
<td>{{ item.RISK_DESCR }}</td>
|
||||
<td>{{ item.DEPARTMENT_NAME }}/{{ item.USERNAME }}</td>
|
||||
<td>{{ info.DEPARTMENT_NAME }}/{{ info.USER_NAME }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table v-if="LIST_TYPE === '2'" class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px" class="title">序号</th>
|
||||
<th style="width: 150px" class="title">检查类别</th>
|
||||
<th style="width: 150px" class="title">检查项目</th>
|
||||
<th style="width: 150px" class="title">检查内容</th>
|
||||
<th style="width: 150px" class="title">检查标准</th>
|
||||
<th style="width: 150px" class="title">参考依据</th>
|
||||
<th style="width: 150px" class="title">失职部门和人员</th>
|
||||
<th style="width: 150px" class="title">排查责任人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.CHECK_CATEGORY_NAME }}</td>
|
||||
<td>{{ item.CHECK_ITEM_NAME }}</td>
|
||||
<td>{{ item.CHECK_CONTENT }}</td>
|
||||
<td>{{ item.CHECK_STANDARD }}</td>
|
||||
<td>{{ item.REFERENCE_BASIS }}</td>
|
||||
<td>{{ item.DEPARTMENT_NAME }}/{{ item.USER_NAME }}</td>
|
||||
<td>{{ info.DEPARTMENT_NAME }}/{{ info.USER_NAME }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tc">
|
||||
<h3>{{ YEAR }}年旬检清单排查表</h3>
|
||||
</div>
|
||||
<div
|
||||
class="ptb-15"
|
||||
style="display: flex; justify-content: space-between"
|
||||
>
|
||||
<div>检查方式:现场检查</div>
|
||||
<div>检查人员:{{ info.USER_NAME }}</div>
|
||||
<div class="tr">
|
||||
检查频次:每旬至少一次(备注:√ 表示已检查,×表示未检查,<img
|
||||
src="/src/assets/images/print/white/waring.png"
|
||||
alt=""
|
||||
/>表示离岗/休班 ,-表示未建立)
|
||||
</div>
|
||||
</div>
|
||||
<table class="print_table">
|
||||
<tr v-for="(item, index) in recordList" :key="index">
|
||||
<td
|
||||
v-for="(item1, index1) in item.TRLIST"
|
||||
:key="index1"
|
||||
:colspan="item1.COLSPAN"
|
||||
:rowspan="item1.ROWSPAN"
|
||||
style="width: 100px"
|
||||
>
|
||||
<div v-if="item1.VALUETYPE === 'string' && item1.VALUE === '△'">
|
||||
<img
|
||||
src="/src/assets/images/print/white/waring.png"
|
||||
alt=""
|
||||
width="16"
|
||||
height="16"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="item1.VALUETYPE === 'string' && item1.VALUE !== '△'"
|
||||
>
|
||||
{{ item1.VALUE }}
|
||||
</div>
|
||||
<div v-else-if="item1.VALUETYPE === 'array'">
|
||||
<div v-for="(item2, index2) in item1.VALUE" :key="index2">
|
||||
{{ index2 + 1 }}.{{ item2 }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-10 tc">
|
||||
<el-button v-print="'#printContainer'" type="primary">打 印</el-button>
|
||||
</div>
|
||||
<div v-html="PRINT_STYLE" />
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import {
|
||||
getChecklistInspectionRecordTenDayInspectionList,
|
||||
getCustomChecklistInspectionRecordTenDayInspectionList,
|
||||
} from "@/request/troubleshooting_statistics.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import dayjs from "dayjs";
|
||||
import { ref } from "vue";
|
||||
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||
|
||||
const route = useRoute();
|
||||
const { LISTMANAGER_ID, LIST_TYPE } = route.query;
|
||||
const info = ref({});
|
||||
const recordList = ref([]);
|
||||
const YEAR = ref("");
|
||||
const { list, searchForm, fnGetData } =
|
||||
LIST_TYPE === "1"
|
||||
? useListData(getChecklistInspectionRecordTenDayInspectionList, {
|
||||
otherParams: { LISTMANAGER_ID },
|
||||
defaultSearchForm: { YEAR: dayjs().format("YYYY") },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.pd;
|
||||
recordList.value = resData.recordList;
|
||||
YEAR.value = searchForm.value.YEAR;
|
||||
},
|
||||
})
|
||||
: useListData(getCustomChecklistInspectionRecordTenDayInspectionList, {
|
||||
otherParams: { CUSTOM_ID: LISTMANAGER_ID },
|
||||
defaultSearchForm: { YEAR: dayjs().format("YYYY") },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.pd;
|
||||
recordList.value = resData.recordList;
|
||||
YEAR.value = searchForm.value.YEAR;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<index-view type="week" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IndexView from "../day_inspection/index.vue";
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,193 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="50px"
|
||||
@submit.prevent="fnGetData"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="时间" prop="YEAR">
|
||||
<el-date-picker
|
||||
v-model="searchForm.YEAR"
|
||||
:clearable="false"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
placeholder="选择年"
|
||||
/>
|
||||
</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="fnGetData">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<div id="printContainer">
|
||||
<div class="tc">
|
||||
<h2>{{ info.NAME }}</h2>
|
||||
</div>
|
||||
<div class="mb-20">
|
||||
<div
|
||||
class="ptb-15"
|
||||
style="display: flex; justify-content: space-between"
|
||||
>
|
||||
<div>排查部门:{{ info.DEPARTMENT_NAME }}</div>
|
||||
</div>
|
||||
<table v-if="LIST_TYPE === '1'" class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px" class="title">序号</th>
|
||||
<th style="width: 150px" class="title">风险单元</th>
|
||||
<th style="width: 150px" class="title">排查部位</th>
|
||||
<th style="width: 150px" class="title">风险管控措施</th>
|
||||
<th style="width: 150px" class="title">
|
||||
风险失控表现(问题隐患)
|
||||
</th>
|
||||
<th style="width: 150px" class="title">失职部门和人员</th>
|
||||
<th style="width: 150px" class="title">排查责任人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.RISKUNITNAME }}</td>
|
||||
<td>{{ item.PARTSNAME }}</td>
|
||||
<td>{{ item.CHECK_CONTENT }}</td>
|
||||
<td>{{ item.RISK_DESCR }}</td>
|
||||
<td>{{ item.DEPARTMENT_NAME }}/{{ item.USERNAME }}</td>
|
||||
<td>{{ info.DEPARTMENT_NAME }}/{{ info.USER_NAME }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table v-if="LIST_TYPE === '2'" class="print_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px" class="title">序号</th>
|
||||
<th style="width: 150px" class="title">检查类别</th>
|
||||
<th style="width: 150px" class="title">检查项目</th>
|
||||
<th style="width: 150px" class="title">检查内容</th>
|
||||
<th style="width: 150px" class="title">检查标准</th>
|
||||
<th style="width: 150px" class="title">参考依据</th>
|
||||
<th style="width: 150px" class="title">失职部门和人员</th>
|
||||
<th style="width: 150px" class="title">排查责任人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in list" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.CHECK_CATEGORY_NAME }}</td>
|
||||
<td>{{ item.CHECK_ITEM_NAME }}</td>
|
||||
<td>{{ item.CHECK_CONTENT }}</td>
|
||||
<td>{{ item.CHECK_STANDARD }}</td>
|
||||
<td>{{ item.REFERENCE_BASIS }}</td>
|
||||
<td>{{ item.DEPARTMENT_NAME }}/{{ item.USER_NAME }}</td>
|
||||
<td>{{ info.DEPARTMENT_NAME }}/{{ info.USER_NAME }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tc">
|
||||
<h3>{{ YEAR }}年周检清单排查表</h3>
|
||||
</div>
|
||||
<div
|
||||
class="ptb-15"
|
||||
style="display: flex; justify-content: space-between"
|
||||
>
|
||||
<div>检查方式:现场检查</div>
|
||||
<div>检查人员:{{ info.USER_NAME }}</div>
|
||||
<div class="tr">
|
||||
检查频次:每周一次(备注:√ 表示已检查,×表示未检查,<img
|
||||
src="/src/assets/images/print/white/waring.png"
|
||||
alt=""
|
||||
/>表示离岗/休班 ,-表示未建立)
|
||||
</div>
|
||||
</div>
|
||||
<table class="print_table">
|
||||
<tr v-for="(item, index) in recordList" :key="index">
|
||||
<td
|
||||
v-for="(item1, index1) in item.TRLIST"
|
||||
:key="index1"
|
||||
:colspan="item1.COLSPAN"
|
||||
:rowspan="item1.ROWSPAN"
|
||||
style="width: 100px"
|
||||
>
|
||||
<div v-if="item1.VALUETYPE === 'string' && item1.VALUE === '△'">
|
||||
<img src="/src/assets/images/print/white/waring.png" alt="" />
|
||||
</div>
|
||||
<div
|
||||
v-else-if="item1.VALUETYPE === 'string' && item1.VALUE !== '△'"
|
||||
>
|
||||
{{ item1.VALUE }}
|
||||
</div>
|
||||
<div v-else-if="item1.VALUETYPE === 'array'">
|
||||
<div v-for="(item3, index2) in item1.VALUE" :key="index2">
|
||||
{{ index2 + 1 }}.{{ item3 }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-10 tc">
|
||||
<el-button v-print="'#printContainer'" type="primary">打 印</el-button>
|
||||
</div>
|
||||
<div v-html="PRINT_STYLE" />
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import {
|
||||
getChecklistInspectionRecordWeekInspectionList,
|
||||
getCustomChecklistInspectionRecordWeekInspectionList,
|
||||
} from "@/request/troubleshooting_statistics.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import dayjs from "dayjs";
|
||||
import { ref } from "vue";
|
||||
import { PRINT_STYLE } from "@/assets/js/constant.js";
|
||||
|
||||
const route = useRoute();
|
||||
const { LISTMANAGER_ID, LIST_TYPE } = route.query;
|
||||
const info = ref({});
|
||||
const recordList = ref([]);
|
||||
const YEAR = ref("");
|
||||
const { list, searchForm, fnGetData } =
|
||||
LIST_TYPE === "1"
|
||||
? useListData(getChecklistInspectionRecordWeekInspectionList, {
|
||||
otherParams: { LISTMANAGER_ID },
|
||||
defaultSearchForm: { YEAR: dayjs().format("YYYY") },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.pd;
|
||||
recordList.value = resData.recordList;
|
||||
YEAR.value = searchForm.value.YEAR;
|
||||
},
|
||||
})
|
||||
: useListData(getCustomChecklistInspectionRecordWeekInspectionList, {
|
||||
otherParams: { CUSTOM_ID: LISTMANAGER_ID },
|
||||
defaultSearchForm: { YEAR: dayjs().format("YYYY") },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
info.value = resData.pd;
|
||||
recordList.value = resData.recordList;
|
||||
YEAR.value = searchForm.value.YEAR;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="type === 'add' ? '新增' : '修改'"
|
||||
@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' ? '新增' : '修改'"
|
||||
@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 value="0">否</el-radio>
|
||||
<el-radio value="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template v-if="form.ISCUSTOM === '1'">
|
||||
<el-col
|
||||
v-for="(item, index) in form.periodList"
|
||||
:key="item.id"
|
||||
:span="24"
|
||||
>
|
||||
<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,251 @@
|
|||
<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
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称">
|
||||
<template #default="{ 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><arrow-right /></el-icon>
|
||||
</el-button>
|
||||
<span v-else>{{ row.NAME }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="parentId !== '0'"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@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
|
||||
v-model:visible="data.viewDialog.visible"
|
||||
:period-list="data.viewDialog.periodList"
|
||||
:info="data.viewDialog.info"
|
||||
/>
|
||||
<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 { serialNumber } from "@/assets/js/utils";
|
||||
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