21 changed files with 3942 additions and 617 deletions
@ -0,0 +1,86 @@ |
|||
<template> |
|||
<el-select |
|||
v-model="form.sectionName" |
|||
placeholder="请选择标段名称" |
|||
filterable |
|||
clearable |
|||
size="small" |
|||
style="width: 100%" |
|||
> |
|||
<!-- <el-option |
|||
v-for="dict in sectionNameOptions" |
|||
:key="dict.sectionName + dict.id" |
|||
:label="dict.sectionName" |
|||
:value="dict.sectionName" |
|||
/> --> |
|||
<el-option-group |
|||
v-for="(group, index) in mainAndsectionNameOptions" |
|||
:key="group.label" |
|||
:label="group.label" |
|||
> |
|||
<template v-if="index == 0"> |
|||
<el-option |
|||
v-for="item in group.options" |
|||
:key="item.id" |
|||
:label="item.projectName" |
|||
:value="item.projectName" |
|||
> |
|||
</el-option> |
|||
</template> |
|||
<template v-if="index == 1"> |
|||
<el-option |
|||
v-for="item in group.options" |
|||
:key="item.id" |
|||
:label="item.sectionName" |
|||
:value="item.sectionName" |
|||
> |
|||
</el-option> |
|||
</template> |
|||
</el-option-group> |
|||
</el-select> |
|||
</template> |
|||
<script> |
|||
import { listInfo } from "@/api/build/projectInfo"; |
|||
import { listSectionInfo } from "@/api/build/sectionInfo"; |
|||
export default { |
|||
props: ["form", "proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
// sectionNameOptions: [], |
|||
mainAndsectionNameOptions: [ |
|||
{ |
|||
label: "主项目", |
|||
options: [], |
|||
}, |
|||
{ |
|||
label: "项目标段", |
|||
options: [], |
|||
}, |
|||
], |
|||
Query: { |
|||
pageNum: 1, |
|||
pageSize: 20, |
|||
data: { |
|||
proNo: null, |
|||
proCode: null, |
|||
}, |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getData(); |
|||
}, |
|||
methods: { |
|||
getData() { |
|||
this.Query.data.proNo = this.proNo; |
|||
this.Query.data.proCode = this.proCode; |
|||
listInfo(this.Query).then((res) => { |
|||
this.mainAndsectionNameOptions[0].options = res.records; |
|||
}); |
|||
listSectionInfo(this.Query).then((res) => { |
|||
this.mainAndsectionNameOptions[1].options = res.records; |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
@ -0,0 +1,908 @@ |
|||
<template> |
|||
<!-- 施工准备 --> |
|||
<div class="app-container"> |
|||
<div class="listTitle" style="border-left: 0"> |
|||
<span>工程开工令</span> |
|||
<template v-if="preMsg.id"> |
|||
<span |
|||
class="addBtn" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['build:sgzb:edit']" |
|||
> |
|||
<i class="el-icon-edit-outline"></i> |
|||
编辑 |
|||
</span> |
|||
</template> |
|||
<template v-if="!preMsg.id"> |
|||
<span |
|||
class="addBtn" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['build:sgzb:add']" |
|||
> |
|||
<i class="el-icon-plus"></i> |
|||
新增 |
|||
</span> |
|||
</template> |
|||
</div> |
|||
|
|||
<!-- <div class="listTitle"> |
|||
<span>工程开工令</span> |
|||
</div> --> |
|||
<el-descriptions |
|||
class="margin-top" |
|||
:column="2" |
|||
border |
|||
:labelStyle="{ |
|||
'text-align': 'left', |
|||
width: '180px', |
|||
height: '50px', |
|||
}" |
|||
:contentStyle="{ minWidth: '350px' }" |
|||
> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 开工令文件 </template> |
|||
<template v-if="this.preMsg.workCommencementOrder1"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse( |
|||
this.preMsg.workCommencementOrder1 |
|||
)" |
|||
:key="item + index" |
|||
> |
|||
{{ item.name }} |
|||
|
|||
<i |
|||
class="el-icon-download" |
|||
@click="downloadFile2(item, index)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
</el-descriptions-item> |
|||
<el-descriptions-item> |
|||
<template slot="label"> 上报时间 </template> |
|||
{{ this.preMsg.reportTime1 }} |
|||
</el-descriptions-item> |
|||
<el-descriptions-item> |
|||
<template slot="label"> 审批时间 </template> |
|||
{{ this.preMsg.approvalTime1 }} |
|||
</el-descriptions-item> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 批复意见 </template> |
|||
{{ this.preMsg.approvalOpinion1 }} |
|||
</el-descriptions-item> |
|||
</el-descriptions> |
|||
|
|||
<!-- <div class="listTitle"> |
|||
<span>施工组织设计</span> |
|||
</div> |
|||
<el-descriptions |
|||
class="margin-top" |
|||
:column="2" |
|||
border |
|||
:labelStyle="{ |
|||
'text-align': 'left', |
|||
width: '180px', |
|||
height: '50px', |
|||
}" |
|||
:contentStyle="{ minWidth: '350px' }" |
|||
> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 施工组织设计附件 </template> |
|||
<template v-if="this.preMsg.workCommencementOrder2"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse( |
|||
this.preMsg.workCommencementOrder2 |
|||
)" |
|||
:key="item + index" |
|||
> |
|||
{{ item.name }} |
|||
|
|||
<i |
|||
class="el-icon-download" |
|||
@click="downloadFile2(item, index)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
</el-descriptions-item> |
|||
<el-descriptions-item> |
|||
<template slot="label"> 上报时间 </template> |
|||
{{ this.preMsg.reportTime2 }} |
|||
</el-descriptions-item> |
|||
<el-descriptions-item> |
|||
<template slot="label"> 审批时间 </template> |
|||
{{ this.preMsg.approvalTime2 }} |
|||
</el-descriptions-item> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 批复意见 </template> |
|||
{{ this.preMsg.approvalOpinion2 }} |
|||
</el-descriptions-item> |
|||
</el-descriptions> --> |
|||
|
|||
<!-- <div class="listTitle"> |
|||
<span>施工准备措施</span> |
|||
</div> |
|||
<el-descriptions |
|||
class="margin-top" |
|||
:column="2" |
|||
border |
|||
:labelStyle="{ |
|||
'text-align': 'left', |
|||
width: '180px', |
|||
height: '50px', |
|||
}" |
|||
:contentStyle="{ minWidth: '350px' }" |
|||
> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 施工准备措施附件 </template> |
|||
<template v-if="this.preMsg.workCommencementOrder3"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse( |
|||
this.preMsg.workCommencementOrder3 |
|||
)" |
|||
:key="item + index" |
|||
> |
|||
{{ item.name }} |
|||
|
|||
<i |
|||
class="el-icon-download" |
|||
@click="downloadFile2(item, index)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
</el-descriptions-item> |
|||
|
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 施工准备措施内容 </template> |
|||
{{ this.preMsg.approvalOpinion3 }} |
|||
</el-descriptions-item> |
|||
</el-descriptions> --> |
|||
|
|||
<!-- <div class="listTitle"> |
|||
<span>施工准备措施检查</span> |
|||
</div> |
|||
<el-descriptions |
|||
class="margin-top" |
|||
:column="2" |
|||
border |
|||
:labelStyle="{ |
|||
'text-align': 'left', |
|||
width: '180px', |
|||
height: '50px', |
|||
}" |
|||
:contentStyle="{ minWidth: '350px' }" |
|||
> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 施工准备措施检查附件 </template> |
|||
<template v-if="this.preMsg.workCommencementOrder4"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse( |
|||
this.preMsg.workCommencementOrder4 |
|||
)" |
|||
:key="item + index" |
|||
> |
|||
{{ item.name }} |
|||
|
|||
<i |
|||
class="el-icon-download" |
|||
@click="downloadFile2(item, index)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
</el-descriptions-item> |
|||
|
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 批复意见 </template> |
|||
{{ this.preMsg.approvalOpinion4 }} |
|||
</el-descriptions-item> |
|||
</el-descriptions> --> |
|||
<!-- |
|||
<div class="listTitle"> |
|||
<span>项目开工文件</span> |
|||
</div> |
|||
<el-descriptions |
|||
class="margin-top" |
|||
:column="2" |
|||
border |
|||
:labelStyle="{ |
|||
'text-align': 'left', |
|||
width: '180px', |
|||
height: '50px', |
|||
}" |
|||
:contentStyle="{ minWidth: '350px' }" |
|||
> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 开工令文件 </template> |
|||
<template v-if="this.preMsg.workCommencementOrder5"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse( |
|||
this.preMsg.workCommencementOrder5 |
|||
)" |
|||
:key="item + index" |
|||
> |
|||
{{ item.name }} |
|||
|
|||
<i |
|||
class="el-icon-download" |
|||
@click="downloadFile2(item, index)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
</el-descriptions-item> |
|||
<el-descriptions-item> |
|||
<template slot="label"> 上报时间 </template> |
|||
{{ this.preMsg.reportTime5 }} |
|||
</el-descriptions-item> |
|||
<el-descriptions-item> |
|||
<template slot="label"> 审批时间 </template> |
|||
{{ this.preMsg.approvalTime5 }} |
|||
</el-descriptions-item> |
|||
<el-descriptions-item span="2"> |
|||
<template slot="label"> 批复意见 </template> |
|||
{{ this.preMsg.approvalOpinion5 }} |
|||
</el-descriptions-item> |
|||
</el-descriptions> --> |
|||
|
|||
<el-dialog |
|||
:title="title" |
|||
:visible.sync="open" |
|||
width="1200px" |
|||
append-to-body |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-row :gutter="15"> |
|||
<el-form |
|||
ref="form" |
|||
:model="form" |
|||
:rules="rules" |
|||
label-width="110px" |
|||
label-position="top" |
|||
> |
|||
<!-- ===============工程开工令==================== --> |
|||
<div class="listTitle" style="margin-top: 0"> |
|||
<span>工程开工令</span> |
|||
</div> |
|||
<el-col :span="24"> |
|||
<el-form-item label="开工令文件" prop="workCommencementOrder1"> |
|||
<!-- <el-input |
|||
v-model="form.workCommencementOrder1" |
|||
placeholder="请输入意见附件" |
|||
/> --> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="thinking/common/upload" |
|||
:headers="headers" |
|||
:before-upload="(file) => $fileBeforeUpload(file, 'fileList1')" |
|||
:on-preview="handleOpinionPreview" |
|||
:on-remove="handleOpinionRemove1" |
|||
:before-remove="beforeOpinionRemove" |
|||
multiple |
|||
:on-exceed="handleOpinionExceed" |
|||
:on-success="submitOpinionUpload1" |
|||
:file-list="fileList1" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<!-- <div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过200M |
|||
</div> --> |
|||
</el-upload> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="上报时间" prop="reportTime1"> |
|||
<el-date-picker |
|||
v-model="form.reportTime1" |
|||
type="date" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择上报时间" |
|||
style="width: 100%" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审批时间" prop="approvalTime1"> |
|||
<el-date-picker |
|||
v-model="form.approvalTime1" |
|||
type="date" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择审批时间" |
|||
style="width: 100%" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item label="批复意见" prop="approvalOpinion1"> |
|||
<el-input |
|||
v-model="form.approvalOpinion1" |
|||
placeholder="请输入批复意见" |
|||
type="textarea" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<!-- ===============施工组织设计==================== --> |
|||
<!-- <div class="listTitle"> |
|||
<span>施工组织设计</span> |
|||
</div> |
|||
<el-col :span="24"> |
|||
<el-form-item |
|||
label="施工组织设计附件" |
|||
prop="workCommencementOrder2" |
|||
> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="thinking/common/upload" |
|||
:headers="headers" |
|||
:before-upload="(file) => $fileBeforeUpload(file, 'fileList2')" |
|||
:on-preview="handleOpinionPreview" |
|||
:on-remove="handleOpinionRemove2" |
|||
:before-remove="beforeOpinionRemove" |
|||
multiple |
|||
:on-exceed="handleOpinionExceed" |
|||
:on-success="submitOpinionUpload2" |
|||
:file-list="fileList2" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过200M |
|||
</div> |
|||
</el-upload> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="上报时间" prop="reportTime2"> |
|||
<el-date-picker |
|||
v-model="form.reportTime2" |
|||
type="date" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期" |
|||
style="width: 100%" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审批时间" prop="approvalTime2"> |
|||
<el-date-picker |
|||
v-model="form.approvalTime2" |
|||
type="date" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期" |
|||
style="width: 100%" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item label="批复意见" prop="approvalOpinion2"> |
|||
<el-input |
|||
v-model="form.approvalOpinion2" |
|||
placeholder="请输入批复意见" |
|||
type="textarea" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
|
|||
<!-- ===============施工准备措施==================== --> |
|||
<!-- <div class="listTitle"> |
|||
<span>施工准备措施</span> |
|||
</div> |
|||
|
|||
<el-col :span="24"> |
|||
<el-form-item |
|||
label="施工准备措施附件" |
|||
prop="workCommencementOrder3" |
|||
> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="thinking/common/upload" |
|||
:headers="headers" |
|||
:before-upload="(file) => $fileBeforeUpload(file, 'fileList3')" |
|||
:on-preview="handleOpinionPreview" |
|||
:on-remove="handleOpinionRemove3" |
|||
:before-remove="beforeOpinionRemove" |
|||
multiple |
|||
:on-exceed="handleOpinionExceed" |
|||
:on-success="submitOpinionUpload3" |
|||
:file-list="fileList3" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过200M |
|||
</div> |
|||
</el-upload> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item label="施工准备措施内容" prop="approvalOpinion3"> |
|||
<el-input |
|||
v-model="form.approvalOpinion3" |
|||
placeholder="请输入施工准备措施内容" |
|||
type="textarea" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
<!-- ===============施工准备措施检查==================== --> |
|||
<!-- <div class="listTitle"> |
|||
<span>施工准备措施检查</span> |
|||
</div> |
|||
|
|||
<el-col :span="24"> |
|||
<el-form-item |
|||
label="施工准备措施检查附件" |
|||
prop="workCommencementOrder4" |
|||
> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="thinking/common/upload" |
|||
:headers="headers" |
|||
:before-upload="(file) => $fileBeforeUpload(file, 'fileList4')" |
|||
:on-preview="handleOpinionPreview" |
|||
:on-remove="handleOpinionRemove4" |
|||
:before-remove="beforeOpinionRemove" |
|||
multiple |
|||
:on-exceed="handleOpinionExceed" |
|||
:on-success="submitOpinionUpload4" |
|||
:file-list="fileList4" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过200M |
|||
</div> |
|||
</el-upload> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item label="批复意见" prop="approvalOpinion4"> |
|||
<el-input |
|||
v-model="form.approvalOpinion4" |
|||
placeholder="请输入批复意见" |
|||
type="textarea" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
|
|||
<!-- ===============项目开工文件==================== --> |
|||
<!-- <div class="listTitle"> |
|||
<span>项目开工文件</span> |
|||
</div> |
|||
|
|||
<el-col :span="24"> |
|||
<el-form-item label="项目开工文件" prop="workCommencementOrder5"> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="thinking/common/upload" |
|||
:headers="headers" |
|||
:before-upload="(file) => $fileBeforeUpload(file, 'fileList5')" |
|||
:on-preview="handleOpinionPreview" |
|||
:on-remove="handleOpinionRemove5" |
|||
:before-remove="beforeOpinionRemove" |
|||
multiple |
|||
:on-exceed="handleOpinionExceed" |
|||
:on-success="submitOpinionUpload5" |
|||
:file-list="fileList5" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过200M |
|||
</div> |
|||
</el-upload> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="上报时间" prop="reportTime5"> |
|||
<el-date-picker |
|||
v-model="form.reportTime5" |
|||
type="date" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期" |
|||
style="width: 100%" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="审批时间" prop="approvalTime5"> |
|||
<el-date-picker |
|||
v-model="form.approvalTime5" |
|||
type="date" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择日期" |
|||
style="width: 100%" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item label="批复意见" prop="approvalOpinion5"> |
|||
<el-input |
|||
v-model="form.approvalOpinion5" |
|||
placeholder="请输入批复意见" |
|||
type="textarea" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
</el-form> |
|||
|
|||
<!-- <div class="btnList"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> --> |
|||
</el-row> |
|||
<div class="dialog-footer" slot="footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { |
|||
listMeas, |
|||
getMeas, |
|||
delMeas, |
|||
addMeas, |
|||
updateMeas, |
|||
exportMeas, |
|||
} from "@/api/build/meas"; |
|||
import { getToken } from "@/utils/auth"; |
|||
import { getFileStream } from "@/api/system/upload"; |
|||
export default { |
|||
name: "Meas", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 弹出层标题 |
|||
title: "", |
|||
viewTitle: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
viewOpen: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
proCode: null, |
|||
proNo: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
preMsg: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
workCommencementOrder1: [ |
|||
{ required: true, message: "请上传开工令文件", trigger: "blur" }, |
|||
], |
|||
reportTime1: [ |
|||
{ required: true, message: "请选择上报时间", trigger: "blur" }, |
|||
], |
|||
approvalTime1: [ |
|||
{ required: true, message: "请选择审批时间", trigger: "blur" }, |
|||
], |
|||
approvalOpinion1: [ |
|||
{ required: true, message: "请输入批复意见", trigger: "blur" }, |
|||
{ max: 500, message: "字符长度最大为500", trigger: "blur" }, |
|||
], |
|||
approvalOpinion2: [ |
|||
{ max: 500, message: "字符长度最大为500", trigger: "blur" }, |
|||
], |
|||
approvalOpinion3: [ |
|||
{ max: 500, message: "字符长度最大为500", trigger: "blur" }, |
|||
], |
|||
approvalOpinion4: [ |
|||
{ max: 500, message: "字符长度最大为500", trigger: "blur" }, |
|||
], |
|||
approvalOpinion5: [ |
|||
{ max: 500, message: "字符长度最大为500", trigger: "blur" }, |
|||
], |
|||
}, |
|||
// 请求头 |
|||
headers: { |
|||
jianwei: "jwtech " + getToken(), |
|||
}, |
|||
fileList1: [], |
|||
fileList2: [], |
|||
fileList3: [], |
|||
fileList4: [], |
|||
fileList5: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
// 表单重置 |
|||
reset() { |
|||
this.resetForm("form"); |
|||
}, |
|||
getList() { |
|||
this.loading = true; |
|||
this.queryParams.data.proNo = this.proNo; |
|||
this.queryParams.data.proCode = this.proCode; |
|||
listMeas(this.queryParams).then((response) => { |
|||
console.log("responseresponse", response); |
|||
if (response.records[0]) { |
|||
this.preMsg = response.records[0]; |
|||
} |
|||
|
|||
// this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
handleUpdate() { |
|||
this.reset(); |
|||
this.form = { ...this.preMsg }; |
|||
if (this.form.workCommencementOrder1) { |
|||
this.fileList1 = JSON.parse(this.form.workCommencementOrder1); |
|||
} |
|||
if (this.form.workCommencementOrder2) { |
|||
this.fileList2 = JSON.parse(this.form.workCommencementOrder2); |
|||
} |
|||
if (this.form.workCommencementOrder3) { |
|||
this.fileList3 = JSON.parse(this.form.workCommencementOrder3); |
|||
} |
|||
if (this.form.workCommencementOrder4) { |
|||
this.fileList4 = JSON.parse(this.form.workCommencementOrder4); |
|||
} |
|||
if (this.form.workCommencementOrder5) { |
|||
this.fileList5 = JSON.parse(this.form.workCommencementOrder5); |
|||
} |
|||
this.open = true; |
|||
this.title = "修改施工准备信息"; |
|||
}, |
|||
submitForm() { |
|||
if (this.fileList1.length) { |
|||
} |
|||
this.form.workCommencementOrder1 = this.fileList1.length |
|||
? JSON.stringify(this.fileList1) |
|||
: null; |
|||
this.form.workCommencementOrder2 = this.fileList2.length |
|||
? JSON.stringify(this.fileList2) |
|||
: null; |
|||
this.form.workCommencementOrder3 = this.fileList3.length |
|||
? JSON.stringify(this.fileList3) |
|||
: null; |
|||
this.form.workCommencementOrder4 = this.fileList4.length |
|||
? JSON.stringify(this.fileList4) |
|||
: null; |
|||
this.form.workCommencementOrder5 = this.fileList5.length |
|||
? JSON.stringify(this.fileList5) |
|||
: null; |
|||
// this.form.workCommencementOrder1 = JSON.stringify(this.fileList1); |
|||
// this.form.workCommencementOrder2 = JSON.stringify(this.fileList2); |
|||
// this.form.workCommencementOrder3 = JSON.stringify(this.fileList3); |
|||
// this.form.workCommencementOrder4 = JSON.stringify(this.fileList4); |
|||
// this.form.workCommencementOrder5 = JSON.stringify(this.fileList5); |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
this.form.proNo = this.proNo; |
|||
this.form.proCode = this.proCode; |
|||
|
|||
if (this.form.id != null) { |
|||
updateMeas(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
addMeas(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
cancel() { |
|||
// this.$router.back(); |
|||
this.open = false; |
|||
}, |
|||
// 上传意见附件 |
|||
submitOpinionUpload1(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.fileList1.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.fileList1", this.fileList1); |
|||
}, |
|||
|
|||
handleOpinionRemove1(file, fileList) { |
|||
// console.log(file, fileList1); |
|||
let index = this.fileList1.findIndex((item) => item.uid === file.uid); |
|||
// 删除文件 |
|||
this.fileList1.splice(index, 1); |
|||
}, |
|||
|
|||
submitOpinionUpload2(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.fileList2.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.fileList1", this.fileList1); |
|||
}, |
|||
|
|||
handleOpinionRemove2(file, fileList) { |
|||
// console.log(file, fileList2); |
|||
let index = this.fileList2.findIndex((item) => item.uid === file.uid); |
|||
// 删除文件 |
|||
this.fileList2.splice(index, 1); |
|||
}, |
|||
|
|||
submitOpinionUpload3(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.fileList3.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.fileList3", this.fileList3); |
|||
}, |
|||
|
|||
handleOpinionRemove3(file, fileList) { |
|||
// console.log(file, fileList); |
|||
let index = this.fileList3.findIndex((item) => item.uid === file.uid); |
|||
// 删除文件 |
|||
this.fileList3.splice(index, 1); |
|||
}, |
|||
|
|||
submitOpinionUpload4(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.fileList4.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.fileList4", this.fileList4); |
|||
}, |
|||
|
|||
handleOpinionRemove4(file, fileList) { |
|||
// console.log(file, fileList); |
|||
let index = this.fileList4.findIndex((item) => item.uid === file.uid); |
|||
// 删除文件 |
|||
this.fileList4.splice(index, 1); |
|||
}, |
|||
|
|||
submitOpinionUpload5(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.fileList5.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.fileList5", this.fileList5); |
|||
}, |
|||
|
|||
handleOpinionRemove5(file, fileList) { |
|||
// console.log(file, fileList); |
|||
let index = this.fileList5.findIndex((item) => item.uid === file.uid); |
|||
// 删除文件 |
|||
this.fileList5.splice(index, 1); |
|||
}, |
|||
downloadFile2(info, index) { |
|||
console.log(info); |
|||
this.handleOpinionPreview(info); |
|||
}, |
|||
// 点击预览的文件进行下载 |
|||
handleOpinionPreview(file) { |
|||
// console.log(file); |
|||
getFileStream({ fileName: file.fileName }).then((res) => { |
|||
const blob = new Blob([res], { |
|||
// type类型后端返回来的数据中会有,根据自己实际进行修改 |
|||
// 表格下载为 application/xlsx,压缩包为 application/zip等, |
|||
type: "application/xlsx", |
|||
}); //excel,pdf等 |
|||
const href = URL.createObjectURL(blob); //创建新的URL表示指定的blob对象 |
|||
const a = document.createElement("a"); //创建a标签 |
|||
a.style.display = "none"; |
|||
a.href = href; // 指定下载链接 |
|||
a.download = file.name; //指定下载文件名 |
|||
a.click(); //触发下载 |
|||
URL.revokeObjectURL(a.href); //释放URL对象 |
|||
}); |
|||
}, |
|||
handleOpinionExceed(files, fileList) { |
|||
this.$message.warning( |
|||
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ |
|||
files.length + fileList.length |
|||
} 个文件` |
|||
); |
|||
}, |
|||
beforeOpinionRemove(file, fileList) { |
|||
return this.$confirm(`确定移除 ${file.name}?`); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
::v-deep { |
|||
.el-dialog { |
|||
margin-top: 2vh !important; |
|||
} |
|||
} |
|||
.listTitle { |
|||
font-size: 14px; |
|||
padding-left: 10px; |
|||
padding-right: 30px; |
|||
margin: 20px 0; |
|||
border-left: 2px solid #36b29e; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
span:nth-child(1) { |
|||
font-weight: bold; |
|||
} |
|||
.addBtn { |
|||
color: #36b29e; |
|||
cursor: pointer; |
|||
} |
|||
.addBtn:hover { |
|||
color: #31a08e; |
|||
} |
|||
} |
|||
.listTitle:nth-child(1) { |
|||
margin-top: 0; |
|||
// border-left: 0; |
|||
} |
|||
</style> |
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue