Skip to content

Commit 03ec0f3

Browse files
feat: application
1 parent af61494 commit 03ec0f3

File tree

13 files changed

+190
-171
lines changed

13 files changed

+190
-171
lines changed

ui/src/layout/layout-header/UserHeader.vue

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
<LogoFull />
66
</div>
77

8-
<el-divider
9-
direction="vertical"
10-
class="ml-24 mr-24"
11-
v-if="hasPermission(EditionConst.IS_EE, 'OR')"
12-
/>
13-
<!-- 企业版: 工作空间下拉框-->
14-
<WorkspaceDropdown v-if="hasPermission(EditionConst.IS_EE, 'OR')" />
158
<div class="flex-between w-full">
16-
<div></div>
9+
<div class="ml-24 flex align-center">
10+
<!-- 企业版: 工作空间下拉框-->
11+
<el-divider class="mr-16" direction="vertical" v-if="hasPermission(EditionConst.IS_EE, 'OR')" />
12+
<WorkspaceDropdown v-if="hasPermission(EditionConst.IS_EE, 'OR')" />
13+
</div>
1714
<TopMenu></TopMenu>
1815
<TopAbout></TopAbout>
1916
</div>

ui/src/locales/lang/en-US/views/application-overview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838
showSourceLabel: 'Show Knowledge Source',
3939
clientQueryLimitLabel: 'Query Limit per Client',
4040
authentication: 'Authentication',
41-
authenticationValue: 'Access Password',
41+
authenticationValue: 'Password Access',
4242
timesDays: 'queries per day',
4343
whitelistLabel: 'Allowed Domains',
4444
whitelistPlaceholder:

ui/src/locales/lang/zh-CN/views/application-overview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default {
4848
clientQueryLimitLabel: '每个客户端提问限制',
4949
timesDays: '次/天',
5050
authentication: '身份验证',
51-
authenticationValue: '验证密码',
51+
authenticationValue: '密码验证',
5252
whitelistLabel: '白名单',
5353
whitelistPlaceholder:
5454
'请输入允许嵌入第三方的源地址,一行一个,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io'

ui/src/locales/lang/zh-Hant/views/application-overview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838
clientQueryLimitLabel: '每個用戶端提問限制',
3939
timesDays: '次/天',
4040
authentication: '身份驗證',
41-
authenticationValue: '驗證密碼',
41+
authenticationValue: '密碼驗證',
4242
whitelistLabel: '白名單',
4343
whitelistPlaceholder:
4444
'請輸入允許嵌入第三方的來源位址,一行一個,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io'

ui/src/styles/component.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@
135135
color: var(--app-text-color);
136136
}
137137

138-
:deep(.el-radio__label) {
139-
padding-left: 30px;
138+
.el-radio__label {
139+
padding-left: 24px;
140140
width: 100%;
141141
}
142-
:deep(.el-radio__input) {
142+
.el-radio__input {
143143
position: absolute;
144-
top: 16px;
144+
top: 5px;
145145
}
146146
.active {
147147
border: 1px solid var(--el-color-primary);

ui/src/styles/element-plus.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@
230230
.el-form-item__label {
231231
font-weight: 400;
232232
width: 100%;
233+
color: var(--el-text-color-primary);
233234
}
234235

235236
.el-form-item__error {

ui/src/views/application-overview/xpack-component/XPackDisplaySettingDialog.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,6 @@
376376
$t('views.applicationOverview.appInfo.SettingDisplayDialog.showExecutionDetail')
377377
"
378378
/>
379-
<el-checkbox
380-
v-model="xpackForm.show_history"
381-
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.showHistory')"
382-
/>
383379
<el-checkbox
384380
v-model="xpackForm.show_guide"
385381
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.displayGuide')"

ui/src/views/application-overview/xpack-component/XPackLimitDrawer.vue

Lines changed: 91 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<template>
2-
<el-dialog
3-
:title="$t('views.applicationOverview.appInfo.accessControl')"
4-
v-model="dialogVisible"
5-
:close-on-click-modal="false"
6-
:close-on-press-escape="false"
7-
width="650"
8-
>
9-
<el-form label-position="top" ref="limitFormRef" :model="form">
2+
<el-drawer v-model="dialogVisible" size="60%">
3+
<template #header>
4+
<h4>{{ $t('views.applicationOverview.appInfo.accessControl') }}</h4>
5+
</template>
6+
<el-form
7+
label-position="top"
8+
ref="limitFormRef"
9+
:model="form"
10+
require-asterisk-position="right"
11+
>
1012
<el-form-item
1113
:label="$t('views.applicationOverview.appInfo.LimitDialog.clientQueryLimitLabel')"
1214
>
@@ -28,42 +30,81 @@
2830
<el-form-item :label="$t('views.applicationOverview.appInfo.LimitDialog.authentication')">
2931
<el-switch size="small" v-model="form.authentication" @change="firstGeneration"></el-switch>
3032
</el-form-item>
31-
<el-form-item
32-
prop="authentication_value"
33-
v-if="form.authentication"
34-
:label="$t('views.applicationOverview.appInfo.LimitDialog.authenticationValue')"
35-
>
36-
<el-input
37-
class="authentication-append-input"
38-
v-model="form.authentication_value"
39-
readonly
40-
style="width: 268px"
41-
disabled
42-
>
43-
<template #append>
44-
<el-tooltip :content="$t('common.copy')" placement="top">
45-
<el-button
46-
type="primary"
47-
text
48-
@click="copyClick(form.authentication_value)"
49-
style="margin: 0 4px !important"
50-
>
51-
<AppIcon iconName="app-copy"></AppIcon>
52-
</el-button>
53-
</el-tooltip>
54-
<el-tooltip :content="$t('common.refresh')" placement="top">
55-
<el-button
56-
@click="refreshAuthentication"
57-
type="primary"
58-
text
59-
style="margin: 0 4px 0 0 !important"
60-
>
61-
<el-icon><RefreshRight /></el-icon>
33+
<el-radio-group v-if="form.authentication" v-model="form.method" class="card__radio">
34+
<el-card shadow="never" class="mb-16" :class="form.method === 'replace' ? 'active' : ''">
35+
<el-radio value="replace" size="large">
36+
<p class="mb-4 lighter">
37+
{{ $t('views.applicationOverview.appInfo.LimitDialog.authenticationValue') }}
38+
</p>
39+
</el-radio>
40+
<el-form-item class="ml-24">
41+
<el-input
42+
class="authentication-append-input"
43+
v-model="form.authentication_value"
44+
readonly
45+
style="width: 268px"
46+
>
47+
<template #append>
48+
<el-tooltip :content="$t('common.copy')" placement="top">
49+
<el-button
50+
type="primary"
51+
text
52+
@click="copyClick(form.authentication_value)"
53+
style="margin: 0 0 0 4px !important"
54+
>
55+
<AppIcon iconName="app-copy"></AppIcon>
56+
</el-button>
57+
</el-tooltip>
58+
<el-tooltip :content="$t('common.refresh')" placement="top">
59+
<el-button
60+
@click="refreshAuthentication"
61+
type="primary"
62+
text
63+
style="margin: 0 4px 0 0 !important"
64+
>
65+
<el-icon><RefreshRight /></el-icon>
66+
</el-button>
67+
</el-tooltip>
68+
</template>
69+
</el-input>
70+
</el-form-item>
71+
</el-card>
72+
73+
<el-card shadow="never" class="mb-16" :class="form.method === 'complete' ? 'active' : ''">
74+
<el-radio value="complete" size="large">
75+
<p class="mb-16 lighter">
76+
{{ $t('views.system.authentication.title') }}
77+
<el-button type="primary" link @click="router.push({ path: '' })">
78+
{{ '去配置对话用户' }}
6279
</el-button>
63-
</el-tooltip>
64-
</template>
65-
</el-input>
66-
</el-form-item>
80+
</p>
81+
</el-radio>
82+
<el-form-item
83+
label="登录方式"
84+
:rules="[
85+
{
86+
required: true,
87+
message: $t('请选择登录方式'),
88+
trigger: 'change',
89+
},
90+
]"
91+
prop="checkList"
92+
class="ml-24 border-t"
93+
style="padding-top: 16px"
94+
>
95+
<el-checkbox-group v-model="form.checkList">
96+
<el-checkbox label="账号登录" value="账号登录" />
97+
<el-checkbox label="LDAP" value="LDAP" />
98+
<el-checkbox label="OIDC" value="OIDC" />
99+
<el-checkbox label="CAS" value="CAS" />
100+
<el-checkbox label="企业微信" value="企业微信" />
101+
<el-checkbox label="钉钉" value="钉钉" />
102+
<el-checkbox label="飞书" value="飞书" />
103+
</el-checkbox-group>
104+
</el-form-item>
105+
</el-card>
106+
</el-radio-group>
107+
67108
<el-form-item
68109
:label="$t('views.applicationOverview.appInfo.LimitDialog.whitelistLabel')"
69110
@click.prevent
@@ -80,24 +121,25 @@
80121
</el-form-item>
81122
</el-form>
82123
<template #footer>
83-
<span class="dialog-footer">
124+
<div>
84125
<el-button @click.prevent="dialogVisible = false">{{ $t('common.cancel') }} </el-button>
85126
<el-button type="primary" @click="submit(limitFormRef)" :loading="loading">
86-
{{ $t('common.save') }}
127+
{{ $t('common.create') }}
87128
</el-button>
88-
</span>
129+
</div>
89130
</template>
90-
</el-dialog>
131+
</el-drawer>
91132
</template>
92133
<script setup lang="ts">
93134
import { ref, watch } from 'vue'
94-
import { useRoute } from 'vue-router'
135+
import { useRoute, useRouter } from 'vue-router'
95136
import type { FormInstance, FormRules } from 'element-plus'
96137
import applicationApi from '@/api/application/application'
97138
import { MsgSuccess } from '@/utils/message'
98139
import { t } from '@/locales'
99140
import { copyClick } from '@/utils/clipboard'
100141
142+
const router = useRouter()
101143
const route = useRoute()
102144
const {
103145
params: { id },
@@ -178,7 +220,7 @@ defineExpose({ open })
178220
</script>
179221
<style lang="scss" scoped>
180222
.authentication-append-input {
181-
.el-input-group__append {
223+
:deep(.el-input-group__append) {
182224
padding: 0 !important;
183225
}
184226
}

ui/src/views/document/upload/SetRules.vue

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="set-rules__right">
77
<el-scrollbar>
88
<div class="left-height" @click.stop>
9-
<el-radio-group v-model="radio" class="set-rules__radio">
9+
<el-radio-group v-model="radio" class="card__radio">
1010
<el-card shadow="never" class="mb-16" :class="radio === '1' ? 'active' : ''">
1111
<el-radio value="1" size="large">
1212
<p class="mb-4">{{ $t('views.document.setRules.intelligent.label') }}</p>
@@ -218,7 +218,7 @@ function splitDocument() {
218218
}
219219
220220
const initSplitPatternList = () => {
221-
documentApi.listSplitPattern(id,patternLoading).then((ok) => {
221+
documentApi.listSplitPattern(id, patternLoading).then((ok) => {
222222
splitPatternList.value = ok.data
223223
})
224224
}
@@ -247,32 +247,6 @@ defineExpose({
247247
max-height: calc(var(--create-knowledge-height) - 110px);
248248
overflow-x: hidden;
249249
}
250-
251-
&__radio {
252-
width: 100%;
253-
display: block;
254-
255-
.el-radio {
256-
white-space: break-spaces;
257-
width: 100%;
258-
height: 100%;
259-
line-height: 22px;
260-
color: var(--app-text-color);
261-
}
262-
263-
:deep(.el-radio__label) {
264-
padding-left: 30px;
265-
width: 100%;
266-
}
267-
:deep(.el-radio__input) {
268-
position: absolute;
269-
top: 16px;
270-
}
271-
.active {
272-
border: 1px solid var(--el-color-primary);
273-
}
274-
}
275-
276250
&__form {
277251
.title {
278252
font-size: 14px;

ui/src/views/knowledge/component/SyncWebDialog.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<script setup lang="ts">
3838
import { ref, watch } from 'vue'
3939
import knowledgeApi from '@/api/knowledge/knowledge'
40+
import { MsgSuccess } from '@/utils/message'
4041
4142
const emit = defineEmits(['refresh'])
4243
const loading = ref<boolean>(false)
@@ -59,6 +60,7 @@ const open = (id: string) => {
5960
const submit = () => {
6061
knowledgeApi.putSyncWebKnowledge(knowledgeId.value, method.value, loading).then((res: any) => {
6162
emit('refresh', res.data)
63+
MsgSuccess(t('views.knowledge.tip.syncSuccess'))
6264
dialogVisible.value = false
6365
})
6466
}

0 commit comments

Comments
 (0)