|
@@ -255,9 +255,10 @@
|
|
|
<div class="text">
|
|
<div class="text">
|
|
|
{{ items.name }}
|
|
{{ items.name }}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="operation" :style="{color: items.genStatus == -1 ? 'red' : ''}" v-if="items.genStatus != 0">{{ items.genStatus == 1 ? 'AI制卷中...' : '制卷失败' }}</div>
|
|
|
<div
|
|
<div
|
|
|
class="operation"
|
|
class="operation"
|
|
|
- v-if="!show && childrenList.value == items.id"
|
|
|
|
|
|
|
+ v-else-if="!show && childrenList.value == items.id"
|
|
|
>
|
|
>
|
|
|
<el-icon title="下载" @click="exportToPDF(false, items)"
|
|
<el-icon title="下载" @click="exportToPDF(false, items)"
|
|
|
><Download
|
|
><Download
|
|
@@ -505,16 +506,16 @@
|
|
|
<showpages
|
|
<showpages
|
|
|
ref="showPagesRef"
|
|
ref="showPagesRef"
|
|
|
:photos="photos"
|
|
:photos="photos"
|
|
|
- v-if="childrenList.src"
|
|
|
|
|
|
|
+ v-if="childrenList.src && childrenList.item.genStatus == 0"
|
|
|
:pageCount="childrenList.item.pageCount || 0"
|
|
:pageCount="childrenList.item.pageCount || 0"
|
|
|
:content="childrenList.src"
|
|
:content="childrenList.src"
|
|
|
/>
|
|
/>
|
|
|
<div v-else class="noView">
|
|
<div v-else class="noView">
|
|
|
<div
|
|
<div
|
|
|
class="noViewTitle"
|
|
class="noViewTitle"
|
|
|
- v-if="childrenList.item && childrenList.item.filesUrl"
|
|
|
|
|
|
|
+ v-if="childrenList.item.genStatus != 0"
|
|
|
>
|
|
>
|
|
|
- <div class="zbzc">暂不支持预览</div>
|
|
|
|
|
|
|
+ <div class="zbzc">{{ childrenList.item.genStatus == 1 ? 'AI制卷中...' : '制卷失败' }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else class="noViewTitle">暂无数据</div>
|
|
<div v-else class="noViewTitle">暂无数据</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -735,11 +736,9 @@ function handleSuccess(item) {
|
|
|
onActivated(() =>{
|
|
onActivated(() =>{
|
|
|
getList(true);
|
|
getList(true);
|
|
|
})
|
|
})
|
|
|
-function getList(refresh = false) {
|
|
|
|
|
- //new 0 现场图 1 照片卷 2 现场照片 3 勘验笔录
|
|
|
|
|
- //old 0 现场照片 1 现场图 2 勘验笔录
|
|
|
|
|
|
|
+let refreshTimer: NodeJS.Timeout | null = null;
|
|
|
|
|
+function getPhotoRollList(){
|
|
|
getCasePhotoRollList(caseId.value).then((res) => {
|
|
getCasePhotoRollList(caseId.value).then((res) => {
|
|
|
- casePhotoList.value = res || [];
|
|
|
|
|
let count = 0;
|
|
let count = 0;
|
|
|
casePhotoList.value = res.map((ele) => {
|
|
casePhotoList.value = res.map((ele) => {
|
|
|
let content = ele.content && JSON.parse(ele.content);
|
|
let content = ele.content && JSON.parse(ele.content);
|
|
@@ -750,6 +749,14 @@ function getList(refresh = false) {
|
|
|
pageCount: count - number,
|
|
pageCount: count - number,
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
|
|
+ let isloading = casePhotoList.value.some((ele) => ele.genStatus == 1);//存在制卷中的数据进行刷新流程
|
|
|
|
|
+ if(isloading){
|
|
|
|
|
+ refreshTimer = setTimeout(startAutoRefresh, 3000);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // 有结果 → 清除定时器,停止刷新
|
|
|
|
|
+ clearInterval(refreshTimer);
|
|
|
|
|
+ refreshTimer = null;
|
|
|
|
|
+ }
|
|
|
if (
|
|
if (
|
|
|
active1.value == "照片卷" &&
|
|
active1.value == "照片卷" &&
|
|
|
casePhotoList.value &&
|
|
casePhotoList.value &&
|
|
@@ -759,6 +766,18 @@ function getList(refresh = false) {
|
|
|
handlItem2(item);
|
|
handlItem2(item);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+}
|
|
|
|
|
+function startAutoRefresh(): void {
|
|
|
|
|
+ // 防止重复启动
|
|
|
|
|
+ if (refreshTimer) clearTimeout(refreshTimer);
|
|
|
|
|
+
|
|
|
|
|
+ // 立即执行一次检查
|
|
|
|
|
+ getPhotoRollList();
|
|
|
|
|
+}
|
|
|
|
|
+function getList(refresh = false) {
|
|
|
|
|
+ //new 0 现场图 1 照片卷 2 现场照片 3 勘验笔录
|
|
|
|
|
+ //old 0 现场照片 1 现场图 2 勘验笔录
|
|
|
|
|
+ getPhotoRollList();
|
|
|
updateByTreeFileLists(caseId.value).then((res) => {
|
|
updateByTreeFileLists(caseId.value).then((res) => {
|
|
|
list.value =
|
|
list.value =
|
|
|
res.find((ele) => ele.filesTypeName == "三录材料")?.childrenList || [];
|
|
res.find((ele) => ele.filesTypeName == "三录材料")?.childrenList || [];
|
|
@@ -1181,7 +1200,7 @@ async function frameLoad(sdk, num) {
|
|
|
});
|
|
});
|
|
|
console.log("返回数据1", data);
|
|
console.log("返回数据1", data);
|
|
|
loadingAiPhone.value.close();
|
|
loadingAiPhone.value.close();
|
|
|
- // handledrawCasePhotos(data.id);
|
|
|
|
|
|
|
+ await handlItem2(data);
|
|
|
getList(true);
|
|
getList(true);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.log("捕获到错误", error);
|
|
console.log("捕获到错误", error);
|