|
8 | 8 | <h4>{{ detail?.name }}</h4> |
9 | 9 | <div v-if="showHistory && disablePublic"> |
10 | 10 | <el-text type="info" class="ml-16 color-secondary" |
11 | | - >预览版本: |
| 11 | + >{{ $t('views.applicationWorkflow.info.previewVersion') }} |
12 | 12 | {{ currentVersion.name || datetimeFormat(currentVersion.update_time) }}</el-text |
13 | 13 | > |
14 | 14 | </div> |
15 | 15 | <el-text type="info" class="ml-16 color-secondary" v-else-if="saveTime" |
16 | | - >保存时间:{{ datetimeFormat(saveTime) }}</el-text |
| 16 | + >{{ $t('views.applicationWorkflow.info.saveTime') |
| 17 | + }}{{ datetimeFormat(saveTime) }}</el-text |
17 | 18 | > |
18 | 19 | </div> |
19 | 20 | <div v-if="showHistory && disablePublic"> |
20 | | - <el-button type="primary" class="mr-8" @click="refreshVersion()"> 恢复版本 </el-button> |
| 21 | + <el-button type="primary" class="mr-8" @click="refreshVersion()"> |
| 22 | + {{ $t('views.applicationWorkflow.setting.restoreVersion') }} |
| 23 | + </el-button> |
21 | 24 | <el-divider direction="vertical" /> |
22 | 25 | <el-button text @click="closeHistory"> |
23 | 26 | <el-icon><Close /></el-icon> |
24 | 27 | </el-button> |
25 | 28 | </div> |
26 | 29 | <div v-else> |
27 | | - <el-button icon="Plus" @click="showPopover = !showPopover"> 添加组件 </el-button> |
| 30 | + <el-button icon="Plus" @click="showPopover = !showPopover"> {{ $t('views.applicationWorkflow.setting.addComponent') }} </el-button> |
28 | 31 | <el-button @click="clickShowDebug" :disabled="showDebug"> |
29 | 32 | <AppIcon iconName="app-play-outlined" class="mr-4"></AppIcon> |
30 | 33 | {{ $t('common.debug') }}</el-button |
|
33 | 36 | <AppIcon iconName="app-save-outlined" class="mr-4"></AppIcon> |
34 | 37 | {{ $t('common.save') }} |
35 | 38 | </el-button> |
36 | | - <el-button type="primary" @click="publicHandle"> 发布 </el-button> |
| 39 | + <el-button type="primary" @click="publicHandle"> {{ $t('views.applicationWorkflow.setting.public') }} </el-button> |
37 | 40 |
|
38 | 41 | <el-dropdown trigger="click"> |
39 | 42 | <el-button text @click.stop class="ml-8 mt-4"> |
|
43 | 46 | <el-dropdown-menu> |
44 | 47 | <el-dropdown-item @click="openHistory"> |
45 | 48 | <AppIcon iconName="app-history-outlined"></AppIcon> |
46 | | - 发布历史 |
| 49 | + {{ $t('views.applicationWorkflow.setting.releaseHistory') }} |
47 | 50 | </el-dropdown-item> |
48 | 51 | <el-dropdown-item> |
49 | 52 | <AppIcon iconName="app-save-outlined"></AppIcon> |
50 | | - 自动保存 |
| 53 | + {{ $t('views.applicationWorkflow.setting.autoSave') }} |
51 | 54 | <div class="ml-4"> |
52 | 55 | <el-switch size="small" v-model="isSave" @change="changeSave" /> |
53 | 56 | </div> |
@@ -146,7 +149,7 @@ import { datetimeFormat } from '@/utils/time' |
146 | 149 | import useStore from '@/stores' |
147 | 150 | import { WorkFlowInstance } from '@/workflow/common/validate' |
148 | 151 | import { hasPermission } from '@/utils/permission' |
149 | | -
|
| 152 | +import { t } from '@/locales' |
150 | 153 | const { user, application } = useStore() |
151 | 154 | const router = useRouter() |
152 | 155 | const route = useRoute() |
@@ -258,17 +261,17 @@ async function publicHandle() { |
258 | 261 | return |
259 | 262 | } |
260 | 263 | applicationApi.putPublishApplication(id as String, obj, loading).then(() => { |
261 | | - MsgSuccess('发布成功') |
| 264 | + MsgSuccess(t('views.applicationWorkflow.tip.publicSuccess')) |
262 | 265 | }) |
263 | 266 | }) |
264 | 267 | .catch((res: any) => { |
265 | 268 | const node = res.node |
266 | 269 | const err_message = res.errMessage |
267 | 270 | if (typeof err_message == 'string') { |
268 | | - MsgError(res.node.properties?.stepName + '节点 ' + err_message) |
| 271 | + MsgError(res.node.properties?.stepName + `${t('views.applicationWorkflow.node')} ` + err_message) |
269 | 272 | } else { |
270 | 273 | const keys = Object.keys(err_message) |
271 | | - MsgError(node.properties?.stepName + '节点 ' + err_message[keys[0]]?.[0]?.message) |
| 274 | + MsgError(node.properties?.stepName + `${t('views.applicationWorkflow.node')} ` + err_message[keys[0]]?.[0]?.message) |
272 | 275 | } |
273 | 276 | }) |
274 | 277 | } |
@@ -297,10 +300,10 @@ const clickShowDebug = () => { |
297 | 300 | const node = res.node |
298 | 301 | const err_message = res.errMessage |
299 | 302 | if (typeof err_message == 'string') { |
300 | | - MsgError(res.node.properties?.stepName + '节点 ' + err_message) |
| 303 | + MsgError(res.node.properties?.stepName + `${t('views.applicationWorkflow.node')} ` + err_message) |
301 | 304 | } else { |
302 | 305 | const keys = Object.keys(err_message) |
303 | | - MsgError(node.properties?.stepName + '节点 ' + err_message[keys[0]]?.[0]?.message) |
| 306 | + MsgError(node.properties?.stepName + `${t('views.applicationWorkflow.node')} ` + err_message[keys[0]]?.[0]?.message) |
304 | 307 | } |
305 | 308 | }) |
306 | 309 | } |
|
0 commit comments