From ba8a936772e4e2c58dd515d64d7cb7d7817bbe88 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期六, 28 十月 2023 18:50:42 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/bulletin-board-style1 into wn --- src/views/dashboard/index.vue | 77 +++++++++++++++++++++++++++++++++++--- 1 files changed, 71 insertions(+), 6 deletions(-) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 6a0fc85..b927f26 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,22 +1,87 @@ <template> <DashboardLayout> - <template #leftBlock1>浠诲姟绛涢�塼abs</template> + <template #leftBlock1> + <TaskTabs v-model="activeTaskTab" style="margin-top: 20px" :list="taskTabsTitle"></TaskTabs> + </template> <template #leftBlock2> - <div style="height: 1500px">閫氶亾浠诲姟</div> + <ChannelCollapse :channels="channels"></ChannelCollapse> </template> <template #middleBlock1>鏍囬</template> - <template #middleBlock2>涓荤湅鏉�</template> + <template #middleBlock2 + >涓荤湅鏉� + <ProcessInfo :process="process"></ProcessInfo> + </template> <template #middleBlock3>浠诲姟璇︽儏</template> - <template #middleBlock4>浜哄憳淇℃伅</template> - <template #rightBlock1>鏃堕棿</template> + <template #middleBlock4 + >浜哄憳淇℃伅 + <PersonInfo :person="person"></PersonInfo> + </template> + <template #rightBlock1> + <div class="date-time"> + <CurrentDateTime></CurrentDateTime> + </div> + </template> <template #rightBlock2>鐘舵�侀潰鏉�</template> <template #rightBlock3>鐭ヨ瘑搴�</template> </DashboardLayout> </template> <script setup lang="ts"> +import { getTaskList } from '@/api' +import { computed, ref, watchEffect } from 'vue' +import ChannelCollapse from '@/views/dashboard/components/ChannelCollapse.vue' +import type { Task } from '@/api/task' +import { chain } from 'lodash-es' +import ProcessInfo from '@/views/dashboard/components/ProcessInfo.vue' +import PersonInfo from '@/views/dashboard/components/PersonInfo.vue' +import TaskTabs from '@/views/dashboard/components/TaskTabs.vue' +import CurrentDateTime from '@/views/dashboard/components/CurrentDateTime.vue' + defineOptions({ name: 'DashboardView' }) + +const taskList = ref<Task[]>() + +function getChannels() { + getTaskList(2) + .then((res) => { + taskList.value = res.data.Tasks + }) + .catch((err) => { + console.error(err) + taskList.value = [] + }) +} + +const channels = computed(() => { + return chain<Task>(taskList.value) + .groupBy((ele) => ele.Channel) + .value() +}) +const process = computed(() => { + return { name: '宸ヨ壓鍚嶇О', number: '111' } +}) +const person = computed(() => { + return { + workerName: '濮撳悕', + phone: '111' + } +}) +getChannels() +const taskTabsTitle = ['鏈畬鎴�', '浠婃棩浠诲姟', '宸插畬鎴�'] +const activeTaskTab = ref('鏈畬鎴�') + +watchEffect(() => { + // console.log(activeTaskTab?.value, 111111) +}) </script> -<style scoped></style> +<style scoped> +.date-time { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + padding-top: 12px; +} +</style> -- Gitblit v1.8.0