Browse Source

change workflow

master
godo 9 months ago
parent
commit
afdf5ad920
  1. 2
      frontend/components.d.ts
  2. 13
      frontend/src/components/chat/Chat.vue
  3. 29
      frontend/src/components/chat/ChatWorkList.vue
  4. 6
      frontend/src/system/config.ts

2
frontend/components.d.ts

@ -77,6 +77,8 @@ declare module 'vue' {
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElLink: typeof import('element-plus/es')['ElLink'] ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain'] ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover'] ElPopover: typeof import('element-plus/es')['ElPopover']

13
frontend/src/components/chat/Chat.vue

@ -1,7 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { useChatStore } from '@/stores/chat'; import { useChatStore } from '@/stores/chat';
import { Search } from '@element-plus/icons-vue'; import { Search } from '@element-plus/icons-vue';
import {getWorkflowUrl} from '@/system/config'
const store = useChatStore() const store = useChatStore()
const workUrl = getWorkflowUrl()
onMounted(() => { onMounted(() => {
store.initChat() store.initChat()
}) })
@ -23,13 +25,16 @@ onMounted(() => {
<el-scrollbar> <el-scrollbar>
<chat-msg-list v-if="store.currentNavId == 0" /> <chat-msg-list v-if="store.currentNavId == 0" />
<chat-user-list v-if="store.currentNavId == 1" /> <chat-user-list v-if="store.currentNavId == 1" />
<chat-work-list v-if="store.currentNavId == 2" /> <!-- <chat-work-list v-if="store.currentNavId == 2" /> -->
</el-scrollbar> </el-scrollbar>
</el-main> </el-main>
</el-container> </el-container>
<el-container class="chat-box"> <el-container class="chat-box">
<chat-box v-if="store.currentNavId < 2" /> <chat-box v-if="store.currentNavId < 2" />
</el-container> </el-container>
<el-container class="chat-setting" v-if="store.currentNavId == 2">
<iframe class="workflow" :src="workUrl"></iframe>
</el-container>
<el-container class="chat-setting" v-if="store.currentNavId == 5"> <el-container class="chat-setting" v-if="store.currentNavId == 5">
<ChatUserSetting /> <ChatUserSetting />
</el-container> </el-container>
@ -102,4 +107,10 @@ onMounted(() => {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
.workflow {
width: 100%;
height: 100%;
object-fit: contain;
border: none;
}
</style> </style>

29
frontend/src/components/chat/ChatWorkList.vue

@ -6,5 +6,32 @@ const store = useChatStore()
</script> </script>
<template> <template>
<el-menu default-active="1" class="chat-menu">
<el-menu-item index="1">
<el-icon><Guide /></el-icon>
<span>我要申请</span>
</el-menu-item>
<el-menu-item index="2">
<el-icon><Place /></el-icon>
<span>我的申请</span>
</el-menu-item>
<el-menu-item index="3">
<el-icon><DishDot /></el-icon>
<span>我的任务</span>
</el-menu-item>
<el-menu-item index="4">
<el-icon><SuitcaseLine /></el-icon>
<span>安排任务</span>
</el-menu-item>
<el-menu-item index="5">
<el-icon><Present /></el-icon>
<span>我的审批</span>
</el-menu-item>
</el-menu>
</template> </template>
<style scoped>
.chat-menu{
background: none;
border: none;
}
</style>

6
frontend/src/system/config.ts

@ -202,6 +202,12 @@ export function getUrl(url: string, islast = true) {
} }
} }
export function getWorkflowUrl(){
const config = getSystemConfig();
if (config.userType == 'member') {
return config.userInfo.url + '/views/desktop/index.html' + '?uuid=' + getClientId() + '&token=' + config.userInfo.token
}
}
export function fetchGet(url: string) { export function fetchGet(url: string) {
const config = getSystemConfig(); const config = getSystemConfig();
if (config.userType == 'person') { if (config.userType == 'person') {

Loading…
Cancel
Save