|
21 | 21 | <el-row :gutter="12"> |
22 | 22 | <el-col :span="12" class="mt-16"> |
23 | 23 | <div class="flex"> |
24 | | - <el-text type="info" |
25 | | - >{{ $t('views.applicationOverview.appInfo.publicAccessLink') }} |
| 24 | + <el-text type="info">{{ $t('views.applicationOverview.appInfo.publicAccessLink') }} |
26 | 25 | </el-text> |
27 | | - <el-switch |
28 | | - v-model="accessToken.is_active" |
29 | | - class="ml-8" |
30 | | - size="small" |
31 | | - inline-prompt |
| 26 | + <el-switch v-model="accessToken.is_active" class="ml-8" size="small" inline-prompt |
32 | 27 | :active-text="$t('views.applicationOverview.appInfo.openText')" |
33 | 28 | :inactive-text="$t('views.applicationOverview.appInfo.closeText')" |
34 | | - :before-change="() => changeState(accessToken.is_active)" |
35 | | - /> |
| 29 | + :before-change="() => changeState(accessToken.is_active)" /> |
36 | 30 | </div> |
37 | 31 |
|
38 | 32 | <div class="mt-4 mb-16 url-height flex align-center" style="margin-bottom: 37px"> |
|
45 | 39 | </el-button> |
46 | 40 | </el-tooltip> |
47 | 41 | <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top"> |
48 | | - <el-button |
49 | | - @click="refreshAccessToken" |
50 | | - type="primary" |
51 | | - text |
52 | | - style="margin-left: 1px" |
53 | | - > |
| 42 | + <el-button @click="refreshAccessToken" type="primary" text style="margin-left: 1px"> |
54 | 43 | <el-icon> |
55 | 44 | <RefreshRight /> |
56 | 45 | </el-icon> |
57 | 46 | </el-button> |
58 | 47 | </el-tooltip> |
59 | 48 | </div> |
60 | 49 | <div> |
61 | | - <el-button |
62 | | - v-if="accessToken?.is_active" |
63 | | - :disabled="!accessToken?.is_active" |
64 | | - tag="a" |
65 | | - :href="shareUrl" |
66 | | - target="_blank" |
67 | | - > |
| 50 | + <el-button v-if="accessToken?.is_active" :disabled="!accessToken?.is_active" tag="a" :href="shareUrl" |
| 51 | + target="_blank"> |
68 | 52 | <AppIcon iconName="app-create-chat" class="mr-4"></AppIcon> |
69 | 53 | {{ $t('views.application.operation.toChat') }} |
70 | 54 | </el-button> |
71 | 55 | <el-button v-else :disabled="!accessToken?.is_active"> |
72 | 56 | <AppIcon iconName="app-create-chat" class="mr-4"></AppIcon> |
73 | 57 | {{ $t('views.application.operation.toChat') }} |
74 | 58 | </el-button> |
75 | | - <el-button |
76 | | - :disabled="!accessToken?.is_active" |
77 | | - @click="openDialog" |
78 | | - v-if="permissionPrecise.overview_embed(id)" |
79 | | - > |
| 59 | + <el-button :disabled="!accessToken?.is_active" @click="openDialog" |
| 60 | + v-if="permissionPrecise.overview_embed(id)"> |
80 | 61 | <AppIcon iconName="app-export" class="mr-4"></AppIcon> |
81 | 62 | {{ $t('views.applicationOverview.appInfo.embedInWebsite') }} |
82 | 63 | </el-button> |
|
88 | 69 | {{ $t('views.applicationOverview.appInfo.accessControl') }} |
89 | 70 | </el-button> |
90 | 71 | <!-- 显示设置 --> |
91 | | - <el-button |
92 | | - @click="openDisplaySettingDialog" |
93 | | - v-if="permissionPrecise.overview_display(id)" |
94 | | - > |
| 72 | + <el-button @click="openDisplaySettingDialog" v-if="permissionPrecise.overview_display(id)"> |
95 | 73 | <el-icon class="mr-4"> |
96 | 74 | <Setting /> |
97 | 75 | </el-icon> |
|
101 | 79 | </el-col> |
102 | 80 | <el-col :span="12" class="mt-16"> |
103 | 81 | <div class="flex"> |
104 | | - <el-text type="info" |
105 | | - >{{ $t('views.applicationOverview.appInfo.apiAccessCredentials') }} |
| 82 | + <el-text type="info">{{ $t('views.applicationOverview.appInfo.apiAccessCredentials') }} |
106 | 83 | </el-text> |
107 | 84 | </div> |
108 | 85 | <div class="mt-4 mb-16 url-height"> |
109 | 86 | <div> |
110 | 87 | <el-text>API {{ $t('common.fileUpload.document') }}: </el-text> |
111 | | - <el-button |
112 | | - type="primary" |
113 | | - link |
114 | | - @click="toUrl(apiUrl)" |
115 | | - class="vertical-middle lighter break-all" |
116 | | - > |
| 88 | + <el-button type="primary" link @click="toUrl(apiUrl)" class="vertical-middle lighter break-all"> |
117 | 89 | {{ apiUrl }} |
118 | 90 | </el-button> |
119 | 91 | </div> |
|
124 | 96 |
|
125 | 97 | <span class="vertical-middle lighter break-all ellipsis-1">{{ |
126 | 98 | baseUrl + id |
127 | | - }}</span> |
| 99 | + }}</span> |
128 | 100 | <el-tooltip effect="dark" :content="$t('common.copy')" placement="top"> |
129 | 101 | <el-button type="primary" text @click="copyClick(baseUrl + id)"> |
130 | 102 | <AppIcon iconName="app-copy"></AppIcon> |
|
133 | 105 | </div> |
134 | 106 | </div> |
135 | 107 | <div> |
136 | | - <el-button |
137 | | - @click="openAPIKeyDialog" |
138 | | - v-if="permissionPrecise.overview_api_key(id)" |
139 | | - > |
| 108 | + <el-button @click="openAPIKeyDialog" v-if="permissionPrecise.overview_api_key(id)"> |
140 | 109 | <el-icon class="mr-4"> |
141 | 110 | <Key /> |
142 | 111 | </el-icon> |
|
152 | 121 | {{ $t('views.applicationOverview.monitor.monitoringStatistics') }} |
153 | 122 | </h4> |
154 | 123 | <div class="mb-16"> |
155 | | - <el-select |
156 | | - v-model="history_day" |
157 | | - class="mr-12" |
158 | | - @change="changeDayHandle" |
159 | | - style="width: 180px" |
160 | | - > |
161 | | - <el-option |
162 | | - v-for="item in dayOptions" |
163 | | - :key="item.value" |
164 | | - :label="item.label" |
165 | | - :value="item.value" |
166 | | - /> |
| 124 | + <el-select v-model="history_day" class="mr-12" @change="changeDayHandle" style="width: 180px"> |
| 125 | + <el-option v-for="item in dayOptions" :key="item.value" :label="item.label" :value="item.value" /> |
167 | 126 | </el-select> |
168 | | - <el-date-picker |
169 | | - v-if="history_day === 'other'" |
170 | | - v-model="daterangeValue" |
171 | | - type="daterange" |
| 127 | + <el-date-picker v-if="history_day === 'other'" v-model="daterangeValue" type="daterange" |
172 | 128 | :start-placeholder="$t('views.applicationOverview.monitor.startDatePlaceholder')" |
173 | | - :end-placeholder="$t('views.applicationOverview.monitor.endDatePlaceholder')" |
174 | | - format="YYYY-MM-DD" |
175 | | - value-format="YYYY-MM-DD" |
176 | | - @change="changeDayRangeHandle" |
177 | | - /> |
| 129 | + :end-placeholder="$t('views.applicationOverview.monitor.endDatePlaceholder')" format="YYYY-MM-DD" |
| 130 | + value-format="YYYY-MM-DD" @change="changeDayRangeHandle" /> |
178 | 131 | </div> |
179 | 132 | <div v-loading="statisticsLoading"> |
180 | 133 | <StatisticsCharts :data="statisticsData" /> |
|
183 | 136 | </div> |
184 | 137 | </el-scrollbar> |
185 | 138 |
|
186 | | - <EmbedDialog |
187 | | - ref="EmbedDialogRef" |
188 | | - :data="detail" |
189 | | - :api-input-params="mapToUrlParams(apiInputParams)" |
190 | | - /> |
| 139 | + <EmbedDialog ref="EmbedDialogRef" :data="detail" :api-input-params="mapToUrlParams(apiInputParams)" /> |
191 | 140 | <APIKeyDialog ref="APIKeyDialogRef" /> |
192 | 141 |
|
193 | 142 | <!-- 社区版访问限制 --> |
@@ -232,7 +181,7 @@ const { |
232 | 181 | params: { id }, |
233 | 182 | } = route as any |
234 | 183 |
|
235 | | -const apiUrl = window.location.origin + '/doc/chat/' |
| 184 | +const apiUrl = window.location.origin + '/doc_chat/' |
236 | 185 |
|
237 | 186 | const baseUrl = window.location.origin + `${window.MaxKB.chatPrefix}/api/` |
238 | 187 |
|
@@ -373,7 +322,7 @@ function refreshAccessToken() { |
373 | 322 | const str = t('views.applicationOverview.appInfo.refreshToken.refreshSuccess') |
374 | 323 | updateAccessToken(obj, str) |
375 | 324 | }) |
376 | | - .catch(() => {}) |
| 325 | + .catch(() => { }) |
377 | 326 | } |
378 | 327 |
|
379 | 328 | async function changeState(bool: boolean) { |
@@ -419,20 +368,20 @@ function getDetail() { |
419 | 368 | .map((v: any) => { |
420 | 369 | apiInputParams.value = v.properties.api_input_field_list |
421 | 370 | ? v.properties.api_input_field_list.map((v: any) => { |
422 | | - return { |
423 | | - name: v.variable, |
424 | | - value: v.default_value, |
425 | | - } |
426 | | - }) |
| 371 | + return { |
| 372 | + name: v.variable, |
| 373 | + value: v.default_value, |
| 374 | + } |
| 375 | + }) |
427 | 376 | : v.properties.input_field_list |
428 | 377 | ? v.properties.input_field_list |
429 | | - .filter((v: any) => v.assignment_method === 'api_input') |
430 | | - .map((v: any) => { |
431 | | - return { |
432 | | - name: v.variable, |
433 | | - value: v.default_value, |
434 | | - } |
435 | | - }) |
| 378 | + .filter((v: any) => v.assignment_method === 'api_input') |
| 379 | + .map((v: any) => { |
| 380 | + return { |
| 381 | + name: v.variable, |
| 382 | + value: v.default_value, |
| 383 | + } |
| 384 | + }) |
436 | 385 | : [] |
437 | 386 | }) |
438 | 387 | }) |
|
0 commit comments