|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<el-dialog title="文件上传" :close-on-click-modal="false" :visible.sync="visible" width="50%" top="5vh"> |
|
|
|
<el-dialog title="文件上传" :close-on-click-modal="false" :visible.sync="visible" width="70%" top="5vh"> |
|
|
|
<div class="upload-content"> |
|
|
|
<!-- 查询表单 --> |
|
|
|
<el-form :inline="true" :model="searchForm" @keyup.enter.native="getFileList()" style="background: #f5f5f5; padding: 10px; margin-bottom: 10px;"> |
|
|
|
@ -32,7 +32,7 @@ |
|
|
|
border |
|
|
|
v-loading="fileListLoading" |
|
|
|
@selection-change="fileSelectionChange" |
|
|
|
height="280" |
|
|
|
height="250" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
@ -45,14 +45,14 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="文件编码" |
|
|
|
width="120"> |
|
|
|
min-width="150"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="fileName" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
label="文件名称" |
|
|
|
min-width="180"> |
|
|
|
min-width="200"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="sopType" |
|
|
|
@ -66,26 +66,26 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="文件后缀" |
|
|
|
width="100"> |
|
|
|
min-width="80"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="sopRevNo" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="版本号" |
|
|
|
width="100"> |
|
|
|
min-width="80"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="生效日期" |
|
|
|
width="120"> |
|
|
|
min-width="120"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="失效日期" |
|
|
|
width="120"> |
|
|
|
min-width="120"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
@ -115,19 +115,19 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 操作按钮 --> |
|
|
|
<div style="margin-top: 20px; text-align: center;"> |
|
|
|
<div style="margin-top: 10px; text-align: center;"> |
|
|
|
<el-button type="primary" @click="addSelectedFiles">添加>></el-button> |
|
|
|
<el-button type="danger" @click="removeSelectedFiles">删除<<</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 已上传的文件 --> |
|
|
|
<div style="margin-top: 20px;"> |
|
|
|
<h4 style="margin-bottom: 10px;">已上传的文件</h4> |
|
|
|
<div> |
|
|
|
<h4 style="margin-bottom: 5px;">已上传的文件</h4> |
|
|
|
<el-table |
|
|
|
ref="uploadedFileTable" |
|
|
|
:data="uploadedFileList" |
|
|
|
border |
|
|
|
height="180" |
|
|
|
height="203" |
|
|
|
style="width: 100%;" |
|
|
|
@selection-change="uploadedFileSelectionChange" |
|
|
|
> |
|
|
|
@ -142,47 +142,64 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="文件编码" |
|
|
|
width="120"> |
|
|
|
min-width="150"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="fileName" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="文件名称" |
|
|
|
min-width="180"> |
|
|
|
min-width="200"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="sopType" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="文件类型" |
|
|
|
width="100"> |
|
|
|
min-width="100"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="fileSuffix" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="文件后缀" |
|
|
|
width="100"> |
|
|
|
min-width="80"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="sopRevNo" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="版本号" |
|
|
|
width="100"> |
|
|
|
min-width="80"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="生效日期" |
|
|
|
width="120"> |
|
|
|
min-width="120"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="失效日期" |
|
|
|
width="120"> |
|
|
|
min-width="120"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="operationDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="120" |
|
|
|
label="工序"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.operationDesc" clearable style="width:98%"> |
|
|
|
<el-option |
|
|
|
v-for = "i in operationList" |
|
|
|
:key = "i.id" |
|
|
|
:label = "i.operationDesc" |
|
|
|
:value = "i.operationDesc"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
@ -197,7 +214,11 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {sopAvailableFiles, sopFileUploadSave} from '@/api/qc/qc.js' |
|
|
|
import { |
|
|
|
sopAvailableFiles, |
|
|
|
sopFileUploadSave, |
|
|
|
getStandardOperation |
|
|
|
} from '@/api/qc/qc.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
data () { |
|
|
|
@ -219,16 +240,31 @@ export default { |
|
|
|
fileListLoading: false, |
|
|
|
selectedFiles: [], |
|
|
|
uploadedFileList: [], |
|
|
|
selectedUploadedFiles: [] // 已上传文件表格中选中的文件 |
|
|
|
selectedUploadedFiles: [], // 已上传文件表格中选中的文件 |
|
|
|
operationList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
// 获取标准工序 |
|
|
|
getStandardOperation (site) { |
|
|
|
let tempData = { |
|
|
|
site: site |
|
|
|
} |
|
|
|
getStandardOperation(tempData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.operationList = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
init (partNo, site) { |
|
|
|
this.visible = true |
|
|
|
this.currentPartNo = partNo || '' |
|
|
|
this.currentSite = site || this.$store.state.user.site |
|
|
|
this.resetData() |
|
|
|
this.getFileList() |
|
|
|
this.getStandardOperation(site) |
|
|
|
}, |
|
|
|
resetData () { |
|
|
|
this.searchForm = { |
|
|
|
@ -407,7 +443,8 @@ export default { |
|
|
|
fileType: file.fileType || '', |
|
|
|
fileSuffix: file.fileSuffix || '', |
|
|
|
sourceSystem: file.sourceSystem || '', |
|
|
|
standardFields: file.standardFields || '' |
|
|
|
standardFields: file.standardFields || '', |
|
|
|
operationDesc: file.operationDesc || '' |
|
|
|
})) |
|
|
|
|
|
|
|
sopFileUploadSave(saveData).then(({data}) => { |
|
|
|
@ -466,4 +503,9 @@ export default { |
|
|
|
::v-deep .el-table .cell { |
|
|
|
padding: 5px; |
|
|
|
} |
|
|
|
|
|
|
|
.el-table /deep/ .cell{ |
|
|
|
height: auto; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
</style> |