有限空间作业迁移
parent
05c8055754
commit
7b5aabf5b0
|
@ -8,7 +8,7 @@
|
|||
<td colspan="10" style="border: none">
|
||||
<div class="level-title mt-20">
|
||||
<h1>受限空间安全作业票</h1>
|
||||
<div class="level-btns">编号:{{ pd.CHECK_NO }}</div>
|
||||
<div class="level-code">编号:{{ pd.CHECK_NO }}</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -122,7 +122,7 @@
|
|||
{{ item.PROTECTIVE_MEASURES }}
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="item.STATUS=='1'"><input type="radio" disabled checked>涉 及</span>
|
||||
<span v-if="item.STATUS=='1'"><input type="radio" disabled checked>涉 及</span>
|
||||
<span v-if="item.STATUS=='-1'"><input type="radio" disabled checked>不涉及</span>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -158,10 +158,10 @@
|
|||
<tr>
|
||||
<td class="bbg">接受交底人</td>
|
||||
<td colspan="10">
|
||||
<div v-if="pd.ACCEPT_CONFESS_USER_SIGNER_PATH" style="text-align: right">
|
||||
<div v-for="item in imgList" :key="item.ACCEPT_CONFESS_ID" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.ACCEPT_CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.ACCEPT_CONFESS_USER_SIGNER_TIME }}</span>
|
||||
<img v-viewer :src="config.fileUrl + item.ACCEPT_CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ item.ACCEPT_CONFESS_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -185,13 +185,13 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.ACCEPT_USER_SIGNER_PATH">
|
||||
<tr v-if="imgList1.length>0">
|
||||
<td colspan="10">
|
||||
<div>完工验收:{{ pd.ACCEPT_CONTENT }}</div>
|
||||
<div style="text-align: right">
|
||||
<div v-for="item in imgList1" :key="item.ACCEPT_CONFESS_ID" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img :src="config.fileUrl + pd.ACCEPT_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.ACCEPT_USER_SIGNER_TIME }}</span>
|
||||
<img v-viewer :src="config.fileUrl + item.ACCEPT_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ item.ACCEPT_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -216,6 +216,8 @@ export default {
|
|||
measuresList: [],
|
||||
gasList: [],
|
||||
gas: {},
|
||||
imgList: [],
|
||||
imgList1: [],
|
||||
otherProtectiveMeasures: []
|
||||
}
|
||||
},
|
||||
|
@ -271,6 +273,8 @@ export default {
|
|||
// 将数组转回字符串
|
||||
data.measuresList[i].PROTECTIVE_MEASURES = PROTECTIVE_MEASURES.join('')
|
||||
}
|
||||
this.imgList = data.imgList
|
||||
this.imgList1 = data.imgList1
|
||||
this.measuresList = data.measuresList // 参数map
|
||||
this.gasList = data.gasList // 参数map
|
||||
this.gas = data.gas || {} // 参数map
|
||||
|
@ -309,6 +313,4 @@ export default {
|
|||
img
|
||||
width: 100%
|
||||
height: 100%
|
||||
.app-container
|
||||
margin-bottom: 50px
|
||||
</style>
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
<span v-else-if="row.APPLY_STATUS==-4">作业负责人审核打回</span>
|
||||
<span v-else-if="row.APPLY_STATUS==-5">所在单位审核打回</span>
|
||||
<span v-else-if="row.APPLY_STATUS==-6">验收打回</span>
|
||||
<span v-else-if="row.APPLY_STATUS==-99">已作废(监护人未签字)</span>
|
||||
<span v-else-if="row.APPLY_STATUS==-98">已作废(未进行气体检测)</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -98,6 +100,39 @@
|
|||
</template>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
<div style="margin: 60px 60px 0 60px;display: flex;justify-content: space-between">
|
||||
<div v-if="pd.GUARDIAN_USER_SIGNER_TIME">
|
||||
<div style="color: #13ce66">
|
||||
监护人:{{ pd.GUARDIAN_USER_NAME }}已签字
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!pd.GUARDIAN_USER_SIGNER_TIME">
|
||||
<div style="color: red">
|
||||
监护人:{{ pd.GUARDIAN_USER_NAME }}未签字
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pd.CONFESS_USER_SIGNER_TIME">
|
||||
<div style="color: #13ce66">
|
||||
安全交底人:{{ pd.CONFESS_USER_NAME }}已签字
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!pd.CONFESS_USER_SIGNER_TIME">
|
||||
<div style="color: red">
|
||||
安全交底人:{{ pd.CONFESS_USER_NAME }}未签字
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pd.ACCEPT_CONFESS_USER_SIGNER_TIME">
|
||||
<div style="color: #13ce66">
|
||||
接受交底人:{{ pd.ACCEPT_CONFESS_USER_NAME }}已签字
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!pd.ACCEPT_CONFESS_USER_SIGNER_TIME">
|
||||
<div style="color: red">
|
||||
接受交底人:{{ pd.ACCEPT_CONFESS_USER_NAME }}未签字
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<!-- <el-button @click="dialogFormShow = false">取 消</el-button>-->
|
||||
<el-button type="primary" @click="dialogFormShow = false">确 定</el-button>
|
||||
|
@ -120,7 +155,7 @@ export default {
|
|||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
limit: 10
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
|
@ -136,7 +171,7 @@ export default {
|
|||
replyVarList: [], // REPLY
|
||||
replyListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
limit: 10
|
||||
},
|
||||
replyTotal: 0,
|
||||
dialogFormHuifuShow: false,
|
||||
|
@ -149,7 +184,9 @@ export default {
|
|||
{ ID: '6', NAME: '验收归档' },
|
||||
{ ID: '-4', NAME: '作业负责人审核打回' },
|
||||
{ ID: '-5', NAME: '所在单位审核打回' },
|
||||
{ ID: '-6', NAME: '验收打回' }
|
||||
{ ID: '-6', NAME: '验收打回' },
|
||||
{ ID: '-99', NAME: '已作废(监护人未签字)' },
|
||||
{ ID: '-98', NAME: '已作废(未进行气体检测)' }
|
||||
],
|
||||
STATUS: '',
|
||||
DEPTIDS: ''
|
||||
|
@ -269,6 +306,20 @@ export default {
|
|||
OPERATTIME: this.pd.OPERATTIME
|
||||
}
|
||||
}
|
||||
if (this.pd.APPLY_STATUS == '-99') {
|
||||
obj = {
|
||||
title: '已作废(监护人未签字)',
|
||||
AUSER_NAME: '',
|
||||
OPERATTIME: this.pd.OPERATTIME
|
||||
}
|
||||
}
|
||||
if (this.pd.APPLY_STATUS == '-98') {
|
||||
obj = {
|
||||
title: '已作废(未进行气体检测)',
|
||||
AUSER_NAME: '',
|
||||
OPERATTIME: this.pd.OPERATTIME
|
||||
}
|
||||
}
|
||||
return obj
|
||||
},
|
||||
goDetail(id) {
|
||||
|
|
|
@ -2,192 +2,193 @@
|
|||
<div>
|
||||
<div id="printTest" class="app-container print-work">
|
||||
<el-page-header content="审批表详情" class="no-print" @back="goBack"/>
|
||||
<table class="table-ui">
|
||||
<thead>
|
||||
<div v-for="pdf in 2" :key="pdf" :name="pdf === 2 ? 'pdf-box' : ''" class="pdf-content">
|
||||
<table :class="['table-ui','table-ui' + pdf]">
|
||||
<tr>
|
||||
<td colspan="10" style="border: none">
|
||||
<div class="level-title mt-20">
|
||||
<h1>受限空间安全作业票</h1>
|
||||
<div class="level-btns">编号:{{ pd.CHECK_NO }}</div>
|
||||
<div class="level-code">编号:{{ pd.CHECK_NO }}</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td class="bbg">作业申请单位</td>
|
||||
<td colspan="5">{{ pd.APPLY_DEPARTMENT_NAME }}</td>
|
||||
<td class="bbg">作业申请时间</td>
|
||||
<td colspan="3">{{ pd.CREATTIME }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">受限空间名称</td>
|
||||
<td colspan="5">{{ pd.LIMITSPACE_NAME }}</td>
|
||||
<td class="bbg">受限空间内原有介质名称</td>
|
||||
<td colspan="3">{{ pd.MEDIUM_NAME }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业内容</td>
|
||||
<td colspan="9">{{ pd.WORK_CONTENT }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业单位</td>
|
||||
<td colspan="5">{{ pd.CONFIRM_DEPARTMENT_NAME }}</td>
|
||||
<td class="bbg">作业负责人</td>
|
||||
<td colspan="3">{{ pd.CONFIRM_USER_NAME }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业人</td>
|
||||
<td colspan="5">{{ pd.WORK_USER }}</td>
|
||||
<td class="bbg">监护人</td>
|
||||
<td colspan="5">
|
||||
<div v-if="pd.GUARDIAN_USER_SIGNER_PATH" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.GUARDIAN_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.GUARDIAN_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">关联的其他特殊作业及安全作业票编号</td>
|
||||
<td colspan="9">{{ pd.SPECIAL_WORK }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">风险辨识结果</td>
|
||||
<td colspan="9">{{ pd.RISK_IDENTIFICATION }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td :rowspan="3 + gasList.length" class="bbg">气体分析</td>
|
||||
<td class="bbg" rowspan="2">分析项目</td>
|
||||
<td class="bbg" colspan="2">有毒有害气体名称</td>
|
||||
<td class="bbg" colspan="2">可燃气体名称</td>
|
||||
<td class="bbg" rowspan="2">氧气含量</td>
|
||||
<td class="bbg" rowspan="3">取样分析时间</td>
|
||||
<td class="bbg" rowspan="3">分析部位</td>
|
||||
<td class="bbg" rowspan="3">分析人</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td :style="{padding:gas.GAS_NAME1 ? '8px' : '16px'}">{{ gas.GAS_NAME1 }}</td>
|
||||
<td :style="{padding:gas.GAS_NAME2 ? '8px' : '16px'}">{{ gas.GAS_NAME2 }}</td>
|
||||
<td :style="{padding:gas.GAS_NAME3 ? '8px' : '16px'}">{{ gas.GAS_NAME3 }}</td>
|
||||
<td :style="{padding:gas.GAS_NAME4 ? '8px' : '16px'}">{{ gas.GAS_NAME4 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">合格标准</td>
|
||||
<td>{{ gas.GAS_STANDARD1 }}</td>
|
||||
<td>{{ gas.GAS_STANDARD2 }}</td>
|
||||
<td>{{ gas.GAS_STANDARD3 }}</td>
|
||||
<td>{{ gas.GAS_STANDARD4 }}</td>
|
||||
<td>19.5% 〜21%(体积分数)</td>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in gasList" :key="index">
|
||||
<td v-if="index === 0" :rowspan="gasList.length" class="bbg">分析数据</td>
|
||||
<td><span v-if="gas.GAS_NAME1">{{ item.DATA1 }}</span></td>
|
||||
<td><span v-if="gas.GAS_NAME2">{{ item.DATA2 }}</span></td>
|
||||
<td><span v-if="gas.GAS_NAME3">{{ item.DATA3 }}</span></td>
|
||||
<td><span v-if="gas.GAS_NAME4">{{ item.DATA4 }}</span></td>
|
||||
<td>{{ item.OXYGEN_CONTENT }}</td>
|
||||
<td>{{ item.ANALYZE_TIME }}</td>
|
||||
<td>{{ item.ANALYZE_PLACE }}</td>
|
||||
<td>{{ item.ANALYZE_USER }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业实施时间</td>
|
||||
<td colspan="9">{{ pd.WORK_START_DATE }}至{{ pd.WORK_END_DATE }}止</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<table class="table-ui">
|
||||
<tr>
|
||||
<td>序号</td>
|
||||
<td>安全措施</td>
|
||||
<td style="width: 100px">是否涉及</td>
|
||||
<td style="width: 100px">确认人</td>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in measuresList" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>
|
||||
{{ item.PROTECTIVE_MEASURES }}
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="item.STATUS=='1'"><input type="radio" disabled checked>涉 及</span>
|
||||
<span v-if="item.STATUS=='-1'"><input type="radio" disabled checked>不涉及</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ item.CONFIRM_NAME }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.CONFIRM_USER_MEASURES || pd.APPROVE_USER_MEASURES" >
|
||||
<td >{{ measuresList.length + 1 }}</td>
|
||||
<td colspan="3">
|
||||
<div v-if="pd.CONFIRM_USER_MEASURES" style="display: flex;justify-content: space-between;">
|
||||
<span>其他安全措施:{{ pd.CONFIRM_USER_MEASURES }}</span>
|
||||
<span>编制人:{{ pd.CONFIRM_USER_NAME }}</span>
|
||||
</div>
|
||||
<div v-if="pd.APPROVE_USER_MEASURES" style="display: flex;justify-content: space-between;">
|
||||
<span>其他安全措施:{{ pd.APPROVE_USER_MEASURES }}</span>
|
||||
<span>编制人:{{ pd.APPROVE_USER_NAME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">安全交底人</td>
|
||||
<td colspan="10">
|
||||
<div v-if="pd.CONFESS_USER_SIGNER_PATH" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.CONFESS_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">接受交底人</td>
|
||||
<td colspan="10">
|
||||
<div v-if="pd.ACCEPT_CONFESS_USER_SIGNER_PATH" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.ACCEPT_CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.ACCEPT_CONFESS_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.CONFIRM_USER_SIGNER_PATH">
|
||||
<td colspan="10">
|
||||
<div>作业负责人意见:{{ pd.CONFIRM_CONTENT }}</div>
|
||||
<div style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.CONFIRM_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.CONFIRM_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.APPROVE_USER_SIGNER_PATH">
|
||||
<td colspan="10">
|
||||
<div>所在单位意见:{{ pd.APPROVE_CONTENT }}</div>
|
||||
<div style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.APPROVE_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.APPROVE_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.ACCEPT_USER_SIGNER_PATH">
|
||||
<td colspan="10">
|
||||
<div>完工验收:{{ pd.ACCEPT_CONTENT }}</div>
|
||||
<div style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img :src="config.fileUrl + pd.ACCEPT_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.ACCEPT_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td class="bbg">作业申请单位</td>
|
||||
<td colspan="5">{{ pd.APPLY_DEPARTMENT_NAME }}</td>
|
||||
<td class="bbg">作业申请时间</td>
|
||||
<td colspan="3">{{ pd.CREATTIME }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">受限空间名称</td>
|
||||
<td colspan="5">{{ pd.LIMITSPACE_NAME }}</td>
|
||||
<td class="bbg">受限空间内原有介质名称</td>
|
||||
<td colspan="3">{{ pd.MEDIUM_NAME }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业内容</td>
|
||||
<td colspan="9">{{ pd.WORK_CONTENT }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业单位</td>
|
||||
<td colspan="5">{{ pd.CONFIRM_DEPARTMENT_NAME }}</td>
|
||||
<td class="bbg">作业负责人</td>
|
||||
<td colspan="3">{{ pd.CONFIRM_USER_NAME }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业人</td>
|
||||
<td colspan="5">{{ pd.WORK_USER }}</td>
|
||||
<td class="bbg">监护人</td>
|
||||
<td colspan="5">
|
||||
<div v-if="pd.GUARDIAN_USER_SIGNER_PATH" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.GUARDIAN_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.GUARDIAN_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">关联的其他特殊作业及安全作业票编号</td>
|
||||
<td colspan="9">{{ pd.SPECIAL_WORK }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">风险辨识结果</td>
|
||||
<td colspan="9">{{ pd.RISK_IDENTIFICATION }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td :rowspan="3 + gasList.length" class="bbg">气体分析</td>
|
||||
<td class="bbg" rowspan="2">分析项目</td>
|
||||
<td class="bbg" colspan="2">有毒有害气体名称</td>
|
||||
<td class="bbg" colspan="2">可燃气体名称</td>
|
||||
<td class="bbg" rowspan="2">氧气含量</td>
|
||||
<td class="bbg" rowspan="3">取样分析时间</td>
|
||||
<td class="bbg" rowspan="3">分析部位</td>
|
||||
<td class="bbg" rowspan="3">分析人</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td :style="{padding:gas.GAS_NAME1 ? '8px' : '16px'}">{{ gas.GAS_NAME1 }}</td>
|
||||
<td :style="{padding:gas.GAS_NAME2 ? '8px' : '16px'}">{{ gas.GAS_NAME2 }}</td>
|
||||
<td :style="{padding:gas.GAS_NAME3 ? '8px' : '16px'}">{{ gas.GAS_NAME3 }}</td>
|
||||
<td :style="{padding:gas.GAS_NAME4 ? '8px' : '16px'}">{{ gas.GAS_NAME4 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">合格标准</td>
|
||||
<td>{{ gas.GAS_STANDARD1 }}</td>
|
||||
<td>{{ gas.GAS_STANDARD2 }}</td>
|
||||
<td>{{ gas.GAS_STANDARD3 }}</td>
|
||||
<td>{{ gas.GAS_STANDARD4 }}</td>
|
||||
<td>19.5% 〜21%(体积分数)</td>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in gasList" :key="index">
|
||||
<td v-if="index === 0" :rowspan="gasList.length" class="bbg">分析数据</td>
|
||||
<td><span v-if="gas.GAS_NAME1">{{ item.DATA1 }}</span></td>
|
||||
<td><span v-if="gas.GAS_NAME2">{{ item.DATA2 }}</span></td>
|
||||
<td><span v-if="gas.GAS_NAME3">{{ item.DATA3 }}</span></td>
|
||||
<td><span v-if="gas.GAS_NAME4">{{ item.DATA4 }}</span></td>
|
||||
<td>{{ item.OXYGEN_CONTENT }}</td>
|
||||
<td>{{ item.ANALYZE_TIME }}</td>
|
||||
<td>{{ item.ANALYZE_PLACE }}</td>
|
||||
<td>{{ item.ANALYZE_USER }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">作业实施时间</td>
|
||||
<td colspan="9">{{ pd.WORK_START_DATE }}至{{ pd.WORK_END_DATE }}止</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<table class="table-ui">
|
||||
<tr>
|
||||
<td>序号</td>
|
||||
<td>安全措施</td>
|
||||
<td style="width: 100px">是否涉及</td>
|
||||
<td style="width: 100px">确认人</td>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in measuresList" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>
|
||||
{{ item.PROTECTIVE_MEASURES }}
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="item.STATUS=='1'"><input type="radio" disabled checked>涉 及</span>
|
||||
<span v-if="item.STATUS=='-1'"><input type="radio" disabled checked>不涉及</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ item.CONFIRM_NAME }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.CONFIRM_USER_MEASURES || pd.APPROVE_USER_MEASURES" >
|
||||
<td >{{ measuresList.length + 1 }}</td>
|
||||
<td colspan="3">
|
||||
<div v-if="pd.CONFIRM_USER_MEASURES" style="display: flex;justify-content: space-between;">
|
||||
<span>其他安全措施:{{ pd.CONFIRM_USER_MEASURES }}</span>
|
||||
<span>编制人:{{ pd.CONFIRM_USER_NAME }}</span>
|
||||
</div>
|
||||
<div v-if="pd.APPROVE_USER_MEASURES" style="display: flex;justify-content: space-between;">
|
||||
<span>其他安全措施:{{ pd.APPROVE_USER_MEASURES }}</span>
|
||||
<span>编制人:{{ pd.APPROVE_USER_NAME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">安全交底人</td>
|
||||
<td colspan="10">
|
||||
<div v-if="pd.CONFESS_USER_SIGNER_PATH" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.CONFESS_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bbg">接受交底人</td>
|
||||
<td colspan="10">
|
||||
<div v-for="item in imgList" :key="item.ACCEPT_CONFESS_ID" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + item.ACCEPT_CONFESS_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ item.ACCEPT_CONFESS_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.CONFIRM_USER_SIGNER_PATH">
|
||||
<td colspan="10">
|
||||
<div>作业负责人意见:{{ pd.CONFIRM_CONTENT }}</div>
|
||||
<div style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.CONFIRM_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.CONFIRM_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="pd.APPROVE_USER_SIGNER_PATH">
|
||||
<td colspan="10">
|
||||
<div>所在单位意见:{{ pd.APPROVE_CONTENT }}</div>
|
||||
<div style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + pd.APPROVE_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ pd.APPROVE_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="imgList1.length>0">
|
||||
<td colspan="10">
|
||||
<div>完工验收:{{ pd.ACCEPT_CONTENT }}</div>
|
||||
<div v-for="item in imgList1" :key="item.ACCEPT_CONFESS_ID" style="text-align: right">
|
||||
<span>签字:</span>
|
||||
<img v-viewer :src="config.fileUrl + item.ACCEPT_USER_SIGNER_PATH" alt="" width="100" height="100">
|
||||
<span>{{ item.ACCEPT_USER_SIGNER_TIME }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 100px"/>
|
||||
|
||||
<!-- <div class="ui-height" />-->
|
||||
<div class="ui-foot">
|
||||
<el-button v-print="'#printTest'" icon="el-icon-printer" type="primary">打 印</el-button>
|
||||
<!-- <el-button v-print="'#printTest'" icon="el-icon-printer" type="primary">打 印</el-button>-->
|
||||
<el-button type="primary" icon="el-icon-printer" @click="handle2PDF">PDF导出</el-button>
|
||||
<el-button icon="el-icon-arrow-left" @click="goBack">返 回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -196,6 +197,8 @@
|
|||
<script>
|
||||
import { requestFN } from '@/utils/request'
|
||||
import dateformat from '@/utils/dateformat'
|
||||
import JsPDF from 'jspdf'
|
||||
import html2Canvas from 'html2canvas'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -204,6 +207,8 @@ export default {
|
|||
pd: [], // 存放字段参数
|
||||
measuresList: [],
|
||||
gasList: [],
|
||||
imgList: [],
|
||||
imgList1: [],
|
||||
gas: {},
|
||||
otherProtectiveMeasures: []
|
||||
}
|
||||
|
@ -212,6 +217,85 @@ export default {
|
|||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
handle2PDF() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在生成,请稍候...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const elements = document.querySelectorAll('div[name="pdf-box"]')
|
||||
console.log(elements)
|
||||
this.html2pdf(this.pd.CHECK_NO + '审批表详情', elements, loading)
|
||||
},
|
||||
|
||||
html2pdf(filename, els, loading) {
|
||||
const flagArr = []
|
||||
for (let i = 0, len = els.length; i < len; i++) {
|
||||
flagArr.push(0)
|
||||
}
|
||||
console.log(flagArr)
|
||||
runself(0)
|
||||
const pdf = new JsPDF('', 'pt', 'a4') // A4纸,纵向
|
||||
function runself(index) {
|
||||
const html = els[index]
|
||||
html2Canvas(html, {
|
||||
allowTaint: true,
|
||||
taintTest: false,
|
||||
logging: false,
|
||||
useCORS: true,
|
||||
scale: 2 // 按比例增加分辨率
|
||||
}).then(canvas => {
|
||||
// eslint-disable-next-line one-var
|
||||
var ctx = canvas.getContext('2d'),
|
||||
a4w = 532.28, a4h = 781.89, // A4大小,210mm x 297mm,四边各保留10mm的边距,显示区域190x277 pt:592.28 * 841.89
|
||||
renderedHeight = 0
|
||||
const allTrs = html.querySelectorAll('tr')
|
||||
while (renderedHeight < canvas.height) {
|
||||
let imgHeight = Math.floor(a4h * canvas.width / a4w) // 按A4显示比例换算一页图像的像素高度
|
||||
for (let i = 0; i < allTrs.length; i++) {
|
||||
const tr = allTrs[i]
|
||||
const trHeight = tr.offsetHeight + tr.offsetTop
|
||||
console.log('offsetHeight:' + tr.offsetHeight + 'offsetTop:' + tr.offsetTop + 'offsetParent:' + tr.offsetParent.offsetTop)
|
||||
if (trHeight * 2 > (imgHeight + renderedHeight)) {
|
||||
const btr = allTrs[i - 1]
|
||||
const btrHeight = btr.offsetHeight + btr.offsetTop
|
||||
console.log('i:' + (i - 1) + 'btrHeight:' + btrHeight)
|
||||
imgHeight = btrHeight * 2 - renderedHeight
|
||||
break
|
||||
}
|
||||
}
|
||||
var page = document.createElement('canvas')
|
||||
page.width = canvas.width
|
||||
page.height = Math.min(imgHeight, canvas.height - renderedHeight)// 可能内容不足一页
|
||||
|
||||
// 用getImageData剪裁指定区域,并画到前面创建的canvas对象中
|
||||
page.getContext('2d').putImageData(ctx.getImageData(0, renderedHeight, canvas.width, Math.min(imgHeight, canvas.height - renderedHeight)), 0, 0)
|
||||
pdf.addImage(page.toDataURL('image/jpeg', 1.0), 'JPEG', 30, 30, a4w, Math.min(a4h, a4w * page.height / page.width)) // 添加图像到页面,保留10mm边距
|
||||
|
||||
renderedHeight += imgHeight
|
||||
if (renderedHeight < canvas.height) {
|
||||
pdf.addPage()// 如果后面还有内容,添加一个空页
|
||||
}
|
||||
}
|
||||
if (index < els.length - 1) {
|
||||
pdf.addPage()
|
||||
}
|
||||
return 1
|
||||
}).then(item => {
|
||||
flagArr[index] = item
|
||||
if (flagArr.every(f => f === 1)) {
|
||||
pdf.save(filename)
|
||||
}
|
||||
index++
|
||||
if (index < els.length) {
|
||||
runself(index)
|
||||
} else {
|
||||
loading.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
validStr(str) {
|
||||
if (str != null && str != '' && typeof (str) != 'undefined' && str != 0) { return true }
|
||||
return false
|
||||
|
@ -243,6 +327,8 @@ export default {
|
|||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.pd = data.pd // 参数map
|
||||
this.imgList = data.imgList
|
||||
this.imgList1 = data.imgList1
|
||||
for (let i = 0; i < data.measuresList.length; i++) {
|
||||
// 将字符串转成数组
|
||||
const PROTECTIVE_MEASURES = data.measuresList[i].PROTECTIVE_MEASURES.split('')
|
||||
|
@ -299,3 +385,27 @@ export default {
|
|||
width: 100%
|
||||
height: 100%
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.table-ui td{
|
||||
line-height: unset;
|
||||
}
|
||||
|
||||
.pdf-content[name=pdf-box]{
|
||||
position: absolute;
|
||||
left: -999999px;
|
||||
.level-title {
|
||||
h1{
|
||||
font-size: 20px;
|
||||
}
|
||||
.level-code{
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
td{
|
||||
font-size: 20px;
|
||||
}
|
||||
.bbg {
|
||||
width: 180px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -71,7 +71,7 @@ export default {
|
|||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
limit: 10
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
|
@ -86,7 +86,7 @@ export default {
|
|||
replyVarList: [], // REPLY
|
||||
replyListQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
limit: 10
|
||||
},
|
||||
replyTotal: 0,
|
||||
dialogFormHuifuShow: false,
|
||||
|
|
Loading…
Reference in New Issue