You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.0 KiB
87 lines
2.0 KiB
<script lang="ts" setup>
|
|
import { onMounted, ref } from 'vue'
|
|
import Aside from './aside/Aside.vue'
|
|
import Content from './content/Content.vue'
|
|
import ListContent from './content/ListContent.vue'
|
|
import Robot from '@/components/Robot/index.vue'
|
|
import Task from"@/views/task/content/Content.vue"
|
|
|
|
|
|
defineOptions({
|
|
name: 'FinalMain',
|
|
})
|
|
const showList = ref(true)
|
|
const showDetail = ref(false)
|
|
const contentRef: any = ref(null)
|
|
const ListRef: any = ref(null)
|
|
const asideref = ref(null)
|
|
const taskvalue = ref('')
|
|
const detaiitem = ref({})
|
|
function inputChange(keyword) {
|
|
if (asideref.value?.showSearch)
|
|
taskvalue.value = keyword
|
|
|
|
else
|
|
taskvalue.value = ''
|
|
|
|
if (ListRef.value != null)
|
|
ListRef.value.initData(1, 20, {}, keyword)
|
|
else
|
|
contentRef.value.filterTableData(keyword)
|
|
}
|
|
function goDetailx(item){
|
|
detaiitem.value=item
|
|
showDetail.value=true
|
|
if (item.type == 'table'){
|
|
showList.value = false
|
|
}
|
|
else{
|
|
showList.value = true
|
|
}
|
|
|
|
}
|
|
function goBack(){
|
|
showDetail.value=false
|
|
}
|
|
onMounted(() => {
|
|
// const searchParams = new URLSearchParams(window.location.search)
|
|
/* const type = searchParams.get('type')
|
|
if (type == 'table')
|
|
showList.value = false
|
|
|
|
else
|
|
showList.value = true
|
|
*/})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="main">
|
|
|
|
<!-- 侧边 -->
|
|
<Aside v-show="!showDetail" ref="asideref" @input-change="inputChange" />
|
|
|
|
<!-- 任务管理 -->
|
|
<!-- TODO:本地演示即可 上传注释注释 -->
|
|
<ListContent v-show="!showDetail" @goDetailx="goDetailx" v-if="showList" ref="ListRef" :taskvalue="taskvalue" @change-show="showList = false" :asidevalue="asideref"/>
|
|
|
|
<!-- 内容 -->
|
|
<Content v-show="!showDetail" @goDetailx="goDetailx" v-if="!showList" ref="contentRef" :taskvalue="taskvalue" @change-show="showList = true" />
|
|
|
|
<!-- 机器人 -->
|
|
<Robot />
|
|
|
|
<Task v-show="showDetail" :detaiitem="detaiitem" @goBack="goBack"/>
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<style lang="less" scoped>
|
|
.main {
|
|
display: flex;
|
|
flex-direction: row;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
padding-bottom: 16px;
|
|
}
|
|
</style>
|