222
This commit is contained in:
parent
b86e6fb285
commit
d0ad3fcad9
|
|
@ -62,7 +62,7 @@ onMounted(() => {
|
|||
<!-- <div v-if="qmLoading" class="sidebar-overlay" :class="{ 'sidebar-overlay-active': qmLoading }"></div> -->
|
||||
<LoadingCom v-if="qmLoading" />
|
||||
<!-- 登录页面全屏显示 -->
|
||||
<main style="position: relative;" v-if="isLoginPage">
|
||||
<main style="position: relative;height: 100%;width: 100%;" v-if="isLoginPage">
|
||||
<!-- <div v-if="loading" class="sidebar-overlay" :class="{ 'sidebar-overlay-active': loading }"></div> -->
|
||||
<LoadingCom v-if="loading" />
|
||||
<router-view />
|
||||
|
|
@ -74,7 +74,7 @@ onMounted(() => {
|
|||
<router-view />
|
||||
</main>
|
||||
<!-- 应用内页面使用布局组件 -->
|
||||
<div v-else style="position: relative;">
|
||||
<div v-else style="position: relative;height: 100%;">
|
||||
<MainLayout :loading="loading" >
|
||||
<template #header>
|
||||
<AppHeader />
|
||||
|
|
@ -93,52 +93,35 @@ onMounted(() => {
|
|||
</div>
|
||||
</template>
|
||||
<style>
|
||||
*{
|
||||
box-sizing: border-box;
|
||||
outline:0;
|
||||
/* margin: 0;
|
||||
padding: 0; */
|
||||
}
|
||||
body,html{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#app,#app-container{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#nprogress .bar {
|
||||
/* 自定义加载条颜色 */
|
||||
background: #9c7eef !important; /* Element Plus 主色 */
|
||||
height: 2px !important; /* 高度 */
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<style scoped>
|
||||
header strong { font-size: 1.25rem; }
|
||||
|
||||
|
||||
/* 应用容器基础样式 */
|
||||
#app-container {
|
||||
width: 100vw;
|
||||
min-height: 98vh;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
/* 移除 overflow: hidden 以允许页面滚动 */
|
||||
}
|
||||
|
||||
/* 登录模式样式 - 全屏显示 */
|
||||
#app-container.login-mode {
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
bottom: 0 !important;
|
||||
}
|
||||
|
||||
#app-container.login-mode main {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* 全屏模式样式 */
|
||||
#app-container.fullscreen-mode {
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
right: 0 !important;
|
||||
bottom: 0 !important;
|
||||
overflow: auto !important; /* 允许全屏内容滚动 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fullscreen-content {
|
||||
|
|
@ -149,14 +132,6 @@ header strong { font-size: 1.25rem; }
|
|||
position: relative;
|
||||
}
|
||||
|
||||
/* 首页全屏滚动模式 - 使用浏览器原生滚动 */
|
||||
#app-container.homepage-mode {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
overflow: visible; /* 允许浏览器原生滚动 */
|
||||
}
|
||||
|
||||
.homepage-content {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
|
|
@ -187,10 +162,4 @@ html.dark .navigation-buttons .el-button--primary:hover {
|
|||
border-color: #7C3AED !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
*{
|
||||
box-sizing: border-box;
|
||||
outline:0;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="ip-card-container" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave" @touchstart="handleTouchStart" @touchend="handleTouchEnd" :class="{ 'controls-visible': isControlsVisible }">
|
||||
<div class="ip-card-container" @touchstart="handleTouchStart" @touchend="handleTouchEnd" :class="{ 'controls-visible': isControlsVisible }">
|
||||
<!-- 主卡片区域 -->
|
||||
<div class="ip-card-wrapper">
|
||||
<!-- 文本输入框弹出层 -->
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="text-input-container">
|
||||
<div class="text-input-header">
|
||||
<div class="text-input-title">文本输入</div>
|
||||
<button class="text-input-close" @click="handleTextInputCancel" aria-label="关闭">
|
||||
<button class="text-input-close" @click="handleTextInputCancel" @touchend.prevent="handleTextInputCancel" aria-label="关闭">
|
||||
<el-icon class="close-icon"><CloseBold /></el-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -23,10 +23,10 @@
|
|||
@mousedown.stop
|
||||
></textarea>
|
||||
<div class="text-input-actions">
|
||||
<button class="text-input-btn cancel-btn" @click="handleTextInputCancel">
|
||||
<button class="text-input-btn cancel-btn" @click="handleTextInputCancel" @touchend.prevent="handleTextInputCancel">
|
||||
取消
|
||||
</button>
|
||||
<button class="text-input-btn confirm-btn" @click="handleTextInputConfirm">
|
||||
<button class="text-input-btn confirm-btn" @click="handleTextInputConfirm" @touchend.prevent="handleTextInputConfirm">
|
||||
确定
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -59,20 +59,18 @@
|
|||
<div class="right-controls-container" v-if="formData.internalImageUrl">
|
||||
<!-- 右侧圆形按钮控件 -->
|
||||
<div class="right-circular-controls">
|
||||
<button class="control-button share-btn" title="Preview Image" @click="handleImageClick">
|
||||
<button class="control-button share-btn" title="Preview Image" @click="handleImageClick" @touchend.prevent="handleImageClick">
|
||||
<el-icon class="btn-icon"><View /></el-icon>
|
||||
</button>
|
||||
<button v-if="!(props.cardData.imgyt)" class="control-button share-btn" title="model" @click="handleGenerateModel">
|
||||
<button v-if="!(props.cardData.imgyt)" class="control-button share-btn" title="model" @click="handleGenerateModel" @touchend.prevent="handleGenerateModel">
|
||||
<el-icon class="btn-icon"><Cpu /></el-icon>
|
||||
</button>
|
||||
<button v-if="!(props.cardData.imgyt)" class="control-button share-btn" title="textInput" @click="toggleTextInput">
|
||||
<button v-if="!(props.cardData.imgyt)" class="control-button share-btn" title="textInput" @click="toggleTextInput" @touchend.prevent="toggleTextInput">
|
||||
<el-icon class="btn-icon"><ChatDotRound /></el-icon>
|
||||
</button>
|
||||
|
||||
<button v-if="!(props.cardData.imgyt)" class="control-button share-btn" title="scene graph" @click="handleTextcjt">
|
||||
<button v-if="!(props.cardData.imgyt)" class="control-button share-btn" title="scene graph" @click="handleTextcjt" @touchend.prevent="handleTextcjt">
|
||||
<el-icon class="btn-icon"><Grid /></el-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -100,12 +98,8 @@ const isTouching = ref(false);
|
|||
const isControlsVisible = ref(false);
|
||||
const cjimg = 'https://draft-user.s3.us-east-2.amazonaws.com/images/14f98f33-06a7-4629-a42e-d7cfbced786f';
|
||||
const anTypeImg = 'https://draft-user.s3.us-east-2.amazonaws.com/images/1e82b2b6-0e5d-4a62-b65f-098952eb2f67';
|
||||
const humanTypeImg = 'https://draft-user.s3.us-east-2.amazonaws.com/images/6569f75b-5534-49f4-9c3a-68eb35def196';
|
||||
const humanTypeImg = 'https://draft-user.s3.us-east-2.amazonaws.com/images/e3e60cc7-9777-41ba-9d1e-f5ffc92e4fac.webp';
|
||||
const giminiServer = new GiminiServer();
|
||||
// 控制右侧按钮显示状态
|
||||
const showRightControls = ref(false);
|
||||
// 控制鼠标悬停状态
|
||||
const isHovered = ref(false);
|
||||
// 图片比例
|
||||
const imageAspectRatio = ref(9/16); // 默认比例
|
||||
// 控制文本输入框显示状态
|
||||
|
|
@ -114,20 +108,12 @@ const showTextInput = ref(false);
|
|||
const textInputValue = ref('');
|
||||
// 文本输入框引用
|
||||
const textInputRef = ref(null);
|
||||
// 处理鼠标移入事件
|
||||
const handleMouseEnter = () => {
|
||||
isHovered.value = true;
|
||||
};
|
||||
|
||||
const handleImageClick = () => {
|
||||
// 点击图片时触发预览
|
||||
emit('preview-image', formData.value.internalImageUrl);
|
||||
}
|
||||
// 处理鼠标移出事件
|
||||
const handleMouseLeave = () => {
|
||||
isHovered.value = false;
|
||||
// 鼠标离开时隐藏展开的操作按钮
|
||||
showRightControls.value = false;
|
||||
};
|
||||
|
||||
// 切换文本输入框显示/隐藏
|
||||
const toggleTextInput = () => {
|
||||
showTextInput.value = !showTextInput.value;
|
||||
|
|
@ -157,7 +143,8 @@ const handleTextInputConfirm = () => {
|
|||
emit('create-prompt-card', {
|
||||
img: formData.value.internalImageUrl,
|
||||
diyPromptText:textInputValue.value,
|
||||
generateFourView:props.generateFourView
|
||||
generateFourView:props.generateFourView,
|
||||
cardData: props.cardData
|
||||
});
|
||||
showTextInput.value = false;
|
||||
textInputValue.value = '';
|
||||
|
|
@ -171,11 +158,9 @@ const handleTextInputCancel = () => {
|
|||
// 处理触摸开始事件
|
||||
const handleTouchStart = () => {
|
||||
isTouching.value = true;
|
||||
setTimeout(() => {
|
||||
if (isTouching.value) {
|
||||
isControlsVisible.value = true;
|
||||
}
|
||||
}, 200); // 长按显示控件
|
||||
};
|
||||
// 处理触摸结束事件
|
||||
const handleTouchEnd = () => {
|
||||
|
|
@ -722,8 +707,26 @@ const handleImageLoad = (event) => {
|
|||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* 在 iPad 及更大触控屏上,按下即显示右侧圆形控件 */
|
||||
@media (hover: none) and (pointer: coarse) {
|
||||
.ip-card-container:active .right-circular-controls,
|
||||
.ip-card-container.controls-visible .right-circular-controls {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* 非触控设备保持 hover 显示 */
|
||||
@media (hover: hover) {
|
||||
.ip-card-container:hover .right-circular-controls {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
/* 移动端适配:点击卡片后显示功能按钮 */
|
||||
@media (max-width: 768px) {
|
||||
@media (max-width: 1024px) {
|
||||
/* 点击卡片容器时显示功能按钮 */
|
||||
.ip-card-container:active .right-circular-controls,
|
||||
.ip-card-container.controls-visible .right-circular-controls {
|
||||
|
|
@ -928,7 +931,7 @@ const handleImageLoad = (event) => {
|
|||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
@media (max-width: 1024px) {
|
||||
.ip-card-container {
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ const formData = ref({
|
|||
|
||||
const textareaRef = ref(null);
|
||||
const fileInput = ref(null); // 文件输入引用
|
||||
const generateCount = ref(1); // 生成数量,默认为1
|
||||
const generateCount = ref(4); // 生成数量,默认为1
|
||||
const isOptimizing = ref(false); // 优化状态
|
||||
const isDragOver = ref(false); // 拖拽状态
|
||||
const isUploading = ref(false); // 图片上传状态
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ watch(() => window.location.pathname, () => {
|
|||
.main-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
height: 100%;
|
||||
/* 移除 overflow: hidden 以允许页面滚动 */
|
||||
position: relative;
|
||||
}
|
||||
|
|
@ -172,7 +172,7 @@ watch(() => window.location.pathname, () => {
|
|||
.content-row {
|
||||
display: flex;
|
||||
/* flex: 1; */
|
||||
height: calc(100vh - 100px);
|
||||
height: calc(100% - 64px);
|
||||
/* overflow: hidden; */
|
||||
}
|
||||
|
||||
|
|
@ -188,6 +188,7 @@ watch(() => window.location.pathname, () => {
|
|||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -208,7 +209,6 @@ watch(() => window.location.pathname, () => {
|
|||
position: relative;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<div
|
||||
class="ip-card-container"
|
||||
@mouseenter="handleMouseEnter"
|
||||
@mouseleave="handleMouseLeave"
|
||||
@touchstart="handleTouchStart"
|
||||
@touchend="handleTouchEnd"
|
||||
|
|
@ -64,7 +63,7 @@
|
|||
<div class="right-controls-container" @click.stop>
|
||||
<!-- 右侧圆形按钮控件 -->
|
||||
<div class="right-circular-controls" v-if="currentModelUrl">
|
||||
<button class="control-button rotate-btn" title="detail" @click="handleCardClick">
|
||||
<button class="control-button rotate-btn" title="detail" @click="handleCardClick" @touchend.prevent="handleCardClick">
|
||||
<span class="btn-icon">🔍</span>
|
||||
</button>
|
||||
<!-- <button class="control-button export-btn" @click="exportModel">
|
||||
|
|
@ -203,10 +202,7 @@ onMounted(() => {
|
|||
}
|
||||
});
|
||||
|
||||
// 处理鼠标移入事件(保留用于其他可能的交互)
|
||||
const handleMouseEnter = () => {
|
||||
// 现在主要通过CSS控制显示,这里可以添加其他交互逻辑
|
||||
};
|
||||
|
||||
|
||||
// 处理鼠标移出事件
|
||||
const handleMouseLeave = () => {
|
||||
|
|
@ -217,11 +213,9 @@ const handleMouseLeave = () => {
|
|||
// 处理触摸开始事件
|
||||
const handleTouchStart = () => {
|
||||
isTouching.value = true;
|
||||
setTimeout(() => {
|
||||
if (isTouching.value) {
|
||||
isControlsVisible.value = true;
|
||||
}
|
||||
}, 100); // 短按显示控件
|
||||
};
|
||||
|
||||
// 处理触摸结束事件
|
||||
|
|
@ -603,7 +597,7 @@ justify-content: center;
|
|||
}
|
||||
|
||||
/* 移动端适配:点击卡片后显示功能按钮 */
|
||||
@media (max-width: 768px) {
|
||||
@media (max-width: 1024px) {
|
||||
/* 点击卡片容器时显示功能按钮 */
|
||||
.ip-card-container:active .right-circular-controls,
|
||||
.ip-card-container.controls-visible .right-circular-controls {
|
||||
|
|
@ -613,6 +607,25 @@ justify-content: center;
|
|||
}
|
||||
}
|
||||
|
||||
/* 在 iPad 及更大触控屏上,按下即显示右侧圆形控件 */
|
||||
@media (hover: none) and (pointer: coarse) {
|
||||
.ip-card-container:active .right-circular-controls,
|
||||
.ip-card-container.controls-visible .right-circular-controls {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* 非触控设备保持 hover 显示 */
|
||||
@media (hover: hover) {
|
||||
.ip-card-container:hover .right-circular-controls {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.control-button {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
|
@ -625,6 +638,9 @@ justify-content: center;
|
|||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
/* 添加触摸支持 */
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.control-button:hover {
|
||||
|
|
@ -778,7 +794,7 @@ justify-content: center;
|
|||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
@media (max-width: 1024px) {
|
||||
.ip-card-container {
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ const router = createRouter({
|
|||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start()
|
||||
// if(window.location.hostname=='localhost'){
|
||||
window.localStorage.setItem('token','123')
|
||||
return next()
|
||||
// window.localStorage.setItem('token','123')
|
||||
// return next()
|
||||
// }
|
||||
if (to.meta.requiresAuth) {
|
||||
const token = localStorage.getItem('token')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<el-scrollbar height="100%" @end-reached="loadMore">
|
||||
<div class="agent-management">
|
||||
<!-- 页面头部 -->
|
||||
<div class="page-header">
|
||||
|
|
@ -24,8 +25,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 10px;width: 100%"></div>
|
||||
<el-scrollbar v-if="false" height="100%" @end-reached="loadMore">
|
||||
<!-- <div style="height: 10px;width: 100%"></div> -->
|
||||
<div class="agents-section">
|
||||
<!-- 智能体列表 -->
|
||||
<div class="agents-grid">
|
||||
|
|
@ -121,8 +121,8 @@
|
|||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
@ -335,7 +335,7 @@ onMounted(() => {
|
|||
<style scoped>
|
||||
.agent-management {
|
||||
height: 100%;
|
||||
background: var(--bg-color, #F3F4F6);
|
||||
/* background: var(--bg-color, #F3F4F6); */
|
||||
}
|
||||
|
||||
/* 页面头部样式 */
|
||||
|
|
@ -516,7 +516,7 @@ onMounted(() => {
|
|||
|
||||
/* 暗色主题样式 */
|
||||
:root.dark .agent-management {
|
||||
background: linear-gradient(135deg, #1F2937 0%, #111827 50%, #030712 100%);
|
||||
/* background: linear-gradient(135deg, #1F2937 0%, #111827 50%, #030712 100%); */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ onMounted(() => {
|
|||
/* 登录页面基础样式 */
|
||||
.login-page {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<el-scrollbar height="100%" @end-reached="loadMore">
|
||||
<div class="order-management">
|
||||
<div class="orders-section">
|
||||
<div class="filter-section">
|
||||
|
|
@ -43,7 +44,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-scrollbar height="88vh" @end-reached="loadMore">
|
||||
<div class="orders-grid">
|
||||
<OrderCard
|
||||
v-for="order in order_list"
|
||||
|
|
@ -56,7 +56,6 @@
|
|||
@confirm-order="handleConfirmOrder"
|
||||
/>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<div v-if="order_list.length === 0" class="empty-state">
|
||||
<div class="empty-icon">
|
||||
<el-icon><DocumentDelete /></el-icon>
|
||||
|
|
@ -66,6 +65,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
@ -215,6 +216,7 @@ watch(sort_by, () => {
|
|||
<style scoped>
|
||||
.order-management {
|
||||
padding: 24px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.page-header { margin-bottom: 24px; }
|
||||
|
|
|
|||
|
|
@ -461,6 +461,7 @@ const handleCreateFourViewCard = (index,params) => {
|
|||
// 处理提示词卡片生成
|
||||
const handleCreatePromptCard = (index,params) => {
|
||||
const { img, diyPromptText,imgyt,cardData } = params;
|
||||
console.log(cardData,'cardDatacardData');
|
||||
// 创建新的提示词卡片对象
|
||||
const newCard = createSmartCard({
|
||||
diyPromptImg:img,
|
||||
|
|
@ -827,8 +828,8 @@ const dragScene = (e) => {
|
|||
// 补偿偏移量:向右偏移600像素,向上偏移400像素
|
||||
// 这意味着实际鼠标位置需要向左偏移600,向下偏移400
|
||||
// 移动端不需要调整偏差
|
||||
const adjustedMouseX = isMobile.value ? mouseX : mouseX - 900;
|
||||
const adjustedMouseY = isMobile.value ? mouseY : mouseY - 400;
|
||||
const adjustedMouseX = mouseX - 600;
|
||||
const adjustedMouseY = mouseY - 400;
|
||||
|
||||
// 计算当前场景中心点相对于调整后鼠标位置的偏移
|
||||
const currentOffsetFromMouseX = adjustedMouseX - initialOffsetX.value;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ export class GiminiServer extends FileServer {
|
|||
// "aspectRatio": "9:16"
|
||||
// },
|
||||
"aspect_ratio": "16:9",
|
||||
"model": "gemini-2.5-flash-image",//models/gemini-3-pro-image-preview/"gemini-2.5-flash-image",
|
||||
"model": "gemini-3-pro-image-preview",//models/gemini-3-pro-image-preview/"gemini-2.5-flash-image",
|
||||
"location": "global",
|
||||
"vertexai": true,
|
||||
...config,
|
||||
|
|
|
|||
Loading…
Reference in New Issue