|
|
@@ -151,13 +151,27 @@ watch(
|
|
|
}
|
|
|
);
|
|
|
onMounted(async () => {
|
|
|
+ // console.log('textData.value',textData.value);
|
|
|
+ const cTextData = sessionStorage.getItem('textData')
|
|
|
+ const imgStr = sessionStorage.getItem('showImg')
|
|
|
+ const cImg = imgStr?JSON.parse(imgStr):''
|
|
|
+ // console.log('cTextData',cTextData);
|
|
|
+ // console.log('cImg',cImg);
|
|
|
+ if(cImg && cTextData){
|
|
|
+ // TODO
|
|
|
+ thisStep.value = "end"
|
|
|
+ textData.value = cTextData
|
|
|
+ showImg.value = cImg
|
|
|
+ loadingPreview.value = false;
|
|
|
+ return
|
|
|
+ }
|
|
|
let route = useRoute();
|
|
|
let docId = route.query.docId;
|
|
|
let fileId = route.query.fileId;
|
|
|
let fileType = route.query.fileType;
|
|
|
const JparData = history.state.clickRowId;
|
|
|
const parData = JSON.parse(JparData);
|
|
|
- console.log("parData", parData);
|
|
|
+ // console.log("parData", parData);
|
|
|
if (parData && JparData != "N") {
|
|
|
docId = parData.docId;
|
|
|
fileId = parData.fileId;
|
|
|
@@ -181,6 +195,8 @@ onMounted(async () => {
|
|
|
// })
|
|
|
thisStep.value = "end";
|
|
|
textData.value = res.msg;
|
|
|
+ sessionStorage.setItem('textData',textData.value)
|
|
|
+ sessionStorage.setItem('showImg',JSON.stringify(showImg.value))
|
|
|
} else {
|
|
|
loadingPreview.value = false;
|
|
|
}
|
|
|
@@ -193,6 +209,8 @@ const handleAvatarSuccess = (msg, file) => {
|
|
|
if (msg.code === 200) {
|
|
|
textData.value = msg.msg;
|
|
|
thisStep.value = "end";
|
|
|
+ sessionStorage.setItem('textData',textData.value)
|
|
|
+ sessionStorage.setItem('showImg',JSON.stringify(showImg.value))
|
|
|
} else {
|
|
|
thisStep.value = "start";
|
|
|
textData.value = null;
|
|
|
@@ -241,6 +259,8 @@ const fileChangeMsg = async (val) => {
|
|
|
const res = await ocrRemark(data.remark);
|
|
|
thisStep.value = "end";
|
|
|
textData.value = res.msg;
|
|
|
+ sessionStorage.setItem('textData',textData.value)
|
|
|
+ sessionStorage.setItem('showImg',JSON.stringify(showImg.value))
|
|
|
// console.log("res", res);
|
|
|
// console.log("imgRes", imgRes);
|
|
|
};
|