feat: layout
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run

This commit is contained in:
wangdan-fit2cloud 2025-06-25 21:58:01 +08:00
parent ea7b8547be
commit b5bbf9d0bb
54 changed files with 428 additions and 829 deletions

View File

@ -25,46 +25,6 @@ export default {
])
},
},
'app-setting': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M3.60734 16.4448L3.34807 16.1624C2.44036 15.1737 1.75935 13.9944 1.36011 12.7066L1.24756 12.3435L2.95427 10.0001L1.24756 7.65668L1.36011 7.29361C1.75935 6.00574 2.44036 4.82649 3.34807 3.83779L3.60734 3.55539L6.47552 3.86889L7.64049 1.21319L8.01405 1.12909C8.66134 0.983366 9.32633 0.90918 10.0004 0.90918C10.6744 0.90918 11.3394 0.983366 11.9867 1.12909L12.3603 1.21319L13.5252 3.86889L16.3934 3.55539L16.6527 3.83779C17.5604 4.82649 18.2414 6.00574 18.6406 7.29361L18.7532 7.65668L17.0465 10.0001L18.7532 12.3435L18.6406 12.7066C18.2414 13.9944 17.5604 15.1737 16.6527 16.1624L16.3934 16.4448L13.5252 16.1313L12.3603 18.787L11.9867 18.8711C11.3394 19.0168 10.6744 19.091 10.0004 19.091C9.32633 19.091 8.66134 19.0168 8.01405 18.8711L7.64049 18.787L6.47552 16.1313L3.60734 16.4448ZM6.51159 14.6031C7.05002 14.5443 7.56436 14.8417 7.78194 15.3377L8.71565 17.4662C9.13677 17.5389 9.56603 17.5758 10.0004 17.5758C10.4347 17.5758 10.864 17.5389 11.2851 17.4662L12.2188 15.3377C12.4364 14.8417 12.9507 14.5443 13.4892 14.6031L15.7844 14.854C16.3387 14.1868 16.7757 13.4286 17.0741 12.6116L15.7038 10.7301C15.3869 10.295 15.3869 9.70511 15.7038 9.26999L17.0741 7.38847C16.7757 6.57146 16.3387 5.81331 15.7844 5.14609L13.4892 5.39696C12.9507 5.45581 12.4364 5.1584 12.2188 4.66238L11.2851 2.53389C10.864 2.46117 10.4347 2.42429 10.0004 2.42429C9.56603 2.42429 9.13677 2.46117 8.71565 2.53389L7.78194 4.66238C7.56436 5.1584 7.05002 5.45581 6.51159 5.39696L4.21641 5.14609C3.66208 5.81331 3.22502 6.57146 2.92666 7.38847L4.29697 9.26999C4.61387 9.70511 4.61387 10.295 4.29697 10.7301L2.92666 12.6116C3.22502 13.4286 3.66208 14.1868 4.21641 14.854L6.51159 14.6031ZM10.0004 13.788C7.91555 13.788 6.22693 12.0913 6.22693 10.0001C6.22693 7.9089 7.91555 6.2122 10.0004 6.2122C12.0852 6.2122 13.7738 7.9089 13.7738 10.0001C13.7738 12.0913 12.0852 13.788 10.0004 13.788ZM10.0004 12.2729C11.2468 12.2729 12.2587 11.2561 12.2587 10.0001C12.2587 8.74413 11.2468 7.72741 10.0004 7.72741C8.75397 7.72741 7.74208 8.74413 7.74208 10.0001C7.74208 11.2561 8.75397 12.2729 10.0004 12.2729Z',
fill: 'currentColor',
}),
],
),
])
},
},
'app-setting-active': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M3.26425 16.2151C2.35478 15.2292 1.65887 14.0432 1.25 12.7305L2.70785 10.7384C3.02952 10.2988 3.02952 9.70154 2.70785 9.26197L1.25 7.26979C1.65887 5.95714 2.35478 4.77112 3.26425 3.78522L5.71416 4.05172C6.25589 4.11065 6.77338 3.81185 6.99316 3.31321L7.98848 1.05505C8.63579 0.910018 9.30896 0.833496 10 0.833496C10.691 0.833496 11.3642 0.910018 12.0115 1.05505L13.0068 3.31321C13.2266 3.81185 13.7441 4.11065 14.2858 4.05172L16.7357 3.78522C17.6452 4.77112 18.3411 5.95714 18.75 7.26979L17.2921 9.26197C16.9705 9.70154 16.9705 10.2988 17.2921 10.7384L18.75 12.7305C18.3411 14.0432 17.6452 15.2292 16.7357 16.2151L14.2858 15.9486C13.7441 15.8897 13.2266 16.1885 13.0068 16.6871L12.0115 18.9453C11.3642 19.0903 10.691 19.1668 10 19.1668C9.30896 19.1668 8.63579 19.0903 7.98848 18.9453L6.99316 16.6871C6.77338 16.1885 6.25589 15.8897 5.71416 15.9486L3.26425 16.2151ZM10 13.3335C11.8409 13.3335 13.3333 11.8411 13.3333 10.0002C13.3333 8.15921 11.8409 6.66683 10 6.66683C8.15905 6.66683 6.66667 8.15921 6.66667 10.0002C6.66667 11.8411 8.15905 13.3335 10 13.3335Z',
fill: 'currentColor',
}),
],
),
])
},
},
'right-outlined': {
iconReader: () => {
return h('i', [
@ -85,96 +45,4 @@ export default {
])
},
},
'app-folder-share-active': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M0.833334 3.33333C0.833334 2.8731 1.20643 2.5 1.66667 2.5H8.65164C8.96728 2.5 9.25583 2.67834 9.39699 2.96066L10 4.16667H18.3333C18.7936 4.16667 19.1667 4.53976 19.1667 5V16.6667C19.1667 17.1269 18.7936 17.5 18.3333 17.5H1.66667C1.20643 17.5 0.833334 17.1269 0.833334 16.6667V3.33333Z',
fill: '#3370FF',
}),
h('path', {
d: 'M10.5403 9.27428C10.505 9.15191 10.4861 9.02261 10.4861 8.88889C10.4861 8.12183 11.1079 7.5 11.875 7.5C12.6421 7.5 13.2639 8.12183 13.2639 8.88889C13.2639 9.65595 12.6421 10.2778 11.875 10.2778C11.492 10.2778 11.1451 10.1227 10.8939 9.87195L9.39028 10.7604C9.42555 10.8828 9.44444 11.0121 9.44444 11.1458C9.44444 11.2379 9.43549 11.3278 9.41841 11.4149L11.3337 12.3342C11.5885 12.0321 11.9697 11.8403 12.3958 11.8403C13.1629 11.8403 13.7847 12.4621 13.7847 13.2292C13.7847 13.9962 13.1629 14.6181 12.3958 14.6181C11.6288 14.6181 11.0069 13.9962 11.0069 13.2292C11.0069 13.1371 11.0159 13.0472 11.033 12.9601L9.11769 12.0408C8.86291 12.3429 8.48164 12.5347 8.05556 12.5347C7.28849 12.5347 6.66667 11.9129 6.66667 11.1458C6.66667 10.3788 7.28849 9.75694 8.05556 9.75694C8.43859 9.75694 8.78541 9.912 9.03667 10.1628L10.5403 9.27428Z',
fill: 'white',
}),
],
),
])
},
},
'app-folder-share': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M10.4015 9.13532C10.3663 9.01295 10.3474 8.88365 10.3474 8.74993C10.3474 7.98287 10.9692 7.36104 11.7363 7.36104C12.5033 7.36104 13.1251 7.98287 13.1251 8.74993C13.1251 9.51699 12.5033 10.1388 11.7363 10.1388C11.3532 10.1388 11.0064 9.98377 10.7551 9.733L9.25154 10.6215C9.2868 10.7439 9.3057 10.8732 9.3057 11.0069C9.3057 11.0989 9.29675 11.1889 9.27967 11.2759L11.195 12.1952C11.4497 11.8932 11.831 11.7013 12.2571 11.7013C13.0242 11.7013 13.646 12.3231 13.646 13.0902C13.646 13.8573 13.0242 14.4791 12.2571 14.4791C11.49 14.4791 10.8682 13.8573 10.8682 13.0902C10.8682 12.9982 10.8772 12.9082 10.8942 12.8212L8.97894 11.9019C8.72417 12.2039 8.3429 12.3958 7.91681 12.3958C7.14975 12.3958 6.52792 11.7739 6.52792 11.0069C6.52792 10.2398 7.14975 9.61799 7.91681 9.61799C8.29985 9.61799 8.64667 9.77304 8.89793 10.0238L10.4015 9.13532Z',
fill: '#1F2329',
}),
h('path', {
d: 'M0.833344 3.33333V16.6667C0.833344 17.1269 1.22421 17.5 1.70636 17.5H18.2937C18.7758 17.5 19.1667 17.1269 19.1667 16.6667V5C19.1667 4.53976 18.7758 4.16667 18.2937 4.16667H10L9.397 2.96066C9.25584 2.67834 8.96729 2.5 8.65165 2.5H1.66668C1.20644 2.5 0.833344 2.8731 0.833344 3.33333ZM2.50001 15.8333V5.83333H17.5V15.8333H2.50001Z',
fill: '#1F2329',
}),
],
),
])
},
},
'moments-categories': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M10.2239 2.22566L18.6144 7.56512C18.8717 7.72885 18.8717 8.10444 18.6144 8.26817L10.2239 13.6076C10.0874 13.6945 9.91296 13.6945 9.77647 13.6076L1.3859 8.26817C1.12861 8.10444 1.12861 7.72885 1.3859 7.56512L9.77647 2.22566C9.91296 2.13881 10.0874 2.13881 10.2239 2.22566ZM3.93789 7.91664L10.0002 11.7745L16.0625 7.91664L10.0002 4.05883L3.93789 7.91664Z',
fill: '#1F2329',
}),
h('path', {
d: 'M2.16387 11.5717C1.96769 11.4515 1.71114 11.513 1.59086 11.7092L1.15526 12.4196C1.03498 12.6158 1.0965 12.8723 1.29268 12.9926L8.92197 17.6705C9.45728 17.9987 10.1264 17.9987 10.6617 17.6705L18.291 12.9926C18.4871 12.8723 18.5487 12.6158 18.4284 12.4196L17.9928 11.7092C17.8725 11.513 17.6159 11.4515 17.4198 11.5717L9.90072 16.182C9.8339 16.223 9.74974 16.223 9.68292 16.182L2.16387 11.5717Z',
fill: '#1F2329',
}),
],
),
])
},
},
'close-outlined': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 16 16',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M8.00023 7.05718L12.4786 2.57883C12.6087 2.44866 12.8198 2.44866 12.95 2.57883L13.4214 3.05024C13.5516 3.18041 13.5516 3.39147 13.4214 3.52164L8.94304 7.99998L13.4214 12.4783C13.5516 12.6085 13.5516 12.8196 13.4214 12.9497L12.95 13.4211C12.8198 13.5513 12.6087 13.5513 12.4786 13.4211L8.00023 8.94279L3.52189 13.4211C3.39171 13.5513 3.18066 13.5513 3.05048 13.4211L2.57908 12.9497C2.4489 12.8196 2.4489 12.6085 2.57908 12.4783L7.05742 7.99998L2.57908 3.52164C2.4489 3.39147 2.4489 3.18041 2.57908 3.05024L3.05048 2.57883C3.18066 2.44866 3.39171 2.44866 3.52189 2.57883L8.00023 7.05718Z',
fill: '#8F959E',
}),
],
),
])
},
},
}

View File

@ -54,6 +54,54 @@ export default {
])
},
},
'app-shared-active': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M0.833334 3.33333C0.833334 2.8731 1.20643 2.5 1.66667 2.5H8.65164C8.96728 2.5 9.25583 2.67834 9.39699 2.96066L10 4.16667H18.3333C18.7936 4.16667 19.1667 4.53976 19.1667 5V16.6667C19.1667 17.1269 18.7936 17.5 18.3333 17.5H1.66667C1.20643 17.5 0.833334 17.1269 0.833334 16.6667V3.33333Z',
fill: 'currentColor',
}),
h('path', {
d: 'M10.5403 9.27428C10.505 9.15191 10.4861 9.02261 10.4861 8.88889C10.4861 8.12183 11.1079 7.5 11.875 7.5C12.6421 7.5 13.2639 8.12183 13.2639 8.88889C13.2639 9.65595 12.6421 10.2778 11.875 10.2778C11.492 10.2778 11.1451 10.1227 10.8939 9.87195L9.39028 10.7604C9.42555 10.8828 9.44444 11.0121 9.44444 11.1458C9.44444 11.2379 9.43549 11.3278 9.41841 11.4149L11.3337 12.3342C11.5885 12.0321 11.9697 11.8403 12.3958 11.8403C13.1629 11.8403 13.7847 12.4621 13.7847 13.2292C13.7847 13.9962 13.1629 14.6181 12.3958 14.6181C11.6288 14.6181 11.0069 13.9962 11.0069 13.2292C11.0069 13.1371 11.0159 13.0472 11.033 12.9601L9.11769 12.0408C8.86291 12.3429 8.48164 12.5347 8.05556 12.5347C7.28849 12.5347 6.66667 11.9129 6.66667 11.1458C6.66667 10.3788 7.28849 9.75694 8.05556 9.75694C8.43859 9.75694 8.78541 9.912 9.03667 10.1628L10.5403 9.27428Z',
fill: 'currentColor',
}),
],
),
])
},
},
'app-shared': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M10.4015 9.13532C10.3663 9.01295 10.3474 8.88365 10.3474 8.74993C10.3474 7.98287 10.9692 7.36104 11.7363 7.36104C12.5033 7.36104 13.1251 7.98287 13.1251 8.74993C13.1251 9.51699 12.5033 10.1388 11.7363 10.1388C11.3532 10.1388 11.0064 9.98377 10.7551 9.733L9.25154 10.6215C9.2868 10.7439 9.3057 10.8732 9.3057 11.0069C9.3057 11.0989 9.29675 11.1889 9.27967 11.2759L11.195 12.1952C11.4497 11.8932 11.831 11.7013 12.2571 11.7013C13.0242 11.7013 13.646 12.3231 13.646 13.0902C13.646 13.8573 13.0242 14.4791 12.2571 14.4791C11.49 14.4791 10.8682 13.8573 10.8682 13.0902C10.8682 12.9982 10.8772 12.9082 10.8942 12.8212L8.97894 11.9019C8.72417 12.2039 8.3429 12.3958 7.91681 12.3958C7.14975 12.3958 6.52792 11.7739 6.52792 11.0069C6.52792 10.2398 7.14975 9.61799 7.91681 9.61799C8.29985 9.61799 8.64667 9.77304 8.89793 10.0238L10.4015 9.13532Z',
fill: 'currentColor',
}),
h('path', {
d: 'M0.833344 3.33333V16.6667C0.833344 17.1269 1.22421 17.5 1.70636 17.5H18.2937C18.7758 17.5 19.1667 17.1269 19.1667 16.6667V5C19.1667 4.53976 18.7758 4.16667 18.2937 4.16667H10L9.397 2.96066C9.25584 2.67834 8.96729 2.5 8.65165 2.5H1.66668C1.20644 2.5 0.833344 2.8731 0.833344 3.33333ZM2.50001 15.8333V5.83333H17.5V15.8333H2.50001Z',
fill: 'currentColor',
}),
],
),
])
},
},
'app-setting': {
iconReader: () => {
return h('i', [
@ -93,5 +141,5 @@ export default {
),
])
},
}
},
}

View File

@ -35,7 +35,7 @@ import FormItem from '@/components/dynamics-form/FormItem.vue'
import type { FormField } from '@/components/dynamics-form/type'
import { ref, onBeforeMount, watch, type Ref } from 'vue'
import type { FormInstance } from 'element-plus'
import triggerApi from '@/api/model/provider'
import { get } from '@/request/index'
import type Result from '@/request/Result'
import _ from 'lodash'
@ -56,7 +56,7 @@ const props = withDefaults(
modelValue?: Dict<any>
}>(),
{ view: false, defaultItemWidth: '75%', otherParams: () => {} }
{ view: false, defaultItemWidth: '75%', otherParams: () => {} },
)
const formValue = ref<Dict<any>>({})
@ -108,7 +108,7 @@ watch(
() => {
emit('update:modelValue', formValue.value)
},
{ deep: true }
{ deep: true },
)
/**
@ -117,25 +117,6 @@ watch(
* @param loading
*/
const trigger = (field: FormField, loading: Ref<boolean>) => {
if (field.provider && field.method) {
return triggerApi
.trigger(
field.provider,
field.method,
{
...props.otherParams,
...formValue.value
},
loading
)
.then((ok) => {
if (field.trigger_type === 'CHILD_FORMS') {
field.children = ok.data as Array<FormField>
} else {
field.option_list = ok.data as Array<any>
}
})
}
return Promise.resolve([])
}
/**
@ -161,10 +142,10 @@ onBeforeMount(() => {
const render = (
render_data: string | Array<FormField> | Promise<Result<Array<FormField>>>,
data?: Dict<any>
data?: Dict<any>,
) => {
if (typeof render_data == 'string') {
triggerApi.get(render_data, {}, loading).then((ok) => {
get(render_data, {}, loading).then((ok) => {
formFieldList.value = ok.data
})
} else if (render_data instanceof Array) {
@ -213,7 +194,7 @@ const render = (
const validate = () => {
return Promise.all([
...formFieldRef.value.map((item) => item.validate()),
ruleFormRef.value ? ruleFormRef.value.validate() : Promise.resolve()
ruleFormRef.value ? ruleFormRef.value.validate() : Promise.resolve(),
])
}
@ -222,7 +203,7 @@ defineExpose({
initDefaultData,
validate,
render,
ruleFormRef
ruleFormRef,
})
</script>
<style lang="scss" scoped></style>

View File

@ -13,7 +13,7 @@
class="shared-button flex cursor"
:class="currentNodeKey === 'share' && 'active'"
>
<AppIcon iconName="app-folder-share-active" style="font-size: 18px"></AppIcon>
<AppIcon iconName="app-shared-active" style="font-size: 18px"></AppIcon>
<span class="ml-8 lighter">{{ shareTitle }}</span>
</div>
<div class="tree-height border-t" :style="treeStyle">

View File

@ -89,5 +89,11 @@ export default {
otherSetting: 'Other Settings',
username: 'username',
importCreate: 'Import Create',
detail: 'Detail'
detail: 'Detail',
selected: 'Selected',
notFound: {
title: '404',
message: 'Unable to Access APP',
operate: 'Back to Home',
},
}

View File

@ -130,8 +130,6 @@ export default {
dialog: {
addKnowledge: 'Add Related Knowledge',
addKnowledgePlaceholder: 'The selected knowledge must use the same embedding model',
selected: 'Selected',
selectSearchMode: 'Retrieval Mode',
vectorSearch: 'Vector Search',
vectorSearchTooltip:

View File

@ -2,7 +2,6 @@ export default {
uploadDocument: 'Upload Document',
importDocument: 'Import Document',
syncDocument: 'Sync Document',
selected: 'Selected',
items: 'Items',
migrateDocument: 'Migrate to',
searchBar: {

View File

@ -1,40 +1,40 @@
import notFound from './404'
import application from './application'
import role from './role'
import workspace from './workspace'
import applicationOverview from './application-overview'
import login from './login'
import model from './model'
import knowledge from './knowledge'
import system from './system'
import tool from './tool'
import document from './document'
import system from './system'
import userManage from './user-manage'
import resourceAuthorization from './resource-authorization'
import model from './model'
import document from './document'
import paragraph from './paragraph'
import role from './role'
import workspace from './workspace'
import application from './application'
import problem from './problem'
import applicationOverview from './application-overview'
import applicationWorkflow from './application-workflow'
import paragraph from './paragraph'
import chatLog from './chat-log'
import chatUser from './chat-user'
import applicationWorkflow from './application-workflow'
import login from './login'
import operateLog from './operate-log'
import shared from './shared'
export default {
notFound,
application,
applicationOverview,
system,
tool,
userManage,
resourceAuthorization,
login,
model,
knowledge,
applicationWorkflow,
tool,
document,
paragraph,
problem,
chatLog,
login,
operateLog,
system,
userManage,
resourceAuthorization,
role,
workspace,
chatUser
application,
problem,
applicationOverview,
applicationWorkflow,
paragraph,
chatLog,
chatUser,
operateLog,
shared
}

View File

@ -0,0 +1,8 @@
export default {
title: 'Shared',
shared_resources: 'Shared Resources',
shared_tool: 'Shared Tool',
shared_model: 'Shared Model',
shared_knowledge: 'Shared Knowledge',
authorized_workspace: 'Authorize Workspace',
}

View File

@ -94,48 +94,6 @@ export default {
access: 'Access',
},
},
theme: {
title: 'Appearance Settings',
platformDisplayTheme: 'Platform Display Theme',
customTheme: 'Custom Theme',
platformLoginSettings: 'Platform Login Settings',
custom: 'Custom',
pagePreview: 'Page Preview',
default: 'Default',
restoreDefaults: 'Restore Defaults',
orange: 'Orange',
green: 'Green',
purple: 'Purole',
red: 'Red',
loginBackground: 'Login Background',
loginLogo: 'Login Logo',
websiteLogo: 'Website Logo',
replacePicture: 'Replace Picture',
websiteLogoTip:
'The logo displayed on the top of the website. The recommended size is 48*48. It supports JPG, PNG, and GIF formats, with a size not exceeding 10MB.',
loginLogoTip:
'Login page right-side logo. Recommended size is 204*52. Supports JPG, PNG, GIF formats, with a maximum file size of 10 MB.',
loginBackgroundTip:
'Left background image, vector image recommended size 576 * 900, bitmap recommended size 1152 * 1800; Supports JPG, PNG, GIF, with a size not exceeding 10 MB.',
websiteName: 'Website Name',
websiteNamePlaceholder: 'Please enter the WebsiteName',
websiteNameTip: 'The platform name displayed on the web page tab.',
websiteSlogan: 'Welcome Slogan',
websiteSloganPlaceholder: 'Please enter the Welcome Slogan',
websiteSloganTip: 'Welcome message under the product logo',
defaultSlogan: 'Welcome to MaxKB Open Source AI Assistant',
logoDefaultTip: 'Default is MaxKB login interface, supports custom settings',
defaultTip: 'Default is MaxKB platform interface, supports custom settings',
platformSetting: 'Platform Setting',
showUserManual: 'Show User Manual',
showForum: 'Show Forum',
showProject: 'Show Project Address',
urlPlaceholder: 'Please enter URL address',
abandonUpdate: 'Abandon Update',
saveAndApply: 'Save and Apply',
fileMessageError: 'The file size exceeds 10M',
saveSuccess: 'Appearance setting successful',
},
email: {
title: 'Email Settings',
smtpHost: 'SMTP Host',
@ -151,43 +109,6 @@ export default {
enableSSL: 'Enable SSL (if the SMTP port is 465, you usually need to enable SSL)',
enableTLS: 'Enable TLS (if the SMTP port is 587, you usually need to enable TLS)',
},
group: {
title: 'Team Member',
member: 'Member',
manage: 'Owner',
permissionSetting: 'Permission Setting',
addMember: 'Add Member',
addSubTitle: 'Members can access the data authorized by you after logging in',
searchBar: {
placeholder: 'Please enter username to search',
},
delete: {
button: 'Remove',
confirmTitle: 'Wheather to remove the member:',
confirmMessage:
"After removal, the member's knowledge base and application permissions will be revoked.",
},
setting: {
management: 'manegement',
check: 'check',
},
form: {
userName: {
label: 'Username/Email',
placeholder: "Please enter the member's username or email",
requiredMessage: 'Please enter Username/Email',
},
},
},
shared: {
label: 'Shared',
shared_resources: 'Shared Resources',
shared_tool: 'Shared Tool',
shared_model: 'Shared Model',
shared_knowledge: 'Shared Knowledge',
authorized_workspace: 'Authorize Workspace',
},
resource_management: {
label: 'Resource Management',
},

View File

@ -93,5 +93,11 @@ export default {
otherSetting: '其他设置',
username: '用户名',
importCreate: '导入创建',
detail: '详情'
detail: '详情',
selected: '已选',
notFound: {
title: '404',
message: '无法访问应用',
operate: '返回首页',
},
}

View File

@ -121,8 +121,6 @@ export default {
dialog: {
addKnowledge: '添加关联知识库',
addKnowledgePlaceholder: '所选知识库必须使用相同的 Embedding 模型',
selected: '已选',
selectSearchMode: '检索模式',
vectorSearch: '向量检索',
vectorSearchTooltip: '向量检索是一种基于向量相似度的检索方式,适用于知识库中的大数据量场景。',

View File

@ -2,7 +2,6 @@ export default {
uploadDocument: '上传文档',
importDocument: '导入文档',
syncDocument: '同步文档',
selected: '已选',
items: '项',
migrateDocument: '文档迁移到',
searchBar: {

View File

@ -15,9 +15,8 @@ import applicationWorkflow from './application-workflow'
import paragraph from './paragraph'
import chatLog from './chat-log'
import chatUser from './chat-user'
// import notFound from './404'
import operateLog from './operate-log'
import shared from './shared'
export default {
login,
model,
@ -36,7 +35,6 @@ export default {
paragraph,
chatLog,
chatUser,
// notFound,
operateLog
operateLog,
shared
}

View File

@ -1,5 +1,3 @@
import role from './role'
export default {
title: '资源授权',
member: '成员',

View File

@ -0,0 +1,8 @@
export default {
title: '共享',
shared_resources: '共享资源',
shared_tool: '共享工具',
shared_model: '共享模型',
shared_knowledge: '共享知识库',
authorized_workspace: '授权工作空间',
}

View File

@ -94,46 +94,6 @@ export default {
access: '接入',
},
},
theme: {
title: '外观设置',
platformDisplayTheme: '平台显示主题',
customTheme: '自定义主题',
platformLoginSettings: '平台登录设置',
custom: '自定义',
pagePreview: '页面预览',
default: '默认',
restoreDefaults: '恢复默认',
orange: '活力橙',
green: '松石绿',
purple: '神秘紫',
red: '胭脂红',
loginBackground: '登录背景图',
loginLogo: '登录 Logo',
websiteLogo: '网站 Logo',
replacePicture: '替换图片',
websiteLogoTip: '顶部网站显示的 Logo建议尺寸 48*48支持 JPG、PNG、GIF大小不超过 10MB',
loginLogoTip: '登录页面右侧 Logo建议尺寸 204*52支持 JPG、PNG、GIF大小不超过 10 MB',
loginBackgroundTip:
'左侧背景图,矢量图建议尺寸 576*900位图建议尺寸 1152*1800支持 JPG、PNG、GIF大小不超过 10 MB',
websiteName: '网站名称',
websiteNamePlaceholder: '请输入网站名称',
websiteNameTip: '显示在网页 Tab 的平台名称',
websiteSlogan: '欢迎语',
websiteSloganPlaceholder: '请输入欢迎语',
websiteSloganTip: '产品 Logo 下的欢迎语',
defaultSlogan: '欢迎使用 MaxKB 开源 AI 助手',
logoDefaultTip: '默认为 MaxKB 登录界面,支持自定义设置',
defaultTip: '默认为 MaxKB 平台界面,支持自定义设置',
platformSetting: '平台设置',
showUserManual: '显示用户手册',
showForum: '显示论坛求助',
showProject: '显示项目地址',
urlPlaceholder: '请输入 URL 地址',
abandonUpdate: '放弃更新',
saveAndApply: '保存并应用',
fileMessageError: '文件大小超过 10M',
saveSuccess: '外观设置成功',
},
email: {
title: '邮箱设置',
smtpHost: 'SMTP Host',
@ -149,42 +109,6 @@ export default {
enableSSL: '启用 SSL如果 SMTP 端口是 465通常需要启用 SSL',
enableTLS: '启用 TLS如果 SMTP 端口是 587通常需要启用 TLS',
},
group: {
title: '团队成员',
member: '成员',
manage: '所有者',
permissionSetting: '权限设置',
addMember: '添加成员',
addSubTitle: '成员登录后可以访问到您授权的数据。',
searchBar: {
placeholder: '请输入用户名搜索',
},
delete: {
button: '移除',
confirmTitle: '是否移除成员:',
confirmMessage: '移除后将会取消成员拥有的知识库和应用权限。',
},
setting: {
management: '管理',
check: '查看',
},
form: {
userName: {
label: '用户名/邮箱',
placeholder: '请输入成员的用户名或邮箱',
requiredMessage: '请输入用户名/邮箱',
},
},
},
shared: {
label: '共享',
shared_resources: '共享资源',
shared_tool: '共享工具',
shared_model: '共享模型',
shared_knowledge: '共享知识库',
authorized_workspace: '授权工作空间',
},
resource_management: {
label: '资源管理',
},

View File

@ -89,5 +89,11 @@ export default {
otherSetting: '其他設定',
username: '用戶名',
importCreate: '導入創建',
detail: '详情'
detail: '详情',
selected: '已選',
notFound: {
title: '404',
message: '無法訪問應用',
operate: '返回首頁',
},
}

View File

@ -1,5 +0,0 @@
export default {
title: '404',
message: '無法訪問應用',
operate: '返回首頁'
}

View File

@ -121,7 +121,6 @@ export default {
dialog: {
addKnowledge: '新增關聯知識庫',
addKnowledgePlaceholder: '所選知識庫必須使用相同的 Embedding 模型',
selected: '已選',
selectSearchMode: '檢索模式',
vectorSearch: '向量檢索',

View File

@ -2,7 +2,6 @@ export default {
uploadDocument: '上傳文檔',
importDocument: '導入文檔',
syncDocument: '同步文檔',
selected: '已選',
items: '項',
migrateDocument: '文檔遷移到',
searchBar: {

View File

@ -1,4 +1,3 @@
import notFound from './404'
import application from './application'
import role from './role'
import workspace from './workspace'
@ -17,8 +16,8 @@ import chatUser from './chat-user'
import applicationWorkflow from './application-workflow'
import login from './login'
import operateLog from './operate-log'
import shared from './shared'
export default {
notFound,
application,
applicationOverview,
system,
@ -36,5 +35,6 @@ export default {
operateLog,
role,
workspace,
chatUser
chatUser,
shared
}

View File

@ -0,0 +1,8 @@
export default {
title: '共享',
shared_resources: '共享资源',
shared_tool: '共享工具',
shared_model: '共享模型',
shared_knowledge: '共享知识库',
authorized_workspace: '授权工作区',
}

View File

@ -110,14 +110,7 @@ export default {
enableSSL: '啟用 SSL如果 SMTP 端口是 465通常需要啟用 SSL',
enableTLS: '啟用 TLS如果 SMTP 端口是 587通常需要啟用 TLS',
},
shared: {
label: '共享',
shared_resources: '共享资源',
shared_tool: '共享工具',
shared_model: '共享模型',
shared_knowledge: '共享知识库',
authorized_workspace: '授权工作区',
},
resource_management: {
label: '资源管理',
},

View File

@ -75,8 +75,8 @@ const systemRouter = {
// path: '/system/resource-management',
// name: 'resourceManagement',
// meta: {
// icon: 'app-folder-share',
// iconActive: 'app-folder-share-active',
// icon: 'app-shared',
// iconActive: 'app-shared-active',
// title: 'views.system.resource_management.label',
// activeMenu: '/system',
// parentPath: '/system',
@ -124,9 +124,9 @@ const systemRouter = {
path: '/system/shared',
name: 'shared',
meta: {
icon: 'app-folder-share',
iconActive: 'app-folder-share-active',
title: 'views.system.shared.shared_resources',
icon: 'app-shared',
iconActive: 'app-shared-active',
title: 'views.shared.shared_resources',
activeMenu: '/system',
parentPath: '/system',
parentName: 'system',
@ -196,8 +196,8 @@ const systemRouter = {
path: '/system/chat',
name: 'SystemChat',
meta: {
icon: 'app-folder-share',
iconActive: 'app-folder-share-active',
icon: 'app-shared',
iconActive: 'app-shared-active',
title: 'views.chatUser.title',
activeMenu: '/system',
parentPath: '/system',
@ -287,7 +287,7 @@ const systemRouter = {
path: '/system/setting/theme',
name: 'theme',
meta: {
title: 'views.system.theme.title',
title: 'theme.title',
activeMenu: '/system',
parentPath: '/system',
parentName: 'system',

View File

@ -202,3 +202,10 @@
content: '';
}
}
// checkbox 一行一个样式
.checkbox-group-block {
.el-checkbox {
display: block;
}
}

View File

@ -2,8 +2,8 @@
<el-row class="not-found-container">
<el-col class="img" :xs="0" :sm="0" :md="12" :lg="12" :xl="12"> </el-col>
<el-col class="message-container" :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="title">{{ $t('views.notFound.title') }}</div>
<div class="message">{{ $t('views.notFound.message') }}</div>
<div class="title">{{ $t('views.common.notFound.title') }}</div>
<div class="message">{{ $t('views.common.notFound.message') }}</div>
<!-- TODO 暂时不处理 -->
<!-- <div class="operate"><el-button type="primary" @click="router.push('/')">{{ $t('views.notFound.operate') }}</el-button></div> -->
</el-col>

View File

@ -435,7 +435,6 @@ import AIModeParamSettingDialog from './component/AIModeParamSettingDialog.vue'
import ParamSettingDialog from './component/ParamSettingDialog.vue'
import AddKnowledgeDialog from './component/AddKnowledgeDialog.vue'
import EditAvatarDialog from '@/views/application-overview/component/EditAvatarDialog.vue'
import modelAPI from '@/api/model/model.ts'
import type { FormInstance, FormRules } from 'element-plus'
import type { ApplicationFormType } from '@/api/type/application'
import { relatedObject } from '@/utils/utils'
@ -444,14 +443,12 @@ import useStore from '@/stores'
import { t } from '@/locales'
import TTSModeParamSettingDialog from './component/TTSModeParamSettingDialog.vue'
import ReasoningParamSettingDialog from './component/ReasoningParamSettingDialog.vue'
import { PermissionConst, RoleConst } from '@/utils/permission/data'
import { hasPermission } from '@/utils/permission/index'
import permissionMap from '@/permission'
const route = useRoute()
const apiType = computed<'workspace'>(() => {
return 'workspace'
return 'workspace'
})
const permissionPrecise = computed(() => {
return permissionMap['application'][apiType.value]
@ -652,8 +649,8 @@ function getKnowledge() {
function getSelectModel() {
loading.value = true
modelAPI
.getSelectModelList({ model_type: 'LLM' })
model
.asyncGetSelectModel({ model_type: 'LLM' })
.then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
loading.value = false
@ -665,8 +662,8 @@ function getSelectModel() {
function getSTTModel() {
loading.value = true
modelAPI
.getSelectModelList({ model_type: 'STT' })
model
.asyncGetSelectModel({ model_type: 'STT' })
.then((res: any) => {
sttModelOptions.value = groupBy(res?.data, 'provider')
loading.value = false
@ -678,8 +675,8 @@ function getSTTModel() {
function getTTSModel() {
loading.value = true
modelAPI
.getSelectModelList({ model_type: 'TTS' })
model
.asyncGetSelectModel({ model_type: 'TTS' })
.then((res: any) => {
ttsModelOptions.value = groupBy(res?.data, 'provider')
loading.value = false

View File

@ -45,7 +45,7 @@
v-loading="folderLoading"
:canOperation="false"
showShared
:shareTitle="$t('views.system.shared.shared_knowledge')"
:shareTitle="$t('views.shared.shared_knowledge')"
:treeStyle="{ height: 'calc(100vh - 320px)' }"
/>
</template>
@ -78,7 +78,7 @@
<div class="flex-between">
<div class="flex">
<el-text type="info" class="color-secondary mr-8" v-if="checkList.length > 0">
{{ $t('views.application.dialog.selected') }} {{ checkList.length }}
{{ $t('common.selected') }} {{ checkList.length }}
</el-text>
<el-button link type="primary" v-if="checkList.length > 0" @click="clearCheck">
{{ $t('common.clear') }}

View File

@ -43,7 +43,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import type { FormField } from '@/components/dynamics-form/type'
import modelAPi from '@/api/model/model'
import ModelAPI from '@/api/model/model'
import applicationApi from '@/api/application/application'
import DynamicsForm from '@/components/dynamics-form/index.vue'
import { useRoute } from 'vue-router'
@ -63,7 +63,7 @@ const playLoading = ref(false)
const getApi = (model_id: string, application_id?: string) => {
return application_id
? applicationApi.getModelParamsForm(application_id, model_id, loading)
: modelAPi.getModelParamsForm(model_id, loading)
: ModelAPI.getModelParamsForm(model_id, loading)
}
const open = (model_id: string, application_id?: string, model_setting_data?: any) => {
form_data.value = {}

View File

@ -565,7 +565,7 @@
{{ $t('views.document.setting.cancelGenerate') }}
</el-button>
<el-text type="info" class="secondary ml-24">
{{ $t('views.document.selected') }} {{ multipleSelection.length }}
{{ $t('common.selected') }} {{ multipleSelection.length }}
{{ $t('views.document.items') }}
</el-text>
<el-button class="ml-16" type="primary" link @click="clearSelection">

View File

@ -191,7 +191,7 @@
</template>
<template #tag>
<el-tag v-if="isShared || isSystemShare" type="info" class="info-tag">
{{ t('views.system.shared.label') }}
{{ t('views.shared.title') }}
</el-tag>
</template>
<template #footer>
@ -246,7 +246,7 @@
v-if="isSystemShare"
icon="Lock"
@click.stop="openAuthorizedWorkspaceDialog(item)"
>{{ $t('views.system.shared.authorized_workspace') }}</el-dropdown-item
>{{ $t('views.shared.authorized_workspace') }}</el-dropdown-item
>
<el-dropdown-item
icon="Setting"

View File

@ -8,7 +8,7 @@
:currentNodeKey="currentFolder?.id"
@handleNodeClick="folderClickHandel"
class="p-8"
:shareTitle="$t('views.system.shared.shared_knowledge')"
:shareTitle="$t('views.shared.shared_knowledge')"
:showShared="permissionPrecise['is_share']()"
@refreshTree="refreshFolder"
/>

View File

@ -2,7 +2,7 @@
<login-layout v-if="!loading" v-loading="loading || sendLoading">
<LoginContainer
:subTitle="
theme.themeInfo?.slogan ? theme.themeInfo?.slogan : $t('views.system.theme.defaultSlogan')
theme.themeInfo?.slogan ? theme.themeInfo?.slogan : $t('theme.defaultSlogan')
"
>
<h2 class="mb-24">{{ $t('views.login.forgotPassword') }}</h2>

View File

@ -29,7 +29,7 @@
</template>
<template #tag>
<el-tag v-if="isShared || isSystemShare" type="info" class="info-tag">
{{ t('views.system.shared.label') }}
{{ t('views.shared.title') }}
</el-tag>
</template>
<ul>
@ -83,7 +83,7 @@
v-if="isSystemShare"
icon="Lock"
@click.stop="openAuthorizedWorkspaceDialog(model)"
>{{ $t('views.system.shared.authorized_workspace') }}</el-dropdown-item
>{{ $t('views.shared.authorized_workspace') }}</el-dropdown-item
>
<el-dropdown-item

View File

@ -8,8 +8,8 @@
v-if="showShared && hasPermission(EditionConst.IS_EE, 'OR')"
:class="active?.provider === 'share' && 'active'"
>
<AppIcon iconName="app-folder-share-active" style="font-size: 18px"></AppIcon>
<span class="ml-8 lighter">{{ $t('views.system.shared.shared_model') }}</span>
<AppIcon iconName="app-shared-active" style="font-size: 18px"></AppIcon>
<span class="ml-8 lighter">{{ $t('views.shared.shared_model') }}</span>
</div>
<div
class="all-mode flex cursor"
@ -145,7 +145,7 @@ const clickListHandle = (item: Provider) => {
}
const handleSharedNodeClick = () => {
emit('click', { provider: 'share', name: t('views.system.shared.shared_model') })
emit('click', { provider: 'share', name: t('views.shared.shared_model') })
}
</script>
<style lang="scss" scoped>

View File

@ -131,7 +131,7 @@
{{ $t('common.delete') }}
</el-button>
<span class="ml-8">
{{ $t('views.document.selected') }} {{ multipleSelection.length }}
{{ $t('common.selected') }} {{ multipleSelection.length }}
{{ $t('views.document.items') }}
</span>
</div>

View File

@ -1,9 +1,9 @@
<template>
<div class="theme-setting p-16-24" v-loading="loading">
<h4 class="mb-16">{{ $t('views.system.theme.title') }}</h4>
<h4 class="mb-16">{{ $t('theme.title') }}</h4>
<el-scrollbar>
<el-card style="--el-card-padding: 16px">
<h5 class="mb-16">{{ $t('views.system.theme.platformDisplayTheme') }}</h5>
<h5 class="mb-16">{{ $t('theme.platformDisplayTheme') }}</h5>
<el-radio-group
v-model="themeRadio"
class="app-radio-button-group"
@ -12,21 +12,21 @@
<template v-for="(item, index) in themeList" :key="index">
<el-radio-button :label="item.label" :value="item.value" />
</template>
<el-radio-button :label="$t('views.system.theme.custom')" value="custom" />
<el-radio-button :label="$t('theme.custom')" value="custom" />
</el-radio-group>
<div v-if="themeRadio === 'custom'">
<h5 class="mt-16 mb-8">{{ $t('views.system.theme.customTheme') }}</h5>
<h5 class="mt-16 mb-8">{{ $t('theme.customTheme') }}</h5>
<el-color-picker v-model="customColor" @change="customColorHandle" />
</div>
</el-card>
<el-card style="--el-card-padding: 16px" class="mt-16">
<h5 class="mb-16">{{ $t('views.system.theme.platformLoginSettings') }}</h5>
<h5 class="mb-16">{{ $t('theme.platformLoginSettings') }}</h5>
<el-card shadow="never" class="layout-bg">
<div class="flex-between">
<h5 class="mb-16">{{ $t('views.system.theme.pagePreview') }}</h5>
<h5 class="mb-16">{{ $t('theme.pagePreview') }}</h5>
<el-button type="primary" link @click="resetForm('login')">
{{ $t('views.system.theme.restoreDefaults') }}
{{ $t('theme.restoreDefaults') }}
</el-button>
</div>
<el-scrollbar>
@ -39,7 +39,7 @@
<div class="theme-form">
<el-card shadow="never" class="mb-8">
<div class="flex-between mb-8">
<span class="lighter">{{ $t('views.system.theme.websiteLogo') }}</span>
<span class="lighter">{{ $t('theme.websiteLogo') }}</span>
<el-upload
ref="uploadRef"
action="#"
@ -51,17 +51,17 @@
"
>
<el-button size="small">
{{ $t('views.system.theme.replacePicture') }}
{{ $t('theme.replacePicture') }}
</el-button>
</el-upload>
</div>
<el-text type="info" size="small"
>{{ $t('views.system.theme.websiteLogoTip') }}
>{{ $t('theme.websiteLogoTip') }}
</el-text>
</el-card>
<el-card shadow="never" class="mb-8">
<div class="flex-between mb-8">
<span class="lighter"> {{ $t('views.system.theme.loginLogo') }}</span>
<span class="lighter"> {{ $t('theme.loginLogo') }}</span>
<el-upload
ref="uploadRef"
action="#"
@ -73,17 +73,17 @@
"
>
<el-button size="small">
{{ $t('views.system.theme.replacePicture') }}
{{ $t('theme.replacePicture') }}
</el-button>
</el-upload>
</div>
<el-text type="info" size="small"
>{{ $t('views.system.theme.loginLogoTip') }}
>{{ $t('theme.loginLogoTip') }}
</el-text>
</el-card>
<el-card shadow="never" class="mb-8">
<div class="flex-between mb-8">
<span class="lighter">{{ $t('views.system.theme.loginBackground') }}</span>
<span class="lighter">{{ $t('theme.loginBackground') }}</span>
<el-upload
ref="uploadRef"
action="#"
@ -95,12 +95,12 @@
"
>
<el-button size="small">
{{ $t('views.system.theme.replacePicture') }}
{{ $t('theme.replacePicture') }}
</el-button>
</el-upload>
</div>
<el-text type="info" size="small">
{{ $t('views.system.theme.loginBackgroundTip') }}
{{ $t('theme.loginBackgroundTip') }}
</el-text>
</el-card>
@ -112,26 +112,26 @@
:rules="rules"
@submit.prevent
>
<el-form-item :label="$t('views.system.theme.websiteName')" prop="title">
<el-form-item :label="$t('theme.websiteName')" prop="title">
<el-input
v-model="themeForm.title"
:placeholder="$t('views.system.theme.websiteNamePlaceholder')"
:placeholder="$t('theme.websiteNamePlaceholder')"
>
</el-input>
<el-text type="info"
>{{ $t('views.system.theme.websiteNameTip') }}
>{{ $t('theme.websiteNameTip') }}
</el-text>
</el-form-item>
<el-form-item :label="$t('views.system.theme.websiteSlogan')" prop="slogan">
<el-form-item :label="$t('theme.websiteSlogan')" prop="slogan">
<el-input
v-model="themeForm.slogan"
:placeholder="$t('views.system.theme.websiteSloganPlaceholder')"
:placeholder="$t('theme.websiteSloganPlaceholder')"
maxlength="64"
show-word-limit
>
</el-input>
<el-text type="info"
>{{ $t('views.system.theme.websiteSloganTip') }}
>{{ $t('theme.websiteSloganTip') }}
</el-text>
</el-form-item>
</el-form>
@ -141,17 +141,17 @@
</div>
</el-scrollbar>
<div class="mt-16">
<el-text type="info">{{ $t('views.system.theme.logoDefaultTip') }}</el-text>
<el-text type="info">{{ $t('theme.logoDefaultTip') }}</el-text>
</div>
</el-card>
</el-card>
<el-card style="--el-card-padding: 16px" class="mt-16">
<h5 class="mb-16">{{ $t('views.system.theme.platformSetting') }}</h5>
<h5 class="mb-16">{{ $t('theme.platformSetting') }}</h5>
<el-card shadow="never" class="layout-bg">
<div class="flex-between">
<h5 class="mb-16">{{ $t('views.system.theme.pagePreview') }}</h5>
<h5 class="mb-16">{{ $t('theme.pagePreview') }}</h5>
<el-button type="primary" link @click="resetForm('platform')">
{{ $t('views.system.theme.restoreDefaults') }}
{{ $t('theme.restoreDefaults') }}
</el-button>
</div>
<el-scrollbar>
@ -198,36 +198,36 @@
<div>
<el-checkbox
v-model="themeForm.showUserManual"
:label="$t('views.system.theme.showUserManual')"
:label="$t('theme.showUserManual')"
/>
<div class="ml-24">
<el-input
v-model="themeForm.userManualUrl"
:placeholder="$t('views.system.theme.urlPlaceholder')"
:placeholder="$t('theme.urlPlaceholder')"
/>
</div>
</div>
<div class="mt-4">
<el-checkbox
v-model="themeForm.showForum"
:label="$t('views.system.theme.showForum')"
:label="$t('theme.showForum')"
/>
<div class="ml-24">
<el-input
v-model="themeForm.forumUrl"
:placeholder="$t('views.system.theme.urlPlaceholder')"
:placeholder="$t('theme.urlPlaceholder')"
/>
</div>
</div>
<div class="mt-4">
<el-checkbox
v-model="themeForm.showProject"
:label="$t('views.system.theme.showProject')"
:label="$t('theme.showProject')"
/>
<div class="ml-24">
<el-input
v-model="themeForm.projectUrl"
:placeholder="$t('views.system.theme.urlPlaceholder')"
:placeholder="$t('theme.urlPlaceholder')"
/>
</div>
</div>
@ -237,15 +237,15 @@
</div>
</el-scrollbar>
<div class="mt-16">
<el-text type="info">{{ $t('views.system.theme.defaultTip') }}</el-text>
<el-text type="info">{{ $t('theme.defaultTip') }}</el-text>
</div>
</el-card>
</el-card>
</el-scrollbar>
<div class="theme-setting__operate w-full p-16-24">
<el-button @click="resetTheme">{{ $t('views.system.theme.abandonUpdate') }}</el-button>
<el-button @click="resetTheme">{{ $t('theme.abandonUpdate') }}</el-button>
<el-button type="primary" @click="updateTheme(themeFormRef)">
{{ $t('views.system.theme.saveAndApply') }}
{{ $t('theme.saveAndApply') }}
</el-button>
</div>
</div>
@ -284,7 +284,7 @@ const themeForm = ref<any>({
loginLogo: '',
loginImage: '',
title: 'MaxKB',
slogan: t('views.system.theme.defaultSlogan'),
slogan: t('theme.defaultSlogan'),
...defaultPlatformSetting,
})
const themeRadio = ref('')
@ -292,10 +292,10 @@ const customColor = ref('')
const rules = reactive<FormRules>({
title: [
{ required: true, message: t('views.system.theme.websiteNamePlaceholder'), trigger: 'blur' },
{ required: true, message: t('theme.websiteNamePlaceholder'), trigger: 'blur' },
],
slogan: [
{ required: true, message: t('views.system.theme.websiteSloganPlaceholder'), trigger: 'blur' },
{ required: true, message: t('theme.websiteSloganPlaceholder'), trigger: 'blur' },
],
})
@ -303,7 +303,7 @@ const onChange = (file: any, fileList: UploadFiles, attr: string) => {
const isLimit = file?.size / 1024 / 1024 < 10
if (!isLimit) {
// @ts-ignore
MsgError(t('views.system.theme.fileMessageError'))
MsgError(t('theme.fileMessageError'))
return false
} else {
themeForm.value[attr] = file.raw
@ -356,7 +356,7 @@ const updateTheme = async (formEl: FormInstance | undefined, test?: string) => {
ThemeApi.postThemeInfo(fd, loading).then((res) => {
theme.theme()
cloneTheme.value = cloneDeep(themeForm.value)
MsgSuccess(t('views.system.theme.saveSuccess'))
MsgSuccess(t('theme.saveSuccess'))
})
}
})

View File

@ -1,23 +1,22 @@
<template>
<el-dialog
modal-class="authorized-workspace"
v-model="centerDialogVisible"
title="授权工作空间"
width="840"
>
<div class="tip">被授权的工作空间可使用当前资源</div>
<div class="form-type">类型</div>
<el-dialog modal-class="authorized-workspace" v-model="centerDialogVisible" width="840">
<template #header="{ titleId, titleClass }">
<h4 class="mb-8">{{ $t('views.shared.authorized_workspace') }}</h4>
<el-text class="color-secondary lighter">被授权的工作空间可使用当前资源</el-text>
</template>
<p class="mb-8 lighter">类型</p>
<el-radio-group v-model="listType" @change="handleListTypeChange">
<el-radio value="WHITE_LIST">白名单</el-radio>
<el-radio value="BLACK_LIST">黑名单</el-radio>
</el-radio-group>
<div class="form-type_work">选择工作空间</div>
<div class="workspace-list" v-loading="loading">
<div class="to-be_selected">
<p class="mb-8 lighter mt-16">选择工作空间</p>
<div class="flex border" v-loading="loading">
<div class="p-16 border-r">
<el-input
v-model="search"
:validate-event="false"
:placeholder="$t('dynamicsForm.searchBar.placeholder')"
:placeholder="$t('common.search')"
style="width: 364px"
clearable
>
@ -27,50 +26,62 @@
</el-icon>
</template>
</el-input>
<el-checkbox
v-model="checkAll"
:indeterminate="isIndeterminate"
@change="handleCheckAllChange"
v-if="!search"
>
全选
</el-checkbox>
<el-checkbox-group v-model="checkedWorkspace" @change="handleCheckedWorkspaceChange">
<div class="mt-8">
<el-checkbox
v-for="space in workspaceWithKeywords"
:key="space.id"
:label="space.name"
:value="space"
class="mb-8"
v-model="checkAll"
:indeterminate="isIndeterminate"
@change="handleCheckAllChange"
v-if="!search"
>
<el-icon size="20">
<momentsCategories></momentsCategories>
</el-icon>
{{ space.name }}
全选
</el-checkbox>
</el-checkbox-group>
<el-checkbox-group
class="checkbox-group-block"
v-model="checkedWorkspace"
@change="handleCheckedWorkspaceChange"
>
<el-checkbox
v-for="space in workspaceWithKeywords"
:key="space.id"
:label="space.name"
:value="space"
>
<div class="flex">
<AppIcon iconName="app-wordspace"></AppIcon>
<span class="ml-4"> {{ space.name }}</span>
</div>
</el-checkbox>
</el-checkbox-group>
</div>
</div>
<div class="selected">
<div class="count">
已选: {{ checkedWorkspace.length }}
<el-button @click="clearWorkspaceAll" link type="primary"> 清空 </el-button>
</div>
<div class="list-item_primary" v-for="ele in checkedWorkspace">
<el-icon size="20">
<momentsCategories></momentsCategories>
</el-icon>
<div class="label">{{ ele.name }}</div>
<el-icon @click="clearWorkspace(ele)" class="close" size="16">
<closeIcon></closeIcon>
</el-icon>
<div class="p-16 w-full">
<div class="flex-between mb-16">
<span class="lighter">
{{ $t('common.selected') }}: {{ checkedWorkspace.length }}
</span>
<el-button @click="clearWorkspaceAll" link type="primary">
{{ $t('common.clear') }}
</el-button>
</div>
<template v-for="ele in checkedWorkspace">
<div class="flex-between">
<div class="flex align-center">
<AppIcon iconName="app-wordspace"></AppIcon>
<span class="ml-4 lighter">{{ ele.name }}</span>
</div>
<el-button @click="clearWorkspaceAll" link>
<el-icon @click="clearWorkspace(ele)" :size="18"><Close /></el-icon>
</el-button>
</div>
</template>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="centerDialogVisible = false">取消</el-button>
<el-button type="primary" @click="handleConfirm"> 添加 </el-button>
</div>
<el-button @click="centerDialogVisible = false"> {{ $t('common.cancel') }}</el-button>
<el-button type="primary" @click="handleConfirm"> {{ $t('common.add') }} </el-button>
</template>
</el-dialog>
</template>
@ -78,8 +89,6 @@
<script lang="ts" setup>
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/system-shared/authorization'
const checkAll = ref(false)
@ -94,11 +103,9 @@ const loading = ref(false)
const centerDialogVisible = ref(false)
let auth_list: any[] = []
let un_auth_list = []
const closeIcon = iconMap['close-outlined'].iconReader()
const momentsCategories = iconMap['moments-categories'].iconReader()
const workspaceWithKeywords = computed(() => {
return workspace.value.filter((ele) => (ele.name as string).includes(search.value))
return workspace.value.filter((ele: any) => (ele.name as string).includes(search.value))
})
const handleCheckAllChange = (val: CheckboxValueType) => {
checkedWorkspace.value = val ? workspace.value : []
@ -117,7 +124,11 @@ const handleCheckedWorkspaceChange = (value: CheckboxValueType[]) => {
checkAll.value = checkedCount === workspace.value.length
isIndeterminate.value = checkedCount > 0 && checkedCount < workspace.value.length
auth_list = [
...value.map((ele) => ({ authentication_type: listType.value, workspace_id: ele.id, name: ele.name })),
...value.map((ele: any) => ({
authentication_type: listType.value,
workspace_id: ele.id,
name: ele.name,
})),
...auth_list.filter((ele) => ele.authentication_type !== listType.value),
]
}
@ -147,7 +158,7 @@ const open = ({ id }: any, type = 'Knowledge') => {
const handleConfirm = () => {
authorizationApi[`postSharedAuthorization${currentType}`](knowledge_id, {
workspace_id_list: checkedWorkspace.value.map(ele => ele.id),
workspace_id_list: checkedWorkspace.value.map((ele: any) => ele.id),
authentication_type: listType.value,
}).then(() => {
centerDialogVisible.value = false
@ -155,7 +166,7 @@ const handleConfirm = () => {
}
const clearWorkspace = (val: any) => {
checkedWorkspace.value = checkedWorkspace.value.filter((ele) => ele.id !== val.id)
checkedWorkspace.value = checkedWorkspace.value.filter((ele: any) => ele.id !== val.id)
auth_list = auth_list.filter((ele) => ele.workspace_id !== val.id)
}
@ -177,131 +188,5 @@ defineExpose({
</script>
<style lang="scss">
.authorized-workspace {
font-weight: 400;
font-size: 14px;
line-height: 22px;
.tip {
color: #646a73;
}
.el-dialog__header {
padding-bottom: 8px;
}
.form-type {
margin-top: 24px;
margin-bottom: 8px;
}
.el-checkbox__label,
.el-radio__label {
color: #1f2329 !important;
font-weight: 400;
}
.form-type_work {
margin-top: 16px;
margin-bottom: 8px;
}
.el-radio {
height: 22px;
line-height: 22px;
}
.workspace-list {
width: 100%;
border: 1px solid #dee0e3;
border-radius: 4px;
height: 428px;
}
.to-be_selected {
padding: 16px 0;
float: left;
width: 50%;
height: 100%;
border-right: 1px solid #dee0e3;
box-sizing: border-box;
.el-input {
margin: 0 0 12px 16px;
}
.el-checkbox {
width: 100%;
height: 38px;
}
}
.selected {
padding: 22px 0;
float: right;
width: calc(50% - 1px);
height: 100%;
box-sizing: border-box;
.count {
margin-left: 16px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
.el-button {
height: 26px;
width: 44px;
margin-right: 8px;
&:hover,
&:active {
background-color: #3370ff1a;
color: var(--el-button-text-color);
}
}
}
}
.list-item_primary,
.el-checkbox {
height: 38px;
padding: 8px 16px;
cursor: pointer;
display: flex;
align-items: center;
box-sizing: border-box;
.el-icon:not(.close) {
margin-right: 8px;
}
.el-checkbox__label {
display: flex;
align-items: center;
width: 80%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.label {
width: 88%;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&:not(.active):hover {
background: rgba(31, 35, 41, 0.1);
}
}
.dialog-footer {
width: 100%;
height: 100%;
display: flex;
justify-content: flex-end;
.el-button {
min-width: 80px;
}
}
}
</style>

View File

@ -3,7 +3,7 @@
<KnowledgeListContainer>
<template #header>
<el-breadcrumb separator-icon="ArrowRight">
<el-breadcrumb-item>{{ t('views.system.shared.shared_resources') }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
<el-breadcrumb-item>
<h5 class="ml-4 color-text-primary">{{ t('views.knowledge.title') }}</h5>
</el-breadcrumb-item>

View File

@ -3,7 +3,7 @@
<ContentContainer>
<template #header>
<el-breadcrumb separator-icon="ArrowRight">
<el-breadcrumb-item>{{ t('views.system.shared.shared_resources') }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
<el-breadcrumb-item>
<h5 class="ml-4 color-text-primary">{{ t('views.model.title') }}</h5>
</el-breadcrumb-item>

View File

@ -3,7 +3,7 @@
<ToolListContainer>
<template #header>
<el-breadcrumb separator-icon="ArrowRight">
<el-breadcrumb-item>{{ t('views.system.shared.shared_resources') }}</el-breadcrumb-item>
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
<el-breadcrumb-item>
<h5 class="ml-4 color-text-primary">{{ t('views.tool.title') }}</h5>
</el-breadcrumb-item>

View File

@ -173,7 +173,7 @@
</template>
<template #tag>
<el-tag v-if="isShared" type="info" class="info-tag">
{{ t('views.system.shared.label') }}
{{ t('views.shared.title') }}
</el-tag>
</template>
@ -247,7 +247,7 @@
v-if="isSystemShare"
icon="Lock"
@click.stop="openAuthorizedWorkspaceDialog(item)"
>{{ $t('views.system.shared.authorized_workspace') }}</el-dropdown-item
>{{ $t('views.shared.authorized_workspace') }}</el-dropdown-item
>
<el-dropdown-item
v-if="!item.template_id && permissionPrecise.export()"

View File

@ -8,7 +8,7 @@
:currentNodeKey="currentFolder?.id"
@handleNodeClick="folderClickHandel"
@refreshTree="refreshFolder"
:shareTitle="$t('views.system.shared.shared_tool')"
:shareTitle="$t('views.shared.shared_tool')"
:showShared="permissionPrecise['is_share']()"
class="p-8"
/>

View File

@ -47,11 +47,11 @@ class CustomEdge2 extends BezierEdge {
graphModel,
(node: any, graph: any) => {
return { model: node, graph }
}
},
)
} else {
this.customLineApp = createApp({
render: () => vh(CustomLine, { model: this.props.model })
render: () => vh(CustomLine, { model: this.props.model }),
})
this.customLineApp?.mount(root)
}
@ -101,18 +101,18 @@ class CustomEdge2 extends BezierEdge {
animationDuration,
animationIterationCount,
animationTimingFunction,
animationDirection
animationDirection,
} = animationStyle
const positionData = {
x: (startPoint.x + endPoint.x - customWidth) / 2,
y: (startPoint.y + endPoint.y - customHeight) / 2,
width: customWidth,
height: customHeight
height: customHeight,
}
const style = model.getEdgeStyle()
const wrapperStyle = {
width: customWidth,
height: customHeight
height: customHeight,
}
setTimeout(() => {
@ -129,7 +129,7 @@ class CustomEdge2 extends BezierEdge {
h(
'style' as any,
{ type: 'text/css' },
'.lf-edge{stroke:#afafaf}.lf-edge:hover{stroke: #3370FF;}'
'.lf-edge{stroke:#afafaf}.lf-edge:hover{stroke: #3370FF;}',
),
h('path', {
d: path,
@ -145,10 +145,10 @@ class CustomEdge2 extends BezierEdge {
animationDuration,
animationIterationCount,
animationTimingFunction,
animationDirection
}
animationDirection,
},
}
: {})
: {}),
}),
h(
'foreignObject',
@ -156,16 +156,16 @@ class CustomEdge2 extends BezierEdge {
...positionData,
y: positionData.y + 5,
x: positionData.x + 5,
style: {}
style: {},
},
[
h('div', {
id,
style: { ...wrapperStyle },
className: 'lf-custom-edge-wrapper'
})
]
)
className: 'lf-custom-edge-wrapper',
}),
],
),
])
}
}
@ -201,7 +201,6 @@ class CustomEdgeModel2 extends BezierEdgeModel {
* 使
*/
updatePathByAnchor() {
// TODO
const sourceNodeModel = this.graphModel.getNodeModelById(this.sourceNodeId)
const sourceAnchor = sourceNodeModel
.getDefaultAnchor()
@ -214,12 +213,12 @@ class CustomEdgeModel2 extends BezierEdgeModel {
if (sourceAnchor && targetAnchor) {
const startPoint = {
x: sourceAnchor.x,
y: sourceAnchor.y
y: sourceAnchor.y,
}
this.updateStartPoint(startPoint)
const endPoint = {
x: targetAnchor.x,
y: targetAnchor.y
y: targetAnchor.y,
}
this.updateEndPoint(endPoint)
@ -239,5 +238,5 @@ class CustomEdgeModel2 extends BezierEdgeModel {
export default {
type: 'app-edge',
view: CustomEdge2,
model: CustomEdgeModel2
model: CustomEdgeModel2,
}

View File

@ -269,15 +269,9 @@ const validate = () => {
}
function getSelectModel() {
if (id) {
model.asyncGetSelectModel({ model_type: 'LLM' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
} else {
model.asyncGetSelectModel().then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
model.asyncGetSelectModel({ model_type: 'LLM' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
const openAIParamSettingDialog = (modelId: string) => {

View File

@ -222,83 +222,83 @@ const update_field = () => {
return
}
// todo
// applicationApi
// .getApplicationById(id, props.nodeModel.properties.node_data.application_id)
// .then((ok) => {
// const old_api_input_field_list = cloneDeep(
// props.nodeModel.properties.node_data.api_input_field_list
// )
// const old_user_input_field_list = cloneDeep(
// props.nodeModel.properties.node_data.user_input_field_list
// )
// if (isWorkFlow(ok.data.type)) {
// const nodeData = ok.data.work_flow.nodes[0].properties.node_data
// const new_api_input_field_list = cloneDeep(
// ok.data.work_flow.nodes[0].properties.api_input_field_list
// )
// const new_user_input_field_list = cloneDeep(
// ok.data.work_flow.nodes[0].properties.user_input_field_list
// )
applicationApi
.getApplicationById(id, props.nodeModel.properties.node_data.application_id)
.then((ok) => {
const old_api_input_field_list = cloneDeep(
props.nodeModel.properties.node_data.api_input_field_list
)
const old_user_input_field_list = cloneDeep(
props.nodeModel.properties.node_data.user_input_field_list
)
if (isWorkFlow(ok.data.type)) {
const nodeData = ok.data.work_flow.nodes[0].properties.node_data
const new_api_input_field_list = cloneDeep(
ok.data.work_flow.nodes[0].properties.api_input_field_list
)
const new_user_input_field_list = cloneDeep(
ok.data.work_flow.nodes[0].properties.user_input_field_list
)
// const merge_api_input_field_list = (new_api_input_field_list || []).map((item: any) => {
// const find_field = old_api_input_field_list.find(
// (old_item: any) => old_item.variable == item.variable
// )
// if (find_field) {
// return {
// ...item,
// value: find_field.value,
// label:
// typeof item.label === 'object' && item.label != null ? item.label.label : item.label
// }
// } else {
// return item
// }
// })
// set(
// props.nodeModel.properties.node_data,
// 'api_input_field_list',
// merge_api_input_field_list
// )
// const merge_user_input_field_list = (new_user_input_field_list || []).map((item: any) => {
// const find_field = old_user_input_field_list.find(
// (old_item: any) => old_item.field == item.field
// )
// if (find_field) {
// return {
// ...item,
// value: find_field.value,
// label:
// typeof item.label === 'object' && item.label != null ? item.label.label : item.label
// }
// } else {
// return item
// }
// })
// set(
// props.nodeModel.properties.node_data,
// 'user_input_field_list',
// merge_user_input_field_list
// )
// const fileEnable = nodeData.file_upload_enable
// const fileUploadSetting = nodeData.file_upload_setting
// if (fileEnable) {
// handleFileUpload('document', fileUploadSetting.document)
// handleFileUpload('image', fileUploadSetting.image)
// handleFileUpload('audio', fileUploadSetting.audio)
// } else {
// ;['document_list', 'image_list', 'audio_list'].forEach((list) => {
// // eslint-disable-next-line vue/no-mutating-props
// delete props.nodeModel.properties.node_data[list]
// })
// }
// set(props.nodeModel.properties, 'status', ok.data.id ? 200 : 500)
// }
// })
// .catch((err) => {
// console.log(err)
// set(props.nodeModel.properties, 'status', 500)
// })
const merge_api_input_field_list = (new_api_input_field_list || []).map((item: any) => {
const find_field = old_api_input_field_list.find(
(old_item: any) => old_item.variable == item.variable
)
if (find_field) {
return {
...item,
value: find_field.value,
label:
typeof item.label === 'object' && item.label != null ? item.label.label : item.label
}
} else {
return item
}
})
set(
props.nodeModel.properties.node_data,
'api_input_field_list',
merge_api_input_field_list
)
const merge_user_input_field_list = (new_user_input_field_list || []).map((item: any) => {
const find_field = old_user_input_field_list.find(
(old_item: any) => old_item.field == item.field
)
if (find_field) {
return {
...item,
value: find_field.value,
label:
typeof item.label === 'object' && item.label != null ? item.label.label : item.label
}
} else {
return item
}
})
set(
props.nodeModel.properties.node_data,
'user_input_field_list',
merge_user_input_field_list
)
const fileEnable = nodeData.file_upload_enable
const fileUploadSetting = nodeData.file_upload_setting
if (fileEnable) {
handleFileUpload('document', fileUploadSetting.document)
handleFileUpload('image', fileUploadSetting.image)
handleFileUpload('audio', fileUploadSetting.audio)
} else {
;['document_list', 'image_list', 'audio_list'].forEach((list) => {
// eslint-disable-next-line vue/no-mutating-props
delete props.nodeModel.properties.node_data[list]
})
}
set(props.nodeModel.properties, 'status', ok.data.id ? 200 : 500)
}
})
.catch((err) => {
console.log(err)
set(props.nodeModel.properties, 'status', 500)
})
}
const props = defineProps<{ nodeModel: any }>()

View File

@ -219,16 +219,9 @@ const form_data = computed({
})
function getSelectModel() {
if (id) {
// todo
applicationApi.getApplicationTTIModel(id).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
} else {
model.asyncGetSelectModel().then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
model.asyncGetSelectModel({ model_type: 'TTI' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
const model_change = () => {

View File

@ -239,16 +239,9 @@ const form_data = computed({
})
function getSelectModel() {
if (id) {
//todo
applicationApi.getApplicationImageModel(id).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
} else {
model.asyncGetSelectModel().then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
model.asyncGetSelectModel({ model_type: 'IMAGE' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
function submitSystemDialog(val: string) {

View File

@ -132,7 +132,7 @@
</div>
</template>
<template v-else>
<div class="p-8-12" v-if="!form_data.mcp_tool">
<div class="p-8-12" v-if="!form_data.mcp_tool">
<el-text type="info">{{ $t('common.noData') }}</el-text>
</div>
<div v-else class="border-r-4 p-8-12 mb-8 layout-bg lighter">
@ -243,7 +243,7 @@ const form = {
mcp_server: '',
tool_params: {},
tool_form_field: [],
params_nested: ''
params_nested: '',
}
function submitDialog(val: string) {
@ -262,26 +262,26 @@ function getTools() {
return
}
// todo
// applicationApi
// .getMcpTools({ mcp_servers: form_data.value.mcp_servers }, loading)
// .then((res: any) => {
// form_data.value.mcp_tools = res.data
// MsgSuccess(t('views.applicationWorkflow.nodes.mcpNode.getToolsSuccess'))
// // jsonmcp_server
// form_data.value.mcp_server = form_data.value.mcp_tools.filter(
// (item: any) => item.name === form_data.value.mcp_tool
// )[0].server
// })
applicationApi
.getMcpTools({ mcp_servers: form_data.value.mcp_servers }, loading)
.then((res: any) => {
form_data.value.mcp_tools = res.data
MsgSuccess(t('views.applicationWorkflow.nodes.mcpNode.getToolsSuccess'))
// jsonmcp_server
form_data.value.mcp_server = form_data.value.mcp_tools.filter(
(item: any) => item.name === form_data.value.mcp_tool,
)[0].server
})
}
function changeTool() {
form_data.value.mcp_server = form_data.value.mcp_tools.filter(
(item: any) => item.name === form_data.value.mcp_tool
(item: any) => item.name === form_data.value.mcp_tool,
)[0].server
// console.log(form_data.value.mcp_server)
const args_schema = form_data.value.mcp_tools.filter(
(item: any) => item.name === form_data.value.mcp_tool
(item: any) => item.name === form_data.value.mcp_tool,
)[0].args_schema
form_data.value.tool_form_field = []
for (const item in args_schema.properties) {
@ -308,7 +308,7 @@ function changeTool() {
input_type: 'TooltipLabel',
label: item2,
attrs: { tooltip: params[item2].description },
props_info: {}
props_info: {},
},
input_type: input_type,
source: 'referencing',
@ -318,10 +318,10 @@ function changeTool() {
{
required: args_schema.properties[item].required?.indexOf(item2) !== -1,
message: t('dynamicsForm.tip.requiredMessage'),
trigger: 'blur'
}
]
}
trigger: 'blur',
},
],
},
})
}
} else {
@ -345,7 +345,7 @@ function changeTool() {
input_type: 'TooltipLabel',
label: item,
attrs: { tooltip: args_schema.properties[item].description },
props_info: {}
props_info: {},
},
input_type: input_type,
source: 'referencing',
@ -355,10 +355,10 @@ function changeTool() {
{
required: args_schema.required?.indexOf(item) !== -1,
message: t('dynamicsForm.tip.requiredMessage'),
trigger: 'blur'
}
]
}
trigger: 'blur',
},
],
},
})
}
}
@ -381,7 +381,7 @@ const form_data = computed({
},
set: (value) => {
set(props.nodeModel.properties, 'node_data', value)
}
},
})
const replyNodeFormRef = ref()
@ -399,7 +399,7 @@ const validate = async () => {
if (!form_data.value.tool_params[form_data.value.params_nested][item]) {
return Promise.reject({
node: props.nodeModel,
errMessage: item + t('dynamicsForm.tip.requiredMessage')
errMessage: item + t('dynamicsForm.tip.requiredMessage'),
})
}
} else {
@ -407,7 +407,7 @@ const validate = async () => {
if (!form_data.value.tool_params[item]) {
return Promise.reject({
node: props.nodeModel,
errMessage: item + t('dynamicsForm.tip.requiredMessage')
errMessage: item + t('dynamicsForm.tip.requiredMessage'),
})
}
}
@ -419,13 +419,13 @@ const validate = async () => {
if (!form.mcp_servers) {
return Promise.reject({
node: props.nodeModel,
errMessage: t('views.applicationWorkflow.nodes.mcpNode.mcpServerTip')
errMessage: t('views.applicationWorkflow.nodes.mcpNode.mcpServerTip'),
})
}
if (!form.mcp_tool) {
return Promise.reject({
node: props.nodeModel,
errMessage: t('views.applicationWorkflow.nodes.mcpNode.mcpToolTip')
errMessage: t('views.applicationWorkflow.nodes.mcpNode.mcpToolTip'),
})
}
}

View File

@ -221,16 +221,9 @@ const validate = () => {
}
function getSelectModel() {
if (id) {
//todo
applicationApi.getApplicationModel(id).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
} else {
model.asyncGetSelectModel().then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
model.asyncGetSelectModel({ model_type: 'LLM' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
onMounted(() => {

View File

@ -234,16 +234,9 @@ function refreshParam(data: any) {
set(props.nodeModel.properties.node_data, 'reranker_setting', data)
}
function getSelectModel() {
if (id) {
//todo
applicationApi.getApplicationRerankerModel(id).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
} else {
model.asyncGetSelectModel({ model_type: 'RERANKER' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
model.asyncGetSelectModel({ model_type: 'RERANKER' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
const add_reranker_reference = () => {

View File

@ -154,18 +154,10 @@ const form_data = computed({
})
function getSelectModel() {
if (id) {
//todo
applicationApi.getApplicationSTTModel(id).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
} else {
model.asyncGetSelectModel().then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
model.asyncGetSelectModel({ model_type: 'LLM' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
onMounted(() => {
getSelectModel()

View File

@ -169,17 +169,10 @@ const form_data = computed({
},
})
// todo
function getSelectModel() {
if (id) {
applicationApi.getApplicationTTSModel(id).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
} else {
model.asyncGetSelectModel().then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
model.asyncGetSelectModel({ model_type: 'TTS' }).then((res: any) => {
modelOptions.value = groupBy(res?.data, 'provider')
})
}
const openTTSParamSettingDialog = () => {