Skip to content

Commit 1da8315

Browse files
fix: Associated Resources
1 parent 278dbf0 commit 1da8315

File tree

6 files changed

+40
-10
lines changed

6 files changed

+40
-10
lines changed

ui/src/components/resource_mapping/index.vue

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
:row-key="(row: any) => row.id"
9595
v-loading="loading"
9696
>
97-
<el-table-column prop="name" :label="$t('common.name')" min-width="120" show-overflow-tooltip>
97+
<el-table-column prop="name" :label="$t('common.name')" min-width="130" show-overflow-tooltip>
9898
<template #default="{ row }">
99-
<el-button link>
99+
<el-button link @click="toSetting(row)">
100100
<div class="flex align-center">
101101
<KnowledgeIcon
102102
v-if="row.source_type === 'KNOWLEDGE'"
@@ -211,15 +211,15 @@
211211
</template>
212212
<script setup lang="ts">
213213
import { ref, reactive, computed, onMounted, watch } from 'vue'
214-
import { useRoute } from 'vue-router'
214+
import { useRoute, useRouter } from 'vue-router'
215215
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
216216
import { isAppIcon, resetUrl } from '@/utils/common'
217217
import useStore from '@/stores'
218218
import { t } from '@/locales'
219219
import type { Provider } from '@/api/type/model'
220220
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api.ts'
221-
222221
const route = useRoute()
222+
const router = useRouter()
223223
const { model, user } = useStore()
224224
const searchType = ref<string>('resource_name')
225225
const query = ref<any>({
@@ -345,6 +345,35 @@ async function getWorkspaceList() {
345345
}
346346
}
347347
348+
function toSetting(row: any) {
349+
let from = ''
350+
if (route.path.includes('resource-management')) {
351+
from = 'resource-management'
352+
} else if (route.path.includes('shared')) {
353+
from = 'shared'
354+
} else {
355+
from = 'workspace'
356+
}
357+
if (row.source_type === 'KNOWLEDGE') {
358+
const newUrl = router.resolve({
359+
path: `/knowledge/${row.source_id}/${from}/${row.type}/document`,
360+
}).href
361+
window.open(newUrl)
362+
} else if (row.source_type === 'APPLICATION') {
363+
if (row.type === 'WORK_FLOW') {
364+
const newUrl = router.resolve({
365+
path: `/application/${from}/${row.source_id}/workflow`,
366+
}).href
367+
window.open(newUrl)
368+
} else {
369+
const newUrl = router.resolve({
370+
path: `/application/${from}/${row.source_id}/SIMPLE/setting`,
371+
}).href
372+
window.open(newUrl)
373+
}
374+
}
375+
}
376+
348377
watch(
349378
[() => workspaceOptions.value, () => filterText.value],
350379
() => {

ui/src/locales/lang/en-US/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default {
7575
success: 'Successful',
7676
fail: 'Failed',
7777
all: 'All',
78-
padding: 'Padding',
78+
STARTED: 'Padding',
7979
REVOKED: 'Cancelled',
8080
REVOKE: 'Cancelling',
8181
},

ui/src/locales/lang/zh-CN/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
success: '成功',
7777
fail: '失败',
7878
all: '全部',
79-
padding: '执行中',
79+
STARTED: '执行中',
8080
REVOKED: '已取消',
8181
REVOKE: '取消中',
8282
},

ui/src/locales/lang/zh-Hant/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default {
7575
success: '成功',
7676
fail: '失敗',
7777
all: '全部',
78-
padding: '執行中',
78+
STARTED: '執行中',
7979
REVOKED: '已取消',
8080
REVOKE: '取消中',
8181
},

ui/src/views/knowledge-workflow/component/execution-record/ExecutionDetailDrawer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
</el-text>
6464
<el-text class="color-text-primary" v-else>
6565
<el-icon class="is-loading color-primary"><Loading /></el-icon>
66-
{{ $t('common.status.padding') }}
66+
{{ $t('common.status.STARTED') }}
6767
</el-text>
6868
</p>
6969
</el-col>

ui/src/views/knowledge-workflow/component/execution-record/ExecutionRecordDrawer.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
>
2828
<el-option :label="$t('common.status.success')" value="SUCCESS" />
2929
<el-option :label="$t('common.status.fail')" value="FAILURE" />
30-
<el-option :label="$t('common.status.padding')" value="PADDING" />
30+
<el-option :label="$t('common.status.STARTED')" value="STARTED" />
31+
<el-option :label="$t('common.status.REVOKED')" value="REVOKED" />
3132
</el-select>
3233
<el-input
3334
v-else
@@ -77,7 +78,7 @@
7778
</el-text>
7879
<el-text class="color-text-primary" v-else>
7980
<el-icon class="is-loading color-primary"><Loading /></el-icon>
80-
{{ $t('common.status.padding') }}
81+
{{ $t('common.status.STARTED') }}
8182
</el-text>
8283
</template>
8384
</el-table-column>

0 commit comments

Comments
 (0)