Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite

This commit is contained in:
zhangyh
2025-09-16 15:41:46 +08:00
27 changed files with 59 additions and 42 deletions

12
components.d.ts vendored
View File

@@ -9,14 +9,11 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
ABadge: typeof import('ant-design-vue/es')['Badge']
ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb']
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
ADrawer: typeof import('ant-design-vue/es')['Drawer']
AImage: typeof import('ant-design-vue/es')['Image']
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
AMenu: typeof import('ant-design-vue/es')['Menu']
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
AModal: typeof import('ant-design-vue/es')['Modal']
APagination: typeof import('ant-design-vue/es')['Pagination']
APopover: typeof import('ant-design-vue/es')['Popover']
@@ -24,16 +21,17 @@ declare module 'vue' {
ASelect: typeof import('ant-design-vue/es')['Select']
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
ASlider: typeof import('ant-design-vue/es')['Slider']
ASpace: typeof import('ant-design-vue/es')['Space']
ASpin: typeof import('ant-design-vue/es')['Spin']
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
ASwitch: typeof import('ant-design-vue/es')['Switch']
ATable: typeof import('ant-design-vue/es')['Table']
ATabPane: typeof import('ant-design-vue/es')['TabPane']
ATabs: typeof import('ant-design-vue/es')['Tabs']
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
AUpload: typeof import('ant-design-vue/es')['Upload']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElLoading: typeof import('element-plus/es')['ElLoading']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
public/image/brush/fur.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
public/image/brush/pen.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -14,7 +14,8 @@
@click="setBrushTypeWithCommand(brush.id)"
:class="['brush-type-item', { active: brushStore.state.type === brush.id }]"
>
<div class="brush-preview" :style="getBrushPreviewStyle(brush)"></div>
<!-- <div class="brush-preview" :style="getBrushPreviewStyle(brush)"></div> -->
<img class="brush-preview" :src="brush.imgUrl" :title="brush.name" alt="">
<span class="brush-name">{{ brush.name }}</span>
</div>
</div>
@@ -886,6 +887,7 @@ onMounted(() => {
const availableBrushes = toolManager.brushManager
.getBrushTypes()
?.filter((brush) => brush.id !== "eraser");
console.log(availableBrushes)
BrushStore.setAvailableBrushes(availableBrushes);
}
});
@@ -1178,6 +1180,8 @@ const brushStore = BrushStore;
margin-bottom: 8px;
border-radius: 4px;
background-color: rgba(0, 0, 0, 0.02);
object-fit: contain;
background-color: #fff;
}
/* 保持笔刷预览内容样式一致 */

View File

@@ -340,7 +340,7 @@ onMounted(async () => {
props.redGreenImageUrl
) {
canvasManager.canvas.fill = "#fff"; // 设置画布背景色为白色 // 初始化红绿图模式管理器
redGreenModeManager = new RedGreenModeManager({
redGreenModeManager = new toolManagerRedGreenModeManager({
canvas: canvasManager.canvas,
canvasManager,
layerManager,

View File

@@ -65,6 +65,7 @@ export class BrushManager {
description: "基础铅笔工具,适合精细线条绘制",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/pencil.jpg',
});
// 注册材质笔刷
@@ -73,6 +74,7 @@ export class BrushManager {
description: "使用纹理图片作为笔刷,支持缩放和透明度",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/texture.jpg',
});
// 注册集成的笔刷类型
@@ -81,54 +83,63 @@ export class BrushManager {
description: "使用纹理图片作为笔刷,支持缩放和透明度",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/crayon.jpg',
});
brushRegistry.register("fur", FurBrush, {
name: this.t("Canvas.Fur"),
description: "使用纹理图片作为笔刷,支持缩放和透明度",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/fur.jpg',
});
brushRegistry.register("ink", InkBrush, {
name: this.t("Canvas.Ink"),
description: "墨水笔刷,适合书写和绘图",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/ink.jpg',
});
brushRegistry.register("", LongfurBrush, {
name: this.t("Canvas.Longfur"),
description: "长毛发笔刷,适合绘制动物毛皮、草或头发",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/longFur.jpg',
});
brushRegistry.register("writing", WritingBrush, {
name: this.t("Canvas.Writing"),
description: "书法笔刷,模拟中国传统书法毛笔效果,具有笔锋和墨色变化",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/writing.jpg',
});
brushRegistry.register("marker", MarkerBrush, {
name: this.t("Canvas.Marker"),
description: "马克笔笔刷,适合粗线条和填充",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/marker.jpg',
});
brushRegistry.register("pen", CustomPenBrush, {
name: this.t("Canvas.Pen"),
description: "自定义钢笔笔刷,适合书写和绘图",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/pen.jpg',
});
brushRegistry.register("ribbon", RibbonBrush, {
name: this.t("Canvas.Ribbon"),
description: "丝带笔刷,适合创建流动的丝带效果",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/ribbon.jpg',
});
brushRegistry.register("shaded", ShadedBrush, {
name: this.t("Canvas.Shaded"),
description: "阴影笔刷,适合创建渐变和阴影效果",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/shaded.jpg',
});
brushRegistry.register("spray", SprayBrush, {
@@ -136,6 +147,7 @@ export class BrushManager {
description: "模拟喷枪效果,创建散点效果",
t:this.t,
category: this.t('Canvas.BasicBrushes'),
imgUrl:'./image/brush/spray.jpg',
});
// brushRegistry.register("sketchy", SketchyBrush);
@@ -365,6 +377,7 @@ export class BrushManager {
description: brushInfo.metadata.description || "",
category: brushInfo.metadata.category || "默认",
icon: brushInfo.metadata.icon || null,
imgUrl: brushInfo.metadata.imgUrl || null,
}));
}

View File

@@ -302,14 +302,15 @@ export default defineComponent({
if(detailData.currentDetailType == 'sketch' && newData){
color = detailData.designDetail.clothes[0].color?.rgba?.r?`${detailData.designDetail.clothes[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:''
}
console.log(list[i])
let data:any = {
changed:false,
color,
designType:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.designType:list[i].designType,
id:(newData && detailData.currentDetailType == 'sketch' && isCurrent)?newData.id:list[i].id,
maskMinioUrl:list[i]?.maskMinioUrl,
maskMinioUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskMinioUrl,
// maskUrl:'',
maskUrl:list[i].maskUrl,
maskUrl:(newData && detailData.currentDetailType == 'sketch')?'':list[i]?.maskUrl,
// offset:[
// -233.13985,
// 406.90964

View File

@@ -190,7 +190,7 @@ export default defineComponent({
})
}
const frontBackChange = (value:any)=>{
let full = detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.frontBack.front[detailData.imgDomIndex].imageUrl
let full = detailData.frontBack.front[detailData.imgDomIndex].undividedLayer || detailData.selectDetail.path
let size = {
...detailData.canvasConfig,
}

View File

@@ -56,11 +56,13 @@ export default defineComponent({
})
const selectImgItem = (file:any)=>{
if(props.type != 'models'){
if(!file.resData.minIOPath){
file.minIOPath = getMinioUrl(file.imgUrl || file.resData.url)
if(!file.resData?.minIOPath){
file.minIOPath = getMinioUrl(file?.imgUrl || file?.resData?.url)
}else{
file.minIOPath = file.resData.minIOPath
}
if(!file.designType){
file.designType = file.resData.designType
file.designType = file?.resData?.designType
}
}
// store.commit('DesignDetail/setNewDetail',file.resData)

View File

@@ -76,10 +76,10 @@ export default defineComponent({
selectImgItem(data)
return
}
data.id = id
if(data?.imgUrl)data.url = data.imgUrl
let value = {
data,
id,
}
if(detailData.currentDetailType == 'sketch'){
detailData.selectDetail.sketchString = ''

View File

@@ -1,6 +1,6 @@
<template>
<div class="editPrintElement">
<div class="detailText" style="text-align: left; margin-bottom: 1rem;">
<div class="detailText" style="text-align: left; margin-bottom: 1rem;" v-if="type == 'print'">
{{ $t('DesignPrintOperation.ModifyPrint') }}
</div>
<div class="printOverallBtn" v-if="type == 'print'">

View File

@@ -481,7 +481,7 @@ export default defineComponent({
align-items: center;
justify-content: center;
img{
height: auto;
// height: auto;
}
}
}

View File

@@ -33,7 +33,7 @@ import poseTransfer from '@/component/home/tools/poseTransfer/index.vue';
import deReconstruction from '@/component/home/tools/deReconstruction/index.vue';
import patternMaking3D from '@/component/home/tools/patternMaking3D/index.vue';
import canvasUpload from "@/component/modules/generalMiniCanvas.vue";
import {openTypeList} from "@/tool/listData.js";
import {navTypeList} from "@/tool/listData.js";
export default defineComponent({
components:{
@@ -105,7 +105,7 @@ export default defineComponent({
return await new Promise((resolve, reject) => {
let tools = route.query.tools as any
if(!tools){reject(false)}
let toolsData:any = openTypeList(t).tools.list.find((item:any)=>item.value == route.query.tools)
let toolsData:any = navTypeList(t).tools.list.find((item:any)=>item.value == route.query.tools)
let value = {
name:toolsData.label,
process:data.toolsList[tools],

View File

@@ -231,7 +231,7 @@ const projectList = {
}
],
}
const openTypeList = (t)=>{
const navTypeList = (t)=>{
return {
tools:{
icon:'fi-rr-magic-wand',
@@ -412,4 +412,4 @@ const openTypeList = (t)=>{
},
}
}
export {projectList,openTypeList}
export {projectList,navTypeList}

View File

@@ -18,7 +18,7 @@
<p>{{$t('Header.NewProject')}}</p>
</div>
<div class="navList ">
<div class="tools list" v-for="item in openTypeList" :class="{active:openType == item.value,history:item.value == 'history','show-history' : showHistory && item.value === 'history111','isHistory' : item.value === 'history111'}">
<div class="tools list" v-for="item in navTypeList" :class="{active:openType == item.value,history:item.value == 'history','show-history' : showHistory && item.value === 'history111','isHistory' : item.value === 'history111'}">
<div class="titleBox" @click="setOpenType(item.value,item.list)">
<div class="left">
<i :class="['fi',item.icon]"></i>
@@ -291,7 +291,7 @@ import { ScrollTrigger } from "gsap/ScrollTrigger";
import MyWs from "@/tool/webSocket";
import MyEvent from "@/tool/myEvents";
import { useRouter,useRoute } from 'vue-router'
import {openTypeList} from "@/tool/listData.js";
import {navTypeList} from "@/tool/listData.js";
import home from "@/component/home/index.vue";
import projectSetting from '@/component/home/newProject/setting.vue'
import bindEmail from "@/component/HomePage/bindEmail.vue";
@@ -325,7 +325,7 @@ export default defineComponent({
openTypeChild:'',
isLanguage:false,
userDetailLanguage:computed(()=>store.state.UserHabit.userDetail.language),
openTypeList:openTypeList(t),
navTypeList:navTypeList(t),
projectSetting:null,
historyData:{
isNoData:false,
@@ -356,13 +356,13 @@ export default defineComponent({
watch(()=>homeMainData.userDetailLanguage,(newVal)=>{
if(locale.value == newVal || !newVal)return
locale.value = newVal
let opTypeList = openTypeList(t)
for (const key in opTypeList) {
const element = opTypeList[key];
homeMainData.openTypeList[key].label = element.label
let navList = navTypeList(t)
for (const key in navList) {
const element = navList[key];
homeMainData.navTypeList[key].label = element.label
if(element.list?.length > 0){
element.list.forEach((item,index)=>{
homeMainData.openTypeList[key].list[index].label = item.label
homeMainData.navTypeList[key].list[index].label = item.label
})
}
}
@@ -372,7 +372,7 @@ export default defineComponent({
// watch(()=>locale.value,(newVal,oldVal)=>{
// if(newVal == oldVal)return
// console.log(newVal , oldVal)
// // homeMainData.openTypeList =
// // homeMainData.navTypeList =
// })
const historyData = reactive({
@@ -625,7 +625,7 @@ export default defineComponent({
return
}
homeMainData.historyData.page = 1
// homeMainData.openTypeList.history = {
// homeMainData.navTypeList.history = {
// icon:"fi-br-time-past",
// label:"History",
// value:"history",
@@ -634,10 +634,10 @@ export default defineComponent({
// WithinAWeeklist:[],
// Earlierlist:[],
// }
homeMainData.openTypeList.history.Todaylist = []
homeMainData.openTypeList.history.Yesterdaylist = []
homeMainData.openTypeList.history.WithinAWeeklist = []
homeMainData.openTypeList.history.Earlierlist = []
homeMainData.navTypeList.history.Todaylist = []
homeMainData.navTypeList.history.Yesterdaylist = []
homeMainData.navTypeList.history.WithinAWeeklist = []
homeMainData.navTypeList.history.Earlierlist = []
homeMainData.historyData.isShowLoading = false
homeMainData.historyData.isNoData = false
isFound = 0//表示是否找到当前id的记录
@@ -675,7 +675,7 @@ export default defineComponent({
}else{
isFound++
historyDateList.forEach((item,dateItemIndex)=>{
let length = homeMainData.openTypeList.history[item].length
let length = homeMainData.navTypeList.history[item].length
if(existToHistoryIndex > length + num){
num += length
}else{
@@ -712,7 +712,7 @@ export default defineComponent({
if (rv.content.length > 0) {
rv.content.forEach((item,index)=>{
let str = categorizeDate(item.updateTime) + 'list'
homeMainData.openTypeList.history[str].push(item)
homeMainData.navTypeList.history[str].push(item)
if(item.id == (route.query?.id || route.query?.history)){
existToHistoryIndex = rv.page * rv.size + index + 1 - rv.size
}
@@ -760,10 +760,10 @@ export default defineComponent({
}
const editName = (item)=>{
homeMainData.historyData.selectHistoryId = -1
for (const key in homeMainData.openTypeList.history) {
for (const key in homeMainData.navTypeList.history) {
let list = ['Earlierlist','Todaylist','WithinAWeeklist','Yesterdaylist']
if(list.indexOf(key) == -1)continue
homeMainData.openTypeList.history[key].forEach((item)=>{
homeMainData.navTypeList.history[key].forEach((item)=>{
item.editName = false
})
}

View File

@@ -40,7 +40,7 @@
<div class="title">
<i class="fi fi-br-angle-left" @click="loginBack"></i>
<!-- <i class="fi fi-rr-arrow-left" @click="()=>loginType = ''"></i> -->
<span>Log on to AiDA</span>
<span>Log on to AiDA 3.1</span>
</div>
<div class="info" v-show="!loginType">Please fill your information below</div>
<personal ref="personal" v-if="loginType == 'personal'" v-model:isMask="isMask"></personal>
@@ -171,7 +171,6 @@ export default defineComponent({
}
onMounted(()=>{
const data = route.query;
console.log(data)
if (data?.state == "weiXin") {
wechatLogin(data);
}