|
@@ -32,7 +32,7 @@
|
|
|
:on-success="handleSuccess"
|
|
|
:on-error='handleError'
|
|
|
:on-progress="handlePropress"
|
|
|
- multiple
|
|
|
+ :show-file-list="true"
|
|
|
:limit="1"
|
|
|
:on-exceed="handleExceed"
|
|
|
:file-list="fileList">
|
|
@@ -134,6 +134,7 @@
|
|
|
import programCenterApi from "@/api/resourceProductMgr/programCenter"
|
|
|
// 【设备(生产资源)】-API
|
|
|
import productionResourcesMgrApi from "@/api/resourceProductMgr/productionResourcesMgr"
|
|
|
+import attachmentMgrApi from "@/api/Attachment"
|
|
|
import db from "@/utils/localstorage";
|
|
|
import {Base64} from 'js-base64';
|
|
|
import { initQueryParams } from '@/utils/commons'
|
|
@@ -247,7 +248,7 @@ export default {
|
|
|
getToolList(arrs){
|
|
|
this.queryParams.current = 1
|
|
|
this.queryParams.size = 9999
|
|
|
- this.queryParams.map.state = '0'
|
|
|
+ //this.queryParams.map.state = '0'
|
|
|
|
|
|
if(arrs.length > 0){
|
|
|
this.queryParams.map.ids = arrs.map(item=>{return item.toolId}).join(',')
|
|
@@ -302,9 +303,12 @@ export default {
|
|
|
this.fileObj.size = response.data.size
|
|
|
// [程序id]
|
|
|
this.fileObj.programId = response.data.bizId
|
|
|
+ this.fileObj.submittedFileName = response.data.filename
|
|
|
+ this.tenant.submittedFileName = response.data.filename
|
|
|
// 查询【程序】信息
|
|
|
// this.getProgram(response.data.filename)
|
|
|
- this.getProgram(response.data.bizId);
|
|
|
+ //this.getProgram(response.data.bizId);
|
|
|
+ this.getProContent(response.data.bizId)
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -544,12 +548,25 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ getProContent(bizId){
|
|
|
+ let that = this
|
|
|
+ programCenterApi.getProgramContent({bizId: bizId}).then(res => {
|
|
|
+ res = res.data
|
|
|
+ if(res.isSuccess){
|
|
|
+ that.loading = false
|
|
|
+ that.pgContent = res.data.content
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 根据[程序ID]获取文件内容
|
|
|
getProgram(programId){
|
|
|
+
|
|
|
programCenterApi.getProgram({id: programId}).then(res => {
|
|
|
res = res.data
|
|
|
- this.loading = false; // 上传遮罩-关闭
|
|
|
+ // 上传遮罩-关闭
|
|
|
console.log("根据[程序ID]:", res.data)
|
|
|
+ this.loading = false
|
|
|
if(res.isSuccess){
|
|
|
const obj = res.data
|
|
|
// [程序内容]字段的值
|
|
@@ -564,10 +581,10 @@ export default {
|
|
|
// 附件-赋值
|
|
|
// this.fileObj = res.data;
|
|
|
// 需要回填的信息
|
|
|
- this.fileObj.nc = '1' // 表示已经上传
|
|
|
- this.fileObj.submittedFileName = obj.name
|
|
|
- this.fileObj.filePath = obj.url
|
|
|
- this.fileObj.runTime = obj.runTime
|
|
|
+ //this.fileObj.nc = '1' // 表示已经上传
|
|
|
+ //this.fileObj.submittedFileName = obj.name
|
|
|
+ //this.fileObj.filePath = obj.url
|
|
|
+ //this.fileObj.runTime = obj.runTime
|
|
|
// this.fileObj.toolList = obj.toolList
|
|
|
// this.fileObj.toolNums = obj.toolList ? obj.toolList.length : 0
|
|
|
}
|