1252 lines
51 KiB
Vue
1252 lines
51 KiB
Vue
<template>
|
||
<div class="dangerousBigProject">
|
||
<div v-if="dialogFormVisible">
|
||
<div class="search-box">
|
||
<el-form :inline="true" :model="formInline" class="demo-form-inline" size="small">
|
||
<el-form-item label="作业票编号">
|
||
<el-input placeholder="请输入" v-model="formInline.workTicketCode" clearable style="width: 200px">
|
||
</el-input>
|
||
</el-form-item>
|
||
<el-form-item label="作业申请单位">
|
||
<el-select v-model="formInline.enterpriseId" placeholder="请选择">
|
||
<el-option :label="item.enterpriseName" :value="item.id"
|
||
v-for="(item, index) in responsibilityList" :key="index">
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="动火人">
|
||
<el-input placeholder="请输入" v-model="formInline.firemanName" clearable style="width: 200px">
|
||
</el-input>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="primary" @click="onSubmit" plain>{{
|
||
$t('message.quality.inquire')
|
||
}}</el-button>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="warning" @click="onRefresh" plain>刷新</el-button>
|
||
</el-form-item>
|
||
</el-form>
|
||
<!-- 新增 -->
|
||
<!-- <el-button v-permission="{key: 'wdgc_add', menuPath: '/project/dangerousBigProject/parameter'}" type="primary" @click="showAddDialog()" size="small">
|
||
|
||
{{ $t('message.dangerousBigProject.add') }}
|
||
</el-button> -->
|
||
<!-- <el-button type="danger" size="small">批量删除</el-button> -->
|
||
</div>
|
||
<div class="table-box">
|
||
<el-table class="tables" :data="tableData" size="small" @cell-click="previewDetail"
|
||
@selection-change="handleSelectionChange" :header-cell-style="{ 'text-align': 'center' }">
|
||
<!-- <el-table-column type="selection" align="center" width="60px"></el-table-column> -->
|
||
<el-table-column label="序号" type="index" align="center" width="60"></el-table-column>
|
||
|
||
<el-table-column align="center" label="作业票编号" prop="workTicketCode">
|
||
<template slot-scope="scope">
|
||
<div class="" style="display: flex;justify-content:center;font-weight:bold">
|
||
<div style="display: flex" :style="tableData.some(item => item.engineeringState == 3) ? 'justify-content:flex-end' : 'justify-content:center;'">
|
||
<el-tag type="danger" effect="dark" size="mini"
|
||
v-if="scope.row.engineeringState === 3">超期</el-tag>
|
||
<!-- <el-tag type="danger" effect="dark" size="mini">超期</el-tag> -->
|
||
<p class="item-title" style="margin-left:5px">{{ scope.row.workTicketCode }}</p>
|
||
</div>
|
||
<!-- <p>{{scope.row.people}}识别于:{{ scope.row.date }}</p> -->
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column align="center" label="作业申请单位" show-overflow-tooltip>
|
||
<!-- 作业申请单位 -->
|
||
<template slot-scope="scope">
|
||
{{ scope.row.jobApplicationUnitName }}
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column align="center" label="作业申请时间" prop="jobApplicationTime"></el-table-column>
|
||
<el-table-column align="center" label="动火作业级别" prop="hotWorkLevel">
|
||
<template slot-scope="scope">
|
||
<div :style="scope.row.hotWorkLevel == '特级' ?'color:#f56c6c' : scope.row.hotWorkLevel == '一级' ? 'color:#DAA520' : scope.row.hotWorkLevel == '二级' ? 'color:#5181F6' : ''"> {{ scope.row.hotWorkLevel }}</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column align="center" label="动火人及证书编号" prop="firemanAndCertificateNo"></el-table-column>
|
||
<!-- <el-table-column align="center" label="证书编号" prop="certificateNo"></el-table-column> -->
|
||
<el-table-column align="center" label="作业单位" prop="operatingUnitName"></el-table-column>
|
||
<el-table-column align="center" label="作业负责人" prop="assignmentPersonInChargeName"></el-table-column>
|
||
<!-- 状态 -->
|
||
<el-table-column :label="$t('message.dangerousBigProject.finalAcceptanceStatus')" align="center">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.finalAcceptanceStatus === 1"
|
||
style="color:#DAA520;font-weight:bold;">进行中</span>
|
||
<span v-if="scope.row.finalAcceptanceStatus === 2"
|
||
style="color:#008000;font-weight:bold;">已完工</span>
|
||
</template>
|
||
</el-table-column>
|
||
<!-- 操作 -->
|
||
<el-table-column align="center" :label="$t('message.dangerousBigProject.operation')" width="120">
|
||
<template slot-scope="scope">
|
||
<!-- <el-button
|
||
@click.native.prevent="viewData(scope.$index, tableData)"
|
||
type="text"
|
||
size="small">
|
||
查看
|
||
</el-button> -->
|
||
<!-- <el-button
|
||
@click.native.prevent="editData(scope.$index, tableData)"
|
||
type="text"
|
||
size="small">
|
||
编辑
|
||
</el-button> -->
|
||
<!-- <el-button
|
||
v-permission="{key: 'wdgc_edit', menuPath: '/project/dangerousBigProject/parameter'}"
|
||
@click.stop="editRow(scope.$index, tableData)"
|
||
type="text"
|
||
size="small"
|
||
>
|
||
<i class="el-icon-edit"></i>
|
||
</el-button> -->
|
||
<!-- v-permission="{key: 'wdgc_delete', menuPath: '/project/dangerousBigProject/parameter'}" -->
|
||
<el-button @click.stop="deleteRow(scope.$index, tableData)" type="text" size="small">
|
||
<i class="el-icon-delete"></i>
|
||
删除
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
<el-pagination class="pagerBox" background @size-change="handleSizeChange"
|
||
@current-change="handleCurrentChange" :current-page.sync="pageNo" layout="sizes, prev, pager, next"
|
||
:page-sizes="[10, 20, 30, 40]" :page-size="pageSize" :total="Number(total)">
|
||
</el-pagination>
|
||
</div>
|
||
|
||
<!-- <el-dialog :modal-append-to-body="false" :title="dialogTitle" :visible.sync="dialogFormVisible" class="add-dialog">
|
||
<div class="form-title">基础信息</div>
|
||
<el-form :model="addForm">
|
||
<el-row :gutter="40">
|
||
<el-col :span="12">
|
||
<el-form-item label="危大工程名称:" required :label-width="formLabelWidth">
|
||
<el-input v-model="addForm.name" :disabled="isEditDisabled" placeholder="请输入危大工程名称" autocomplete="off"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="危大工程类别:" required :label-width="formLabelWidth">
|
||
<el-select v-model="addForm.category" :disabled="isEditDisabled" @change="changeType" placeholder="请选择危大工程类别">
|
||
<el-option v-for="item in typeOptions"
|
||
:key="item.value"
|
||
:label="item.label"
|
||
:value="item.value"
|
||
>
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="40">
|
||
<el-col :span="12">
|
||
<el-form-item label="危大工程概况:" :label-width="formLabelWidth">
|
||
<el-input v-model="addForm.points" :disabled="isDisabled" placeholder="请输入危大工程概况" autocomplete="off"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="类别描述:" required :label-width="formLabelWidth">
|
||
<el-select v-model="addForm.describe" :disabled="isEditDisabled" placeholder="请选择类别描述">
|
||
<el-option v-for="item in describeOptions"
|
||
:key="item.value"
|
||
:label="item.label"
|
||
:value="item.value">
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="40">
|
||
<el-col :span="12">
|
||
<el-form-item label="施工部位:" :label-width="formLabelWidth">
|
||
<el-input v-model="addForm.address" :disabled="isDisabled" placeholder="请输入施工部位" autocomplete="off"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="施工计划:" :label-width="formLabelWidth">
|
||
<el-date-picker
|
||
:disabled="isDisabled"
|
||
v-model="addForm.date"
|
||
type="daterange"
|
||
range-separator="至"
|
||
value-format="yyyy-MM-dd"
|
||
start-placeholder="开始日期"
|
||
end-placeholder="结束日期">
|
||
</el-date-picker>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-row :gutter="40">
|
||
<el-col :span="12">
|
||
<el-form-item label="责任人:" :label-width="formLabelWidth">
|
||
<el-input v-model="addForm.people" :disabled="isDisabled" placeholder="请输入责任人" autocomplete="off"></el-input>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="责任分包单位:" :label-width="formLabelWidth">
|
||
<el-cascader
|
||
:disabled="isDisabled"
|
||
v-model="addForm.unit"
|
||
placeholder="请选择责任分包单位"
|
||
:options="options"
|
||
:props="props"
|
||
clearable>
|
||
</el-cascader>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</el-form>
|
||
<div class="form-title">危大工程资料</div>
|
||
<div class="upload-box">
|
||
<div class="upload-file">
|
||
<div class="upload-item">
|
||
<span>安全技术交底:</span>
|
||
<el-switch v-model="safeStatus" :disabled="isDisabled" >
|
||
</el-switch>
|
||
<span v-if="safeStatus" class="switch-check">已完成</span>
|
||
<span v-else class="switch-uncheck">未完成</span>
|
||
</div>
|
||
<div v-if="dialogTitle == '查看' && file1">{{fileName1}}<a :href="file1">下载</a></div>
|
||
<el-upload
|
||
class="uploadBox"
|
||
:action='$store.state.UPLOADURL'
|
||
:on-preview="handlePreview"
|
||
:on-remove="handleRemove"
|
||
:before-remove="beforeRemove"
|
||
:on-success="uploadSuccess"
|
||
:on-error="uploadError"
|
||
:limit="1"
|
||
multiple
|
||
name="files"
|
||
accept=".doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf"
|
||
:file-list="fileList">
|
||
<el-button v-if="dialogTitle == '新增' || dialogTitle == '编辑'" size="small" type="primary">点击上传</el-button>
|
||
</el-upload>
|
||
</div>
|
||
<div class="upload-file">
|
||
<div class="upload-item">
|
||
<span>安全专项施工方案及附件:</span>
|
||
<el-switch v-model="safeStatus2" :disabled="isDisabled">
|
||
</el-switch>
|
||
<span v-if="safeStatus2" class="switch-check">已完成</span>
|
||
<span v-else class="switch-uncheck">未完成</span>
|
||
|
||
</div>
|
||
<div v-if="dialogTitle == '查看' && fileName2">{{fileName2}}<a :href="file2">下载</a></div>
|
||
<el-upload
|
||
class="uploadBox"
|
||
:action='$store.state.UPLOADURL'
|
||
:on-preview="handlePreview2"
|
||
:on-remove="handleRemove2"
|
||
:before-remove="beforeRemove2"
|
||
:on-success="uploadSuccess2"
|
||
:on-error="uploadError2"
|
||
:limit="1"
|
||
multiple
|
||
name="files"
|
||
accept=".doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf"
|
||
:file-list="fileList2">
|
||
<el-button v-if="dialogTitle == '新增' || dialogTitle == '编辑'" size="small" type="primary">点击上传</el-button>
|
||
</el-upload>
|
||
</div>
|
||
<div class="upload-file">
|
||
<div class="upload-item">
|
||
<span>专项施工方案交底:</span>
|
||
<el-switch v-model="safeStatus3" :disabled="isDisabled">
|
||
</el-switch>
|
||
<span v-if="safeStatus3" class="switch-check">已完成</span>
|
||
<span v-else class="switch-uncheck">未完成</span>
|
||
</div>
|
||
<div v-if="dialogTitle == '查看' && fileName3">{{fileName3}}<a :href="file3">下载</a></div>
|
||
<el-upload
|
||
class="uploadBox"
|
||
:action='$store.state.UPLOADURL'
|
||
:on-preview="handlePreview3"
|
||
:on-remove="handleRemove3"
|
||
:before-remove="beforeRemove3"
|
||
:on-success="uploadSuccess3"
|
||
:on-error="uploadError3"
|
||
:limit="1"
|
||
multiple
|
||
name="files"
|
||
accept=".doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf"
|
||
:file-list="fileList3">
|
||
<el-button v-if="dialogTitle == '新增' || dialogTitle == '编辑'" size="small" type="primary">点击上传</el-button>
|
||
</el-upload>
|
||
</div>
|
||
</div>
|
||
<div slot="footer" class="dialog-footer">
|
||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||
<el-button type="primary" @click="addData()">确 定</el-button>
|
||
</div>
|
||
</el-dialog> -->
|
||
<!-- 提示 -->
|
||
<el-dialog :modal-append-to-body="false" :title="$t('message.dangerousBigProject.hint')"
|
||
:visible.sync="deleteDialog" width="30%">
|
||
<span>
|
||
<!-- 是否确定删除该条记录? -->
|
||
{{ $t('message.dangerousBigProject.hintContent') }}
|
||
</span>
|
||
<span slot="footer" class="dialog-footer">
|
||
<el-button @click="deleteDialog = false">
|
||
<!-- 取 消 -->
|
||
{{ $t('message.dangerousBigProject.cancel') }}
|
||
</el-button>
|
||
<el-button type="primary" @click="checkDelete">
|
||
<!-- 确 定 -->
|
||
{{ $t('message.dangerousBigProject.confirm') }}
|
||
</el-button>
|
||
</span>
|
||
</el-dialog>
|
||
</div>
|
||
<div style="height: 100%" v-else>
|
||
<el-page-header @back="goBack" :content="dialogTitle" class="backText"
|
||
:class="{ dark: styleType == 2 }"></el-page-header>
|
||
<!-- <addPlan @cancleSave="goBack" v-if="isAdd"></addPlan> -->
|
||
<detail :id="detailId" :isSuperDanger="isSuperDanger" @cancleSave="goBack" :workDetail="workDetail"
|
||
v-if="isEdit">
|
||
<template v-slot:basicinfo>
|
||
<div class="info-content">
|
||
<el-form class="form-box" :model="workDetail">
|
||
<el-form-item label="作业票编号:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.workTicketCode }}
|
||
</el-form-item>
|
||
<el-form-item label="作业申请时间:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.jobApplicationTime }}
|
||
<!-- <el-date-picker v-model="workDetail.jobApplicationTime" type="date"
|
||
value-format="yyyy-MM-dd HH:mm:ss"
|
||
:disabled="isDisabledDetail">
|
||
</el-date-picker> -->
|
||
</el-form-item>
|
||
<el-form-item label="作业申请单位:" :label-width="formLabelWidthDetail">
|
||
<el-select v-model="workDetail.jobApplicationUnit" placeholder="请选择作业申请单位" disabled>
|
||
<el-option :label="item.enterpriseName" :value="item.id"
|
||
v-for="(item, index) in responsibilityList" :key="index">
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="动火地点和动火部位:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.fireLocationAndFirePart }}
|
||
</el-form-item>
|
||
<el-form-item label="作业内容:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.jobContent }}
|
||
</el-form-item>
|
||
<el-form-item label="动火方式:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.hotMethod }}
|
||
</el-form-item>
|
||
<el-form-item label="动火作业级别:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.hotWorkLevel }}
|
||
</el-form-item>
|
||
<el-form-item label="作业负责人:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.assignmentPersonInChargeName }}
|
||
</el-form-item>
|
||
<!-- <el-form-item label="动火人:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.firemanName }}
|
||
</el-form-item> -->
|
||
<el-form-item label="动火人及证书编号:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.firemanAndCertificateNo }}
|
||
</el-form-item>
|
||
<el-form-item label="关联的其他特殊作业及安全作业票编号:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.otherRelatedSpecialTask }}
|
||
</el-form-item>
|
||
<!-- <el-form-item label="证书编号:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.certificateNo }}
|
||
</el-form-item> -->
|
||
<el-form-item label="动火作业实施时间:" :label-width="formLabelWidthDetail">
|
||
<el-date-picker v-model="workDetail.hotWorkExecutionTime" type="daterange"
|
||
value-format="yyyy-MM-dd HH:mm:ss" :disabled="isDisabledDetail" range-separator="至"
|
||
start-placeholder="开始日期" end-placeholder="结束日期">
|
||
</el-date-picker>
|
||
<!-- -->
|
||
<!-- :picker-options="pickerOptions" -->
|
||
</el-form-item>
|
||
<el-form-item label="作业单位:" :label-width="formLabelWidthDetail">
|
||
<el-select v-model="workDetail.jobApplicationUnit" placeholder="请选择作业单位" disabled>
|
||
<el-option :label="item.enterpriseName" :value="item.id"
|
||
v-for="(item, index) in responsibilityList" :key="index">
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="风险辨识结果:" :label-width="formLabelWidthDetail">
|
||
{{ workDetail.riskIdentificationResult }}
|
||
</el-form-item>
|
||
<!--
|
||
<el-form-item label="作业类型:" :label-width="formLabelWidthDetail">
|
||
动火作业
|
||
</el-form-item> -->
|
||
<!-- <el-form-item label="危大工程概况:" :label-width="formLabelWidthDetail">
|
||
<el-input v-model="detailData.engineeringSurvey" :disabled="isDisabled"
|
||
placeholder="请输入危大工程概况" autocomplete="off"></el-input>
|
||
</el-form-item> -->
|
||
<!-- <el-form-item label="责任人:" :label-width="formLabelWidthDetail">
|
||
<el-input
|
||
v-model="detailData.personLiable"
|
||
:disabled="isDisabled"
|
||
placeholder="请输入责任人"
|
||
autocomplete="off"
|
||
></el-input>
|
||
</el-form-item> -->
|
||
</el-form>
|
||
<!-- <div v-if="COMPANY != 'longguang'" class="qr-box">
|
||
<div id="qrCode" ref="qrCodeDiv"></div>
|
||
<el-button size="medium" class="print-btn" @click="printBtn">打印危大工程标识</el-button>
|
||
</div> -->
|
||
</div>
|
||
</template>
|
||
<template v-slot:gasanalysis>
|
||
<div class="gasanalysis-table">
|
||
<el-row>
|
||
<el-col :span="3">气体取样分析时间</el-col>
|
||
<el-col :span="3" v-for="item in workDetail.xzGasAnalyzeList" :key="item.id">{{
|
||
item.gasAnalyzeTime }}</el-col>
|
||
<!-- <el-col :span="3">12-03 12:00</el-col>
|
||
<el-col :span="3">12-03 12:00</el-col> -->
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="3">代表性气体</el-col>
|
||
<el-col :span="3" v-for="item in workDetail.xzGasAnalyzeList" :key="item.id">{{
|
||
item.representativeGas }}</el-col>
|
||
<!-- <el-col :span="3">一氧化氢</el-col>
|
||
<el-col :span="3">一氧化氢</el-col> -->
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="3">分析结果/%</el-col>
|
||
<el-col :span="3" v-for="item in workDetail.xzGasAnalyzeList" :key="item.id">{{
|
||
item.analyzeResult }}</el-col>
|
||
<!-- <el-col :span="3">50%</el-col>
|
||
<el-col :span="3">50%</el-col> -->
|
||
</el-row>
|
||
<el-row>
|
||
<el-col :span="3">分析人</el-col>
|
||
<el-col :span="3" v-for="item in workDetail.xzGasAnalyzeList" :key="item.id">{{
|
||
item.analyzer }}</el-col>
|
||
<!-- <el-col :span="3">50%</el-col>
|
||
<el-col :span="3">50%</el-col> -->
|
||
</el-row>
|
||
</div>
|
||
</template>
|
||
</detail>
|
||
<editPlan :title="operateTitle" :editId="editId" @cancleSave="goBack" v-if="isUpdate"></editPlan>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import moment from 'moment'
|
||
// import addPlan from './addPlan.vue'
|
||
import detail from './detail.vue'
|
||
import editPlan from './editPlan.vue'
|
||
import {
|
||
selectDangerousEngineeringRecordApi,
|
||
addDangerousEngineeringRecordApi,
|
||
deleteDangerousEngineeringRecordApi,
|
||
selectDangerousEngineeringTypeApi,
|
||
editDangerousEngineeringRecordApi
|
||
} from "@/assets/js/api/dangerousBigProject"
|
||
|
||
import {
|
||
getFireSafetyPageApi,
|
||
getEnterpriseInfoListApi,
|
||
getFireSafetyQueryByIdApi,
|
||
getFireSafetydeleteApi,
|
||
} from "@/assets/js/api/specialWork"
|
||
|
||
import { getCooperatorListApi } from "@/assets/js/api/cooperationUnit";
|
||
export default {
|
||
components: {
|
||
// addPlan,
|
||
detail,
|
||
editPlan
|
||
},
|
||
data() {
|
||
return {
|
||
formInline: {
|
||
firemanName: '',
|
||
enterpriseId: '',
|
||
workTicketCode:"",
|
||
},
|
||
formLabelWidthDetail: "180px",
|
||
detailData: {},
|
||
responsibilityList: [],
|
||
planDate: "",
|
||
pickerOptions: {
|
||
disabledDate(time) {
|
||
return time.getTime() < Date.now() - 8.64e7;
|
||
},
|
||
},
|
||
isDisabledDetail: true,
|
||
workDetail: {},
|
||
|
||
operateTitle: "新增",
|
||
isAdd: false,
|
||
isEdit: false,
|
||
isDisabled: false,
|
||
engineeringName: "",
|
||
detailId: "",
|
||
isSuperDanger: false,
|
||
tableData: [],
|
||
dialogFormVisible: true,
|
||
multipleSelection: [],
|
||
addForm: {
|
||
name: "",
|
||
category: "",
|
||
points: "",
|
||
describe: "",
|
||
address: "",
|
||
date: [],
|
||
people: "",
|
||
unit: []
|
||
},
|
||
props: {
|
||
multiple: true
|
||
},
|
||
typeOptions: [],
|
||
describeOptions: [],
|
||
options: [{
|
||
label: 111,
|
||
value: 12
|
||
}],
|
||
formLabelWidth: "110px",
|
||
safeStatus: false,
|
||
safeStatus2: false,
|
||
safeStatus3: false,
|
||
fileList: [],
|
||
fileList2: [],
|
||
fileList3: [],
|
||
dialogTitle: "",
|
||
pageNo: 1,
|
||
pageSize: 10,
|
||
total: 10,
|
||
projectSn: "",
|
||
enterpriseTypeId: 1,
|
||
cooperatorList: [],
|
||
file3: "",
|
||
file2: "",
|
||
file1: "",
|
||
deleteId: "",
|
||
editId: "",
|
||
deleteDialog: false,
|
||
isEditDisabled: false,
|
||
editParms: [],
|
||
fileName1: "",
|
||
fileName2: "",
|
||
fileName3: "",
|
||
styleType: 1,
|
||
isUpdate: false
|
||
}
|
||
},
|
||
created() {
|
||
this.projectSn = this.$store.state.projectSn
|
||
this.styleType = this.$store.state.userInfo.styleType;
|
||
// this.getCooperatorList()
|
||
// this.getType()
|
||
this.initData();
|
||
this.getEnterpriseInfoList();
|
||
},
|
||
mounted() {
|
||
|
||
},
|
||
watch: {
|
||
"workDetail.hotWorkExecutionTime": {
|
||
handler(newVal) {
|
||
console.log(newVal);
|
||
},
|
||
},
|
||
},
|
||
methods: {
|
||
editRow(index, rows) {
|
||
if (rows[index].finalAcceptanceStatus === 2) {
|
||
this.$message.warning('该项危大工程已闭合,请勿操作')
|
||
return
|
||
}
|
||
// console.log(index,rows[index].id)
|
||
this.editId = rows[index].id
|
||
this.operateTitle = "编辑"
|
||
this.dialogTitle = "编辑"
|
||
this.dialogFormVisible = false
|
||
this.isEdit = false
|
||
this.isAdd = false
|
||
this.isUpdate = true;
|
||
},
|
||
goBack() {
|
||
this.dialogFormVisible = true
|
||
// this.initData()
|
||
this.isAdd = false
|
||
this.isEdit = false
|
||
this.isUpdate = false;
|
||
},
|
||
showAddDialog() {
|
||
this.dialogFormVisible = false
|
||
this.isEdit = false
|
||
this.isUpdate = false;
|
||
this.isAdd = true
|
||
// "新增"
|
||
this.dialogTitle = this.$t('message.dangerousBigProject.add')
|
||
// this.clearData()
|
||
// if(this.isDisabled){
|
||
// this.isDisabled = false
|
||
// }
|
||
// if(this.isEditDisabled){
|
||
// this.isEditDisabled = false
|
||
// }
|
||
},
|
||
onSubmit() {
|
||
this.pageNo = 1;
|
||
this.initData();
|
||
},
|
||
onRefresh() {
|
||
this.formInline.enterpriseId = "";
|
||
this.formInline.firemanName = "";
|
||
this.formInline.workTicketCode = "";
|
||
|
||
this.pageNo = 1;
|
||
this.initData();
|
||
},
|
||
getEnterpriseInfoList() {
|
||
getEnterpriseInfoListApi({
|
||
projectSn: this.projectSn
|
||
}).then((res) => {
|
||
if (res.result) {
|
||
console.log(res.result, 1)
|
||
this.responsibilityList = res.result;
|
||
}
|
||
})
|
||
},
|
||
initData() {
|
||
let data = {
|
||
jobApplicationUnit: this.formInline.enterpriseId,
|
||
firemanName: this.formInline.firemanName,
|
||
workTicketCode: this.formInline.workTicketCode,
|
||
pageNo: this.pageNo,
|
||
pageSize: this.pageSize,
|
||
projectSn: this.projectSn
|
||
}
|
||
getFireSafetyPageApi(data).then((res) => {
|
||
if (res.result) {
|
||
console.log(res.result.records, 1)
|
||
// res.result.records.forEach((item) => {
|
||
// if (item.planStartTime && item.planEndTime) {
|
||
// item.plan = item.planStartTime + "至" + item.planEndTime
|
||
// }
|
||
// if (item.responsibilityCompany.split(",").length > 0 && item.responsibilityCompany !== "") {
|
||
// let arr = []
|
||
// for (let i = 0; i < this.options.length; i++) {
|
||
// let itm = this.options[i].value
|
||
// for (let j = 0; j < item.responsibilityCompany.split(",").length; j++) {
|
||
// if (itm == item.responsibilityCompany.split(",")[j]) {
|
||
// arr.push(this.options[i].label)
|
||
// }
|
||
// }
|
||
// }
|
||
// item.subpackageUnit = arr.join(",")
|
||
// }
|
||
// })
|
||
// console.log(this.options)
|
||
this.tableData = res.result.records;
|
||
this.total = res.result.total;
|
||
}
|
||
});
|
||
},
|
||
editData(index, val) {
|
||
this.viewData(index, val)
|
||
// "编辑"
|
||
this.dialogTitle = this.$t('message.dangerousBigProject.edit')
|
||
this.editParms = val[index]
|
||
if (this.file1) {
|
||
let obj = {
|
||
name: this.file1.split("/")[this.file1.split("/").length - 1],
|
||
url: this.file1
|
||
}
|
||
this.fileList.push(obj)
|
||
}
|
||
if (this.file2) {
|
||
let obj2 = {
|
||
name: this.file2.split("/")[this.file2.split("/").length - 1],
|
||
url: this.file2
|
||
}
|
||
this.fileList2.push(obj2)
|
||
}
|
||
if (this.file3) {
|
||
let obj3 = {
|
||
name: this.file3.split("/")[this.file3.split("/").length - 1],
|
||
url: this.file3
|
||
}
|
||
this.fileList3.push(obj3)
|
||
}
|
||
this.isDisabled = false
|
||
this.isEditDisabled = true
|
||
// console.log(this.editId)
|
||
},
|
||
viewData(index, val) {
|
||
this.clearData()
|
||
this.dialogFormVisible = true
|
||
// "查看"
|
||
this.dialogTitle = this.$t('message.dangerousBigProject.view')
|
||
this.isDisabled = true
|
||
this.isEditDisabled = true
|
||
this.addForm = {
|
||
name: val[index].engineeringName,
|
||
category: val[index].engineeringTypeId,
|
||
points: val[index].engineeringSurvey,
|
||
describe: val[index].describeName,
|
||
address: val[index].constructionLocation,
|
||
date: [val[index].planStartTime, val[index].planEndTime],
|
||
people: val[index].personLiable,
|
||
unit: val[index].responsibilityCompany
|
||
}
|
||
this.safeStatus = val[index].securityConstructionSchemeType == 2 ? true : false
|
||
this.safeStatus2 = val[index].specialConstructionSchemeType == 2 ? true : false
|
||
this.safeStatus3 = val[index].technicalDisclosureType == 2 ? true : false
|
||
this.file1 = val[index].securityConstructionSchemeFile
|
||
this.file2 = val[index].specialConstructionSchemeFile
|
||
this.file3 = val[index].technicalDisclosureFile
|
||
this.fileName1 = this.file1 ? this.file1.split("/")[this.file1.split("/").length - 1] : ""
|
||
this.fileName2 = this.file2 ? this.file2.split("/")[this.file2.split("/").length - 1] : ""
|
||
this.fileName3 = this.file3 ? this.file3.split("/")[this.file3.split("/").length - 1] : ""
|
||
},
|
||
clearData() {
|
||
this.addForm = {
|
||
name: "",
|
||
category: "",
|
||
points: "",
|
||
describe: "",
|
||
address: "",
|
||
date: [],
|
||
people: "",
|
||
unit: ""
|
||
},
|
||
this.safeStatus = false
|
||
this.safeStatus2 = false
|
||
this.safeStatus3 = false
|
||
this.file1 = ""
|
||
this.file2 = ""
|
||
this.file3 = ""
|
||
this.fileList = []
|
||
this.fileList2 = []
|
||
this.fileList3 = []
|
||
},
|
||
// 选择类别
|
||
changeType(value) {
|
||
this.typeOptions.forEach(item => {
|
||
if (item.id == value) {
|
||
item.describeList.forEach(item => {
|
||
item.value = item.id
|
||
if (item.describeName.length > 40) {
|
||
item.label = item.describeName.substring(0, 40) + '...'
|
||
} else {
|
||
item.label = item.describeName
|
||
}
|
||
})
|
||
this.describeOptions = item.describeList
|
||
}
|
||
})
|
||
console.log(value)
|
||
},
|
||
//获取责任分包单位
|
||
getCooperatorList() {
|
||
let data = {
|
||
projectSn: this.projectSn,
|
||
pageNo: this.pageNo,
|
||
pageSize: this.pageSize,
|
||
enterpriseTypeId: this.enterpriseTypeId,
|
||
enterpriseName: "",
|
||
};
|
||
getCooperatorListApi(data).then((res) => {
|
||
if (res.code == 200) {
|
||
|
||
if (res.result.records.length > 0) {
|
||
this.cooperatorList = JSON.parse(JSON.stringify(res.result.records));
|
||
this.cooperatorList.forEach((item) => {
|
||
item.value = item.enterpriseLegalPerson
|
||
item.label = item.enterpriseName
|
||
})
|
||
this.options = this.cooperatorList
|
||
// console.log(this.options)
|
||
}
|
||
}
|
||
});
|
||
},
|
||
// 获取类别
|
||
getType() {
|
||
selectDangerousEngineeringTypeApi({ sn: JSON.parse(window.sessionStorage.getItem("vuex")).userInfo.headquartersSn }).then((res) => {
|
||
if (res.result) {
|
||
// console.log(res.result)
|
||
res.result.forEach(item => {
|
||
item.label = item.typeName
|
||
item.value = item.id
|
||
})
|
||
this.typeOptions = res.result
|
||
}
|
||
})
|
||
},
|
||
addData() {
|
||
if (this.addForm.name == "") {
|
||
// 请输入危大工程名称
|
||
this.$message.error(this.$t('message.dangerousBigProject.verifyMessage1'))
|
||
return
|
||
} else if (this.addForm.category == "") {
|
||
// 请选择危大工程类别
|
||
this.$message.error(this.$t('message.dangerousBigProject.verifyMessage2'))
|
||
return
|
||
} else if (this.addForm.describe == "") {
|
||
// 请选择类别描述
|
||
this.$message.error(this.$t('message.dangerousBigProject.verifyMessage3'))
|
||
return
|
||
}
|
||
// console.log(this.addForm)
|
||
let nowDate = new Date()
|
||
let data = {
|
||
constructionLocation: this.addForm.address,
|
||
createTime: moment(nowDate).format('YYYY-MM-DD HH:mm:ss'),
|
||
engineeringName: this.addForm.name,
|
||
engineeringSurvey: this.addForm.points,
|
||
engineeringTypeId: this.addForm.category,
|
||
personLiable: this.addForm.people,
|
||
planEndTime: this.addForm.date[1],
|
||
planStartTime: this.addForm.date[0],
|
||
projectSn: this.projectSn,
|
||
securityConstructionSchemeFile: this.fileList.length > 0 ? this.file1 : "", //安全专项施工方案附件
|
||
securityConstructionSchemeType: this.safeStatus ? 2 : 1,//是否完成安全专项施工方案交底,1未完成,2完成
|
||
specialConstructionSchemeFile: this.fileList2.length > 0 ? this.file2 : '',//专项施工方案附件
|
||
specialConstructionSchemeType: this.safeStatus2 ? 2 : 1,//是否完成专项施工方案交底,1未完成,2完成
|
||
technicalDisclosureFile: this.fileList3.length > 0 ? this.file3 : '',//技术交底文件
|
||
technicalDisclosureType: this.safeStatus3 ? 2 : 1,//是否完成安全技术交底,1未完成,2完成
|
||
typeDescribeId: this.addForm.describe,//危大工程类别描述
|
||
addForm: this.addForm
|
||
}
|
||
// "新增"
|
||
if (this.dialogTitle == this.$t('message.dangerousBigProject.add')) {
|
||
console.log(data)
|
||
data.responsibilityCompany = this.addForm.unit ? this.addForm.unit.join(',') : ""
|
||
addDangerousEngineeringRecordApi(data).then((res) => {
|
||
if (res.code = 200) {
|
||
this.$message.success(this.$t('message.dangerousBigProject.add') + this.$t('message.dangerousBigProject.success') + "!")
|
||
this.initData()
|
||
}
|
||
console.log(res)
|
||
})
|
||
} else if (this.dialogTitle == this.$t('message.dangerousBigProject.edit')) {
|
||
// "编辑"
|
||
data.id = this.editParms.id
|
||
data.typeDescribeId = this.editParms.typeDescribeId
|
||
if (this.addForm.unit && Array.isArray(this.addForm.unit)) {
|
||
data.responsibilityCompany = this.addForm.unit.join(',')
|
||
} else {
|
||
data.responsibilityCompany = this.addForm.unit
|
||
}
|
||
editDangerousEngineeringRecordApi(data).then((res) => {
|
||
if (res.code = 200) {
|
||
// "修改成功!"
|
||
this.$message.success(this.$t('message.dangerousBigProject.editSuccess'))
|
||
this.initData()
|
||
}
|
||
console.log(res)
|
||
})
|
||
}
|
||
this.dialogFormVisible = false
|
||
},
|
||
handleSelectionChange(val) {
|
||
this.multipleSelection = val;
|
||
},
|
||
deleteRow(index, rows) {
|
||
if (rows[index].finalAcceptanceStatus === 2) {
|
||
this.$message.warning('该项特种作业已闭合,请勿操作')
|
||
return
|
||
}
|
||
// console.log(index,rows[index].id)
|
||
this.deleteId = rows[index].id
|
||
this.deleteDialog = true
|
||
},
|
||
checkDelete() {
|
||
getFireSafetydeleteApi({ id: this.deleteId }).then((res) => {
|
||
console.log(res)
|
||
if (res.code == 200) {
|
||
this.$message.success(res.message)
|
||
this.initData()
|
||
}
|
||
})
|
||
this.deleteDialog = false
|
||
},
|
||
handleSizeChange() {
|
||
this.initData()
|
||
},
|
||
handleCurrentChange() {
|
||
this.initData()
|
||
},
|
||
handleRemove(file, fileList) {
|
||
console.log(fileList);
|
||
this.fileList = fileList;
|
||
},
|
||
handlePreview(file) {
|
||
console.log(file);
|
||
},
|
||
beforeRemove(file, fileList) {
|
||
// 确定移除
|
||
return this.$confirm(this.$t('message.dangerousBigProject.confirmRemove') + ` ${file.name}?`);
|
||
},
|
||
uploadSuccess(response, file, fileList) {
|
||
console.log('fileList')
|
||
console.log(fileList)
|
||
this.fileList = fileList;
|
||
this.file1 = this.$store.state.FILEURL + fileList[0].response.data[0].imageUrl
|
||
},
|
||
uploadError(err, file, fileList) {
|
||
// 上传失败!
|
||
this.$message.error(this.$t('message.dangerousBigProject.uploadFail'));
|
||
},
|
||
handleRemove2(file, fileList) {
|
||
console.log(fileList);
|
||
this.fileList2 = fileList;
|
||
},
|
||
handlePreview2(file) {
|
||
console.log(file);
|
||
},
|
||
beforeRemove2(file, fileList) {
|
||
// 确定移除
|
||
return this.$confirm(this.$t('message.dangerousBigProject.confirmRemove') + `${file.name}?`);
|
||
},
|
||
uploadSuccess2(response, file, fileList) {
|
||
console.log('fileList')
|
||
console.log(fileList)
|
||
this.fileList2 = fileList;
|
||
this.file2 = this.$store.state.FILEURL + fileList[0].response.data[0].imageUrl
|
||
},
|
||
uploadError2(err, file, fileList) {
|
||
// 上传失败!
|
||
this.$message.error(this.$t('message.dangerousBigProject.uploadFail'));
|
||
},
|
||
handleRemove3(file, fileList) {
|
||
console.log(fileList);
|
||
this.fileList3 = fileList;
|
||
},
|
||
handlePreview3(file) {
|
||
console.log(file);
|
||
},
|
||
beforeRemove3(file, fileList) {
|
||
// 确定移除
|
||
return this.$confirm(this.$t('message.dangerousBigProject.confirmRemove') + `${file.name}?`);
|
||
},
|
||
uploadSuccess3(response, file, fileList) {
|
||
console.log('fileList')
|
||
console.log(fileList)
|
||
this.fileList3 = fileList;
|
||
this.file3 = this.$store.state.FILEURL + fileList[0].response.data[0].imageUrl
|
||
},
|
||
uploadError3(err, file, fileList) {
|
||
// 上传失败!
|
||
this.$message.error(this.$t('message.dangerousBigProject.uploadFail'));
|
||
},
|
||
previewDetail(val) {
|
||
console.log('!!!!!!!!!!!!!!!!!!', val)
|
||
this.dialogFormVisible = false
|
||
this.isEdit = true
|
||
this.isAdd = false
|
||
this.isUpdate = false
|
||
// 详细
|
||
this.dialogTitle = this.$t('message.dangerousBigProject.detailed')
|
||
this.detailId = val.id
|
||
|
||
getFireSafetyQueryByIdApi({
|
||
id: val.id
|
||
}).then((res) => {
|
||
if (res.result) {
|
||
console.log(res.result, 1)
|
||
this.workDetail = {
|
||
...val,
|
||
...res.result,
|
||
// xzGasAnalyzeList: res.result.xzGasAnalyzeList,
|
||
hotWorkExecutionTime: [res.result.hotWorkExecutionBeginTime, res.result.hotWorkExecutionEndTime]
|
||
};
|
||
}
|
||
})
|
||
|
||
this.isSuperDanger = val.issuperdanger
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="less" scoped>
|
||
.el-button--text {
|
||
color: #262d47;
|
||
}
|
||
|
||
.form-box {
|
||
width: 70%;
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
|
||
/deep/.el-form-item {
|
||
width: 50%;
|
||
padding-right: 10px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
// /deep/.el-col-12{
|
||
// padding-left: 20px;
|
||
// }
|
||
/deep/.el-input__inner {
|
||
width: 100%;
|
||
}
|
||
|
||
/deep/.el-select {
|
||
width: 100%;
|
||
}
|
||
|
||
/deep/.el-cascader {
|
||
width: 100%;
|
||
}
|
||
}
|
||
|
||
.gasanalysis-table {
|
||
padding: 10px 20px;
|
||
|
||
.el-row:first-child .el-col {
|
||
background-color: #E9E9E9;
|
||
}
|
||
|
||
.el-row {
|
||
font-size: 14px;
|
||
color: #000;
|
||
|
||
.el-col:first-child {
|
||
background-color: #E9E9E9;
|
||
}
|
||
|
||
.el-col {
|
||
height: 40px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: 1px solid #E1E1E1;
|
||
}
|
||
}
|
||
}
|
||
|
||
.dangerousBigProject {
|
||
padding-bottom: 20px;
|
||
height: 100%;
|
||
background: #fff;
|
||
padding: 0 10px;
|
||
padding-top: 20px;
|
||
box-sizing: border-box;
|
||
|
||
>div {
|
||
height: 100%;
|
||
|
||
.search-box {
|
||
display: flex;
|
||
margin-bottom: 20px;
|
||
|
||
.search-input {
|
||
width: 260px;
|
||
margin-right: 20px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.el-icon-delete {
|
||
color: #f56c6c;
|
||
}
|
||
|
||
.table-box {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: calc(100% - 72px);
|
||
|
||
.tables {
|
||
margin-bottom: auto;
|
||
}
|
||
}
|
||
|
||
.table-item {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
|
||
p {
|
||
width: 100%;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
// .item-status {
|
||
// background: #f56c6c;
|
||
// display: block;
|
||
// color: #fff;
|
||
// border-radius: 4px;
|
||
// padding: 0 4px;
|
||
// height: 20px;
|
||
// }
|
||
.item-status {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
img {
|
||
width: 15px;
|
||
height: 15px;
|
||
}
|
||
|
||
span {
|
||
font-size: 14px;
|
||
color: #EA3941;
|
||
}
|
||
}
|
||
|
||
.status-none {
|
||
height: 20px;
|
||
}
|
||
|
||
.item-title {
|
||
font-weight: 600;
|
||
}
|
||
}
|
||
|
||
.table-category-item {
|
||
display: flex;
|
||
|
||
p {
|
||
width: 100%;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
// .item-status {
|
||
// background: #f56c6c;
|
||
// display: block;
|
||
// color: #fff;
|
||
// border-radius: 4px;
|
||
// padding: 0 4px;
|
||
// height: 20px;
|
||
// }
|
||
.item-status {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-right: 3px;
|
||
|
||
img {
|
||
width: 15px;
|
||
height: 15px;
|
||
margin-right: 3px;
|
||
}
|
||
|
||
span {
|
||
font-size: 14px;
|
||
color: #EA3941;
|
||
}
|
||
}
|
||
|
||
.status-none {
|
||
height: 20px;
|
||
}
|
||
|
||
.item-title {
|
||
font-weight: 600;
|
||
}
|
||
}
|
||
|
||
.add-dialog {
|
||
/deep/ .el-dialog {
|
||
width: 80%;
|
||
}
|
||
|
||
.form-title {
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
/deep/ .el-form-item__label {
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/deep/ .el-form {
|
||
padding-left: 36px;
|
||
padding-right: 26px;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
/deep/ .el-select {
|
||
width: 100%;
|
||
}
|
||
|
||
/deep/ .el-date-editor.el-input {
|
||
width: 100%;
|
||
}
|
||
|
||
/deep/ .el-date-editor {
|
||
width: 100%;
|
||
}
|
||
|
||
/deep/ .el-cascader {
|
||
width: 100%;
|
||
}
|
||
|
||
.upload-item {
|
||
display: flex;
|
||
margin-bottom: 10px;
|
||
align-items: center;
|
||
|
||
span {
|
||
margin-right: 16px;
|
||
}
|
||
|
||
.switch-check {
|
||
margin-left: 8px;
|
||
color: #409eff;
|
||
line-height: 20px;
|
||
}
|
||
|
||
.switch-uncheck {
|
||
margin-left: 8px;
|
||
line-height: 20px;
|
||
}
|
||
}
|
||
|
||
.upload-file {
|
||
width: 50%;
|
||
padding-left: 26px;
|
||
box-sizing: border-box;
|
||
margin-bottom: 20px;
|
||
|
||
a {
|
||
color: #409eff;
|
||
text-decoration: none;
|
||
margin-left: 6px;
|
||
}
|
||
}
|
||
|
||
.upload-box {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
}
|
||
}
|
||
|
||
.el-pagination {
|
||
display: flex;
|
||
justify-content: center;
|
||
// margin-top: 20px;
|
||
}
|
||
|
||
.backText {
|
||
padding: 8px 0;
|
||
padding-left: 10px;
|
||
|
||
/deep/.el-page-header__content {
|
||
font-size: 14px;
|
||
}
|
||
}
|
||
|
||
.dark {
|
||
/deep/.el-page-header__content {
|
||
color: #fff;
|
||
}
|
||
|
||
/deep/ .print-btn {
|
||
background: none;
|
||
color: #262d47;
|
||
font-size: 14px;
|
||
}
|
||
}
|
||
</style> |