|
|
@@ -498,6 +498,7 @@ import term from '../qualityTesting/term';
|
|
|
import fileIndex from '../file/index.vue';
|
|
|
import fileBrowse from '../file/fileBrowse.vue';
|
|
|
import replaceMaterialPop from './replaceMaterialPop.vue';
|
|
|
+import { filePageAPI } from '@/api/material/file';
|
|
|
export default {
|
|
|
components: {
|
|
|
userSearch,
|
|
|
@@ -1193,9 +1194,13 @@ export default {
|
|
|
this.tableData.taskParam[this.currentIndex].fileParam = [];
|
|
|
this.$refs.fileTable.setData([]);
|
|
|
} else {
|
|
|
- this.$refs.fileTable.setData(
|
|
|
- this.tableData.taskParam[this.currentIndex].fileParam
|
|
|
- );
|
|
|
+ let fileId=this.tableData.taskParam[this.currentIndex].fileParam
|
|
|
+ if(fileId.length > 0){
|
|
|
+ this.fileParamDatasource(fileId)
|
|
|
+ }
|
|
|
+ // this.$refs.fileTable.setData(
|
|
|
+ // this.tableData.taskParam[this.currentIndex].fileParam
|
|
|
+ // );
|
|
|
}
|
|
|
} else if (this.activeName === '标准产出') {
|
|
|
this.$refs.standard.setData(
|
|
|
@@ -1367,7 +1372,25 @@ export default {
|
|
|
this.tableData.taskParam[this.currentIndex].qualityParam =
|
|
|
this.$refs.qualityParamRef.getDate() || [];
|
|
|
}
|
|
|
-
|
|
|
+ //工艺文件只传id
|
|
|
+ let fileParamArr=JSON.parse(JSON.stringify(this.tableData.taskParam))
|
|
|
+ fileParamArr.map((item,index)=>{
|
|
|
+ if(item.fileParam.length>0){
|
|
|
+ let val=[]
|
|
|
+ item.fileParam.map((fileItem)=>{
|
|
|
+ let obj={
|
|
|
+ id:fileItem.id
|
|
|
+ }
|
|
|
+ val.push(obj)
|
|
|
+ })
|
|
|
+ this.$set(
|
|
|
+ this.tableData.taskParam[index],
|
|
|
+ 'fileParam',
|
|
|
+ val
|
|
|
+ );
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log('111112223344',this.tableData.taskParam)
|
|
|
workingProcedureUpdate({
|
|
|
id: this.tableData.id,
|
|
|
categoryId: this.treeData.categoryId,
|
|
|
@@ -1386,6 +1409,24 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ //工艺文件表格回显
|
|
|
+ fileParamDatasource(fileParam) {
|
|
|
+ let fileId=fileParam.map(item => item.id).join(',')
|
|
|
+ filePageAPI({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999,
|
|
|
+ directoryId: '1',
|
|
|
+ lcyStatus: 1,
|
|
|
+ fileType: 0,
|
|
|
+ ids:fileId
|
|
|
+ }).then((res) => {
|
|
|
+ this.$refs.fileTable.setData(
|
|
|
+ res.list
|
|
|
+ );
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
async getDictList(code) {
|
|
|
let { data: res } = await getByCode(code);
|
|
|
|