Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front

This commit is contained in:
X1627315083@163.com
2026-03-27 10:22:15 +08:00
4 changed files with 30 additions and 13 deletions

View File

@@ -221,12 +221,13 @@ export class AISelectboxToolManager {
if (!this.demoObject) return
const fobject = this.demoObject
this.clearDemoObject()
const canvas = getObjectAlphaToCanvas(fobject, null, 0, { r: 255, g: 0, b: 0, a: 255 });
const tcanvas = await this.createStaticCanvas(fobject)
const canvas = getObjectAlphaToCanvas(tcanvas, null, 0, { r: 255, g: 0, b: 0, a: 255 });
const arr = traceImageContour(canvas);
const scaleY = fobject.scaleY
const scaleX = fobject.scaleX
const top = fobject.top
const left = fobject.left
const arr = traceImageContour(canvas);
let minX = fobject.width;
let minY = fobject.height;
const str = arr.map((v) => {

View File

@@ -753,6 +753,23 @@ export class CanvasEventManager {
this.canvas.on("object:removed", (e) => {
// updateLayers(e);
});
this.canvas.on("erasing:start", (e) => {
// console.log("erasing:start", e);
});
this.canvas.on("erasing:end", async (e) => {
// console.log("erasing:end", e);
const targets = e.targets;
var isRecord = false;
for (let i = 0; i < targets.length; i++) {
const target = targets[i];
const id = target?.info?.id;
if (id) {
isRecord = true;
await this.layerManager.updateLayerThumbnailsById(id)
}
}
if (isRecord) this.stateManager.recordState();
});
}
setupDoubleClickEvents() {
// 双击处理

View File

@@ -56,7 +56,7 @@
const isGenerating = ref(false)
const isPaused = ref(false) // 标记是否为主动暂停
const params = reactive<AgentParamsType>({
projectID: projectStore.state.id,
projectID: null,
message: '',
token: userStore.state.token,
versionID: '',
@@ -170,13 +170,16 @@
const abortController = createAbortController()
// console.log('token---', params.token, '参数---', params)
params.projectID = projectStore.state.id
try {
const urlParams = new URLSearchParams<AgentParamsType>({
...params,
configParams: JSON.stringify(params.configParams)
})
const BASEURL = import.meta.env.VITE_APP_URL
// console.log('params', params)
// debugger
const response = await fetch(`${BASEURL}${chatUrl}?${urlParams.toString()}`, {
method: 'GET',
signal: abortController.signal
@@ -609,11 +612,6 @@
return
}
const { ancestors, current } = data
current.dialogue.forEach((item) => {
if (item.webAddress) {
console.log(item)
}
})
const imgList = []
const ancestorsList = []

View File

@@ -14,7 +14,7 @@
<img
:src="image.url || image"
class="preview-image"
@click="previewImage(image.url)"
@click="previewImage(image.url || image)"
/>
<div class="image-remove-btn" @click="removeImage(index, image)">
<SvgIcon name="delete" size="16" />
@@ -824,7 +824,7 @@
const handleQuote = (url: string) => {
const hasQuoted = quoteList.value.includes(url)
if (hasQuoted) return
quoteList.value.push(url)
quoteList.value[0] = url
}
onUnmounted(() => {
MyEvent.remove('quote', handleQuote)
@@ -1066,10 +1066,11 @@
width: 13rem;
color: #fff;
border-radius: 4.2rem;
font-family: 'MSemiBold';
font-family: 'SemiBold';
font-weight: 600;
font-size: 1.28rem;
font-size: 1.3rem;
cursor: pointer;
column-gap: 0.3rem;
.shining-icon {
width: 1.4rem;
height: 1.4rem;