|
|
@@ -2,7 +2,7 @@
|
|
|
<div class="monthly-report-add">
|
|
|
<el-form
|
|
|
ref="formRef"
|
|
|
- :model="formData"
|
|
|
+ :model="reportInfo"
|
|
|
:rules="formRules"
|
|
|
label-width="auto"
|
|
|
class="report-form">
|
|
|
@@ -20,7 +20,7 @@
|
|
|
<el-tree-select
|
|
|
clearable
|
|
|
disabled
|
|
|
- v-model="formData.deptId"
|
|
|
+ v-model="reportInfo.deptId"
|
|
|
:data="deptList2"
|
|
|
:props="defaultProps"
|
|
|
:check-strictly="false"
|
|
|
@@ -31,15 +31,15 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
<el-form-item label="月报标题" prop="title">
|
|
|
- <el-input disabled v-model="formData.title" placeholder="请输入月报标题" />
|
|
|
+ <el-input disabled v-model="reportInfo.title" placeholder="请输入月报标题" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="16">
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
|
|
|
- <el-form-item label="年月" prop="yearMonth">
|
|
|
+ <el-form-item label="年月" prop="yearMonths">
|
|
|
<el-date-picker
|
|
|
- v-model="formData.yearMonth"
|
|
|
+ v-model="reportInfo.yearMonths"
|
|
|
type="month"
|
|
|
placeholder="选择年月"
|
|
|
format="YYYY-MM"
|
|
|
@@ -63,7 +63,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="员工人数" prop="employee">
|
|
|
<el-input-number
|
|
|
- v-model="formData.employee"
|
|
|
+ v-model="reportInfo.employee"
|
|
|
:min="0"
|
|
|
disabled
|
|
|
:precision="0"
|
|
|
@@ -74,7 +74,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="分包商人数" prop="subcontractors">
|
|
|
<el-input-number
|
|
|
- v-model="formData.subcontractors"
|
|
|
+ v-model="reportInfo.subcontractors"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -85,7 +85,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="安全行驶里程数(公里)" prop="drivingMileage">
|
|
|
<el-input-number
|
|
|
- v-model="formData.drivingMileage"
|
|
|
+ v-model="reportInfo.drivingMileage"
|
|
|
:min="0"
|
|
|
:precision="2"
|
|
|
disabled
|
|
|
@@ -96,7 +96,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="总人工时数(小时)" prop="totalManHours">
|
|
|
<el-input-number
|
|
|
- v-model="formData.totalManHours"
|
|
|
+ v-model="reportInfo.totalManHours"
|
|
|
:min="0"
|
|
|
:precision="2"
|
|
|
disabled
|
|
|
@@ -119,7 +119,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="无事故累计天数" prop="withoutAccident">
|
|
|
<el-input-number
|
|
|
- v-model="formData.withoutAccident"
|
|
|
+ v-model="reportInfo.withoutAccident"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -130,7 +130,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="死亡事故(起)" prop="fatality">
|
|
|
<el-input-number
|
|
|
- v-model="formData.fatality"
|
|
|
+ v-model="reportInfo.fatality"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -141,7 +141,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="损失工时事故(起)" prop="injury">
|
|
|
<el-input-number
|
|
|
- v-model="formData.injury"
|
|
|
+ v-model="reportInfo.injury"
|
|
|
:min="0"
|
|
|
disabled
|
|
|
:precision="0"
|
|
|
@@ -152,7 +152,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="工作受限事件(起)" prop="restrictedCase">
|
|
|
<el-input-number
|
|
|
- v-model="formData.restrictedCase"
|
|
|
+ v-model="reportInfo.restrictedCase"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -165,7 +165,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="医疗处理事件(起)" prop="medicalCase">
|
|
|
<el-input-number
|
|
|
- v-model="formData.medicalCase"
|
|
|
+ v-model="reportInfo.medicalCase"
|
|
|
:min="0"
|
|
|
disabled
|
|
|
:precision="0"
|
|
|
@@ -176,7 +176,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="急救箱事件(起)" prop="firstAidCase">
|
|
|
<el-input-number
|
|
|
- v-model="formData.firstAidCase"
|
|
|
+ v-model="reportInfo.firstAidCase"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -187,7 +187,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="交通事故(起)" prop="vehicleAccident">
|
|
|
<el-input-number
|
|
|
- v-model="formData.vehicleAccident"
|
|
|
+ v-model="reportInfo.vehicleAccident"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -198,7 +198,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="未遂事件(起)" prop="nearMiss">
|
|
|
<el-input-number
|
|
|
- v-model="formData.nearMiss"
|
|
|
+ v-model="reportInfo.nearMiss"
|
|
|
:min="0"
|
|
|
disabled
|
|
|
:precision="0"
|
|
|
@@ -211,7 +211,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="泄漏事件(起)" prop="spill">
|
|
|
<el-input-number
|
|
|
- v-model="formData.spill"
|
|
|
+ v-model="reportInfo.spill"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -222,7 +222,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="违反保命规则的次数(次)" prop="lifeSavingRules">
|
|
|
<el-input-number
|
|
|
- v-model="formData.lifeSavingRules"
|
|
|
+ v-model="reportInfo.lifeSavingRules"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -245,7 +245,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="班前会(次)" prop="toolboxTalk">
|
|
|
<el-input-number
|
|
|
- v-model="formData.toolboxTalk"
|
|
|
+ v-model="reportInfo.toolboxTalk"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -256,7 +256,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="QHSE管理委员会会议(次)" prop="committeeMeeting">
|
|
|
<el-input-number
|
|
|
- v-model="formData.committeeMeeting"
|
|
|
+ v-model="reportInfo.committeeMeeting"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -267,7 +267,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="QHSE月度例会(次)" prop="monthlyMeeting">
|
|
|
<el-input-number
|
|
|
- v-model="formData.monthlyMeeting"
|
|
|
+ v-model="reportInfo.monthlyMeeting"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -278,7 +278,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="公司级隐患排查(次)" prop="companyHazard">
|
|
|
<el-input-number
|
|
|
- v-model="formData.companyHazard"
|
|
|
+ v-model="reportInfo.companyHazard"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -291,7 +291,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="QHSE检查(次)" prop="qhseInspection">
|
|
|
<el-input-number
|
|
|
- v-model="formData.qhseInspection"
|
|
|
+ v-model="reportInfo.qhseInspection"
|
|
|
:min="0"
|
|
|
disabled
|
|
|
:precision="0"
|
|
|
@@ -302,7 +302,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="安全观察卡(张)" prop="socCards">
|
|
|
<el-input-number
|
|
|
- v-model="formData.socCards"
|
|
|
+ v-model="reportInfo.socCards"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
controls-position="right"
|
|
|
@@ -313,7 +313,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="工作许可审核(份)" prop="ptwAudit">
|
|
|
<el-input-number
|
|
|
- v-model="formData.ptwAudit"
|
|
|
+ v-model="reportInfo.ptwAudit"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -324,7 +324,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="工作安全分析(次)" prop="jsa">
|
|
|
<el-input-number
|
|
|
- v-model="formData.jsa"
|
|
|
+ v-model="reportInfo.jsa"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
disabled
|
|
|
@@ -337,7 +337,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="演练次数" prop="drills">
|
|
|
<el-input-number
|
|
|
- v-model="formData.drills"
|
|
|
+ v-model="reportInfo.drills"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
controls-position="right"
|
|
|
@@ -348,7 +348,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="QHSE培训次数" prop="training">
|
|
|
<el-input-number
|
|
|
- v-model="formData.training"
|
|
|
+ v-model="reportInfo.training"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
controls-position="right"
|
|
|
@@ -359,7 +359,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="QHSE培训人次" prop="participantsTraining">
|
|
|
<el-input-number
|
|
|
- v-model="formData.participantsTraining"
|
|
|
+ v-model="reportInfo.participantsTraining"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
|
controls-position="right"
|
|
|
@@ -370,7 +370,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="QHSE培训学时数(小时)" prop="trainingsHours">
|
|
|
<el-input-number
|
|
|
- v-model="formData.trainingsHours"
|
|
|
+ v-model="reportInfo.trainingsHours"
|
|
|
:min="0"
|
|
|
:precision="2"
|
|
|
controls-position="right"
|
|
|
@@ -393,7 +393,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="水消耗(吨)" prop="waterConsumption">
|
|
|
<el-input-number
|
|
|
- v-model="formData.waterConsumption"
|
|
|
+ v-model="reportInfo.waterConsumption"
|
|
|
:min="0"
|
|
|
:precision="2"
|
|
|
controls-position="right"
|
|
|
@@ -404,7 +404,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="柴油消耗(升)" prop="dieselConsumption">
|
|
|
<el-input-number
|
|
|
- v-model="formData.dieselConsumption"
|
|
|
+ v-model="reportInfo.dieselConsumption"
|
|
|
:min="0"
|
|
|
:precision="2"
|
|
|
controls-position="right"
|
|
|
@@ -415,7 +415,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="用电量(千瓦·小时)" prop="electricityConsumption">
|
|
|
<el-input-number
|
|
|
- v-model="formData.electricityConsumption"
|
|
|
+ v-model="reportInfo.electricityConsumption"
|
|
|
:min="0"
|
|
|
disabled
|
|
|
:precision="2"
|
|
|
@@ -426,7 +426,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6">
|
|
|
<el-form-item label="天然气消耗量(立方米)" prop="naturalGasConsumption">
|
|
|
<el-input-number
|
|
|
- v-model="formData.naturalGasConsumption"
|
|
|
+ v-model="reportInfo.naturalGasConsumption"
|
|
|
:min="0"
|
|
|
disabled
|
|
|
:precision="2"
|
|
|
@@ -465,7 +465,7 @@
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input
|
|
|
- v-model="formData.remark"
|
|
|
+ v-model="reportInfo.remark"
|
|
|
type="textarea"
|
|
|
:rows="4"
|
|
|
disabled
|
|
|
@@ -513,9 +513,9 @@ const formRef = ref<FormInstance>()
|
|
|
const submitLoading = ref(false)
|
|
|
|
|
|
// 表单数据
|
|
|
-const formData = reactive({
|
|
|
+const reportInfo = reactive({
|
|
|
title: '',
|
|
|
- yearMonth: '',
|
|
|
+ yearMonths: '',
|
|
|
deptId: 0,
|
|
|
employee: '0',
|
|
|
subcontractors: '0',
|
|
|
@@ -575,7 +575,7 @@ const userSelectFormRef = ref()
|
|
|
const handleDeptConfirm = async (deptList: any[]) => {
|
|
|
if (deptList && deptList.length > 0) {
|
|
|
const dept = deptList[0]
|
|
|
- formData.deptId = dept.id
|
|
|
+ reportInfo.deptId = dept.id
|
|
|
deptName.value = dept.name
|
|
|
}
|
|
|
}
|
|
|
@@ -589,7 +589,7 @@ const openUserSelect = () => {
|
|
|
const handleUserConfirm = (userId: any, userList: any[]) => {
|
|
|
if (userList && userList.length > 0) {
|
|
|
const user = userList[0]
|
|
|
- formData.dutyPerson = user.id
|
|
|
+ reportInfo.dutyPerson = user.id
|
|
|
dutyPersonName.value = user.nickname
|
|
|
}
|
|
|
}
|
|
|
@@ -604,7 +604,7 @@ const handleSubmit = async () => {
|
|
|
|
|
|
submitLoading.value = true
|
|
|
try {
|
|
|
- await QhseMonthReportApi.createQhseMonthReport(formData)
|
|
|
+ await QhseMonthReportApi.createQhseMonthReport(reportInfo)
|
|
|
message.success('新增成功')
|
|
|
// 返回列表页或上一页
|
|
|
router.back()
|
|
|
@@ -623,6 +623,12 @@ const back = () => {
|
|
|
|
|
|
onMounted(async () => {
|
|
|
deptList2.value = handleTree(await DeptApi.getSimpleDeptList())
|
|
|
+ const res = await QhseMonthReportApi.getQhseMonthReport(route.params.id)
|
|
|
+ const data = (res as any)?.data ?? res ?? {}
|
|
|
+
|
|
|
+ Object.assign(reportInfo, data)
|
|
|
+ dutyPersonName.value =
|
|
|
+ data.personName || data.dutyPersonName || getUserDisplayName(data.dutyPersonInfo || data)
|
|
|
})
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|