mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 18:32:48 +00:00
feat: shared
This commit is contained in:
parent
65a65de03e
commit
cb60220cb8
|
|
@ -44,7 +44,7 @@ import {Codemirror} from 'vue-codemirror'
|
|||
import {python} from '@codemirror/lang-python'
|
||||
import {oneDark} from '@codemirror/theme-one-dark'
|
||||
import {linter, type Diagnostic} from '@codemirror/lint'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
|
||||
defineOptions({name: 'CodemirrorEditor'})
|
||||
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import paragraphApi from '@/api/shared/paragraph'
|
||||
import knowledgeApi from '@/api/shared/knowledge'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import paragraphApi from '@/api/system-shared/paragraph'
|
||||
import knowledgeApi from '@/api/system-shared/knowledge'
|
||||
import useStoreShared from '@/stores/modules-shared-system'
|
||||
import useStore from '@/stores'
|
||||
import { groupBy } from 'lodash'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import {PermissionConst, EditionConst, RoleConst} from '@/utils/permission/data'
|
||||
import {ComplexPermission} from '@/utils/permission/type'
|
||||
import { PermissionConst, EditionConst, RoleConst } from '@/utils/permission/data'
|
||||
import { ComplexPermission } from '@/utils/permission/type'
|
||||
|
||||
const systemRouter = {
|
||||
path: '/system',
|
||||
name: 'system',
|
||||
meta: {title: 'views.system.title'},
|
||||
meta: { title: 'views.system.title' },
|
||||
hidden: true,
|
||||
component: () => import('@/layout/layout-template/SystemMainLayout.vue'),
|
||||
children: [
|
||||
|
|
@ -20,7 +20,49 @@ const systemRouter = {
|
|||
parentName: 'system',
|
||||
permission: [RoleConst.ADMIN, EditionConst.IS_EE],
|
||||
},
|
||||
component: () => import('@/views/user-manage/index.vue'),
|
||||
component: () => import('@/views/system/user-manage/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/role',
|
||||
name: 'role',
|
||||
meta: {
|
||||
icon: 'app-resource-authorization', // TODO
|
||||
iconActive: 'app-resource-authorization-active', // TODO
|
||||
title: 'views.role.title',
|
||||
activeMenu: '/system',
|
||||
parentPath: '/system',
|
||||
parentName: 'system',
|
||||
permission: [
|
||||
new ComplexPermission(
|
||||
[RoleConst.ADMIN, RoleConst.WORKSPACE_MANAGE.getWorkspaceRole],
|
||||
[PermissionConst.ROLE_READ],
|
||||
[EditionConst.IS_EE],
|
||||
'OR',
|
||||
),
|
||||
],
|
||||
},
|
||||
component: () => import('@/views/system/role/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/workspace',
|
||||
name: 'workspace',
|
||||
meta: {
|
||||
icon: 'app-resource-authorization', // TODO
|
||||
iconActive: 'app-resource-authorization-active', // TODO
|
||||
title: 'views.workspace.title',
|
||||
activeMenu: '/system',
|
||||
parentPath: '/system',
|
||||
parentName: 'system',
|
||||
permission: [
|
||||
new ComplexPermission(
|
||||
[RoleConst.WORKSPACE_MANAGE.getWorkspaceRole, RoleConst.ADMIN],
|
||||
[PermissionConst.WORKSPACE_WORKSPACE_READ],
|
||||
[EditionConst.IS_EE],
|
||||
'OR',
|
||||
),
|
||||
],
|
||||
},
|
||||
component: () => import('@/views/system/workspace/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/resource-management',
|
||||
|
|
@ -69,49 +111,7 @@ const systemRouter = {
|
|||
parentPath: '/system',
|
||||
parentName: 'system',
|
||||
},
|
||||
component: () => import('@/views/resource-authorization/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/role',
|
||||
name: 'role',
|
||||
meta: {
|
||||
icon: 'app-resource-authorization', // TODO
|
||||
iconActive: 'app-resource-authorization-active', // TODO
|
||||
title: 'views.role.title',
|
||||
activeMenu: '/system',
|
||||
parentPath: '/system',
|
||||
parentName: 'system',
|
||||
permission: [
|
||||
new ComplexPermission(
|
||||
[RoleConst.ADMIN, RoleConst.WORKSPACE_MANAGE.getWorkspaceRole],
|
||||
[PermissionConst.ROLE_READ],
|
||||
[EditionConst.IS_EE],
|
||||
'OR',
|
||||
),
|
||||
],
|
||||
},
|
||||
component: () => import('@/views/role/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/workspace',
|
||||
name: 'workspace',
|
||||
meta: {
|
||||
icon: 'app-resource-authorization', // TODO
|
||||
iconActive: 'app-resource-authorization-active', // TODO
|
||||
title: 'views.workspace.title',
|
||||
activeMenu: '/system',
|
||||
parentPath: '/system',
|
||||
parentName: 'system',
|
||||
permission: [
|
||||
new ComplexPermission(
|
||||
[RoleConst.WORKSPACE_MANAGE.getWorkspaceRole, RoleConst.ADMIN],
|
||||
[PermissionConst.WORKSPACE_WORKSPACE_READ],
|
||||
[EditionConst.IS_EE],
|
||||
'OR',
|
||||
),
|
||||
],
|
||||
},
|
||||
component: () => import('@/views/workspace/index.vue'),
|
||||
component: () => import('@/views/system/resource-authorization/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/shared',
|
||||
|
|
@ -262,7 +262,7 @@ const systemRouter = {
|
|||
parentName: 'system',
|
||||
permission: [EditionConst.IS_PE, EditionConst.IS_EE],
|
||||
},
|
||||
component: () => import('@/views/theme/index.vue'),
|
||||
component: () => import('@/views/system-setting/theme/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/authentication',
|
||||
|
|
@ -274,7 +274,7 @@ const systemRouter = {
|
|||
parentName: 'system',
|
||||
permission: [EditionConst.IS_PE, EditionConst.IS_EE],
|
||||
},
|
||||
component: () => import('@/views/authentication/index.vue'),
|
||||
component: () => import('@/views/system-setting/authentication/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/system/email',
|
||||
|
|
@ -286,7 +286,7 @@ const systemRouter = {
|
|||
parentName: 'system',
|
||||
//permission: new Role('ADMIN')
|
||||
},
|
||||
component: () => import('@/views/email/index.vue'),
|
||||
component: () => import('@/views/system-setting/email/index.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -302,8 +302,8 @@ const systemRouter = {
|
|||
parentName: 'system',
|
||||
permission: [EditionConst.IS_PE, EditionConst.IS_EE],
|
||||
},
|
||||
component: () => import('@/views/operate-log/index.vue')
|
||||
}
|
||||
component: () => import('@/views/system/operate-log/index.vue'),
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import { type Ref } from 'vue'
|
||||
|
||||
const useDocumentStore = defineStore('documen', {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import type { knowledgeData } from '@/api/type/knowledge'
|
||||
import type { UploadUserFile } from 'element-plus'
|
||||
import knowledgeApi from '@/api/shared/knowledge'
|
||||
import knowledgeApi from '@/api/system-shared/knowledge'
|
||||
import { type Ref } from 'vue'
|
||||
|
||||
export interface knowledgeStateTypes {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {defineStore} from 'pinia'
|
||||
import {type Ref} from 'vue'
|
||||
import ModelApi from '@/api/shared/model'
|
||||
import ProviderApi from '@/api/shared/provider'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import ProviderApi from '@/api/model/provider'
|
||||
import type {ListModelRequest} from '@/api/type/model'
|
||||
|
||||
const useModelStore = defineStore('mode', {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import paragraphApi from '@/api/shared/paragraph'
|
||||
import paragraphApi from '@/api/system-shared/paragraph'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
const useParagraphStore = defineStore('paragrap', {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import { type Ref } from 'vue'
|
||||
import problemApi from '@/api/shared/problem'
|
||||
import problemApi from '@/api/system-shared/problem'
|
||||
import type { pageRequest } from '@/api/type/common'
|
||||
|
||||
const useProblemStore = defineStore('proble', {
|
||||
|
|
|
|||
|
|
@ -1,100 +0,0 @@
|
|||
<template>
|
||||
<div class="chat layout-bg" v-loading="loading">
|
||||
<div class="chat__header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
||||
<div class="chat-width flex align-center">
|
||||
<div class="mr-12 ml-24 flex">
|
||||
<el-avatar
|
||||
v-if="isAppIcon(applicationDetail?.icon)"
|
||||
shape="square"
|
||||
:size="32"
|
||||
style="background: none"
|
||||
>
|
||||
<img :src="applicationDetail?.icon" alt="" />
|
||||
</el-avatar>
|
||||
<LogoIcon v-else height="28px" style="width: 28px; height: 28px; display: block" />
|
||||
</div>
|
||||
|
||||
<h2>{{ applicationDetail?.name }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat__main chat-width">
|
||||
<AiChat
|
||||
v-model:applicationDetails="applicationDetail"
|
||||
type="ai-chat"
|
||||
:available="applicationAvailable"
|
||||
:appId="applicationDetail?.id"
|
||||
:record="recordList"
|
||||
:chatId="currentChatId"
|
||||
@refresh="refresh"
|
||||
>
|
||||
<template #operateBefore>
|
||||
<div>
|
||||
<el-button type="primary" link class="new-chat-button mb-8" @click="newChat">
|
||||
<el-icon><Plus /></el-icon><span class="ml-4">{{ $t('chat.createChat') }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</AiChat>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { isAppIcon } from '@/utils/common'
|
||||
import useStore from '@/stores'
|
||||
|
||||
const { theme } = useStore()
|
||||
|
||||
const isDefaultTheme = computed(() => {
|
||||
return theme.isDefaultTheme()
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const props = defineProps<{
|
||||
application_profile: any
|
||||
applicationAvailable: boolean
|
||||
}>()
|
||||
const applicationDetail = computed({
|
||||
get: () => {
|
||||
return props.application_profile
|
||||
},
|
||||
set: (v) => {},
|
||||
})
|
||||
const recordList = ref([])
|
||||
const currentChatId = ref('')
|
||||
|
||||
function newChat() {
|
||||
currentChatId.value = 'new'
|
||||
recordList.value = []
|
||||
}
|
||||
function refresh(id: string) {
|
||||
currentChatId.value = id
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.chat {
|
||||
overflow: hidden;
|
||||
&__header {
|
||||
background: var(--app-header-bg-color);
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
height: var(--app-header-height);
|
||||
line-height: var(--app-header-height);
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid var(--el-border-color);
|
||||
}
|
||||
&__main {
|
||||
padding-top: calc(var(--app-header-height) + 24px);
|
||||
height: calc(100vh - var(--app-header-height) - 24px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chat-width {
|
||||
// max-width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -50,11 +50,7 @@
|
|||
</div>
|
||||
|
||||
<!-- 历史记录弹出层 -->
|
||||
<div
|
||||
v-if="applicationDetail.show_history || !user.isEnterprise()"
|
||||
@click.prevent.stop="show = !show"
|
||||
class="chat-popover-button cursor color-secondary"
|
||||
>
|
||||
<div @click.prevent.stop="show = !show" class="chat-popover-button cursor color-secondary">
|
||||
<AppIcon
|
||||
iconName="app-history-outlined"
|
||||
:style="{
|
||||
|
|
@ -298,9 +294,7 @@ function refresh(id: string) {
|
|||
*初始化历史对话记录
|
||||
*/
|
||||
const init = () => {
|
||||
if (applicationDetail.value.show_history || !user.isEnterprise()) {
|
||||
getChatLog(applicationDetail.value.id)
|
||||
}
|
||||
getChatLog(applicationDetail.value.id)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -49,11 +49,7 @@
|
|||
</div>
|
||||
|
||||
<!-- 历史记录弹出层 -->
|
||||
<div
|
||||
v-if="applicationDetail.show_history || !user.isEnterprise()"
|
||||
@click.prevent.stop="show = !show"
|
||||
class="chat-popover-button cursor color-secondary"
|
||||
>
|
||||
<div @click.prevent.stop="show = !show" class="chat-popover-button cursor color-secondary">
|
||||
<AppIcon
|
||||
iconName="app-history-outlined"
|
||||
:style="{
|
||||
|
|
@ -294,9 +290,7 @@ function refresh(id: string) {
|
|||
*初始化历史对话记录
|
||||
*/
|
||||
const init = () => {
|
||||
if (applicationDetail.value.show_history || !user.isEnterprise()) {
|
||||
getChatLog(applicationDetail.value.id)
|
||||
}
|
||||
getChatLog(applicationDetail.value.id)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -377,12 +377,13 @@ async function exportHTML(): Promise<void> {
|
|||
*初始化历史对话记录
|
||||
*/
|
||||
const init = () => {
|
||||
if (
|
||||
(applicationDetail.value.show_history || !user.isEnterprise()) &&
|
||||
props.applicationAvailable
|
||||
) {
|
||||
getChatLog(applicationDetail.value.id)
|
||||
}
|
||||
// if (
|
||||
// (applicationDetail.value.show_history || !user.isEnterprise()) &&
|
||||
// props.applicationAvailable
|
||||
// ) {
|
||||
// getChatLog(applicationDetail.value.id)
|
||||
// }
|
||||
getChatLog(applicationDetail.value.id)
|
||||
}
|
||||
onMounted(() => {
|
||||
init()
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ import ToolDebugDrawer from './ToolDebugDrawer.vue'
|
|||
import UserFieldFormDialog from '@/views/resource-management/tool/component/UserFieldFormDialog.vue'
|
||||
import EditAvatarDialog from '@/views/resource-management/tool/component/EditAvatarDialog.vue'
|
||||
import type {toolData} from '@/api/type/tool'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import type {FormInstance} from 'element-plus'
|
||||
import {MsgSuccess, MsgConfirm} from '@/utils/message'
|
||||
import {cloneDeep} from 'lodash'
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { MsgError, MsgSuccess } from '@/utils/message'
|
||||
import { defaultIcon, isAppIcon } from '@/utils/common'
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import {ref, watch} from 'vue'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||
import {MsgSuccess} from '@/utils/message'
|
||||
import {t} from '@/locales'
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ import { ref, computed } from 'vue'
|
|||
import type { CheckboxValueType } from 'element-plus'
|
||||
import iconMap from '@/components/app-icon/icons/common'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import authorizationApi from '@/api/shared/authorization'
|
||||
import authorizationApi from '@/api/system-shared/authorization'
|
||||
|
||||
const checkAll = ref(false)
|
||||
const isIndeterminate = ref(true)
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ import { MsgConfirm, MsgSuccess, MsgWarning } from '@/utils/message'
|
|||
import { getImgUrl } from '@/utils/utils'
|
||||
import { t } from '@/locales'
|
||||
import type Node from 'element-plus/es/components/tree/src/model/node'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ import { useRouter, useRoute } from 'vue-router'
|
|||
import SetRules from './upload/SetRules.vue'
|
||||
import ResultSuccess from './upload/ResultSuccess.vue'
|
||||
import UploadComponent from './upload/UploadComponent.vue'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import { MsgConfirm, MsgSuccess } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
import { ref, reactive, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import { hitHandlingMethod } from '@/enums/document'
|
||||
import { t } from '@/locales'
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
const { knowledge } = useStore()
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@
|
|||
import { ref, onMounted, onBeforeUnmount, computed } from 'vue'
|
||||
import { useRouter, useRoute, onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router'
|
||||
import { ElTable } from 'element-plus'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import ImportDocumentDialog from './component/ImportDocumentDialog.vue'
|
||||
import SyncWebDialog from '@/views/knowledge/component/SyncWebDialog.vue'
|
||||
import SelectKnowledgeDialog from './component/SelectKnowledgeDialog.vue'
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ import { ref, computed, onMounted, reactive, watch } from 'vue'
|
|||
import ParagraphPreview from '@/views/knowledge/component/ParagraphPreview.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { cutFilename } from '@/utils/utils'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
import type { KeyValue } from '@/api/type/common'
|
||||
const { knowledge } = useStore()
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ import { ref, reactive, onUnmounted, onMounted, computed, watch, nextTick } from
|
|||
import type { UploadFiles } from 'element-plus'
|
||||
import { filesize, getImgUrl, isRightType } from '@/utils/utils'
|
||||
import { MsgError } from '@/utils/message'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
import { t } from '@/locales'
|
||||
const { knowledge } = useStore()
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@
|
|||
import { nextTick, ref, onMounted, computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import KnowledgeApi from '@/api/shared/knowledge'
|
||||
import KnowledgeApi from '@/api/system-shared/knowledge'
|
||||
// import applicationApi from '@/api/application/application'
|
||||
import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
|
||||
import { arraySort } from '@/utils/common'
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@
|
|||
import { ref, onMounted, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import BaseForm from '@/views/shared/knowledge-shared/component/BaseForm.vue'
|
||||
import KnowledgeApi from '@/api/shared/knowledge'
|
||||
import KnowledgeApi from '@/api/system-shared/knowledge'
|
||||
import type { ApplicationFormType } from '@/api/type/application'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import { isAppIcon } from '@/utils/common'
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ import CreateKnowledgeDialog from './create-component/CreateKnowledgeDialog.vue'
|
|||
import CreateWebKnowledgeDialog from './create-component/CreateWebKnowledgeDialog.vue'
|
||||
import CreateFolderDialog from '@/components/folder-tree/CreateFolderDialog.vue'
|
||||
import GenerateRelatedDialog from '@/components/generate-related-shared-dialog/index.vue'
|
||||
import KnowledgeApi from '@/api/shared/knowledge'
|
||||
import KnowledgeApi from '@/api/system-shared/knowledge'
|
||||
import KnowledgeWorkspaceApi from '@/api/shared-workspace'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import knowledgeApi from '@/api/shared/knowledge'
|
||||
import knowledgeApi from '@/api/system-shared/knowledge'
|
||||
|
||||
const emit = defineEmits(['refresh'])
|
||||
const loading = ref<boolean>(false)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
import { ref, watch, reactive } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import BaseForm from '@/views/shared/knowledge-shared/component/BaseForm.vue'
|
||||
import KnowledgeApi from '@/api/shared/knowledge'
|
||||
import KnowledgeApi from '@/api/system-shared/knowledge'
|
||||
import { MsgSuccess, MsgAlert } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
import { ref, watch, reactive } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import BaseForm from '@/views/shared/knowledge-shared/component/BaseForm.vue'
|
||||
import KnowledgeApi from '@/api/shared/knowledge'
|
||||
import KnowledgeApi from '@/api/system-shared/knowledge'
|
||||
import { MsgSuccess, MsgAlert } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
import { ComplexPermission } from '@/utils/permission/type'
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
import { ref, watch, reactive } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import BaseForm from '@/views/shared/knowledge-shared/component/BaseForm.vue'
|
||||
import KnowledgeApi from '@/api/shared/knowledge'
|
||||
import KnowledgeApi from '@/api/system-shared/knowledge'
|
||||
import { MsgSuccess, MsgAlert } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ import CreateWebKnowledgeDialog from './create-component/CreateWebKnowledgeDialo
|
|||
import CreateLarkKnowledgeDialog from './create-component/CreateLarkKnowledgeDialog.vue'
|
||||
import CreateFolderDialog from '@/components/folder-tree/CreateFolderDialog.vue'
|
||||
import GenerateRelatedDialog from '@/components/generate-related-shared-dialog/index.vue'
|
||||
import KnowledgeApi from '@/api/shared/knowledge'
|
||||
import KnowledgeApi from '@/api/system-shared/knowledge'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
import { numberFormat } from '@/utils/common'
|
||||
|
|
|
|||
|
|
@ -103,8 +103,8 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import ProviderApi from '@/api/shared/provider'
|
||||
import ModelApi from '@/api/shared/model'
|
||||
import ProviderApi from '@/api/model/provider'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import ModelWorkspaceApi from '@/api/shared-workspace'
|
||||
import type { Provider, Model } from '@/api/type/model'
|
||||
import ModelCard from '@/views/shared/model-shared/component/ModelCardSharedWorkspace.vue'
|
||||
|
|
|
|||
|
|
@ -239,8 +239,8 @@
|
|||
import { ref, computed } from 'vue'
|
||||
import type { Provider, BaseModel } from '@/api/type/model'
|
||||
import type { Dict, KeyValue } from '@/api/type/common'
|
||||
import ModelApi from '@/api/shared/model'
|
||||
import ProviderApi from '@/api/shared/provider'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import ProviderApi from '@/api/model/provider'
|
||||
import type { FormField } from '@/components/dynamics-form/type'
|
||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||
import type { FormRules } from 'element-plus'
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@
|
|||
import {ref, computed} from 'vue'
|
||||
import type {Provider, BaseModel, Model} from '@/api/type/model'
|
||||
import type {Dict, KeyValue} from '@/api/type/common'
|
||||
import ModelApi from '@/api/shared/model'
|
||||
import ProviderApi from '@/api/shared/provider'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import ProviderApi from '@/api/model/provider'
|
||||
import type {FormField} from '@/components/dynamics-form/type'
|
||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||
import type {FormRules} from 'element-plus'
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import type { Provider, Model } from '@/api/type/model'
|
||||
import ModelApi from '@/api/shared/model'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import { computed, ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
import EditModel from '@/views/shared/model-shared/component/EditModel.vue'
|
||||
// import DownloadLoading from '@/components/loading/DownloadLoading.vue'
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import type { Provider, Model } from '@/api/type/model'
|
||||
import ModelApi from '@/api/shared/model'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import { computed, ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
import EditModel from '@/views/shared/model-shared/component/EditModel.vue'
|
||||
// import DownloadLoading from '@/components/loading/DownloadLoading.vue'
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ import type { Model } from '@/api/type/model'
|
|||
import { ref } from 'vue'
|
||||
import AddParamDrawer from './AddParamDrawer.vue'
|
||||
import { MsgError, MsgSuccess } from '@/utils/message'
|
||||
import ModelApi from '@/api/shared/model'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import { input_type_list } from '@/components/dynamics-form/constructor/data'
|
||||
import { t } from '@/locales'
|
||||
const props = defineProps<{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import ProviderApi from '@/api/shared/provider'
|
||||
import ProviderApi from '@/api/model/provider'
|
||||
import type { Provider } from '@/api/type/model'
|
||||
import { modelTypeList } from './data'
|
||||
import { t } from '@/locales'
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import ProviderApi from '@/api/shared/provider'
|
||||
import ProviderApi from '@/api/model/provider'
|
||||
import type { Provider, Model } from '@/api/type/model'
|
||||
import ModelCard from '@/views/shared/model-shared/component/ModelCard.vue'
|
||||
import ProviderComponent from '@/views/shared/model-shared/component/Provider.vue'
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ import { useRoute } from 'vue-router'
|
|||
import { cloneDeep, debounce } from 'lodash'
|
||||
import ParagraphForm from '@/views/paragraph/component/ParagraphForm.vue'
|
||||
import ProblemComponent from '@/views/paragraph/component/ProblemComponent.vue'
|
||||
import paragraphApi from '@/api/shared/paragraph'
|
||||
import paragraphApi from '@/api/system-shared/paragraph'
|
||||
import useStore from '@/stores'
|
||||
|
||||
const props = defineProps({
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, nextTick, onMounted, onUnmounted, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import paragraphApi from '@/api/shared/paragraph'
|
||||
import paragraphApi from '@/api/system-shared/paragraph'
|
||||
import useStore from '@/stores'
|
||||
|
||||
const props = defineProps({
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
import { ref, watch, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import paragraphApi from '@/api/shared/paragraph'
|
||||
import paragraphApi from '@/api/system-shared/paragraph'
|
||||
import useStore from '@/stores'
|
||||
import { t } from '@/locales'
|
||||
const { knowledge, document } = useStore()
|
||||
|
|
|
|||
|
|
@ -140,8 +140,8 @@
|
|||
import { reactive, ref, onMounted, computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import documentApi from '@/api/shared/document'
|
||||
import paragraphApi from '@/api/shared/paragraph'
|
||||
import documentApi from '@/api/system-shared/document'
|
||||
import paragraphApi from '@/api/system-shared/paragraph'
|
||||
import ParagraphDialog from './component/ParagraphDialog.vue'
|
||||
import ParagraphCard from './component/ParagraphCard.vue'
|
||||
import SelectDocumentDialog from './component/SelectDocumentDialog.vue'
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import problemApi from '@/api/shared/problem'
|
||||
import problemApi from '@/api/system-shared/problem'
|
||||
import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
|
||||
import RelateProblemDialog from './RelateProblemDialog.vue'
|
||||
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import problemApi from '@/api/shared/problem'
|
||||
import paragraphApi from '@/api/shared/paragraph'
|
||||
import problemApi from '@/api/system-shared/problem'
|
||||
import paragraphApi from '@/api/system-shared/paragraph'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@
|
|||
import { ref, onMounted, reactive, onBeforeUnmount, computed } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { ElTable } from 'element-plus'
|
||||
import problemApi from '@/api/shared/problem'
|
||||
import problemApi from '@/api/system-shared/problem'
|
||||
import CreateProblemDialog from './component/CreateProblemDialog.vue'
|
||||
import DetailProblemDrawer from './component/DetailProblemDrawer.vue'
|
||||
import RelateProblemDialog from './component/RelateProblemDialog.vue'
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, computed } from 'vue'
|
||||
import { cloneDeep, get } from 'lodash'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import ToolWorkspaceApi from '@/api/shared-workspace'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
import InitParamDrawer from '@/views/shared/tool-shared/component/InitParamDrawer.vue'
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ import ToolDebugDrawer from './ToolDebugDrawer.vue'
|
|||
import UserFieldFormDialog from '@/views/shared/tool-shared/component/UserFieldFormDialog.vue'
|
||||
import EditAvatarDialog from '@/views/shared/tool-shared/component/EditAvatarDialog.vue'
|
||||
import type {toolData} from '@/api/type/tool'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import type {FormInstance} from 'element-plus'
|
||||
import {MsgSuccess, MsgConfirm} from '@/utils/message'
|
||||
import {cloneDeep} from 'lodash'
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { MsgError, MsgSuccess } from '@/utils/message'
|
||||
import { defaultIcon, isAppIcon } from '@/utils/common'
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import {ref, watch} from 'vue'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||
import {MsgSuccess} from '@/utils/message'
|
||||
import {t} from '@/locales'
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive, computed } from 'vue'
|
||||
import { cloneDeep, get } from 'lodash'
|
||||
import ToolApi from '@/api/shared/tool'
|
||||
import ToolApi from '@/api/system-shared/tool'
|
||||
import useStore from '@/stores/modules-shared-system'
|
||||
import InitParamDrawer from '@/views/shared/tool-shared/component/InitParamDrawer.vue'
|
||||
import ToolFormDrawer from './ToolFormDrawer.vue'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,239 @@
|
|||
<template>
|
||||
<ContentContainer>
|
||||
<template #header>
|
||||
<div class="shared-header">
|
||||
<span class="title">{{ t('views.system.shared_resources') }}</span>
|
||||
<el-icon size="12">
|
||||
<rightOutlined></rightOutlined>
|
||||
</el-icon>
|
||||
<span class="sub-title">{{ t('views.model.title') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-card style="--el-card-padding: 0">
|
||||
<LayoutContainer class="model-manage">
|
||||
<template #left>
|
||||
<h4 class="p-16 mb-8 pb-0">{{ $t('views.model.provider') }}</h4>
|
||||
<ProviderComponent
|
||||
:data="provider_list"
|
||||
@click="clickListHandle"
|
||||
:loading="loading"
|
||||
shareTitle="views.system.share_tool"
|
||||
isShared
|
||||
:active="active_provider"
|
||||
/>
|
||||
</template>
|
||||
<ContentContainer :header="active_provider?.name" v-loading="list_model_loading">
|
||||
<template #search>
|
||||
<div class="flex">
|
||||
<div class="flex-between complex-search">
|
||||
<el-select
|
||||
class="complex-search__left"
|
||||
v-model="search_type"
|
||||
style="width: 120px"
|
||||
@change="search_type_change"
|
||||
>
|
||||
<el-option :label="$t('common.creator')" value="create_user" />
|
||||
<el-option
|
||||
:label="$t('views.model.modelForm.model_type.label')"
|
||||
value="model_type"
|
||||
/>
|
||||
<el-option :label="$t('views.model.modelForm.modeName.label')" value="name" />
|
||||
</el-select>
|
||||
<el-input
|
||||
v-if="search_type === 'name'"
|
||||
v-model="model_search_form.name"
|
||||
@change="list_model"
|
||||
:placeholder="$t('common.searchBar.placeholder')"
|
||||
style="width: 220px"
|
||||
clearable
|
||||
/>
|
||||
<el-select
|
||||
v-else-if="search_type === 'create_user'"
|
||||
v-model="model_search_form.create_user"
|
||||
@change="list_model"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
>
|
||||
<el-option
|
||||
v-for="u in user_options"
|
||||
:key="u.id"
|
||||
:value="u.id"
|
||||
:label="u.username"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-else-if="search_type === 'model_type'"
|
||||
v-model="model_search_form.model_type"
|
||||
clearable
|
||||
@change="list_model"
|
||||
style="width: 220px"
|
||||
>
|
||||
<template v-for="item in modelTypeList" :key="item.value">
|
||||
<el-option :label="item.text" :value="item.value" />
|
||||
</template>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-button
|
||||
v-if="!isShared"
|
||||
class="ml-16"
|
||||
type="primary"
|
||||
@click="openCreateModel(active_provider)"
|
||||
v-hasPermission="[
|
||||
RoleConst.WORKSPACE_MANAGE.getWorkspaceRole,
|
||||
RoleConst.USER.getWorkspaceRole,
|
||||
PermissionConst.MODEL_CREATE.getWorkspacePermission,
|
||||
]"
|
||||
>
|
||||
{{ $t('views.model.addModel') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="model-list-height">
|
||||
<el-scrollbar>
|
||||
<el-row v-if="model_split_list.length > 0" :gutter="15" class="w-full">
|
||||
<template v-for="(row, index) in model_split_list" :key="index">
|
||||
<el-col
|
||||
:xs="24"
|
||||
:sm="12"
|
||||
:md="12"
|
||||
:lg="12"
|
||||
:xl="8"
|
||||
class="mb-16"
|
||||
v-for="(model, i) in row"
|
||||
:key="i"
|
||||
>
|
||||
<ModelCard
|
||||
@change="list_model"
|
||||
:updateModelById="updateModelById"
|
||||
:model="model"
|
||||
:provider_list="provider_list"
|
||||
:isShared="isShared"
|
||||
>
|
||||
</ModelCard>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
<el-empty :description="$t('common.noData')" v-else />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</ContentContainer>
|
||||
|
||||
<CreateModelDialog
|
||||
ref="createModelRef"
|
||||
@submit="list_model"
|
||||
@change="openCreateModel($event)"
|
||||
v-if="!isShared"
|
||||
></CreateModelDialog>
|
||||
|
||||
<SelectProviderDialog
|
||||
ref="selectProviderRef"
|
||||
@change="(provider, modelType) => openCreateModel(provider, modelType)"
|
||||
v-if="!isShared"
|
||||
></SelectProviderDialog>
|
||||
</LayoutContainer>
|
||||
</el-card>
|
||||
</ContentContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import ProviderApi from '@/api/model/provider'
|
||||
import ModelApi from '@/api/system-shared/model'
|
||||
import type { Provider, Model } from '@/api/type/model'
|
||||
import ModelCard from '@/views/model/component/ModelCard.vue'
|
||||
import ProviderComponent from '@/views/model/component/Provider.vue'
|
||||
import { splitArray } from '@/utils/common'
|
||||
import { modelTypeList, allObj } from '@/views/model/component/data'
|
||||
import CreateModelDialog from '@/views/model/component/CreateModelDialog.vue'
|
||||
import SelectProviderDialog from '@/views/model/component/SelectProviderDialog.vue'
|
||||
import { t } from '@/locales'
|
||||
import { PermissionConst, RoleConst } from '@/utils/permission/data'
|
||||
const commonList1 = ref()
|
||||
const commonList2 = ref()
|
||||
const loading = ref<boolean>(false)
|
||||
|
||||
const active_provider = ref<Provider>()
|
||||
const search_type = ref('name')
|
||||
const model_search_form = ref<{
|
||||
name: string
|
||||
create_user: string
|
||||
model_type: string
|
||||
}>({
|
||||
name: '',
|
||||
create_user: '',
|
||||
model_type: '',
|
||||
})
|
||||
const user_options = ref<any[]>([])
|
||||
const list_model_loading = ref<boolean>(false)
|
||||
const provider_list = ref<Array<Provider>>([])
|
||||
|
||||
const model_list = ref<Array<Model>>([])
|
||||
|
||||
const isShared = computed(() => {
|
||||
return active_provider.value && active_provider.value.provider === 'share'
|
||||
})
|
||||
const updateModelById = (model_id: string, model: Model) => {
|
||||
model_list.value
|
||||
.filter((m) => m.id == model_id)
|
||||
.forEach((m) => {
|
||||
m.status = model.status
|
||||
})
|
||||
}
|
||||
const model_split_list = computed(() => {
|
||||
return splitArray(model_list.value, 2)
|
||||
})
|
||||
const createModelRef = ref<InstanceType<typeof CreateModelDialog>>()
|
||||
const selectProviderRef = ref<InstanceType<typeof SelectProviderDialog>>()
|
||||
|
||||
const clickListHandle = (item: Provider) => {
|
||||
active_provider.value = item
|
||||
list_model()
|
||||
if (active_provider.value.provider === '') {
|
||||
commonList1.value.clearCurrent()
|
||||
commonList2.value.clearCurrent()
|
||||
}
|
||||
}
|
||||
|
||||
const openCreateModel = (provider?: Provider, model_type?: string) => {
|
||||
if (provider && provider.provider) {
|
||||
createModelRef.value?.open(provider, model_type)
|
||||
} else {
|
||||
selectProviderRef.value?.open()
|
||||
}
|
||||
}
|
||||
|
||||
const list_model = () => {
|
||||
const params = active_provider.value?.provider ? { provider: active_provider.value.provider } : {}
|
||||
ModelApi.getModel({ ...model_search_form.value, ...params }, list_model_loading).then(
|
||||
(ok: any) => {
|
||||
model_list.value = ok.data
|
||||
const v = model_list.value.map((m) => ({ id: m.user_id, username: m.username }))
|
||||
if (user_options.value.length === 0) {
|
||||
user_options.value = Array.from(new Map(v.map((item) => [item.id, item])).values())
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
const search_type_change = () => {
|
||||
model_search_form.value = { name: '', create_user: '', model_type: '' }
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
ProviderApi.getProvider(loading).then((ok) => {
|
||||
active_provider.value = allObj
|
||||
provider_list.value = [allObj, ...ok.data]
|
||||
|
||||
list_model()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.model-manage {
|
||||
.model-list-height {
|
||||
height: calc(var(--app-main-height));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -74,7 +74,7 @@ import {MsgSuccess} from '@/utils/message'
|
|||
import {t} from '@/locales'
|
||||
import type {FormItemModel} from '@/api/type/role'
|
||||
import WorkspaceApi from '@/api/workspace/workspace'
|
||||
import MemberFormContent from '@/views/role/component/MemberFormContent.vue'
|
||||
import MemberFormContent from '@/views/system/role/component/MemberFormContent.vue'
|
||||
import {RoleTypeEnum} from '@/enums/system'
|
||||
import useStore from "@/stores";
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
import { onBeforeMount, ref } from 'vue'
|
||||
import UserApi from '@/api/user/user'
|
||||
import WorkspaceApi from '@/api/workspace/workspace'
|
||||
import MemberFormContent from '@/views/role/component/MemberFormContent.vue'
|
||||
import MemberFormContent from '@/views/system/role/component/MemberFormContent.vue'
|
||||
import { t } from '@/locales'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import type { CreateWorkspaceMemberParamsItem, WorkspaceItem } from '@/api/type/workspace'
|
||||
Loading…
Reference in New Issue