jjj
This commit is contained in:
parent
9b6f1d0995
commit
dcb843a554
|
@ -1,10 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<!--基本信息!-->
|
<!--基本信息!-->
|
||||||
<el-main v-loading="mainLoading">
|
<el-main v-loading="mainLoading" style="margin-top: -60px;">
|
||||||
<div id="exportDiv" class="exportDiv">
|
<div id="exportDiv" class="exportDiv">
|
||||||
|
<p style="font-weight: 600px;font-size: 18px;text-align: center;margin-top: 40px;">{{form.cate_name}}作业许可证<span>({{ form.number }})</span></p>
|
||||||
<p class="tables-title">作业信息</p>
|
<p class="tables-title">作业信息</p>
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-descriptions column=2>
|
<el-descriptions column=2 id="opl__opre">
|
||||||
<el-descriptions-item label="作业名称:">
|
<el-descriptions-item label="作业名称:">
|
||||||
{{ operationObj.name }}
|
{{ operationObj.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
@ -49,7 +50,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
<p class="tables-title">许可证信息</p>
|
<p class="tables-title">许可证信息</p>
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-descriptions column=2>
|
<el-descriptions column=2 id="opl__opre">
|
||||||
<el-descriptions-item label="编号:">
|
<el-descriptions-item label="编号:">
|
||||||
{{ form.number }}
|
{{ form.number }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
@ -64,7 +65,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="状态:">
|
<el-descriptions-item label="状态:">
|
||||||
<span v-if="form.ticket_&&form.ticket_.state_" style="margin-right: 5px;">{{form.ticket_.state_.name }}</span>
|
<span v-if="form.ticket_&&form.ticket_.state_" style="margin-right: 5px;">{{form.ticket_.state_.name }}</span>
|
||||||
<span :class="[form.ticket_.act_state===0?'nomalState':form.ticket_.act_state===1?'nomalState':form.ticket_.act_state===2?'dangerState':form.ticket_.act_state===3?'dangerState':form.ticket_.act_state===5?'dangerState':form.ticket_.act_state===4?'successState':'nomalState']"
|
<span :class="['btnState' ,form.ticket_.act_state===0?'nomalState':form.ticket_.act_state===1?'nomalState':form.ticket_.act_state===2?'dangerState':form.ticket_.act_state===3?'dangerState':form.ticket_.act_state===5?'dangerState':form.ticket_.act_state===4?'successState':'nomalState']"
|
||||||
v-if="form.ticket_&&form.ticket_.act_state">{{act_states[form.ticket_.act_state]}}</span>
|
v-if="form.ticket_&&form.ticket_.act_state">{{act_states[form.ticket_.act_state]}}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="作业部门:">
|
<el-descriptions-item label="作业部门:">
|
||||||
|
@ -103,7 +104,7 @@
|
||||||
</el-card> -->
|
</el-card> -->
|
||||||
<p class="tables-title">作业人员</p>
|
<p class="tables-title">作业人员</p>
|
||||||
<table class="tables" cellspacing="0">
|
<table class="tables" cellspacing="0">
|
||||||
<tr class="tableTh">
|
<tr class="tableTh tableThS">
|
||||||
<td class="tableTd">序号</td>
|
<td class="tableTd">序号</td>
|
||||||
<td class="tableTd">姓名</td>
|
<td class="tableTd">姓名</td>
|
||||||
<td class="tableTd">工作职责</td>
|
<td class="tableTd">工作职责</td>
|
||||||
|
@ -111,19 +112,19 @@
|
||||||
<td class="tableTd">创建时间</td>
|
<td class="tableTd">创建时间</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="workerData.length==0" class="noDataTr"> 无数据</tr>
|
<tr v-if="workerData.length==0" class="noDataTr"> 无数据</tr>
|
||||||
<tr class="tableTr" v-for="(item,index) in workerData" :key="item.id">
|
<tr class="tableTr tableTrS" v-for="(item,index) in workerData" :key="item.id">
|
||||||
<td class="tableTd">{{ index+1 }}</td>
|
<td class="tableTd">{{ index+1 }}</td>
|
||||||
<td class="tableTd">{{ item.worker_.name }}</td>
|
<td class="tableTd">{{ item.worker_.name }}</td>
|
||||||
<td class="tableTd">{{ item.duty }}</td>
|
<td class="tableTd">{{ item.duty }}</td>
|
||||||
<td class="tableTd">
|
<td class="tableTd">
|
||||||
<span v-for="cer in item.certificates_" :key="cer.number">{{cer.name}}</span>
|
<span v-for="cer in item.certificates_" :key="cer.number">{{cer.name}}-{{cer.number }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="tableTd">{{ item.create_time }}</td>
|
<td class="tableTd">{{ item.create_time }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p class="tables-title">气体检测记录</p>
|
<p class="tables-title">气体检测记录</p>
|
||||||
<table class="tables" cellspacing="0">
|
<table class="tables" cellspacing="0">
|
||||||
<tr class="tableTh">
|
<tr class="tableTh tableThS">
|
||||||
<td class="tableTd">序号</td>
|
<td class="tableTd">序号</td>
|
||||||
<td class="tableTd">检测部位</td>
|
<td class="tableTd">检测部位</td>
|
||||||
<td class="tableTd">O₂(%)</td>
|
<td class="tableTd">O₂(%)</td>
|
||||||
|
@ -135,7 +136,7 @@
|
||||||
<td class="tableTd">创建时间</td>
|
<td class="tableTd">创建时间</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="gasData.length==0" class="noDataTr"> 无数据</tr>
|
<tr v-if="gasData.length==0" class="noDataTr"> 无数据</tr>
|
||||||
<tr class="tableTr" v-for="(item,index) in gasData" :key="item.id">
|
<tr class="tableTr tableTrS" v-for="(item,index) in gasData" :key="item.id">
|
||||||
<td class="tableTd">{{ index+1 }}</td>
|
<td class="tableTd">{{ index+1 }}</td>
|
||||||
<td class="tableTd">{{ item.check_place }}</td>
|
<td class="tableTd">{{ item.check_place }}</td>
|
||||||
<td class="tableTd">{{ item.o2 }}</td>
|
<td class="tableTd">{{ item.o2 }}</td>
|
||||||
|
@ -151,8 +152,8 @@
|
||||||
<table class="tables" cellspacing="0">
|
<table class="tables" cellspacing="0">
|
||||||
<tr class="tableTh">
|
<tr class="tableTh">
|
||||||
<td class="tableTd">进行状态</td>
|
<td class="tableTd">进行状态</td>
|
||||||
<td class="tableTd">操作类型</td>
|
<td class="tableTd attributeTd">操作类型</td>
|
||||||
<td class="tableTd">操作属性</td>
|
<td class="tableTd attributeTd">操作属性</td>
|
||||||
<td class="tableTd">操作意见</td>
|
<td class="tableTd">操作意见</td>
|
||||||
<td class="tableTd">操作人</td>
|
<td class="tableTd">操作人</td>
|
||||||
<!-- <td class="tableTd">电子签名</td> -->
|
<!-- <td class="tableTd">电子签名</td> -->
|
||||||
|
@ -161,10 +162,10 @@
|
||||||
<tr v-if="logsData.length==0" class="noDataTr"> 无处理日志</tr>
|
<tr v-if="logsData.length==0" class="noDataTr"> 无处理日志</tr>
|
||||||
<tr class="tableTr" v-for="item in logsData" :key="item.id">
|
<tr class="tableTr" v-for="item in logsData" :key="item.id">
|
||||||
<td class="tableTd">{{ item.state_.name }}</td>
|
<td class="tableTd">{{ item.state_.name }}</td>
|
||||||
<td class="tableTd">{{ typeOptions[item.intervene_type] }}</td>
|
<td class="tableTd attributeTd">{{ typeOptions[item.intervene_type] }}</td>
|
||||||
<td class="tableTd">
|
<td class="tableTd attributeTd">
|
||||||
<span v-if="item.transition_attribute == 1" class="successState">同意</span>
|
<span v-if="item.transition_attribute == 1" class="successText">同意</span>
|
||||||
<span v-else class="dangerState">拒绝</span>
|
<span v-else class="dangerText">拒绝</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="tableTd">{{ item.suggestion }}</td>
|
<td class="tableTd">{{ item.suggestion }}</td>
|
||||||
<td class="tableTd">
|
<td class="tableTd">
|
||||||
|
@ -291,10 +292,6 @@
|
||||||
that.oplcateCode = res.cate_code;
|
that.oplcateCode = res.cate_code;
|
||||||
that.ticketId = res.ticket;
|
that.ticketId = res.ticket;
|
||||||
that.$nextTick(()=>{
|
that.$nextTick(()=>{
|
||||||
// that.$API.wf.ticket.ticketItem.req(that.ticketId).then((ress) => {
|
|
||||||
// that.ticketDetail = ress;
|
|
||||||
// that.ticketDetailState = true;
|
|
||||||
// }).catch(e=>{});
|
|
||||||
this.$API.wf.ticket.ticketFlowlogs.req(that.ticketId).then((res) => {
|
this.$API.wf.ticket.ticketFlowlogs.req(that.ticketId).then((res) => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
|
@ -336,18 +333,33 @@
|
||||||
.el-drawer__header {
|
.el-drawer__header {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
.nomalState{
|
.btnState{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 0 9px;
|
padding: 0 9px;
|
||||||
color: #536dfe;
|
|
||||||
height: 24px;
|
height: 24px;
|
||||||
line-height: 23px;
|
line-height: 23px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #edf0fe;
|
}
|
||||||
|
.nomalState{
|
||||||
|
color: #536dfe;
|
||||||
border: 1px solid #dcdfe6;
|
border: 1px solid #dcdfe6;
|
||||||
}
|
}
|
||||||
|
.dangerState{
|
||||||
|
color: #FF0000;
|
||||||
|
border: 1px solid #fbe0e0;
|
||||||
|
}
|
||||||
|
.successState{
|
||||||
|
color: #14c532;
|
||||||
|
border: 1px solid #e6f3e6;
|
||||||
|
}
|
||||||
|
.successText{
|
||||||
|
color: #14c532;
|
||||||
|
}
|
||||||
|
.dangerText{
|
||||||
|
color: #FF0000;
|
||||||
|
}
|
||||||
.tables{
|
.tables{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
@ -358,33 +370,42 @@
|
||||||
.tables-title{
|
.tables-title{
|
||||||
color: #303331;
|
color: #303331;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 700;
|
/* font-weight: 700; */
|
||||||
margin: 20px 0 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
.tableTh,.tableTr{
|
.tableTh,.tableTr{
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.tableTh>td{
|
.tableTh>td{
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #909399;
|
/* color: #909399; */
|
||||||
height: 35px;
|
height: 35px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
/* background: #fafafa; */
|
/* background: #fafafa; */
|
||||||
}
|
}
|
||||||
.tableTh>td:first-child{
|
.tableThS>td:first-child{
|
||||||
flex-shrink:0;
|
flex-shrink:0;
|
||||||
width: 70px;
|
width: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableTr>td{
|
.tableTr>td{
|
||||||
min-height: 30px;
|
min-height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
.tableTr>td:first-child{
|
.tableTrS>td:first-child{
|
||||||
flex-shrink:0;
|
flex-shrink:0;
|
||||||
width: 70px;
|
width: 70px;
|
||||||
}
|
}
|
||||||
|
.tableTh>td.attributeTd{
|
||||||
|
flex-shrink:0;
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
|
.tableTr>td.attributeTd{
|
||||||
|
flex-shrink:0;
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
td{
|
td{
|
||||||
width: 25%;
|
width: 25%;
|
||||||
border-right: 1px solid #e4e7ed;
|
border-right: 1px solid #e4e7ed;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="sc-upload-multiple">
|
<div class="sc-upload-multiple">
|
||||||
<el-upload ref="uploader" list-type="picture-card"
|
<el-upload ref="uploader"
|
||||||
|
list-type="picture-card"
|
||||||
:auto-upload="autoUpload"
|
:auto-upload="autoUpload"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:action="action"
|
:action="action"
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
:file-list="defaultFileList"
|
:file-list="defaultFileList"
|
||||||
:show-file-list="showFileList"
|
:show-file-list="showFileList"
|
||||||
:accept="accept"
|
:accept="accept"
|
||||||
:multiple="multiple"
|
multiple=true
|
||||||
:limit="limit"
|
:limit="limit"
|
||||||
:before-upload="before"
|
:before-upload="before"
|
||||||
:on-success="success"
|
:on-success="success"
|
||||||
|
@ -51,26 +52,25 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
modelValue: { type: String, default: "" },
|
modelValue: { },
|
||||||
tip: { type: String, default: "" },
|
tip: { type: String, default: "" },
|
||||||
action: { type: String, default: "" },
|
action: { type: String, default: "" },
|
||||||
apiObj: { type: Object, default: () => {} },
|
apiObj: { type: Object, default: () => {} },
|
||||||
name: { type: String, default: config.filename },
|
|
||||||
data: { type: Object, default: () => {} },
|
data: { type: Object, default: () => {} },
|
||||||
accept: { type: String, default: "image/gif, image/jpeg, image/png" },
|
name: { type: String, default: config.filename },
|
||||||
maxSize: { type: Number, default: config.maxSizeFile },
|
limit: { type: Number, default: 9 },
|
||||||
limit: { type: Number, default: 0 },
|
|
||||||
autoUpload: { type: Boolean, default: true },
|
autoUpload: { type: Boolean, default: true },
|
||||||
showFileList: { type: Boolean, default: true },
|
showFileList: { type: Boolean, default: true },
|
||||||
multiple: { type: Boolean, default: true },
|
multiple: { type: Boolean, default: true },
|
||||||
disabled: { type: Boolean, default: false },
|
disabled: { type: Boolean, default: false },
|
||||||
draggable: { type: Boolean, default: false },
|
onSuccess: { type: Function, default: () => { return true } },
|
||||||
onSuccess: { type: Function, default: () => { return true } }
|
maxSize: { type: Number, default: config.maxSizeFile },
|
||||||
|
accept: { type: String, default: "image/gif, image/jpeg, image/png" },
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
value: "",
|
value: "",
|
||||||
defaultFileList: []
|
defaultFileList: []//图片数组[{name:'',url:''}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
|
@ -94,11 +94,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.value = this.modelValue
|
|
||||||
this.defaultFileList = this.toArr(this.modelValue)
|
this.defaultFileList = this.modelValue//数组,图片ids
|
||||||
if(!this.disabled && this.draggable){
|
console.log(this.modelValue);
|
||||||
this.rowDrop()
|
if(this.modelValue.length>0){
|
||||||
|
this.modelValue.forEach(item=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
// this.value.push()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//默认值转换为数组
|
//默认值转换为数组
|
||||||
|
@ -147,14 +153,19 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
success(res, file){
|
success(res, file , fileList){
|
||||||
|
debugger;
|
||||||
var os = this.onSuccess(res, file)
|
var os = this.onSuccess(res, file)
|
||||||
|
console.log(os)
|
||||||
if(os!=undefined && os==false){
|
if(os!=undefined && os==false){
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
var response = config.parseData(res)
|
var response = config.parseData(res)
|
||||||
file.name = response.fileName
|
file.url = response.src;
|
||||||
file.url = response.src
|
file.name = response.fileName;
|
||||||
|
this.$emit('uploadSuccess',fileList);
|
||||||
|
this.value = this.value+','+res.id;
|
||||||
|
|
||||||
},
|
},
|
||||||
error(err){
|
error(err){
|
||||||
this.$notify.error({
|
this.$notify.error({
|
||||||
|
@ -198,12 +209,12 @@
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
config.parseData(res);
|
config.parseData(res);
|
||||||
param.onSuccess(res)
|
// return {
|
||||||
// if(response.code == config.successCode){
|
// fileName: res.name,//分析文件名称
|
||||||
// param.onSuccess(res)
|
// src: res.path,//分析图片远程地址结构
|
||||||
// }else{
|
|
||||||
// param.onError(response.msg || "未知错误")
|
|
||||||
// }
|
// }
|
||||||
|
param.onSuccess(res)
|
||||||
|
debugger;
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
param.onError(err)
|
param.onError(err)
|
||||||
})
|
})
|
||||||
|
|
|
@ -103,4 +103,7 @@ a,button,input,textarea{-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing: bo
|
||||||
|
|
||||||
#eventImgWrap .el-image__preview,#eventImgWrap .el-image__inne{
|
#eventImgWrap .el-image__preview,#eventImgWrap .el-image__inne{
|
||||||
width: auto;
|
width: auto;
|
||||||
|
}
|
||||||
|
#opl__opre>.el-descriptions__body>.el-descriptions__table:not(.is-bordered) .el-descriptions__cell{
|
||||||
|
padding-bottom: 5px;
|
||||||
}
|
}
|
|
@ -21,23 +21,17 @@ class PdfLoader {
|
||||||
async getPDF(resolve) {
|
async getPDF(resolve) {
|
||||||
const ele = this.ele;
|
const ele = this.ele;
|
||||||
let eleme = this.ele;
|
let eleme = this.ele;
|
||||||
eleme.style.width="750px";
|
eleme.style.width="800px";
|
||||||
const pdfFileName = this.pdfFileName
|
const pdfFileName = this.pdfFileName
|
||||||
const eleW = ele.offsetWidth// 获得该容器的宽
|
const eleW = ele.offsetWidth// 获得该容器的宽
|
||||||
const eleH = ele.scrollHeight// 获得该容器的高
|
const eleH = ele.scrollHeight;// 获得该容器的高
|
||||||
const eleOffsetTop = ele.offsetTop// 获得该容器到文档顶部的距离
|
const eleOffsetTop = ele.offsetTop// 获得该容器到文档顶部的距离
|
||||||
const eleOffsetLeft = ele.offsetLeft// 获得该容器到文档最左的距离
|
const eleOffsetLeft = ele.offsetLeft// 获得该容器到文档最左的距离
|
||||||
const canvas = document.createElement('canvas')
|
const canvas = document.createElement('canvas')
|
||||||
// let abs = 0
|
canvas.width = eleW * 3// 将画布宽&&高放大两倍
|
||||||
// const win_in = document.documentElement.clientWidth || document.body.clientWidth// 获得当前可视窗口的宽度(不包含滚动条)
|
canvas.height = eleH * 3
|
||||||
// const win_out = window.innerWidth// 获得当前窗口的宽度(包含滚动条)
|
|
||||||
// if (win_out > win_in) {
|
|
||||||
// abs = (win_out - win_in) / 2// 获得滚动条宽度的一半
|
|
||||||
// }
|
|
||||||
canvas.width = eleW * 2// 将画布宽&&高放大两倍
|
|
||||||
canvas.height = eleH * 2
|
|
||||||
const context = canvas.getContext('2d')
|
const context = canvas.getContext('2d')
|
||||||
context.scale(2,2) // 增强图片清晰度
|
context.scale(3,3) // 增强图片清晰度
|
||||||
context.translate(-eleOffsetLeft , -eleOffsetTop)
|
context.translate(-eleOffsetLeft , -eleOffsetTop)
|
||||||
html2canvas(eleme, {
|
html2canvas(eleme, {
|
||||||
useCORS: true// 允许canvas画布内可以跨域请求外部链接图片, 允许跨域请求。
|
useCORS: true// 允许canvas画布内可以跨域请求外部链接图片, 允许跨域请求。
|
||||||
|
@ -49,7 +43,7 @@ class PdfLoader {
|
||||||
// 未生成pdf的html页面高度
|
// 未生成pdf的html页面高度
|
||||||
let leftHeight = contentHeight
|
let leftHeight = contentHeight
|
||||||
// 页面偏移
|
// 页面偏移
|
||||||
let position = 0
|
let position = 20
|
||||||
// a4纸的尺寸[595,842],单位像素,html页面生成的canvas在pdf中图片的宽高
|
// a4纸的尺寸[595,842],单位像素,html页面生成的canvas在pdf中图片的宽高
|
||||||
const imgWidth = this.A4_WIDTH - 40 // -10为了页面有右边距
|
const imgWidth = this.A4_WIDTH - 40 // -10为了页面有右边距
|
||||||
const imgHeight = (this.A4_WIDTH / contentWidth) * contentHeight
|
const imgHeight = (this.A4_WIDTH / contentWidth) * contentHeight
|
||||||
|
@ -63,7 +57,7 @@ class PdfLoader {
|
||||||
} else {
|
} else {
|
||||||
// 分页
|
// 分页
|
||||||
while (leftHeight > 0) {
|
while (leftHeight > 0) {
|
||||||
pdf.addImage(pageData, 'JPEG', 5, position, imgWidth, imgHeight)
|
pdf.addImage(pageData, 'JPEG', 20, position, imgWidth, imgHeight)
|
||||||
leftHeight -= pageHeight
|
leftHeight -= pageHeight
|
||||||
position -= this.A4_HEIGHT
|
position -= this.A4_HEIGHT
|
||||||
// 避免添加空白页
|
// 避免添加空白页
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="签名">
|
<el-form-item label="签名">
|
||||||
<sc-upload v-model="form.signature" title="签名"></sc-upload>
|
<el-image :src="form.signature" style="width: 148px;min-height: 80px;"></el-image>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
@ -72,12 +72,12 @@
|
||||||
v-model="form.dept_do"
|
v-model="form.dept_do"
|
||||||
:options="deptoptions"
|
:options="deptoptions"
|
||||||
:props="{
|
:props="{
|
||||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||||
label: 'label', //
|
label: 'label', //
|
||||||
value: 'value', //
|
value: 'value', //
|
||||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
}"
|
}"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -89,14 +89,6 @@
|
||||||
style="width:200px"
|
style="width:200px"
|
||||||
disabled
|
disabled
|
||||||
></el-input>
|
></el-input>
|
||||||
<!-- <el-select v-model="form.charger_name" placeholder="选择作业负责人">
|
|
||||||
<el-option
|
|
||||||
v-for="item in useroptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select> -->
|
|
||||||
<ehsUserSelect :multiple="false" @submit="getCharger"/>
|
<ehsUserSelect :multiple="false" @submit="getCharger"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -145,18 +137,22 @@
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业前照片" prop="measures_checked">
|
||||||
|
<sc-Upload-Multiple @uploadSuccess="uploadSuccess" v-model="create_imgs" :modelValue="imgList" title="证件照"></sc-Upload-Multiple>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-bottom: 20px; text-align:center">
|
<div style="margin-bottom: 20px; text-align:center">
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="issave"
|
:disabled="issave"
|
||||||
:loading="issave"
|
:loading="issave"
|
||||||
type="primary" plain
|
type="primary" plain
|
||||||
@click="handleNextStep"
|
@click="handleNextStep"
|
||||||
>下一步</el-button>
|
>下一步</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
|
||||||
<!--作业人员!-->
|
<!--作业人员!-->
|
||||||
<el-main class="nopadding" v-show="active === 1">
|
<el-main class="nopadding" v-show="active === 1">
|
||||||
<div class="left-panel" style="margin: 10px">
|
<div class="left-panel" style="margin: 10px">
|
||||||
|
@ -328,10 +324,10 @@
|
||||||
opl: "",
|
opl: "",
|
||||||
};
|
};
|
||||||
const defaultformgas = {
|
const defaultformgas = {
|
||||||
id: "",
|
id: "",
|
||||||
check_time: null,
|
check_time: null,
|
||||||
opl:""
|
opl:""
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
name: "fire",
|
name: "fire",
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -353,16 +349,19 @@
|
||||||
operation: "",
|
operation: "",
|
||||||
cate: "",
|
cate: "",
|
||||||
risks_checked: [],
|
risks_checked: [],
|
||||||
|
create_imgs:[],
|
||||||
},
|
},
|
||||||
|
create_imgs:[],
|
||||||
|
imgList:[],
|
||||||
initForm: {},
|
initForm: {},
|
||||||
operationId: "",
|
operationId: "",
|
||||||
oplcateId: "",
|
oplcateId: "",
|
||||||
oplcateCode: "",
|
oplcateCode: "",
|
||||||
oplId: "",
|
oplId: "",
|
||||||
leveloptions: [
|
leveloptions: [
|
||||||
{ id: "主干道", name: "主干道" },
|
{ id: "主干道", name: "主干道" },
|
||||||
{ id: "次干渠", name: "次干渠" }
|
{ id: "次干渠", name: "次干渠" }
|
||||||
],
|
],
|
||||||
deptoptions: [],
|
deptoptions: [],
|
||||||
useroptions: [],
|
useroptions: [],
|
||||||
risklist: [],
|
risklist: [],
|
||||||
|
@ -422,6 +421,21 @@
|
||||||
// this.getUser();
|
// this.getUser();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
uploadSuccess(data){
|
||||||
|
debugger;
|
||||||
|
console.log(data);
|
||||||
|
debugger;
|
||||||
|
let imgArr = [];
|
||||||
|
if(data.constructor===Array ){
|
||||||
|
data.forEach(item=>{
|
||||||
|
imgArr.push(item.response.id)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
|
||||||
|
imgArr.push(data.id)
|
||||||
|
}
|
||||||
|
this.form.create_imgs = imgArr;
|
||||||
|
},
|
||||||
getCharger(data) {
|
getCharger(data) {
|
||||||
this.form.charger=data.id;
|
this.form.charger=data.id;
|
||||||
this.form.charger_name=data.name
|
this.form.charger_name=data.name
|
||||||
|
@ -503,45 +517,48 @@
|
||||||
},
|
},
|
||||||
//组件点击下一步
|
//组件点击下一步
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
|
// debugger;
|
||||||
|
console.log(this.form.create_imgs);
|
||||||
|
// return;
|
||||||
if (this.active == 0) {
|
if (this.active == 0) {
|
||||||
this.$refs.dialogForm.validate((valid) => {
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.issave = false; //如果是创建许可证书
|
this.issave = true;
|
||||||
if (this.oplId == "") {
|
//如果是创建许可证书
|
||||||
//基本信息提交
|
if (this.oplId == "") {
|
||||||
debugger;
|
//基本信息提交
|
||||||
this.form.cate = this.oplcateId;
|
// debugger;
|
||||||
this.form.operation = this.operationId;
|
this.form.cate = this.oplcateId;
|
||||||
console.log(this.form);
|
this.form.operation = this.operationId;
|
||||||
this.$API.opm.opl.create
|
console.log(this.form);
|
||||||
.req(this.form)
|
this.$API.opm.opl.create
|
||||||
.then((res) => {
|
.req(this.form)
|
||||||
this.$emit("success", this.form);
|
.then((res) => {
|
||||||
this.$message.success("创建成功");
|
this.$emit("success", this.form);
|
||||||
|
this.$message.success("创建成功");
|
||||||
|
this.active = 1;
|
||||||
|
this.issave = false;
|
||||||
|
this.oplId = res.id;
|
||||||
|
this.getworkerList();
|
||||||
|
this.getgasList();
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
} else if (this.oplId != "") {
|
||||||
|
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||||
|
this.$message.success("基本修改成功!");
|
||||||
this.active = 1;
|
this.active = 1;
|
||||||
this.issave = false;
|
this.issave = false;
|
||||||
this.oplId = res.id;
|
|
||||||
this.getworkerList();
|
|
||||||
this.getgasList();
|
this.getgasList();
|
||||||
return res;
|
this.getworkerList();
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
return err;
|
|
||||||
});
|
});
|
||||||
} else if (this.oplId != "") {
|
} else {
|
||||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
|
||||||
this.$message.success("基本修改成功!");
|
|
||||||
this.active = 1;
|
this.active = 1;
|
||||||
this.issave = false;
|
this.issave = false;
|
||||||
this.getgasList();
|
}
|
||||||
this.getworkerList();
|
|
||||||
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.active = 1;
|
|
||||||
this.issave = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-drawer :size="'50%'" v-model="showLimited" :title="oplName + '作业许可证详情'">
|
<el-drawer :size="'50%'" v-model="showLimited">
|
||||||
<sc-fire :id="oplId" :wfId="operationId"></sc-fire>
|
<sc-fire :id="oplId" :wfId="operationId"></sc-fire>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
|
|
@ -66,7 +66,8 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="签名">
|
<el-form-item label="签名">
|
||||||
<el-image :src="form.signature" style="width: 148px; height: 80px"></el-image>
|
<sc-upload v-model="form.signature" title="证件照" :disabled="true"></sc-upload>
|
||||||
|
<!-- <el-image :src="form.signature" style="width: 148px; height: 80px"></el-image> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
|
@ -102,8 +103,10 @@ export default {
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
let sform = {
|
let sform = {
|
||||||
|
"id_number":this.form.id_number,
|
||||||
|
"photo": this.form.photo,
|
||||||
"phone": this.form.phone,
|
"phone": this.form.phone,
|
||||||
"email": this.form.email
|
"email": this.form.email,
|
||||||
}
|
}
|
||||||
this.saveLoading = true
|
this.saveLoading = true
|
||||||
this.$API.hrm.employee.improve_info.req(sform).then(res=>{
|
this.$API.hrm.employee.improve_info.req(sform).then(res=>{
|
||||||
|
|
Loading…
Reference in New Issue