feat: workspace

This commit is contained in:
wangdan-fit2cloud 2025-06-26 16:36:08 +08:00
parent 7a7d353433
commit 91dbe1907c
43 changed files with 477 additions and 413 deletions

View File

@ -55,7 +55,7 @@
item.type === WorkflowType.Start || item.type === WorkflowType.Application
"
>
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.inputParam') }}
</h5>
@ -104,7 +104,7 @@
alt=""
fit="cover"
style="width: 40px; height: 40px; display: block"
class="border-r-4"
class="border-r-6"
/>
</template>
</el-space>
@ -120,7 +120,7 @@
:src="f.url"
controls
style="width: 300px; height: 43px"
class="border-r-4"
class="border-r-6"
/>
</template>
</el-space>
@ -152,13 +152,13 @@
</template>
<!-- 知识库检索 -->
<template v-if="item.type == WorkflowType.SearchKnowledge">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.searchContent') }}
</h5>
<div class="p-8-12 border-t-dashed lighter">{{ item.question || '-' }}</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.searchResult') }}
</h5>
@ -185,7 +185,7 @@
</template>
<!-- 判断器 -->
<template v-if="item.type == WorkflowType.Condition">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.conditionResult') }}
</h5>
@ -203,7 +203,7 @@
"
>
<div
class="card-never border-r-4"
class="card-never border-r-6"
v-if="item.type !== WorkflowType.Application"
>
<h5 class="p-8-12">
@ -214,7 +214,7 @@
</div>
</div>
<div
class="card-never border-r-4 mt-8"
class="card-never border-r-6 mt-8"
v-if="item.type !== WorkflowType.Application"
>
<h5 class="p-8-12">{{ $t('chat.history') }}</h5>
@ -233,7 +233,7 @@
</div>
</div>
<div
class="card-never border-r-4 mt-8"
class="card-never border-r-6 mt-8"
v-if="item.type !== WorkflowType.Application"
>
<h5 class="p-8-12">
@ -243,7 +243,7 @@
{{ item.question || '-' }}
</div>
</div>
<div class="card-never border-r-4 mt-8" v-if="item.type == WorkflowType.AiChat">
<div class="card-never border-r-6 mt-8" v-if="item.type == WorkflowType.AiChat">
<h5 class="p-8-12">
{{ $t('views.applicationWorkflow.nodes.aiChatNode.think') }}
</h5>
@ -251,7 +251,7 @@
{{ item.reasoning_content || '-' }}
</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{
item.type == WorkflowType.Application
@ -275,7 +275,7 @@
<!-- 指定回复 -->
<template v-if="item.type === WorkflowType.Reply">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.replyContent') }}
</h5>
@ -297,7 +297,7 @@
<!-- 文档内容提取 -->
<template v-if="item.type === WorkflowType.DocumentExtractNode">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12 flex align-center">
<span class="mr-4"> {{ $t('common.param.outputParam') }}</span>
@ -333,7 +333,7 @@
</div>
</template>
<template v-if="item.type === WorkflowType.SpeechToTextNode">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.inputParam') }}
</h5>
@ -350,7 +350,7 @@
:src="f.url"
controls
style="width: 300px; height: 43px"
class="border-r-4"
class="border-r-6"
/>
</template>
</el-space>
@ -358,7 +358,7 @@
</div>
</div>
</div>
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.outputParam') }}
</h5>
@ -385,7 +385,7 @@
</template>
<template v-if="item.type === WorkflowType.TextToSpeechNode">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.inputParam') }}
</h5>
@ -406,7 +406,7 @@
</div>
</div>
</div>
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.outputParam') }}
</h5>
@ -426,13 +426,13 @@
item.type === WorkflowType.FunctionLibCustom
"
>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">{{ $t('chat.executionDetails.input') }}</h5>
<div class="p-8-12 border-t-dashed lighter pre-wrap">
{{ item.params || '-' }}
</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">{{ $t('chat.executionDetails.output') }}</h5>
<div class="p-8-12 border-t-dashed lighter pre-wrap">
{{ item.result || '-' }}
@ -441,13 +441,13 @@
</template>
<!-- 多路召回 -->
<template v-if="item.type == WorkflowType.RrerankerNode">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.searchContent') }}
</h5>
<div class="p-8-12 border-t-dashed lighter">{{ item.question || '-' }}</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.rerankerContent') }}
</h5>
@ -467,7 +467,7 @@
<template v-else> -</template>
</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.rerankerResult') }}
</h5>
@ -492,7 +492,7 @@
<!-- 表单收集 -->
<template v-if="item.type === WorkflowType.FormNode">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.outputParam')
}}<span style="color: #f54a45">{{
@ -517,7 +517,7 @@
<!-- 图片理解 -->
<template v-if="item.type == WorkflowType.ImageUnderstandNode">
<div
class="card-never border-r-4"
class="card-never border-r-6"
v-if="item.type !== WorkflowType.Application"
>
<h5 class="p-8-12">
@ -528,7 +528,7 @@
</div>
</div>
<div
class="card-never border-r-4 mt-8"
class="card-never border-r-6 mt-8"
v-if="item.type !== WorkflowType.Application"
>
<h5 class="p-8-12">{{ $t('chat.history') }}</h5>
@ -549,7 +549,7 @@
alt=""
fit="cover"
style="width: 40px; height: 40px; display: inline-block"
class="border-r-4 mr-8"
class="border-r-6 mr-8"
/>
<span v-else>{{ h.text }}<br /></span>
@ -562,7 +562,7 @@
<template v-else> -</template>
</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.currentChat') }}
</h5>
@ -575,7 +575,7 @@
alt=""
fit="cover"
style="width: 40px; height: 40px; display: block"
class="border-r-4"
class="border-r-6"
/>
</template>
</el-space>
@ -585,7 +585,7 @@
</div>
</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{
item.type == WorkflowType.Application
@ -608,7 +608,7 @@
</template>
<!-- 图片生成 -->
<template v-if="item.type == WorkflowType.ImageGenerateNode">
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{ $t('chat.executionDetails.currentChat') }}
</h5>
@ -616,7 +616,7 @@
{{ item.question || '-' }}
</div>
</div>
<div class="card-never border-r-4 mt-8">
<div class="card-never border-r-6 mt-8">
<h5 class="p-8-12">
{{
item.type == WorkflowType.Application
@ -640,7 +640,7 @@
<!-- 变量赋值 -->
<template v-if="item.type === WorkflowType.VariableAssignNode">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.inputParam') }}
</h5>
@ -650,7 +650,7 @@
</div>
</div>
</div>
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.outputParam') }}
</h5>
@ -664,7 +664,7 @@
<!-- MCP 节点 -->
<template v-if="item.type === WorkflowType.McpNode">
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('views.applicationWorkflow.nodes.mcpNode.tool') }}
</h5>
@ -674,7 +674,7 @@
</div>
</div>
</div>
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('views.applicationWorkflow.nodes.mcpNode.toolParam') }}
</h5>
@ -684,7 +684,7 @@
</div>
</div>
</div>
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">
{{ $t('common.param.outputParam') }}
</h5>
@ -697,7 +697,7 @@
</template>
</template>
<template v-else>
<div class="card-never border-r-4">
<div class="card-never border-r-6">
<h5 class="p-8-12">{{ $t('chat.executionDetails.errMessage') }}</h5>
<div class="p-8-12 border-t-dashed lighter">{{ item.err_message || '-' }}</div>
</div>

View File

@ -28,7 +28,7 @@
<p class="lighter" :style="{ visibility: isTouching ? 'visible' : 'hidden' }">
{{ message }}
</p>
<div class="speech-img flex-center border-r-4 mt-16">
<div class="speech-img flex-center border-r-6 mt-16">
<img v-if="isTouching" src="@/assets/chat/acoustic-color.svg" alt="" />
<img v-else src="@/assets/chat/acoustic.svg" alt="" />
</div>

View File

@ -130,7 +130,7 @@
<el-space wrap>
<template v-for="(item, index) in uploadImageList" :key="index">
<div
class="file file-image cursor border border-r-4"
class="file file-image cursor border border-r-6"
v-if="item.url"
@mouseenter.stop="mouseenter(item)"
@mouseleave.stop="mouseleave()"
@ -149,7 +149,7 @@
alt=""
fit="cover"
style="width: 40px; height: 40px; display: block"
class="border-r-4"
class="border-r-6"
/>
</div>
</template>
@ -432,7 +432,6 @@ const uploadFile = async (file: any, fileList: any) => {
formData.append('file', file.raw, file.name)
//
const extension = file.name.split('.').pop().toUpperCase() //
console.log(documentExtensions)
if (imageExtensions.includes(extension)) {
uploadImageList.value.push(file)
} else if (documentExtensions.includes(extension)) {

View File

@ -26,7 +26,7 @@
<div class="mb-8" v-if="image_list.length">
<el-space wrap>
<template v-for="(item, index) in image_list" :key="index">
<div class="file cursor border-r-4" v-if="item.url">
<div class="file cursor border-r-6" v-if="item.url">
<el-image
:src="item.url"
:zoom-rate="1.2"
@ -37,7 +37,7 @@
alt=""
fit="cover"
style="width: 170px; height: 170px; display: block"
class="border-r-4"
class="border-r-6"
/>
</div>
</template>
@ -46,12 +46,12 @@
<div class="mb-8" v-if="audio_list.length">
<el-space wrap>
<template v-for="(item, index) in audio_list" :key="index">
<div class="file cursor border-r-4" v-if="item.url">
<div class="file cursor border-r-6" v-if="item.url">
<audio
:src="item.url"
controls
style="width: 350px; height: 43px"
class="border-r-4"
class="border-r-6"
/>
</div>
</template>

View File

@ -1,48 +0,0 @@
import { h } from 'vue'
export default {
'app-go': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 16 16',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M2.66671 4.66665V13.3333H13.3334V8.66665H14.6667V14C14.6667 14.3682 14.3682 14.6666 14 14.6666H2.00004C1.63185 14.6666 1.33337 14.3682 1.33337 14V3.99998C1.33337 3.63179 1.63185 3.33331 2.00004 3.33331H7.33337V4.66665H2.66671Z',
fill: 'currentColor',
}),
h('path', {
d: 'M14.6665 1.99998V6.66665H13.3332V3.60931L9.34987 7.59265C9.28736 7.65514 9.20259 7.69024 9.11421 7.69024C9.02582 7.69024 8.94105 7.65514 8.87854 7.59265L8.40721 7.12131C8.34472 7.0588 8.30961 6.97403 8.30961 6.88565C8.30961 6.79726 8.34472 6.71249 8.40721 6.64998L12.3905 2.66665H9.33321V1.33331H13.9999C14.1767 1.33331 14.3463 1.40355 14.4713 1.52858C14.5963 1.6536 14.6665 1.82317 14.6665 1.99998Z',
fill: 'currentColor',
}),
],
),
])
},
},
'right-outlined': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 12 12',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M8.13909 6L4.07322 1.93414C3.97559 1.83651 3.97559 1.67822 4.07322 1.58059L4.42678 1.22703C4.52441 1.1294 4.6827 1.1294 4.78033 1.22703L9.19975 5.64645C9.39501 5.84171 9.39501 6.15829 9.19975 6.35356L4.78033 10.773C4.6827 10.8706 4.52441 10.8706 4.42678 10.773L4.07322 10.4194C3.97559 10.3218 3.97559 10.1635 4.07322 10.0659L8.13909 6Z',
fill: 'currentColor',
}),
],
),
])
},
},
}

View File

@ -54,30 +54,7 @@ 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', [
@ -102,6 +79,30 @@ 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: 'white',
}),
],
),
])
},
},
'app-setting': {
iconReader: () => {
return h('i', [
@ -210,4 +211,54 @@ export default {
])
},
},
'app-workspace': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 1024 1024',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M523.477333 113.92l429.568 273.408a21.333333 21.333333 0 0 1 0 36.010667L523.52 696.704a21.333333 21.333333 0 0 1-22.912 0L70.954667 423.338667a21.333333 21.333333 0 0 1 0-36.010667l429.610666-273.365333a21.333333 21.333333 0 0 1 22.912 0zM201.6 405.333333L512 602.88l310.4-197.546667L512 207.786667 201.6 405.333333z',
fill: 'currentColor',
}),
h('path', {
d: 'M110.805333 592.469333a21.333333 21.333333 0 0 0-29.354666 7.04l-22.314667 36.394667a21.333333 21.333333 0 0 0 7.04 29.312l390.613333 239.530667a84.992 84.992 0 0 0 89.088 0l390.613334-239.530667a21.333333 21.333333 0 0 0 7.04-29.312l-22.314667-36.394667a21.333333 21.333333 0 0 0-29.312-7.04L506.88 828.586667a10.666667 10.666667 0 0 1-11.136 0l-384.981333-236.074667z',
fill: 'currentColor',
}),
],
),
])
},
},
'app-workspace-active': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 20 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M10.2237 2.22566L18.6143 7.56512C18.8716 7.72885 18.8716 8.10444 18.6143 8.26817L10.2237 13.6076C10.0872 13.6945 9.91279 13.6945 9.7763 13.6076L1.38573 8.26817C1.12844 8.10444 1.12844 7.72885 1.38573 7.56512L9.7763 2.22566C9.91279 2.13881 10.0872 2.13881 10.2237 2.22566Z',
fill: 'currentColor',
}),
h('path', {
d: 'M2.1637 11.5717C1.96752 11.4515 1.71097 11.513 1.59069 11.7092L1.15509 12.4196C1.03481 12.6158 1.09633 12.8723 1.29251 12.9926L8.9218 17.6705C9.45711 17.9987 10.1262 17.9987 10.6615 17.6705L18.2908 12.9926C18.487 12.8723 18.5485 12.6158 18.4282 12.4196L17.9926 11.7092C17.8723 11.513 17.6158 11.4515 17.4196 11.5717L9.90055 16.182C9.83373 16.223 9.74957 16.223 9.68275 16.182L2.1637 11.5717Z',
fill: 'currentColor',
}),
],
),
])
},
},
}

View File

@ -20,4 +20,24 @@ export default {
])
},
},
'app-delete-users': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 1024 1024',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M661.333333 277.333333a213.333333 213.333333 0 1 0-426.752 0.085334A213.333333 213.333333 0 0 0 661.333333 277.333333z m-213.333333 128a128.042667 128.042667 0 0 1 0-256 128.042667 128.042667 0 0 1 0 256zM170.666667 810.666667c0-14.762667 1.92-29.013333 5.333333-42.666667 18.986667-73.6 85.76-128 165.333333-128h171.733334a21.333333 21.333333 0 0 0 21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 0-21.333333-21.333333H341.333333a256 256 0 0 0-256 256v85.333333c0 23.552 19.2 42.666667 42.666667 42.666667h385.066667a21.333333 21.333333 0 0 0 21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 0-21.333333-21.333334H170.666667v-42.666666zM776.405333 663.893333l62.634667 62.677334H618.666667a21.333333 21.333333 0 0 0-21.333334 21.333333v42.666667a21.333333 21.333333 0 0 0 21.333334 21.333333h220.928l-63.189334 63.189333a21.333333 21.333333 0 0 0 0 30.165334l30.165334 30.208a21.333333 21.333333 0 0 0 30.165333 0l150.826667-150.869334a21.333333 21.333333 0 0 0 0-30.165333l-150.826667-150.869333a21.333333 21.333333 0 0 0-30.165333 0l-30.165334 30.208a21.333333 21.333333 0 0 0 0 30.165333z',
fill: 'currentColor',
}),
],
),
])
},
},
}

View File

@ -7,7 +7,6 @@ const dynamicIcons = Object.values(iconsImport).reduce(
}),
{} as Record<string, any>,
)
console.log(dynamicIcons)
export const iconMap: any = {
'app-warning': {
iconReader: () => {
@ -139,24 +138,24 @@ export const iconMap: any = {
])
},
},
'app-wordspace': {
'app-go': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 1024 1024',
viewBox: '0 0 16 16',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M523.477333 113.92l429.568 273.408a21.333333 21.333333 0 0 1 0 36.010667L523.52 696.704a21.333333 21.333333 0 0 1-22.912 0L70.954667 423.338667a21.333333 21.333333 0 0 1 0-36.010667l429.610666-273.365333a21.333333 21.333333 0 0 1 22.912 0zM201.6 405.333333L512 602.88l310.4-197.546667L512 207.786667 201.6 405.333333z',
d: 'M2.66671 4.66665V13.3333H13.3334V8.66665H14.6667V14C14.6667 14.3682 14.3682 14.6666 14 14.6666H2.00004C1.63185 14.6666 1.33337 14.3682 1.33337 14V3.99998C1.33337 3.63179 1.63185 3.33331 2.00004 3.33331H7.33337V4.66665H2.66671Z',
fill: 'currentColor',
}),
h('path', {
d: 'M110.805333 592.469333a21.333333 21.333333 0 0 0-29.354666 7.04l-22.314667 36.394667a21.333333 21.333333 0 0 0 7.04 29.312l390.613333 239.530667a84.992 84.992 0 0 0 89.088 0l390.613334-239.530667a21.333333 21.333333 0 0 0 7.04-29.312l-22.314667-36.394667a21.333333 21.333333 0 0 0-29.312-7.04L506.88 828.586667a10.666667 10.666667 0 0 1-11.136 0l-384.981333-236.074667z',
d: 'M14.6665 1.99998V6.66665H13.3332V3.60931L9.34987 7.59265C9.28736 7.65514 9.20259 7.69024 9.11421 7.69024C9.02582 7.69024 8.94105 7.65514 8.87854 7.59265L8.40721 7.12131C8.34472 7.0588 8.30961 6.97403 8.30961 6.88565C8.30961 6.79726 8.34472 6.71249 8.40721 6.64998L12.3905 2.66665H9.33321V1.33331H13.9999C14.1767 1.33331 14.3463 1.40355 14.4713 1.52858C14.5963 1.6536 14.6665 1.82317 14.6665 1.99998Z',
fill: 'currentColor',
}),
],
@ -164,6 +163,27 @@ export const iconMap: any = {
])
},
},
'right-outlined': {
iconReader: () => {
return h('i', [
h(
'svg',
{
viewBox: '0 0 12 12',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M8.13909 6L4.07322 1.93414C3.97559 1.83651 3.97559 1.67822 4.07322 1.58059L4.42678 1.22703C4.52441 1.1294 4.6827 1.1294 4.78033 1.22703L9.19975 5.64645C9.39501 5.84171 9.39501 6.15829 9.19975 6.35356L4.78033 10.773C4.6827 10.8706 4.52441 10.8706 4.42678 10.773L4.07322 10.4194C3.97559 10.3218 3.97559 10.1635 4.07322 10.0659L8.13909 6Z',
fill: 'currentColor',
}),
],
),
])
},
},
// 动态加载的图标
...dynamicIcons,
}

View File

@ -79,7 +79,7 @@ defineExpose({
line-height: 24px;
&.active {
background: var(--el-color-primary-light-9);
border-radius: 4px;
border-radius: var(--app-border-radius-base);
color: var(--el-color-primary);
font-weight: 500;
&:hover {
@ -87,7 +87,7 @@ defineExpose({
}
}
&:hover {
border-radius: 4px;
border-radius: var(--app-border-radius-base);
background: var(--app-text-color-light-1);
}
&.is-active {

View File

@ -22,7 +22,7 @@
</el-card>
<el-card shadow="never" class="card-add box-card" @click="add_card">
<div class="flex-center">
<AppIcon iconName="Plus" class="add-icon layout-bg p-8 border-r-4" />
<AppIcon iconName="Plus" class="add-icon layout-bg p-8 border-r-6" />
<span>{{ add_msg }}</span>
</div>
</el-card>

View File

@ -13,7 +13,7 @@
class="shared-button flex cursor"
:class="currentNodeKey === 'share' && 'active'"
>
<AppIcon iconName="app-shared-active" style="font-size: 18px"></AppIcon>
<AppIcon iconName="app-shared-active" style="font-size: 18px" class="color-primary"></AppIcon>
<span class="ml-8 lighter">{{ shareTitle }}</span>
</div>
<div class="tree-height border-t" :style="treeStyle">
@ -209,7 +209,7 @@ function refreshFolder() {
margin-bottom: 4px;
&.active {
background: var(--el-color-primary-light-9);
border-radius: 4px;
border-radius: var(--app-border-radius-base);
color: var(--el-color-primary);
font-weight: 500;
&:hover {
@ -217,7 +217,7 @@ function refreshFolder() {
}
}
&:hover {
border-radius: 4px;
border-radius: var(--app-border-radius-base);
background: var(--app-text-color-light-1);
}
&.is-active {

View File

@ -15,7 +15,7 @@
label-position="top"
require-asterisk-position="right"
>
<div class="update-info flex border-r-4 mb-16 p-8-12">
<div class="update-info flex border-r-6 mb-16 p-8-12">
<div class="mt-4">
<AppIcon iconName="app-warning-colorful" style="font-size: 16px"></AppIcon>
</div>

View File

@ -14,7 +14,7 @@
label-position="top"
require-asterisk-position="right"
>
<div class="update-info flex border-r-4 mb-16 p-8-12">
<div class="update-info flex border-r-6 mb-16 p-8-12">
<div class="mt-4">
<AppIcon iconName="app-warning-colorful" style="font-size: 16px"></AppIcon>
</div>

View File

@ -1,7 +1,7 @@
<template>
<el-dropdown placement="bottom-start" class="workspace-dropdown">
<el-button text style="font-size: 14px" class="workspace-dropdown__button">
<AppIcon iconName="app-wordspace" style="font-size: 18px"></AppIcon>
<AppIcon iconName="app-workspace" style="font-size: 18px"></AppIcon>
<span class="ellipsis" style="max-width: 155px">
{{ currentWorkspace?.name }}
</span>
@ -17,7 +17,7 @@
:class="item.id === currentWorkspace?.id ? 'active' : ''"
@click="changeWorkspace(item)"
>
<AppIcon class="mr-8" iconName="app-wordspace" style="font-size: 16px"></AppIcon>
<AppIcon class="mr-8" iconName="app-workspace" style="font-size: 16px"></AppIcon>
<span class="ellipsis" style="max-width: 230px">
{{ item.name }}
</span>

View File

@ -11,7 +11,7 @@
<TopAbout class="mt-4"></TopAbout>
<el-divider class="ml-8 mr-8" direction="vertical" />
<el-button link @click="router.push({ path: '/' })">
<AppIcon class="mr-8" iconName="app-wordspace" style="font-size: 16px"></AppIcon>
<AppIcon class="mr-8" iconName="app-workspace" style="font-size: 16px"></AppIcon>
{{ '返回工作空间' }}</el-button
>
</div>

View File

@ -1,7 +1,7 @@
<template>
<el-dialog
v-model="aboutDialogVisible"
class="about-dialog border-r-4"
class="about-dialog border-r-6"
:class="!isDefaultTheme ? 'dialog-custom-header' : ''"
>
<template #header="{ titleId, titleClass }">

View File

@ -47,8 +47,8 @@ const systemRouter = {
path: '/system/workspace',
name: 'workspace',
meta: {
icon: 'app-resource-authorization', // TODO
iconActive: 'app-resource-authorization-active', // TODO
icon: 'app-workspace',
iconActive: 'app-workspace-active',
title: 'views.workspace.title',
activeMenu: '/system',
parentPath: '/system',

View File

@ -313,10 +313,13 @@ h5 {
border-bottom: 1px solid var(--el-border-color-lighter);
}
.border-r-4 {
border-radius: 4px;
border-radius: var(--app-border-radius-small);
}
.border-r-6 {
border-radius: var(--app-border-radius-base);
}
.border-r-8 {
border-radius: 8px;
border-radius: var(--app-border-radius-large);
}
.border-t-dashed {

View File

@ -9,6 +9,9 @@ $primary-color: #3370ff;
--app-view-padding: 24px;
--app-view-bg-color: #ffffff;
--app-border-color-dark: #bbbfc4;
--app-border-radius-small: 4px;
--app-border-radius-base: 6px;
--app-border-radius-large: 8px;
--md-bk-hover-color: var(--el-border-color-hover);
/** header 组件 */
--app-header-height: 56px;

View File

@ -28,4 +28,3 @@ export function loadPermissionApi(type: string) {
}
}
}

View File

@ -27,7 +27,7 @@
</template>
<div class="flex">
<div class="setting-preview border border-r-4 mr-16" style="min-width: 400px">
<div class="setting-preview border border-r-6 mr-16" style="min-width: 400px">
<div class="setting-preview-container">
<div class="setting-preview-header" :style="customStyle">
<div class="flex-between">

View File

@ -1,5 +1,5 @@
<template>
<div v-show="show" class="workflow-dropdown-menu border border-r-4">
<div v-show="show" class="workflow-dropdown-menu border border-r-6">
<el-tabs v-model="activeName" class="workflow-dropdown-tabs">
<div style="display: flex; width: 100%; justify-content: center" class="mb-4">
<el-input

View File

@ -185,7 +185,7 @@
v-for="(item, index) in applicationForm.knowledge_id_list"
:key="index"
>
<el-card class="relate-knowledge-card border-r-4" shadow="never">
<el-card class="relate-knowledge-card border-r-6" shadow="never">
<div class="flex-between">
<div class="flex align-center" style="width: 80%">
<KnowledgeIcon

View File

@ -36,7 +36,7 @@
<div class="flex align-center">
<h4 class="medium">{{ current?.name }}</h4>
<el-divider direction="vertical" class="mr-8 ml-8" />
<AppIcon iconName="app-wordspace" style="font-size: 16px" class="color-input-placeholder"></AppIcon>
<AppIcon iconName="app-workspace" style="font-size: 16px" class="color-input-placeholder"></AppIcon>
<span class="color-input-placeholder ml-4">
{{ paginationConfig.total }}
</span>
@ -286,4 +286,4 @@ async function handleSave() {
flex-direction: column;
padding: 24px;
}
</style>
</style>

View File

@ -58,7 +58,7 @@
:src="identifyCode"
alt=""
height="38"
class="ml-8 cursor border border-r-4"
class="ml-8 cursor border border-r-6"
@click="makeCode"
/>
</div>

View File

@ -25,7 +25,7 @@
</el-radio-button>
</el-radio-group>
</div>
<div class="update-info flex p-8-12 border-r-4 mb-16">
<div class="update-info flex p-8-12 border-r-6 mb-16">
<div class="mt-4">
<AppIcon iconName="app-warning-colorful" style="font-size: 16px"></AppIcon>
</div>
@ -34,7 +34,7 @@
<p>{{ $t('views.document.feishu.tip2') }}</p>
</div>
</div>
<div class="card-never border-r-4 mb-16">
<div class="card-never border-r-6 mb-16">
<el-checkbox
v-model="allCheck"
:label="$t('views.document.feishu.allCheck')"

View File

@ -18,7 +18,7 @@
</div>
<el-form-item prop="fileList" v-if="form.fileType === 'QA'">
<div class="update-info flex p-8-12 border-r-4 mb-16 w-full">
<div class="update-info flex p-8-12 border-r-6 mb-16 w-full">
<div class="mt-4">
<AppIcon iconName="app-warning-colorful" style="font-size: 16px"></AppIcon>
</div>
@ -71,7 +71,7 @@
</el-upload>
</el-form-item>
<el-form-item prop="fileList" v-else-if="form.fileType === 'table'">
<div class="update-info flex p-8-12 border-r-4 mb-16 w-full">
<div class="update-info flex p-8-12 border-r-6 mb-16 w-full">
<div class="mt-4">
<AppIcon iconName="app-warning-colorful" style="font-size: 16px"></AppIcon>
</div>
@ -125,7 +125,7 @@
</el-upload>
</el-form-item>
<el-form-item prop="fileList" v-else>
<div class="update-info flex p-8-12 border-r-4 mb-16 w-full">
<div class="update-info flex p-8-12 border-r-6 mb-16 w-full">
<div class="mt-4">
<AppIcon iconName="app-warning-colorful" style="font-size: 16px"></AppIcon>
</div>

View File

@ -49,7 +49,7 @@
:src="identifyCode"
alt=""
height="38"
class="ml-8 cursor border border-r-4"
class="ml-8 cursor border border-r-6"
@click="makeCode"
/>
</div>

View File

@ -4,11 +4,15 @@
<div class="p-8">
<div
@click="handleSharedNodeClick"
class="shared-model"
class="shared-button flex cursor border-b"
v-if="showShared && hasPermission(EditionConst.IS_EE, 'OR')"
:class="active?.provider === 'share' && 'active'"
>
<AppIcon iconName="app-shared-active" style="font-size: 18px"></AppIcon>
<AppIcon
iconName="app-shared-active"
style="font-size: 18px"
class="color-primary"
></AppIcon>
<span class="ml-8 lighter">{{ $t('views.shared.shared_model') }}</span>
</div>
<div
@ -154,11 +158,19 @@ const handleSharedNodeClick = () => {
.all-mode {
padding: 10px 8px;
font-weight: 400;
&:hover {
border-radius: var(--app-border-radius-base);
background: var(--app-text-color-light-1);
}
}
.all-mode-active {
border-radius: 4px;
border-radius: var(--app-border-radius-base);
color: var(--el-color-primary);
font-weight: 500 !important;
background: var(--el-color-primary-light-9);
&:hover {
background: var(--el-color-primary-light-9);
}
}
.model-collapse {
border-top: none !important;
@ -172,7 +184,7 @@ const handleSharedNodeClick = () => {
background: none;
&:hover {
background: var(--app-text-color-light-1);
border-radius: 4px;
border-radius: var(--app-border-radius-base);
}
}
:deep(.el-collapse-item) {
@ -191,34 +203,29 @@ const handleSharedNodeClick = () => {
padding-bottom: 0 !important;
}
}
.shared-model {
padding-left: 8px;
display: flex;
align-items: center;
height: 40px;
position: relative;
margin-bottom: 8px;
border-radius: 4px;
cursor: pointer;
&:hover {
background: var(--app-text-color-light-1);
color: var(--el-menu-text-color);
}
.shared-button {
padding: 10px 8px;
font-weight: 400;
font-size: 14px;
margin-bottom: 4px;
&.active {
color: var(--el-color-primary);
background: var(--el-color-primary-light-9);
border-radius: var(--app-border-radius-base);
color: var(--el-color-primary);
font-weight: 500;
&:hover {
background: var(--el-color-primary-light-9);
}
}
&::after {
content: '';
position: absolute;
bottom: -4px;
background-color: #1f232926;
left: 0;
width: 100%;
height: 1px;
&:hover {
border-radius: var(--app-border-radius-base);
background: var(--app-text-color-light-1);
}
&.is-active {
&:hover {
color: var(--el-color-primary);
background: var(--el-color-primary-light-9);
}
}
}
}

View File

@ -186,8 +186,8 @@ const clickListHandle = (item: Provider) => {
active_provider.value = item
list_model()
if (active_provider.value.provider === '') {
commonList1.value.clearCurrent()
commonList2.value.clearCurrent()
commonList1.value?.clearCurrent()
commonList2.value?.clearCurrent()
}
}

View File

@ -80,7 +80,7 @@
<div class="flex align-center">
<h4 class="medium">{{ current?.name }}</h4>
<el-divider direction="vertical" class="mr-8 ml-8" />
<AppIcon iconName="app-wordspace" style="font-size: 16px" class="color-input-placeholder"></AppIcon>
<AppIcon iconName="app-workspace" style="font-size: 16px" class="color-input-placeholder"></AppIcon>
<span class="color-input-placeholder ml-4">
{{ paginationConfig.total }}
</span>

View File

@ -48,7 +48,7 @@
:value="space"
>
<div class="flex">
<AppIcon iconName="app-wordspace"></AppIcon>
<AppIcon iconName="app-workspace"></AppIcon>
<span class="ml-4"> {{ space.name }}</span>
</div>
</el-checkbox>
@ -68,7 +68,7 @@
<template v-for="ele in checkedWorkspace">
<div class="flex-between">
<div class="flex align-center">
<AppIcon iconName="app-wordspace"></AppIcon>
<AppIcon iconName="app-workspace"></AppIcon>
<span class="ml-4 lighter">{{ ele.name }}</span>
</div>
<el-button link>

View File

@ -5,7 +5,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<div class="border border-r-4 mb-16" style="white-space: pre-wrap; height: 400px">
<div class="border border-r-6 mb-16" style="white-space: pre-wrap; height: 400px">
<el-scrollbar>
<div class="p-16">
{{ details }}

View File

@ -1,5 +1,5 @@
<template>
<div class="p-24 pt-0">
<div>
<div class="flex-between mb-16">
<el-button
type="primary"
@ -64,10 +64,7 @@
)
"
>
<!-- TODO: 删除图标需要换 -->
<el-icon>
<Delete />
</el-icon>
<AppIcon iconName="app-delete-users"></AppIcon>
</el-button>
</el-tooltip>
</template>

View File

@ -1,54 +1,45 @@
<template>
<el-scrollbar v-loading="loading">
<div class="p-24 pt-0">
<app-table :data="tableData" border :span-method="objectSpanMethod">
<el-table-column
prop="module"
:width="130"
:label="$t('views.role.permission.moduleName')"
/>
<el-table-column
prop="name"
:width="150"
:label="$t('views.role.permission.operationTarget')"
/>
<el-table-column
prop="permission"
:label="$t('views.model.modelForm.permissionType.label')"
>
<template #default="{ row }">
<el-checkbox-group v-model="row.perChecked" @change="handleCellChange($event, row)">
<el-checkbox
v-for="item in row.permission"
:key="item.id"
:value="item.id"
:disabled="disabled"
>
<div class="ellipsis" style="width: 96px">{{ item.name }}</div>
</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column :width="40">
<template #header>
<app-table :data="tableData" border :span-method="objectSpanMethod">
<el-table-column prop="module" :width="130" :label="$t('views.role.permission.moduleName')" />
<el-table-column
prop="name"
:width="150"
:label="$t('views.role.permission.operationTarget')"
/>
<el-table-column prop="permission" :label="$t('views.model.modelForm.permissionType.label')">
<template #default="{ row }">
<el-checkbox-group v-model="row.perChecked" @change="handleCellChange($event, row)">
<el-checkbox
:model-value="allChecked"
:indeterminate="allIndeterminate"
v-for="item in row.permission"
:key="item.id"
:value="item.id"
:disabled="disabled"
@change="handleCheckAll"
/>
</template>
<template #default="{ row }">
<el-checkbox
v-model="row.enable"
:indeterminate="row.indeterminate"
:disabled="disabled"
@change="(value: boolean) => handleRowChange(value, row)"
/>
</template>
</el-table-column>
</app-table>
</div>
>
<div class="ellipsis" style="width: 96px">{{ item.name }}</div>
</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column :width="40">
<template #header>
<el-checkbox
:model-value="allChecked"
:indeterminate="allIndeterminate"
:disabled="disabled"
@change="handleCheckAll"
/>
</template>
<template #default="{ row }">
<el-checkbox
v-model="row.enable"
:indeterminate="row.indeterminate"
:disabled="disabled"
@change="(value: boolean) => handleRowChange(value, row)"
/>
</template>
</el-table-column>
</app-table>
</el-scrollbar>
<div v-if="!disabled" class="footer border-t">
<el-button type="primary" style="width: 80px" :loading="loading" @click="handleSave">
@ -65,7 +56,7 @@ import type {
RoleTableDataItem,
ChildrenPermissionItem,
} from '@/api/type/role'
import RoleApi from '@/api/system/role'
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api'
import { MsgSuccess } from '@/utils/message'
import { t } from '@/locales'
@ -100,7 +91,7 @@ async function getRolePermission() {
if (!props.currentRole?.id) return
try {
tableData.value = []
const res = await RoleApi.getRolePermissionList(props.currentRole.id, loading)
const res = await loadPermissionApi('role').getRolePermissionList(props.currentRole.id, loading)
tableData.value = transformData(res.data)
} catch (error) {
console.error(error)
@ -175,7 +166,7 @@ async function handleSave() {
})
})
})
await RoleApi.saveRolePermission(props.currentRole?.id as string, permissions, loading)
await loadPermissionApi('role').saveRolePermission(props.currentRole?.id as string, permissions, loading)
MsgSuccess(t('common.saveSuccess'))
} catch (error) {
console.log(error)

View File

@ -38,11 +38,11 @@
<template #dropdown>
<el-dropdown-menu style="min-width: 80px">
<el-dropdown-item @click.stop="createOrUpdateRole(row)" class="p-8">
<AppIcon iconName="app-copy"></AppIcon>
<el-icon><EditPen /></el-icon>
{{ $t('common.rename') }}
</el-dropdown-item>
<el-dropdown-item @click.stop="deleteRole(row)" class="border-t p-8">
<AppIcon iconName="app-copy"></AppIcon>
<el-icon><Delete /></el-icon>
{{ $t('common.delete') }}
</el-dropdown-item>
</el-dropdown-menu>
@ -56,7 +56,7 @@
</template>
</common-list>
<div class="ml-8 border-t flex-between mb-12" style="padding-top: 12px">
<div class="ml-8 border-t flex-between mb-8" style="padding-top: 12px">
<span class="color-secondary lighter">{{ $t('views.role.customRole') }}</span>
<el-tooltip
effect="dark"
@ -105,11 +105,11 @@
<template #dropdown>
<el-dropdown-menu style="min-width: 80px">
<el-dropdown-item @click.stop="createOrUpdateRole(row)" class="p-8">
<AppIcon iconName="app-copy"></AppIcon>
<el-icon><EditPen /></el-icon>
{{ $t('common.rename') }}
</el-dropdown-item>
<el-dropdown-item @click.stop="deleteRole(row)" class="border-t p-8">
<AppIcon iconName="app-copy"></AppIcon>
<el-icon><Delete /></el-icon>
{{ $t('common.delete') }}
</el-dropdown-item>
</el-dropdown-menu>
@ -128,8 +128,8 @@
</div>
<!-- 右边 -->
<div class="role-right w-full" v-loading="loading">
<div class="flex-between mb-16 p-24 pb-0">
<div class="role-right p-24" v-loading="loading">
<div class="flex-between mb-16">
<div class="flex align-center">
<h4>
{{ currentRole?.role_name }}
@ -167,7 +167,6 @@
<script lang="ts" setup>
import { onMounted, ref, watch } from 'vue'
import RoleApi from '@/api/system/role'
import { t } from '@/locales'
import PermissionConfiguration from './component/PermissionConfiguration.vue'
import Member from './component/Member.vue'
@ -243,7 +242,7 @@ function deleteRole(item: RoleItem) {
},
)
.then(() => {
RoleApi.deleteRole(item.id, loading).then(async () => {
loadPermissionApi('role').deleteRole(item.id, loading).then(async () => {
MsgSuccess(t('common.deleteSuccess'))
await getRole()
currentRole.value =

View File

@ -1,9 +1,9 @@
<template>
<div class="flex-between mb-16">
<el-button type="primary" @click="handleAdd"
v-hasPermission="[
RoleConst.ADMIN,
PermissionConst.WORKSPACE_ADD_MEMBER]"
<el-button
type="primary"
@click="handleAdd"
v-hasPermission="[RoleConst.ADMIN, PermissionConst.WORKSPACE_ADD_MEMBER]"
>
{{ $t('views.role.member.add') }}
</el-button>
@ -11,30 +11,50 @@
<el-select class="complex-search__left" v-model="searchType" style="width: 120px">
<el-option :label="$t('views.login.loginForm.username.label')" value="username" />
</el-select>
<el-input v-if="searchType === 'username'" v-model="searchForm.username" @change="getList"
:placeholder="$t('common.inputPlaceholder')" style="width: 220px" clearable />
<el-input
v-if="searchType === 'username'"
v-model="searchForm.username"
@change="getList"
:placeholder="$t('common.inputPlaceholder')"
style="width: 220px"
clearable
/>
</div>
</div>
<app-table :data="tableData" :pagination-config="paginationConfig" @sizeChange="handleSizeChange"
@changePage="getList" v-loading="loading">
<app-table
:data="tableData"
:pagination-config="paginationConfig"
@sizeChange="handleSizeChange"
@changePage="getList"
v-loading="loading"
>
<el-table-column prop="nick_name" :label="$t('views.userManage.userForm.nick_name.label')" />
<el-table-column prop="username" :label="$t('views.login.loginForm.username.label')" />
<el-table-column prop="role_name" :label="$t('views.role.member.role')" />
<el-table-column :label="$t('common.operation')" width="100" fixed="right">
<template #default="{ row }">
<el-tooltip effect="dark" :content="`${$t('views.role.member.delete.button')}`" placement="top">
<el-button type="primary" text @click.stop="handleDelete(row)"
v-hasPermission="[RoleConst.ADMIN,PermissionConst.WORKSPACE_REMOVE_MEMBER]"
<el-tooltip
effect="dark"
:content="`${$t('views.role.member.delete.button')}`"
placement="top"
>
<el-button
type="primary"
text
@click.stop="handleDelete(row)"
v-hasPermission="[RoleConst.ADMIN, PermissionConst.WORKSPACE_REMOVE_MEMBER]"
>
<el-icon>
<EditPen />
</el-icon>
<AppIcon iconName="app-delete-users"></AppIcon>
</el-button>
</el-tooltip>
</template>
</el-table-column>
</app-table>
<AddMemberDrawer ref="addMemberDrawerRef" :currentWorkspace="props.currentWorkspace" @refresh="getList" />
<AddMemberDrawer
ref="addMemberDrawerRef"
:currentWorkspace="props.currentWorkspace"
@refresh="getList"
/>
</template>
<script setup lang="ts">
@ -70,7 +90,12 @@ async function getList() {
const params = {
[searchType.value]: searchForm.value[searchType.value],
}
const res = await WorkspaceApi.getWorkspaceMemberList(props.currentWorkspace?.id, paginationConfig, params, loading)
const res = await WorkspaceApi.getWorkspaceMemberList(
props.currentWorkspace?.id,
paginationConfig,
params,
loading,
)
tableData.value = res.data.records
paginationConfig.total = res.data.total
} catch (error) {
@ -87,30 +112,34 @@ onMounted(() => {
getList()
})
watch(() => props.currentWorkspace?.id, () => {
getList()
})
watch(
() => props.currentWorkspace?.id,
() => {
getList()
},
)
const addMemberDrawerRef = ref<InstanceType<typeof AddMemberDrawer>>()
function handleAdd() {
addMemberDrawerRef.value?.open();
addMemberDrawerRef.value?.open()
}
function handleDelete(row: WorkspaceMemberItem) {
MsgConfirm(
`${t('views.workspace.member.delete.confirmTitle')}${row.nick_name} ?`, '',
{
confirmButtonText: t('common.confirm'),
confirmButtonClass: 'danger',
},
)
MsgConfirm(`${t('views.workspace.member.delete.confirmTitle')}${row.nick_name} ?`, '', {
confirmButtonText: t('common.confirm'),
confirmButtonClass: 'danger',
})
.then(() => {
loading.value = true
WorkspaceApi.deleteWorkspaceMember(props.currentWorkspace?.id as string, row.user_relation_id, loading).then(() => {
WorkspaceApi.deleteWorkspaceMember(
props.currentWorkspace?.id as string,
row.user_relation_id,
loading,
).then(() => {
MsgSuccess(t('common.deleteSuccess'))
getList()
})
})
.catch(() => { })
.catch(() => {})
}
</script>

View File

@ -1,108 +1,131 @@
<template>
<div class="workspace">
<div class="workspace-manage p-16-24">
<h2 class="mb-16">{{ $t('views.workspace.title') }}</h2>
<el-card style="--el-card-padding: 0" body-class="workspace-card">
<el-card style="--el-card-padding: 0">
<div class="flex h-full">
<div class="workspace-left border-r p-16">
<div class="workspace-left_title">
<h4 class="medium">{{ $t('views.workspace.list') }}</h4>
<el-tooltip effect="dark"
:content="`${$t('common.create')}${$t('views.workspace.title')}`"
placement="top">
<el-button type="primary" text @click="createOrUpdateWorkspace()"
v-hasPermission="[RoleConst.ADMIN, PermissionConst.WORKSPACE_CREATE]"
<div class="workspace-left border-r">
<div class="p-24 pb-0">
<div class="flex-between mb-12">
<h4 class="medium">{{ $t('views.workspace.list') }}</h4>
<el-tooltip
effect="dark"
:content="`${$t('common.create')}${$t('views.workspace.title')}`"
placement="top"
>
<AppIcon iconName="app-copy"></AppIcon>
</el-button>
</el-tooltip>
</div>
<div class="p-8">
<el-input v-model="filterText" :placeholder="$t('common.search')" prefix-icon="Search"
clearable/>
<el-button
type="primary"
text
@click="createOrUpdateWorkspace()"
v-hasPermission="[RoleConst.ADMIN, PermissionConst.WORKSPACE_CREATE]"
>
<el-icon :size="18"><Plus /></el-icon>
</el-button>
</el-tooltip>
</div>
<el-input
v-model="filterText"
:placeholder="$t('common.search')"
prefix-icon="Search"
clearable
/>
</div>
<div class="list-height-left">
<el-scrollbar v-loading="loading">
<common-list :data="filterList" @click="clickWorkspace"
:default-active="currentWorkspace?.id">
<template #default="{ row }">
<div class="flex-between">
<span class="ellipsis" style="max-width: initial;">{{ row.name }}</span>
<el-dropdown :teleported="false">
<el-button text>
<el-icon class="color-secondary">
<MoreFilled/>
</el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu style="min-width: 80px">
<el-dropdown-item @click.stop="createOrUpdateWorkspace(row)" class="p-8"
v-if="hasPermission([
RoleConst.ADMIN,
PermissionConst.WORKSPACE_EDIT
],
'OR')"
>
<AppIcon iconName="app-copy"></AppIcon>
{{
$t('common.rename')
}}
</el-dropdown-item>
<el-dropdown-item @click.stop="deleteWorkspace(row)" class="border-t p-8"
v-if="row.id !== 'default' &&
hasPermission([
RoleConst.ADMIN,
PermissionConst.WORKSPACE_DELETE
],
'OR')
">
<AppIcon iconName="app-copy"></AppIcon>
{{
$t('common.delete')
}}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</template>
<template #empty>
<span></span>
</template>
</common-list>
<div class="p-16">
<common-list
:data="filterList"
@click="clickWorkspace"
:default-active="currentWorkspace?.id"
@mouseenter="mouseenter"
@mouseleave="mouseId = ''"
>
<template #default="{ row }">
<div class="flex-between">
<span class="ellipsis">{{ row.name }}</span>
<div @click.stop v-show="mouseId === row.id">
<el-dropdown :teleported="false">
<el-button text>
<el-icon class="color-secondary">
<MoreFilled />
</el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu style="min-width: 80px">
<el-dropdown-item
@click.stop="createOrUpdateWorkspace(row)"
class="p-8"
v-if="
hasPermission(
[RoleConst.ADMIN, PermissionConst.WORKSPACE_EDIT],
'OR',
)
"
>
<el-icon><EditPen /></el-icon>
{{ $t('common.rename') }}
</el-dropdown-item>
<el-dropdown-item
@click.stop="deleteWorkspace(row)"
class="border-t p-8"
v-if="
row.id !== 'default' &&
hasPermission(
[RoleConst.ADMIN, PermissionConst.WORKSPACE_DELETE],
'OR',
)
"
>
<el-icon><Delete /></el-icon>
{{ $t('common.delete') }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</div>
</template>
<template #empty>
<span></span>
</template>
</common-list>
</div>
</el-scrollbar>
</div>
</div>
<!-- 右边 -->
<div class="workspace-right" v-loading="loading">
<div class="flex align-center" style="margin-bottom: 20px;">
<div class="workspace-right p-24" v-loading="loading">
<div class="flex align-center mb-16">
<h4 class="medium">{{ currentWorkspace?.name }}</h4>
<el-divider direction="vertical" class="mr-8 ml-8"/>
<AppIcon iconName="app-wordspace" style="font-size: 16px"
class="color-input-placeholder"></AppIcon>
<el-divider direction="vertical" class="mr-8 ml-8" />
<AppIcon
iconName="app-workspace"
style="font-size: 16px"
class="color-input-placeholder"
></AppIcon>
<span class="color-input-placeholder ml-4">
{{ currentWorkspace?.user_count }}
</span>
</div>
<Member :currentWorkspace="currentWorkspace"/>
<Member :currentWorkspace="currentWorkspace" />
</div>
</div>
</el-card>
<CreateOrUpdateWorkspaceDialog ref="createOrUpdateWorkspaceDialogRef" @refresh="refresh"/>
<CreateOrUpdateWorkspaceDialog ref="createOrUpdateWorkspaceDialogRef" @refresh="refresh" />
</div>
</template>
<script lang="ts" setup>
import {onMounted, ref, watch} from 'vue'
import { onMounted, ref, watch } from 'vue'
import WorkspaceApi from '@/api/workspace/workspace'
import {t} from '@/locales'
import { t } from '@/locales'
import Member from './component/Member.vue'
import CreateOrUpdateWorkspaceDialog from './component/CreateOrUpdateWorkspaceDialog.vue'
import type {WorkspaceItem} from '@/api/type/workspace'
import {MsgSuccess, MsgConfirm} from '@/utils/message'
import {PermissionConst, RoleConst} from '@/utils/permission/data'
import {hasPermission} from '@/utils/permission/index'
import type { WorkspaceItem } from '@/api/type/workspace'
import { MsgSuccess, MsgConfirm } from '@/utils/message'
import { PermissionConst, RoleConst } from '@/utils/permission/data'
import { hasPermission } from '@/utils/permission/index'
const filterText = ref('')
const loading = ref(false)
@ -126,7 +149,7 @@ onMounted(async () => {
})
async function refresh(workspace?: WorkspaceItem) {
await getWorkspace();
await getWorkspace()
//
currentWorkspace.value = workspace ? workspace : currentWorkspace.value
}
@ -135,9 +158,7 @@ function filter(list: WorkspaceItem[], filterText: string) {
if (!filterText.length) {
return list
}
return list.filter((v: WorkspaceItem) =>
v.name.toLowerCase().includes(filterText.toLowerCase()),
)
return list.filter((v: WorkspaceItem) => v.name.toLowerCase().includes(filterText.toLowerCase()))
}
watch(filterText, (val: string) => {
@ -151,21 +172,21 @@ function clickWorkspace(item: WorkspaceItem) {
const createOrUpdateWorkspaceDialogRef = ref<InstanceType<typeof CreateOrUpdateWorkspaceDialog>>()
function createOrUpdateWorkspace(item?: WorkspaceItem) {
createOrUpdateWorkspaceDialogRef.value?.open(item);
createOrUpdateWorkspaceDialogRef.value?.open(item)
}
async function check(id: string) {
try {
return await WorkspaceApi.deleteWorkspaceCheck(id);
return await WorkspaceApi.deleteWorkspaceCheck(id)
} catch (error) {
console.log(error);
console.log(error)
}
}
async function deleteWorkspace(item: WorkspaceItem) {
//
const res = await check(item.id as string);
const canDelete = res ? res.data.can_delete : true;
const res = await check(item.id as string)
const canDelete = res ? res.data.can_delete : true
if (canDelete) {
MsgConfirm(
`${t('views.workspace.delete.confirmTitle')}${item.name} ?`,
@ -174,14 +195,14 @@ async function deleteWorkspace(item: WorkspaceItem) {
confirmButtonText: t('common.confirm'),
confirmButtonClass: 'danger',
},
)
.then(() => {
WorkspaceApi.deleteWorkspace(item.id as string, loading).then(async () => {
MsgSuccess(t('common.deleteSuccess'))
await getWorkspace()
currentWorkspace.value = item.id === currentWorkspace.value?.id ? list.value[0] : currentWorkspace.value
})
).then(() => {
WorkspaceApi.deleteWorkspace(item.id as string, loading).then(async () => {
MsgSuccess(t('common.deleteSuccess'))
await getWorkspace()
currentWorkspace.value =
item.id === currentWorkspace.value?.id ? list.value[0] : currentWorkspace.value
})
})
} else {
MsgConfirm(
`${t('views.workspace.delete.confirmTitle')}${item.name} ?`,
@ -193,48 +214,22 @@ async function deleteWorkspace(item: WorkspaceItem) {
)
}
}
const mouseId = ref('')
function mouseenter(row: any) {
mouseId.value = row.id
}
</script>
<style lang="scss" scoped>
.workspace {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
box-sizing: border-box;
padding: 16px 24px;
:deep(.workspace-card) {
height: 100%;
overflow: hidden;
}
.workspace-manage {
.workspace-left {
box-sizing: border-box;
width: var(--setting-left-width);
min-width: var(--setting-left-width);
.workspace-left_title {
padding: 8px;
display: flex;
justify-content: space-between;
}
.list-height-left {
height: calc(100vh - 255px);
:deep(.common-list li) {
padding-right: 4px;
padding-left: 8px;
}
}
.workspace-left_divider {
padding: 0 8px;
:deep(.el-divider) {
margin: 4px 0;
}
}
}
@ -243,7 +238,6 @@ async function deleteWorkspace(item: WorkspaceItem) {
overflow: hidden;
display: flex;
flex-direction: column;
padding: 24px;
}
}
</style>

View File

@ -223,7 +223,7 @@
{{ $t('views.tool.form.param.paramInfo1') }}
</el-text>
</h4>
<div class="flex-between border-r-4 p-8-12 mb-8 layout-bg lighter">
<div class="flex-between border-r-6 p-8-12 mb-8 layout-bg lighter">
<span>{{ $t('common.result') }} {result}</span>
</div>
</div>

View File

@ -91,7 +91,7 @@
</h5>
<template v-for="(item, index) in nodeFields" :key="index">
<div
class="flex-between border-r-4 p-8-12 mb-8 layout-bg lighter"
class="flex-between border-r-6 p-8-12 mb-8 layout-bg lighter"
@mouseenter="showicon = index"
@mouseleave="showicon = null"
>

View File

@ -1,7 +1,7 @@
<template>
<NodeContainer :nodeModel="nodeModel">
<h5 class="title-decoration-1 mb-8">{{ $t('views.applicationWorkflow.nodeSetting') }}</h5>
<div class="border-r-4 p-8-12 mb-8 layout-bg lighter">
<div class="border-r-6 p-8-12 mb-8 layout-bg lighter">
<el-form
@submit.prevent
:model="form_data"
@ -63,7 +63,7 @@
<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">
<div v-else class="border-r-6 p-8-12 mb-8 layout-bg lighter">
<el-form
ref="dynamicsFormRef"
label-position="top"
@ -135,7 +135,7 @@
<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">
<div v-else class="border-r-6 p-8-12 mb-8 layout-bg lighter">
<el-form
ref="dynamicsFormRef"
label-position="top"

View File

@ -24,7 +24,7 @@
{{ $t('views.application.form.relatedKnowledge.placeholder') }}
</el-text>
<template v-for="(item, index) in form_data.knowledge_id_list" :key="index" v-else>
<div class="flex-between border border-r-4 white-bg mb-4" style="padding: 5px 8px">
<div class="flex-between border border-r-6 white-bg mb-4" style="padding: 5px 8px">
<div class="flex align-center" style="line-height: 20px">
<KnowledgeIcon :type="relatedObject(knowledgeList, item, 'id')?.type" />

View File

@ -4,7 +4,7 @@
<div
v-for="(item, index) in nodeModel.properties.config.globalFields"
:key="index"
class="flex-between border-r-4 p-8-12 mb-8 layout-bg lighter"
class="flex-between border-r-6 p-8-12 mb-8 layout-bg lighter"
@mouseenter="showicon = true"
@mouseleave="showicon = false"
>