Files
aida_front/src/component/home/newProject/index.vue

206 lines
4.7 KiB
Vue
Raw Normal View History

2025-05-20 16:47:27 +08:00
<template>
<div class="newProject">
<div class="contentBox">
2025-08-22 10:27:48 +08:00
<div class="select" v-show="!isCreateBox">
<div class="title">AiDA</div>
<div class="info">{{ $t('newProjectg.info') }}</div>
<div class="selectList">
<div :class="{active:selectFlow?.value == seiesDesign.value}" @click="selectSeiesOrSingle(seiesDesign)">
<img src="@/assets/images/homePage/icon/homeCreateSeriesDesign.svg" alt="">
<span>{{ seiesDesign.title }}</span>
2025-05-20 16:47:27 +08:00
</div>
2025-08-22 10:27:48 +08:00
<div :class="{active:selectFlow?.value == singleDesign.value}" @click="selectSeiesOrSingle(singleDesign)">
<img src="@/assets/images/homePage/icon/homeCreateSingleDesign.svg" alt="">
<span>{{ singleDesign.title }}</span>
2025-05-20 16:47:27 +08:00
</div>
</div>
2025-08-22 10:27:48 +08:00
<div class="gallery_btn gallery_btn_radius" @click="goCreate">{{ $t('newProjectg.CreateProject') }}</div>
</div>
<div class="content" v-show="isCreateBox">
<i class="fi fi-rr-arrow-small-left" @click="()=>isCreateBox = false"></i>
<div class="workspaceBox">
<workspace @setProject="setProject" :httpWorkflowType="selectFlow?.value"></workspace>
2025-05-20 16:47:27 +08:00
</div>
</div>
</div>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
</div>
</template>
<script lang="ts">
2025-05-21 20:05:08 +08:00
import { defineComponent,computed,ref,provide,nextTick,createVNode,toRefs, reactive, onMounted} from 'vue'
2025-05-20 16:47:27 +08:00
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Https } from "@/tool/https";
import { useStore } from "vuex";
import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
import { useI18n } from 'vue-i18n'
import {getCookie,clonAllCookie} from '@/tool/cookie'
import router from '@/router';
import workspace from './workspace.vue'
export default defineComponent({
components:{
workspace,
},
props:{
},
2025-05-21 20:05:08 +08:00
emits:['newProject'],
2025-05-20 16:47:27 +08:00
setup(props,{emit}) {
2025-06-26 15:41:08 +08:00
const {t} = useI18n()
2025-05-20 16:47:27 +08:00
const store = useStore();
const data = reactive({
2025-08-22 10:27:48 +08:00
seiesDesign:{
title:computed(()=>t('newProjectg.series')),
2025-05-20 16:47:27 +08:00
value:'SERIES_DESIGN',
},
2025-08-22 10:27:48 +08:00
singleDesign:{
title:computed(()=>t('newProjectg.single')),
value:'SINGLE_DESIGN',
},
selectFlow:{
2025-07-19 14:04:48 +08:00
},
2025-08-22 10:27:48 +08:00
isCreateBox:false,
2025-05-20 16:47:27 +08:00
loadingShow:false,
})
const dataDom = reactive({
})
const setProject = (item:any)=>{
emit('newProject',item)
// router.push(`home?history=${item.id}`)
2025-05-20 16:47:27 +08:00
}
2025-08-22 10:27:48 +08:00
const selectSeiesOrSingle = (type:any)=>{
data.selectFlow = type
}
const goCreate = ()=>{
if(!data.selectFlow?.value){
return message.info(t('newProjectg.selectDesignType'))
}
data.isCreateBox = true
}
2025-05-21 20:05:08 +08:00
onMounted(()=>{
store.commit('createProbject')
})
2025-05-20 16:47:27 +08:00
return{
...toRefs(dataDom),
...toRefs(data),
setProject,
2025-08-22 10:27:48 +08:00
selectSeiesOrSingle,
goCreate,
2025-05-20 16:47:27 +08:00
}
},
provide() {
return {
}
},
})
</script>
<style lang="less" scoped>
.newProject{
width: 100%;
height: 100%;
position: relative;
> .contentBox{
width: 100%;
2025-05-28 10:28:07 +08:00
height: calc(100% - 3.9rem);
// height: calc(100% - 7.8rem);
2025-05-20 16:47:27 +08:00
display: flex;
align-items: center;
justify-content: center;
2025-08-22 10:27:48 +08:00
> .select{
2025-05-28 10:28:07 +08:00
display: flex;
flex-direction: column;
2025-08-22 10:27:48 +08:00
align-items: center;
2025-05-20 16:47:27 +08:00
> .title{
2025-08-22 10:27:48 +08:00
font-size: 4rem;
2025-05-20 16:47:27 +08:00
font-weight: 600;
}
2025-08-22 10:27:48 +08:00
> .info{
margin-top: 1.2rem;
font-weight: 600;
font-size: 2.4rem;
2025-05-21 20:05:08 +08:00
}
2025-08-22 10:27:48 +08:00
> .selectList{
2025-05-20 16:47:27 +08:00
margin-top: 4.8rem;
2025-08-22 10:27:48 +08:00
display: flex;
> div{
margin-right: 6rem;
border-radius: 3.2rem;
cursor: pointer;
border: 1px solid #D9D9D9;
background-color: #fff;
height: 6.5rem;
padding: 0 2.3rem;
2025-05-20 16:47:27 +08:00
display: flex;
2025-08-22 10:27:48 +08:00
align-items: center;
&.active{
background-color: #efeff1;
2025-05-20 16:47:27 +08:00
}
2025-08-22 10:27:48 +08:00
> img{
width: 2.7rem;
height: 2.7rem;
margin-right: 1rem;
2025-05-20 16:47:27 +08:00
}
2025-08-22 10:27:48 +08:00
> span{
2025-05-20 16:47:27 +08:00
font-weight: 600;
font-size: 2rem;
2025-08-22 10:27:48 +08:00
color: #3B3B3B;
2025-05-20 16:47:27 +08:00
}
2025-08-22 10:27:48 +08:00
&:last-child{
margin-right: 0;
2025-05-20 16:47:27 +08:00
}
2025-08-22 10:27:48 +08:00
2025-05-20 16:47:27 +08:00
}
}
2025-08-22 10:27:48 +08:00
.gallery_btn{
margin-top: 4rem;
}
}
> .content{
// background: red;
// width: 88rem;
height: 100%;
position: relative;
> i{
cursor: pointer;
position: absolute;
transform: translateX(-100%);
left: -2.6rem;
top: 1.8rem;
width: 5rem;
height: 5rem;
2025-05-20 16:47:27 +08:00
display: flex;
2025-08-22 10:27:48 +08:00
font-size: 4rem;
color: #fff;
background-color: #000;
border-radius: 50%;
align-items: center;
justify-content: center;
}
> .title{
font-size: 2rem;
font-weight: 600;
text-align: center;
}
> .workspaceBox{
// height: 89rem;
height: 100%;
// flex: 1;
border-radius: 1.6rem;
padding: 3.2rem 0rem;
border: 2px solid #D0D0D0;
:deep(.workspace){
padding: 0;
height: 100%;
> .workspaceBox{
> div{
padding: 0rem 2.1rem;
}
2025-05-20 16:47:27 +08:00
}
}
}
}
}
}
</style>