Skip to content

Commit 66bcd1d

Browse files
fix: share style error and workflow node style
1 parent 85de26d commit 66bcd1d

6 files changed

Lines changed: 81 additions & 35 deletions

File tree

ui/src/components/ai-chat/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,7 @@ onMounted(() => {
883883
})
884884
bus.on('click:share', (id: string) => {
885885
multipleSelectionChat.value.push(id)
886+
checkAll.value = multipleSelectionChat.value.length === chatList.value.length
886887
emit('update:selection', true)
887888
})
888889
})

ui/src/styles/app.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ h5 {
228228
.p-24 {
229229
padding: calc(var(--app-base-px) * 3);
230230
}
231+
.p-4-12 {
232+
padding: calc(var(--app-base-px) - 4px) calc(var(--app-base-px) + 4px);
233+
}
231234
.p-8-12 {
232235
padding: calc(var(--app-base-px)) calc(var(--app-base-px) + 4px);
233236
}

ui/src/views/chat/embed/index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,17 @@
4848
<el-button
4949
text
5050
@click="newChat"
51+
v-if="!showSelection"
5152
:style="{ color: applicationDetail?.custom_theme?.header_font_color }"
5253
>
5354
<AppIcon iconName="app-create-chat" style="font-size: 20px"></AppIcon>
5455
</el-button>
55-
<el-tooltip effect="dark" :content="$t('chat.share')" placement="top">
56+
<el-tooltip
57+
v-if="!showSelection && currentChatId !== 'new'"
58+
effect="dark"
59+
:content="$t('chat.share')"
60+
placement="top"
61+
>
5662
<el-button text @click="clickShareHandle" :disabled="AiChatRef?.loading">
5763
<AppIcon iconName="app-share"></AppIcon>
5864
</el-button>
@@ -246,6 +252,7 @@ function getChatRecord() {
246252
247253
const clickListHandle = (item: any) => {
248254
if (item.id !== currentChatId.value) {
255+
showSelection.value = false
249256
paginationConfig.current_page = 1
250257
currentRecordList.value = []
251258
currentChatId.value = item.id

ui/src/views/chat/mobile/index.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,19 @@
4747
<el-button
4848
text
4949
@click="newChat"
50-
class="mr-16"
50+
:class="currentChatId === 'new' ? 'mr-16' : ''"
51+
v-if="!showSelection"
5152
:style="{ color: applicationDetail?.custom_theme?.header_font_color }"
5253
>
5354
<AppIcon iconName="app-create-chat" style="font-size: 20px"></AppIcon>
5455
</el-button>
55-
<el-tooltip effect="dark" :content="$t('chat.share')" placement="top">
56-
<el-button text @click="clickShareHandle" :disabled="AiChatRef?.loading">
56+
<el-tooltip
57+
effect="dark"
58+
:content="$t('chat.share')"
59+
placement="top"
60+
v-if="!showSelection && currentChatId !== 'new'"
61+
>
62+
<el-button class="mr-16" text @click="clickShareHandle" :disabled="AiChatRef?.loading">
5763
<AppIcon iconName="app-share"></AppIcon>
5864
</el-button>
5965
</el-tooltip>
@@ -246,6 +252,7 @@ function getChatRecord() {
246252
247253
const clickListHandle = (item: any) => {
248254
if (item.id !== currentChatId.value) {
255+
showSelection.value = false
249256
paginationConfig.current_page = 1
250257
currentRecordList.value = []
251258
currentChatId.value = item.id

ui/src/views/chat/pc/index.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@
126126
<span v-if="paginationConfig.total" class="lighter">
127127
{{ paginationConfig.total }} {{ $t('chat.question_count') }}
128128
</span>
129-
<el-tooltip effect="dark" :content="$t('chat.share')" placement="top">
129+
<el-tooltip
130+
effect="dark"
131+
:content="$t('chat.share')"
132+
placement="top"
133+
v-if="!showSelection"
134+
>
130135
<el-button
131136
text
132137
class="ml-12"
@@ -136,7 +141,7 @@
136141
<AppIcon iconName="app-share"></AppIcon>
137142
</el-button>
138143
</el-tooltip>
139-
<el-dropdown class="ml-8">
144+
<el-dropdown class="ml-8" v-if="!showSelection">
140145
<el-button text>
141146
<AppIcon iconName="app-export" :title="$t('chat.exportRecords')"></AppIcon>
142147
</el-button>

ui/src/workflow/common/NodeContainer.vue

Lines changed: 52 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -102,26 +102,49 @@
102102
<el-switch v-model="enable_exception" size="small" />
103103
</div>
104104
</div>
105+
<div class="border-r-6 p-4-12 layout-bg lighter">
106+
<template v-for="(item, index) in nodeFields" :key="index">
107+
<div
108+
class="flex-between mb-8 mt-8"
109+
@mouseenter="showicon = index"
110+
@mouseleave="showicon = null"
111+
>
112+
<span class="break-all">{{ item.label }} {{ '{' + item.value + '}' }}</span>
113+
<el-tooltip
114+
effect="dark"
115+
:content="$t('workflow.setting.copyParam')"
116+
placement="top"
117+
v-if="showicon === index"
118+
>
119+
<el-button link @click="copyClick(item.globeLabel)" style="padding: 0">
120+
<AppIcon iconName="app-copy"></AppIcon>
121+
</el-button>
122+
</el-tooltip>
123+
</div>
124+
</template>
125+
</div>
105126

106-
<template v-for="(item, index) in nodeFields" :key="index">
107-
<div
108-
class="flex-between border-r-6 p-8-12 mb-8 layout-bg lighter"
109-
@mouseenter="showicon = index"
110-
@mouseleave="showicon = null"
111-
>
112-
<span class="break-all">{{ item.label }} {{ '{' + item.value + '}' }}</span>
113-
<el-tooltip
114-
effect="dark"
115-
:content="$t('workflow.setting.copyParam')"
116-
placement="top"
117-
v-if="showicon === index"
127+
<div class="border-r-6 p-4-12 layout-bg lighter mt-8" v-if="enable_exception">
128+
<template v-for="(item, index) in abnormalNodeFields" :key="index">
129+
<div
130+
class="flex-between mb-8 mt-8"
131+
@mouseenter="showicon = 'abnormal' + index"
132+
@mouseleave="showicon = null"
118133
>
119-
<el-button link @click="copyClick(item.globeLabel)" style="padding: 0">
120-
<AppIcon iconName="app-copy"></AppIcon>
121-
</el-button>
122-
</el-tooltip>
123-
</div>
124-
</template>
134+
<span class="break-all">{{ item.label }} {{ '{' + item.value + '}' }}</span>
135+
<el-tooltip
136+
effect="dark"
137+
:content="$t('workflow.setting.copyParam')"
138+
placement="top"
139+
v-if="showicon === 'abnormal' + index"
140+
>
141+
<el-button link @click="copyClick(item.globeLabel)" style="padding: 0">
142+
<AppIcon iconName="app-copy"></AppIcon>
143+
</el-button>
144+
</el-tooltip>
145+
</div>
146+
</template>
147+
</div>
125148
</template>
126149
</div>
127150
</el-collapse-transition>
@@ -380,21 +403,21 @@ const nodeFields = computed(() => {
380403
globeValue: `{{context['${props.nodeModel.id}'].${field.value}}}`,
381404
}
382405
})
383-
if (enable_exception.value) {
384-
return [
385-
...fields,
386-
{
387-
label: t('workflow.abnormalInformation'),
388-
value: 'exception_message',
389-
globeLabel: `{{${props.nodeModel.properties.stepName}.exception_message}}`,
390-
globeValue: `{{context['${props.nodeModel.id}'].exception_message}}`,
391-
},
392-
]
393-
}
394406
return fields
395407
}
396408
return []
397409
})
410+
411+
const abnormalNodeFields = computed(() => {
412+
return [
413+
{
414+
label: t('workflow.abnormalInformation'),
415+
value: 'exception_message',
416+
globeLabel: `{{${props.nodeModel.properties.stepName}.exception_message}}`,
417+
globeValue: `{{context['${props.nodeModel.id}'].exception_message}}`,
418+
},
419+
]
420+
})
398421
watch(enable_exception, () => {
399422
props.nodeModel.graphModel.eventCenter.emit(
400423
'delete_edge',

0 commit comments

Comments
 (0)