|
@@ -143,18 +143,17 @@ const saveHandler = async () => {
|
|
const args = props.value!;
|
|
const args = props.value!;
|
|
console.log('titleShape', store, titleShape);
|
|
console.log('titleShape', store, titleShape);
|
|
const blob = await board.value!.export();
|
|
const blob = await board.value!.export();
|
|
|
|
+ let filesTitle = titleShape?.text || `${args.caseId}_${BoardTypeDesc[args.type]}`
|
|
const body: SaveCaseFileImageInfo = {
|
|
const body: SaveCaseFileImageInfo = {
|
|
caseId: args.caseId,
|
|
caseId: args.caseId,
|
|
imgType: args.type,
|
|
imgType: args.type,
|
|
- file: new File([blob], `${args.type}_${args.fileId}.jpg`),
|
|
|
|
- filesTitle: titleShape?.text || `${args.caseId}_${BoardTypeDesc[args.type]}`,
|
|
|
|
|
|
+ file: new File([blob], `${filesTitle}_${args.fileId}.jpg`),
|
|
|
|
+ filesTitle: filesTitle,
|
|
content: store && JSON.stringify(store),
|
|
content: store && JSON.stringify(store),
|
|
};
|
|
};
|
|
args.inAdd || (body.filesId = props.value!.fileId);
|
|
args.inAdd || (body.filesId = props.value!.fileId);
|
|
const { data } = await uploadNewFile(body);
|
|
const { data } = await uploadNewFile(body);
|
|
- console.log('args1', args, body, data, pmtId.value, fmtId.value);
|
|
|
|
const rse = await addByMediaLiBrary({ ...body, caseId: args.caseId,filesTypeId: args.type != BoardType.scene ? fmtId.value : pmtId.value, uploadId: data.id });
|
|
const rse = await addByMediaLiBrary({ ...body, caseId: args.caseId,filesTypeId: args.type != BoardType.scene ? fmtId.value : pmtId.value, uploadId: data.id });
|
|
- console.log('args2',rse, { ...body,caseId: args.caseId, type: args.type, id: data.id });
|
|
|
|
if (args.inAdd) {
|
|
if (args.inAdd) {
|
|
router.replace({
|
|
router.replace({
|
|
name: RouteName.drawCaseFile,
|
|
name: RouteName.drawCaseFile,
|