|
@ -42,6 +42,13 @@ |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="basicFormRef" |
|
|
ref="basicFormRef" |
|
|
@success="formsSuccess" |
|
|
@success="formsSuccess" |
|
|
|
|
|
:sumFormDataByForm ="(formRef,formModel)=>{ |
|
|
|
|
|
console.log(formModel) |
|
|
|
|
|
const {videoAddress} = formModel |
|
|
|
|
|
formRef.value.setValues({ |
|
|
|
|
|
installPackageUrl:videoAddress |
|
|
|
|
|
}) |
|
|
|
|
|
}" |
|
|
:rules="InspectionMethodRules" |
|
|
:rules="InspectionMethodRules" |
|
|
:formAllSchemas="InspectionMethod.allSchemas" |
|
|
:formAllSchemas="InspectionMethod.allSchemas" |
|
|
:apiUpdate="InspectionMethodApi.updateInspectionMethod" |
|
|
:apiUpdate="InspectionMethodApi.updateInspectionMethod" |
|
@ -163,6 +170,18 @@ const openForm = (type: string, row?: any) => { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
if(type=='create'){ |
|
|
|
|
|
const currentTime = new Date().getTime() |
|
|
|
|
|
const fileId = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='fileId') |
|
|
|
|
|
const uploadFile = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='videoAddress') |
|
|
|
|
|
if(fileId){ |
|
|
|
|
|
fileId['value'] = currentTime |
|
|
|
|
|
} |
|
|
|
|
|
if(uploadFile){ |
|
|
|
|
|
uploadFile['componentProps']['upData']['tableId'] = currentTime |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
basicFormRef.value.open(type, row) |
|
|
basicFormRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -170,13 +189,17 @@ const openForm = (type: string, row?: any) => { |
|
|
const formsSuccess = async (formType,data) => { |
|
|
const formsSuccess = async (formType,data) => { |
|
|
// data.filePathList = [] |
|
|
// data.filePathList = [] |
|
|
// data.tmp = [] |
|
|
// data.tmp = [] |
|
|
data.filePathList = [] |
|
|
console.log(data) |
|
|
for (let i = 0; i < data.filePathListView.length; i++) { |
|
|
// for (let i = 0; i < data.filePathListView.length; i++) { |
|
|
data.filePathList.push(data.filePathListView[i].url) |
|
|
// data.filePathList.push(data.filePathListView[i].url) |
|
|
} |
|
|
// } |
|
|
if(data.filePathList.length>0){ |
|
|
// data.filePathList = [] |
|
|
data.videoAddress = data.filePathList.join(',') |
|
|
// for (let i = 0; i < data.filePathListView.length; i++) { |
|
|
} |
|
|
// data.filePathList.push(data.filePathListView[i].url) |
|
|
|
|
|
// } |
|
|
|
|
|
// if(data.filePathList.length>0){ |
|
|
|
|
|
// data.videoAddress = data.filePathList.join(',') |
|
|
|
|
|
// } |
|
|
// debugger |
|
|
// debugger |
|
|
// if(data.filePathListView instanceof Array){ |
|
|
// if(data.filePathListView instanceof Array){ |
|
|
// for(let i=0; i<data.filePathListView.length; i++){ |
|
|
// for(let i=0; i<data.filePathListView.length; i++){ |
|
@ -204,6 +227,7 @@ const formsSuccess = async (formType,data) => { |
|
|
// if(data.expireTime==0)data.expireTime = null; |
|
|
// if(data.expireTime==0)data.expireTime = null; |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
|
|
|
|
|
|
|
|
|
delete data['uploadFile'] |
|
|
await InspectionMethodApi.createInspectionMethod(data) |
|
|
await InspectionMethodApi.createInspectionMethod(data) |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.createSuccess')) |
|
|
} else { |
|
|
} else { |
|
|