|
|
@@ -152,8 +152,8 @@ const changeList = async (list) => {
|
|
|
const res = await getCaseImgTagData(caseId.value, imgId);
|
|
|
console.log("getCaseImgTagData2", res);
|
|
|
if (res.data) {
|
|
|
- if (res.data.data) {
|
|
|
- loadedDrawData.value = res.data.data;
|
|
|
+ if (res.data[0] && imgId) {
|
|
|
+ loadedDrawData.value = res.data[0]?.data;
|
|
|
}
|
|
|
if ("isHorizontal" in res.data) {
|
|
|
// console.error("sortType.value", sortType.value, !res.data.isHorizontal);
|
|
|
@@ -261,17 +261,22 @@ const renderCanvas = () => {
|
|
|
? childRef.value.getImageIds()
|
|
|
: imgIds.value,
|
|
|
};
|
|
|
-
|
|
|
+ const title = `${props.title}-照片卷.jpg`;
|
|
|
+ const current = router.currentRoute.value;
|
|
|
+ const query = { ...current.query, editSub: 'photoEdit' };
|
|
|
+ console.log("submitMergePhotos1", params.files);
|
|
|
+ if (!query.parentId && !save) {
|
|
|
+ let fileImgurl = URL.createObjectURL(params.files?.[0]); // 完全兼容
|
|
|
+ saveAs(fileImgurl, title);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.log("submitMergePhotos1", params.files);
|
|
|
setTimeout(async () => {
|
|
|
try {
|
|
|
const res = await submitMergePhotos(params);
|
|
|
const { data, code } = res;
|
|
|
- console.log("submitMergePhotos1", data, save);
|
|
|
- const title = `${props.title}-照片卷.jpg`;
|
|
|
if (data && data.imgUrl) {
|
|
|
if (save) {
|
|
|
- const current = router.currentRoute.value;
|
|
|
- const query = { ...current.query, editSub: 'photoEdit' };
|
|
|
console.log("submitMergePhotos1", query.parentId, data.id, route);
|
|
|
if(!query.parentId){//新的照片制卷
|
|
|
handleAutoSave(data.id);
|