|
@@ -236,7 +236,7 @@
|
|
<div class="textarea">
|
|
<div class="textarea">
|
|
<div>
|
|
<div>
|
|
<span>现场勘验情况 :</span>
|
|
<span>现场勘验情况 :</span>
|
|
- <span @click="()=>{aiImgShow=true}" style="color:#000;cursor: pointer;float: right;font-weight: bold;">AI</span>
|
|
|
|
|
|
+ <span @click="()=>{aiImgShow=true}" style="color:#26559B;cursor: pointer;float: right;font-weight: bold;">AI</span>
|
|
</div>
|
|
</div>
|
|
<el-input
|
|
<el-input
|
|
type="textarea"
|
|
type="textarea"
|
|
@@ -476,38 +476,44 @@
|
|
<el-dialog
|
|
<el-dialog
|
|
v-model="aiImgShow"
|
|
v-model="aiImgShow"
|
|
title="AI识别平面图"
|
|
title="AI识别平面图"
|
|
- width="1000"
|
|
|
|
|
|
+ width="1300px"
|
|
align-center
|
|
align-center
|
|
- @close="recorderInfoDialogSelect = null"
|
|
|
|
|
|
+ @close="aiImgData.src = null"
|
|
>
|
|
>
|
|
<div class="flex space-x-4 items-center content-center justify-center text-center">
|
|
<div class="flex space-x-4 items-center content-center justify-center text-center">
|
|
<div class="flex-1" style="width: 80%;">
|
|
<div class="flex-1" style="width: 80%;">
|
|
<el-select
|
|
<el-select
|
|
- v-model="recorderInfoDialogSelect"
|
|
|
|
- placeholder="请选择现场勘验记录人员"
|
|
|
|
|
|
+ v-model="aiImgData.src"
|
|
|
|
+ placeholder="请选择平面图"
|
|
size="large"
|
|
size="large"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in recorderInfoType"
|
|
|
|
- :key="item.type"
|
|
|
|
- :label="item.typeLabel"
|
|
|
|
- :value="item.type"
|
|
|
|
|
|
+ v-for="item in aiImgData.list"
|
|
|
|
+ :key="item.num"
|
|
|
|
+ :label="item.num"
|
|
|
|
+ :value="item.urls[0]"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
- <div class="viewImg mt-4 text-center" style="height: 300px; line-height: 300px; background: #d8d8d8;">
|
|
|
|
|
|
+ <div class="viewImg mt-4 text-center" style="height: 400px; line-height: 400px; border-radius: 0px 0px 0px 0px;
|
|
|
|
+border: 1px solid #D9D9D9;">
|
|
<img class="w-full h-full object-cover" v-if="aiImgData.src" :src="aiImgData.src" alt="" />
|
|
<img class="w-full h-full object-cover" v-if="aiImgData.src" :src="aiImgData.src" alt="" />
|
|
<span v-else>预览选中的平面图</span>
|
|
<span v-else>预览选中的平面图</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex-1">
|
|
|
|
|
|
+ <div class="flex-1 text-center content-start" style="border-radius: 0px 0px 0px 0px;
|
|
|
|
+border: 1px solid #D9D9D9;">
|
|
<span v-if="aiImgData.loading">识别中</span>
|
|
<span v-if="aiImgData.loading">识别中</span>
|
|
- <span v-else>{{ aiImgData.result || '识别结果'}}</span>
|
|
|
|
|
|
+ <div class="text-left" style="height: 450px;padding: 10px" v-else v-html="aiImgData.result"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<template #footer>
|
|
<template #footer>
|
|
- <div class="dialog-footer text-center">
|
|
|
|
- <el-button type="primary" @click="handleAI"> 识别 </el-button>
|
|
|
|
- <el-button v-if="aiImgData.result" @click="handleAI"> 复制 </el-button>
|
|
|
|
|
|
+ <div class="dialog-footer text-center flex">
|
|
|
|
+ <div style="width: 50%">
|
|
|
|
+ <el-button type="primary" @click="handleAI"> 识别 </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="width: 50%">
|
|
|
|
+ <el-button :disabled="aiImgData.result" @click="handleCopy"> 复制 </el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -522,12 +528,15 @@ import {
|
|
saveCaseInquestInfo,
|
|
saveCaseInquestInfo,
|
|
exportCaseInquestInfo,
|
|
exportCaseInquestInfo,
|
|
getCaseInquestInfoOld,
|
|
getCaseInquestInfoOld,
|
|
|
|
+ getAiByImage,
|
|
|
|
+ getFloorList,
|
|
} from "@/store/case";
|
|
} from "@/store/case";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
import saveAs from "@/util/file-serve";
|
|
import saveAs from "@/util/file-serve";
|
|
import { CirclePlus, CircleClose, MagicStick } from "@element-plus/icons-vue";
|
|
import { CirclePlus, CircleClose, MagicStick } from "@element-plus/icons-vue";
|
|
import { recorderInfoType, ChangeReasonType } from "./formData.ts";
|
|
import { recorderInfoType, ChangeReasonType } from "./formData.ts";
|
|
import { confirm } from "@/helper/message";
|
|
import { confirm } from "@/helper/message";
|
|
|
|
+import { copyTextToClipboard } from "@/util/index";
|
|
const props = defineProps({ caseId: Number, title: String });
|
|
const props = defineProps({ caseId: Number, title: String });
|
|
console.log("router.currentRoute", router.currentRoute.value?.params);
|
|
console.log("router.currentRoute", router.currentRoute.value?.params);
|
|
const fileId = computed(() => router.currentRoute.value?.params?.fileId);
|
|
const fileId = computed(() => router.currentRoute.value?.params?.fileId);
|
|
@@ -535,9 +544,10 @@ const caseId = computed(() => router.currentRoute.value?.params?.caseId);
|
|
const isDisableExport = ref(false);
|
|
const isDisableExport = ref(false);
|
|
const aiImgShow = ref(false)
|
|
const aiImgShow = ref(false)
|
|
const aiImgData = ref({
|
|
const aiImgData = ref({
|
|
- src: '',
|
|
|
|
- result: '',
|
|
|
|
- loading: false
|
|
|
|
|
|
+ src: '/oss/scene_view_data/YZL-jm-Z7xsq0T8502/user/floor-cad-0.png',
|
|
|
|
+ result: ``,
|
|
|
|
+ loading: false,
|
|
|
|
+ list: [],
|
|
})
|
|
})
|
|
|
|
|
|
const data = reactive({
|
|
const data = reactive({
|
|
@@ -613,7 +623,24 @@ const initInfo = async (inquestFileId) => {
|
|
initSignatureAndWitInfo();
|
|
initSignatureAndWitInfo();
|
|
}, 500);
|
|
}, 500);
|
|
};
|
|
};
|
|
-const handleAI = () => {
|
|
|
|
|
|
+const handleCopy = () => {
|
|
|
|
+ copyTextToClipboard(aiImgData.value.result);
|
|
|
|
+ ElMessage.success("复制成功!");
|
|
|
|
+}
|
|
|
|
+const handleAI = async () => {
|
|
|
|
+ aiImgData.value.loading = true;
|
|
|
|
+ let orgin = window.location.origin;
|
|
|
|
+ let imageUrl = orgin + aiImgData.value.src
|
|
|
|
+ try {
|
|
|
|
+ const res = await getAiByImage({imageUrl: 'http://192.168.0.25/oss/scene_view_data/YZL-jm-Z7xsq0T8502/user/floor-cad-0.png'})
|
|
|
|
+ console.log("handleAI", res)
|
|
|
|
+ aiImgData.value = {
|
|
|
|
+ result: res,
|
|
|
|
+ loading: false
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ aiImgData.value.loading = false;
|
|
|
|
+ }
|
|
|
|
|
|
};
|
|
};
|
|
const initSignatureAndWitInfo = () => {
|
|
const initSignatureAndWitInfo = () => {
|
|
@@ -640,6 +667,10 @@ const initSignatureAndWitInfo = () => {
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
initInfo();
|
|
initInfo();
|
|
|
|
+ getFloorList(caseId.value).then((res) => {
|
|
|
|
+ aiImgData.value.list = res.filter((i) => i.urls && i.urls.length);
|
|
|
|
+ console.log("getFloorList", res);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
const addRecorderInfo = () => {
|
|
const addRecorderInfo = () => {
|