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 if (!this.demoObject) return
const fobject = this.demoObject const fobject = this.demoObject
this.clearDemoObject() 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 scaleY = fobject.scaleY
const scaleX = fobject.scaleX const scaleX = fobject.scaleX
const top = fobject.top const top = fobject.top
const left = fobject.left const left = fobject.left
const arr = traceImageContour(canvas);
let minX = fobject.width; let minX = fobject.width;
let minY = fobject.height; let minY = fobject.height;
const str = arr.map((v) => { const str = arr.map((v) => {

View File

@@ -753,6 +753,23 @@ export class CanvasEventManager {
this.canvas.on("object:removed", (e) => { this.canvas.on("object:removed", (e) => {
// updateLayers(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() { setupDoubleClickEvents() {
// 双击处理 // 双击处理

View File

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

View File

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