Merge branch 'main' of http://18.167.251.121:10003/aidlab/FiDA_Front
This commit is contained in:
@@ -62,7 +62,7 @@
|
|||||||
<threeModel :currentData="currentData" />
|
<threeModel :currentData="currentData" />
|
||||||
</template>
|
</template>
|
||||||
</baseModal>
|
</baseModal>
|
||||||
<Assistant />
|
<!-- <Assistant /> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
class="base-modal"
|
class="base-modal"
|
||||||
v-model="showDialog"
|
v-model="showDialog"
|
||||||
|
destroy-on-close
|
||||||
align-center
|
align-center
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:width="modalWidth"
|
:width="modalWidth"
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ export default {
|
|||||||
userAgreement: 'User Agreement',
|
userAgreement: 'User Agreement',
|
||||||
privacyPolicy: 'Privacy Policy',
|
privacyPolicy: 'Privacy Policy',
|
||||||
view: 'View',
|
view: 'View',
|
||||||
remainingNum: 'Remaining number of times to upload profile picture:'
|
remainingNum: 'Remaining number of times to upload profile picture:',
|
||||||
|
notFound: 'Project not found',
|
||||||
},
|
},
|
||||||
Country: {
|
Country: {
|
||||||
unitedStates: 'United States',
|
unitedStates: 'United States',
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ export default {
|
|||||||
userAgreement: '用户协议',
|
userAgreement: '用户协议',
|
||||||
privacyPolicy: '隐私政策',
|
privacyPolicy: '隐私政策',
|
||||||
view: '查看',
|
view: '查看',
|
||||||
remainingNum: '剩余上传头像次数:'
|
remainingNum: '剩余上传头像次数:',
|
||||||
|
notFound: '项目不存在',
|
||||||
},
|
},
|
||||||
Country: {
|
Country: {
|
||||||
unitedStates: '美国',
|
unitedStates: '美国',
|
||||||
|
|||||||
@@ -36,10 +36,13 @@
|
|||||||
import { useProjectStore } from '@/stores'
|
import { useProjectStore } from '@/stores'
|
||||||
import { getProjectInfo } from '@/api/agent'
|
import { getProjectInfo } from '@/api/agent'
|
||||||
import { clearNodeChat, getNodeAncestors } from '@/api/versitonTree'
|
import { clearNodeChat, getNodeAncestors } from '@/api/versitonTree'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import MyEvent from '@/utils/myEvent'
|
import MyEvent from '@/utils/myEvent'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const { t } = useI18n()
|
||||||
const projectStore = useProjectStore()
|
const projectStore = useProjectStore()
|
||||||
|
|
||||||
const previewRef = ref(null)
|
const previewRef = ref(null)
|
||||||
@@ -90,6 +93,11 @@
|
|||||||
const handleGetProjectInfoAndHistory = () => {
|
const handleGetProjectInfoAndHistory = () => {
|
||||||
handleOpenSketch()
|
handleOpenSketch()
|
||||||
getProjectInfo({ id: route.params.id }).then((res) => {
|
getProjectInfo({ id: route.params.id }).then((res) => {
|
||||||
|
if(!res) {
|
||||||
|
router.push({ name: 'mainInput' })
|
||||||
|
ElMessage.warning(t('Home.notFound'))
|
||||||
|
return
|
||||||
|
}
|
||||||
if (res) agentRef.value.setChatInfo(res)
|
if (res) agentRef.value.setChatInfo(res)
|
||||||
let data = res?.project || res
|
let data = res?.project || res
|
||||||
if (data?.latestNodeId) data.nodeId = data.latestNodeId
|
if (data?.latestNodeId) data.nodeId = data.latestNodeId
|
||||||
@@ -124,6 +132,7 @@
|
|||||||
projectStore.clearProject()
|
projectStore.clearProject()
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
handleGetProjectInfoAndHistory()
|
handleGetProjectInfoAndHistory()
|
||||||
|
MyEvent.emit('projectChange')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -494,7 +494,7 @@
|
|||||||
editorRef.value?.addEventListener('input', removePlaceholderOnInput)
|
editorRef.value?.addEventListener('input', removePlaceholderOnInput)
|
||||||
}
|
}
|
||||||
|
|
||||||
const toogltReportTag = () => {
|
const toogltReportTag = (clear = false) => {
|
||||||
stopTypewriter() // 移除标签时停止打字机效果
|
stopTypewriter() // 移除标签时停止打字机效果
|
||||||
// 清理掉已被删除的标签引用(从 DOM 中移除的元素)
|
// 清理掉已被删除的标签引用(从 DOM 中移除的元素)
|
||||||
reportTags.value = reportTags.value.filter((tag) => tag.parentNode !== null)
|
reportTags.value = reportTags.value.filter((tag) => tag.parentNode !== null)
|
||||||
@@ -722,14 +722,6 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化编辑器高度
|
|
||||||
onMounted(() => {
|
|
||||||
MyEvent.add('quote', handleQuote)
|
|
||||||
nextTick(() => {
|
|
||||||
autoResizeEditor()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
const typeValue = ref<string>('')
|
const typeValue = ref<string>('')
|
||||||
const areaValue = ref<string>('')
|
const areaValue = ref<string>('')
|
||||||
const styleValue = ref<string>('')
|
const styleValue = ref<string>('')
|
||||||
@@ -826,8 +818,27 @@
|
|||||||
if (hasQuoted) return
|
if (hasQuoted) return
|
||||||
quoteList.value[0] = url
|
quoteList.value[0] = url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleInitInput = () => {
|
||||||
|
inputValue.value = ''
|
||||||
|
uploadedImages.value = []
|
||||||
|
quoteList.value = []
|
||||||
|
toogltReportTag(true)
|
||||||
|
if (editorRef.value) {
|
||||||
|
editorRef.value.innerHTML = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
MyEvent.add('quote', handleQuote)
|
||||||
|
MyEvent.add('projectChange', handleInitInput)
|
||||||
|
nextTick(() => {
|
||||||
|
autoResizeEditor()
|
||||||
|
})
|
||||||
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
MyEvent.remove('quote', handleQuote)
|
MyEvent.remove('quote', handleQuote)
|
||||||
|
MyEvent.remove('projectChange', handleInitInput)
|
||||||
})
|
})
|
||||||
// 暴露方法给父组件
|
// 暴露方法给父组件
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<span class="label" v-show="!item.edit">{{ item.name }}</span>
|
<span class="label" v-show="!item.edit">{{ item.name }}</span>
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="right"
|
placement="right"
|
||||||
trigger="hover"
|
trigger="contextmenu"
|
||||||
width="10rem"
|
width="10rem"
|
||||||
popper-style="
|
popper-style="
|
||||||
padding: .6rem 0.7rem;
|
padding: .6rem 0.7rem;
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
v-model:visible="item.visible"
|
v-model:visible="item.visible"
|
||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<span @click.stop class="icon">
|
<span @click.stop="openPopover(item)" class="icon">
|
||||||
<svg-icon name="more" size="16" />
|
<svg-icon name="more" size="16" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -207,6 +207,12 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const openPopover = (item: any) => {
|
||||||
|
list.value.forEach((item: any) => {
|
||||||
|
item.visible = false
|
||||||
|
})
|
||||||
|
item.visible = !item.visible
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
MyEvent.add('newTitle', replaceTitle)
|
MyEvent.add('newTitle', replaceTitle)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user