Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front
This commit is contained in:
@@ -279,7 +279,7 @@ export class LayerManager {
|
|||||||
})
|
})
|
||||||
this.setLayerPosition(rectObject, options)
|
this.setLayerPosition(rectObject, options)
|
||||||
await this.canvasManager.add(rectObject, isRecord)
|
await this.canvasManager.add(rectObject, isRecord)
|
||||||
if (isActive) this.setActiveID(rectObject.info.id)
|
if (isActive) this.setActiveID(rectObject.info.id, false)
|
||||||
return rectObject
|
return rectObject
|
||||||
}
|
}
|
||||||
/** 创建直线图层 */
|
/** 创建直线图层 */
|
||||||
@@ -303,7 +303,7 @@ export class LayerManager {
|
|||||||
});
|
});
|
||||||
this.setLayerPosition(arrowObject, options)
|
this.setLayerPosition(arrowObject, options)
|
||||||
await this.canvasManager.add(arrowObject, isRecord)
|
await this.canvasManager.add(arrowObject, isRecord)
|
||||||
if (isActive) this.setActiveID(arrowObject.info.id)
|
if (isActive) this.setActiveID(arrowObject.info.id, false)
|
||||||
return arrowObject
|
return arrowObject
|
||||||
}
|
}
|
||||||
/** 创建椭圆图层 */
|
/** 创建椭圆图层 */
|
||||||
@@ -320,7 +320,7 @@ export class LayerManager {
|
|||||||
})
|
})
|
||||||
this.setLayerPosition(ellipseObject, options)
|
this.setLayerPosition(ellipseObject, options)
|
||||||
await this.canvasManager.add(ellipseObject)
|
await this.canvasManager.add(ellipseObject)
|
||||||
if (isActive) this.setActiveID(ellipseObject.info.id)
|
if (isActive) this.setActiveID(ellipseObject.info.id, false)
|
||||||
return ellipseObject
|
return ellipseObject
|
||||||
}
|
}
|
||||||
/** 创建三角形图层 */
|
/** 创建三角形图层 */
|
||||||
@@ -339,7 +339,7 @@ export class LayerManager {
|
|||||||
})
|
})
|
||||||
this.setLayerPosition(triangleObject, options)
|
this.setLayerPosition(triangleObject, options)
|
||||||
await this.canvasManager.add(triangleObject, isRecord)
|
await this.canvasManager.add(triangleObject, isRecord)
|
||||||
if (isActive) this.setActiveID(triangleObject.info.id)
|
if (isActive) this.setActiveID(triangleObject.info.id, false)
|
||||||
return triangleObject
|
return triangleObject
|
||||||
}
|
}
|
||||||
/** 创建五角星图层 */
|
/** 创建五角星图层 */
|
||||||
@@ -360,7 +360,7 @@ export class LayerManager {
|
|||||||
})
|
})
|
||||||
this.setLayerPosition(starObject, options)
|
this.setLayerPosition(starObject, options)
|
||||||
await this.canvasManager.add(starObject, isRecord)
|
await this.canvasManager.add(starObject, isRecord)
|
||||||
if (isActive) this.setActiveID(starObject.info.id)
|
if (isActive) this.setActiveID(starObject.info.id, false)
|
||||||
return starObject
|
return starObject
|
||||||
}
|
}
|
||||||
/** 创建箭头图层 */
|
/** 创建箭头图层 */
|
||||||
@@ -384,7 +384,7 @@ export class LayerManager {
|
|||||||
});
|
});
|
||||||
this.setLayerPosition(arrowObject, options)
|
this.setLayerPosition(arrowObject, options)
|
||||||
await this.canvasManager.add(arrowObject, isRecord)
|
await this.canvasManager.add(arrowObject, isRecord)
|
||||||
if (isActive) this.setActiveID(arrowObject.info.id)
|
if (isActive) this.setActiveID(arrowObject.info.id, false)
|
||||||
return arrowObject
|
return arrowObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -217,11 +217,12 @@ export class ObjectManager {
|
|||||||
const object = this.canvasManager.getObjectById(id)
|
const object = this.canvasManager.getObjectById(id)
|
||||||
if (!object) return null
|
if (!object) return null
|
||||||
const type = object.type
|
const type = object.type
|
||||||
const isWidth = object.hasOwnProperty('width')
|
const isWidth = options.hasOwnProperty('width')
|
||||||
const isHeight = object.hasOwnProperty('height')
|
const isHeight = options.hasOwnProperty('height')
|
||||||
if (isWidth || isHeight) {
|
if (isWidth || isHeight) {
|
||||||
const width = isWidth ? options.width : object.width
|
const width = isWidth ? options.width : object.width
|
||||||
const height = isHeight ? options.height : object.height
|
const height = isHeight ? options.height : object.height
|
||||||
|
console.log(width, height)
|
||||||
if (type === "polygon") {
|
if (type === "polygon") {
|
||||||
if (object.points.length === 10) {// 五角星
|
if (object.points.length === 10) {// 五角星
|
||||||
options.points = getStarArr(width, height)
|
options.points = getStarArr(width, height)
|
||||||
|
|||||||
@@ -226,9 +226,9 @@
|
|||||||
...params,
|
...params,
|
||||||
// configParams: JSON.stringify(params.configParams)
|
// configParams: JSON.stringify(params.configParams)
|
||||||
configParams: JSON.stringify({
|
configParams: JSON.stringify({
|
||||||
type: params.configParams.type||'',
|
type: params.configParams.type || '',
|
||||||
region: params.configParams.region||'',
|
region: params.configParams.region || '',
|
||||||
style: params.configParams.style||'',
|
style: params.configParams.style || '',
|
||||||
temperature: params.configParams.temperature
|
temperature: params.configParams.temperature
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -236,7 +236,8 @@
|
|||||||
|
|
||||||
const response = await fetch(`${BASEURL}${chatUrl}?${urlParams.toString()}`, {
|
const response = await fetch(`${BASEURL}${chatUrl}?${urlParams.toString()}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
signal: abortController.signal
|
signal: abortController.signal,
|
||||||
|
keepalive: true
|
||||||
})
|
})
|
||||||
|
|
||||||
// 检查响应内容类型,判断是否为流式响应
|
// 检查响应内容类型,判断是否为流式响应
|
||||||
@@ -680,7 +681,7 @@
|
|||||||
|
|
||||||
Object.entries(newData).forEach(([key, value]) => {
|
Object.entries(newData).forEach(([key, value]) => {
|
||||||
if (!existingKeys.has(key)) {
|
if (!existingKeys.has(key)) {
|
||||||
targetArr.unshift({ [key]: value })
|
targetArr.push({ [key]: value })
|
||||||
existingKeys.add(key)
|
existingKeys.add(key)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
|
ref="containerRef"
|
||||||
class="preview-container flex"
|
class="preview-container flex"
|
||||||
:class="type === 'sketch' ? 'sketch-preview' : 'report-preview'"
|
:class="type === 'sketch' ? 'sketch-preview' : 'report-preview'"
|
||||||
>
|
>
|
||||||
@@ -93,7 +94,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted, onUnmounted, watch, computed } from 'vue'
|
import { ref, reactive, onMounted, onUnmounted, watch, computed, nextTick } from 'vue'
|
||||||
import { deleteSketchFlowCanvas } from '@/api/flow-canvas'
|
import { deleteSketchFlowCanvas } from '@/api/flow-canvas'
|
||||||
import { useProjectStore } from '@/stores'
|
import { useProjectStore } from '@/stores'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
@@ -114,6 +115,7 @@
|
|||||||
|
|
||||||
// 存储每个图片的加载状态
|
// 存储每个图片的加载状态
|
||||||
const loadedStatus = ref<boolean[]>([])
|
const loadedStatus = ref<boolean[]>([])
|
||||||
|
const containerRef = ref<HTMLElement>()
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -131,7 +133,12 @@
|
|||||||
() => {
|
() => {
|
||||||
// 当 sketchList 变化时,重置加载状态
|
// 当 sketchList 变化时,重置加载状态
|
||||||
loadedStatus.value = new Array(combineSketchList.value.length).fill(false)
|
loadedStatus.value = new Array(combineSketchList.value.length).fill(false)
|
||||||
// pendingSketchIndexes.value = []
|
// 当 type 为 sketch 时,自动滚动到最底部
|
||||||
|
if (props.type === 'sketch') {
|
||||||
|
nextTick(() => {
|
||||||
|
containerRef.value?.scrollTo({ top: containerRef.value.scrollHeight, behavior: 'smooth' })
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user