qa-prevention-gwj-first-app/pages/application/high-risk-work/blind-work/archive-management/detail.vue

367 lines
10 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">盲板抽堵作业</block>
</cu-custom>
<view class="form">
<view class="wui-form-list">
<view class="cu-form-group">
<view class="title">编号</view>
{{ form.CHECK_NO}}
</view>
<view class="cu-form-group">
<view class="title">申请部门</view>
{{ form.APPLY_DEPARTMENT_NAME }}
</view>
<view class="cu-form-group">
<view class="title">申请人</view>
{{ form.APPLY_USER_NAME }}
</view>
<view class="cu-form-group">
<view class="title">设备管线名称</view>
{{ form.NAME}}
</view>
<view class="cu-form-group">
<view class="title">介质</view>
{{ form.MEDIUM }}
</view>
<view class="cu-form-group">
<view class="title">温度</view>
{{ form.TEMPERATURE }}
</view>
<view class="cu-form-group">
<view class="title">盲板材质</view>
{{ form.BOARD_MATERIAL }}
</view>
<view class="cu-form-group">
<view class="title">盲板规格</view>
{{ form.BOARD_SPECIFICATION }}
</view>
<view class="cu-form-group">
<view class="title">盲板编号</view>
{{ form.BOARD_NO }}
</view>
<view class="cu-form-group">
<view class="title">实施时间装</view>
{{ form.BOARD_INSTALL_TIME }}
</view>
<view class="cu-form-group">
<view class="title">实施时间拆</view>
{{ form.BOARD_DISASSEMBLE_TIME }}
</view>
<view class="cu-form-group">
<view class="title">作业人装</view>
{{ form.BOARD_INSTALL_USER }}
</view>
<view class="cu-form-group">
<view class="title">作业人拆</view>
{{ form.BOARD_DISASSEMBLE_USER }}
</view>
<view class="cu-form-group">
<view class="title">监护人装</view>
{{ form.BOARD_INSTALL_CUSTODY_USER }}
</view>
<view class="cu-form-group">
<view class="title">监护人拆</view>
{{ form.BOARD_DISASSEMBLE_CUSTODY_USER }}
</view>
<view class="cu-form-group">
<view class="title">盲板位置图</view>
{{form.imgList.length}}/4
</view>
<view class="cu-form-group" style="padding-top:20upx">
<view class="grid col-4 grid-square flex-sub">
<view class="bg-img" v-for="(item,index) in form.imgList" :key="index" @tap="ViewImage" :data-url="form.imgList[index]">
<image :src="form.imgList[index]" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="cu-form-group">
<view class="title">编制人签字:</view>
</view>
<view>
<view>
<image :src="baseImgPath + form.BOARD_SIGNER_PATH" style="width: 330upx;height: 260upx"></image>
</view>
<view style="text-align: center">{{form.BOARD_SIGNER_TIME}}</view>
</view>
<view class="cu-form-group" v-if="form.WORK_PLACE">
<view class="title">作业地点:</view>
<view>{{form.WORK_PLACE}}</view>
</view>
<view class="cu-form-group" v-if="form.LONGITUDE">
<view class="title">作业地点经度:</view>
<view>{{form.LONGITUDE}}</view>
</view>
<view class="cu-form-group" v-if="form.LATITUDE">
<view class="title">作业地点纬度:</view>
<view>{{form.LATITUDE}}</view>
</view>
<view class="cu-form-textarea">
<view class="cu-form-title">安全措施及确认意见:</view>
<textarea class="cu-input" disabled placeholder="请输入安全措施及确认意见" v-model="form.CONFIRM_OPINION"></textarea>
</view>
<view class="cu-form-group">
<view class="title">作业单位负责人签字:</view>
</view>
<view>
<view>
<image :src="baseImgPath + form.CONFIRM_SIGNER_PATH" style="width: 330upx;height: 260upx"></image>
</view>
<view style="text-align: center">{{form.CONFIRM_SIGNER_TIME}}</view>
</view>
<view class="cu-form-textarea">
<view class="cu-form-title">安全措施及确认意见:</view>
<textarea class="cu-input" disabled placeholder="请输入安全措施及确认意见" v-model="form.APPROVE_OPINION"></textarea>
</view>
<view class="cu-form-group">
<view class="title">分公司(中心)审批人签字:</view>
</view>
<view>
<view>
<image :src="baseImgPath + form.APPROVE_SIGNER_PATH" style="width: 330upx;height: 260upx"></image>
</view>
<view style="text-align: center">{{form.APPROVE_SIGNER_TIME}}</view>
</view>
</view>
</view>
<view class="cu-bar btn-group" style="margin-top: 30upx;">
<button class="cu-btn bg-blue margin-tb-sm lg" @click="$noMultipleClicks(goback)">返回</button>
</view>
<view class="padding flex flex-direction"></view>
</view>
</template>
<script>
import {
basePath,
baseImgPath,
loginSession,
formatDate,
} from '@/common/tool.js';
export default {
data() {
return {
baseImgPath,
noClick: true,
BLINDBOARD_ID: '',
form: {
APPLY_DEPARTMENT_ID: '',
APPLY_DEPARTMENT_NAME: '',
APPLY_USER_ID: '',
APPLY_USER_NAME: '',
CHECK_NO: '',
APPLICATIO_DEPARTMENT_ID: '',
NAME: '',
MEDIUM: '',
TEMPERATURE: '',
BOARD_MATERIAL: '',
BOARD_SPECIFICATION: '',
BOARD_NO: '',
BOARD_INSTALL_TIME: '',
BOARD_DISASSEMBLE_TIME: '',
BOARD_INSTALL_USER: '',
BOARD_DISASSEMBLE_USER: '',
BOARD_INSTALL_CUSTODY_USER: '',
BOARD_DISASSEMBLE_CUSTODY_USER: '',
imgList: [],
LONGITUDE: '',
LATITUDE: '',
BOARD_SIGNER_PATH: '',
BOARD_SIGNER_TIME: '',
CONFIRM_OPINION: '',
CONFIRM_SIGNER_PATH: '',
CONFIRM_SIGNER_TIME: '',
APPROVE_OPINION: '',
APPROVE_SIGNER_PATH: '',
APPROVE_SIGNER_TIME: '',
},
treeNode: [],
todayDate: formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
modalShow: false,
imgList: [],
}
},
onLoad(event) {
this.BLINDBOARD_ID = event.id
this.getData();
loginSession();
},
methods: {
getData() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/blindboard/personChargeGoEdit',
method: 'POST',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
BLINDBOARD_ID: _this.BLINDBOARD_ID,
},
success: (res) => {
if ("success" == res.data.result) {
this.form = res.data.varList;
this.$set(this.form, 'imgList', []);
for (let i = 0; i < res.data.imgList.length; i++) {
this.form.imgList.push(baseImgPath + res.data.imgList[i].FILEPATH);
}
uni.hideLoading();
} else if ("exception" == res.data.result) {
uni.showToast({
title: '错误',
duration: 2000
});
}
}
});
},
goSubmit(type) {
var _this = this;
let required = true
this.rules.map(({name, message}) => {
if (!this.form[name]) {
uni.showToast({
icon: 'none',
title: message,
duration: 1500
});
required = false
}
})
if(this.imgList.length === 0){
uni.showToast({
icon: 'none',
title: '请签字',
duration: 1500
})
required = false
}
if (!required) {
return
}
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + "/app/hotworkapplication/add",
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
...this.form,
type
},
success: (res) => {
uni.showToast({
icon: 'none',
title: '保存成功',
duration: 2000
});
_this.goback()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
},
ViewImage(e) {
uni.previewImage({
urls: this.form.imgList,
current: e.currentTarget.dataset.url
});
},
ViewImage1 (e) {
let files = [];
for (var i = 0; i < this.imgList.length; i++) {
files.push(this.imgList[i].filePath)
}
uni.previewImage({
urls: files,
current: e.currentTarget.dataset.url
});
},
goback() {
uni.navigateBack({
delta: 1
});
uni.hideLoading();
},
}
}
</script>
<style>
.right_icon {
position: relative;
padding-right: 36upx;
width: 200upx;
text-align: right;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.right_icon ::after {
font-family: cuIcon;
display: block;
content: "\e6a3";
position: absolute;
font-size: 17px;
color: #8799a3;
line-height: 50px;
width: 30px;
text-align: center;
top: -28upx;
bottom: 0;
right: -22upx;
margin: auto;
}
.modal_content {
display: flex;
text-align: left;
}
.modal_left {
flex-basis: 50%;
padding: 50upx 20upx;
border-right: 1px solid #000000;
}
.modal_right {
flex-basis: 50%;
padding: 50upx;
}
.modal_left_title, .modal_right_title {
font-size: 16px;
color: #000000;
font-weight: 700;
}
.checkbox-item {
display: flex;
align-items: center;
padding: 0 30upx;
min-height: 100upx;
background-color: #ffffff;
border-bottom: 1upx solid #ddd;
}
.checkbox-item:last-child {
border-bottom: none;
}
</style>