|
|
@@ -9,7 +9,7 @@
|
|
|
v-if="!showImg"
|
|
|
class="avatar-uploader"
|
|
|
:drag="true"
|
|
|
- action="http://192.168.1.28:8080/api/upload"
|
|
|
+ :action="actionUrl"
|
|
|
:show-file-list="false"
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
:before-upload="beforeUp"
|
|
|
@@ -24,7 +24,7 @@
|
|
|
<div class="sunmit_btn">
|
|
|
<el-upload
|
|
|
class="avatar-uploader"
|
|
|
- action="http://192.168.1.28:8080/api/upload"
|
|
|
+ :action="actionUrl"
|
|
|
:show-file-list="false"
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
:before-upload="beforeUp"
|
|
|
@@ -38,7 +38,7 @@
|
|
|
<el-upload
|
|
|
disabled
|
|
|
class="avatar-uploader"
|
|
|
- action="http://192.168.1.28:8080/api/upload"
|
|
|
+ :action="actionUrl"
|
|
|
:show-file-list="false"
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
>
|
|
|
@@ -120,6 +120,7 @@ const isOpen = ref(props.openFile);
|
|
|
const thisStep = ref("start"); //解析进度 start,loading,end,
|
|
|
const openFile = ref(false); //控制tree显示
|
|
|
const treeData = ref(); //树节点数据
|
|
|
+const actionUrl = ref(`${import.meta.env.VITE_APP_BASE_API}/upload`)
|
|
|
|
|
|
const props = defineProps({
|
|
|
openFile: {
|
|
|
@@ -136,12 +137,13 @@ watch(
|
|
|
);
|
|
|
onMounted(async () => {
|
|
|
let route = useRoute();
|
|
|
+ let docId = route.query.docId;
|
|
|
let fileId = route.query.fileId;
|
|
|
let fileType = route.query.fileType;
|
|
|
console.log("fileId", fileId);
|
|
|
console.log("fileType", fileType);
|
|
|
if (fileType === ".png" || fileType === ".jpg") {
|
|
|
- const imgRes = await preview(fileId);
|
|
|
+ const imgRes = await preview(docId);
|
|
|
thisStep.value = "loading";
|
|
|
showImg.value = URL.createObjectURL(imgRes);
|
|
|
const res = await ocrRemark(fileId);
|
|
|
@@ -204,7 +206,7 @@ const addlibraryImg = async () => {
|
|
|
const fileChangeMsg = async (val) => {
|
|
|
console.log("val", toRaw(val));
|
|
|
const data = toRaw(val);
|
|
|
- const imgRes = await preview(data.remark);
|
|
|
+ const imgRes = await preview(data.id);
|
|
|
thisStep.value = "loading";
|
|
|
showImg.value = URL.createObjectURL(imgRes);
|
|
|
const res = await ocrRemark(data.remark);
|