Skip to content

Commit

Permalink
Merge pull request #60 from Kabimon/feature/ui_refactory
Browse files Browse the repository at this point in the history
Feature/UI refactory
  • Loading branch information
mingfengwang authored Feb 24, 2022
2 parents 7c943bb + 7d7b936 commit 489fe55
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion web/src/pages/jobManagement/components/bottomLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default {
res.job.runningTasks = res.job.tasks.Running?.length || 0
res.job.totalTasks = this.tasklist.length
res.job.successPercent = res.job.successTasks * 100 / res.job.totalTasks
res.job.percent = (res.job.successTasks + res.job.runningTasks) * 100 / res.job.totalTasks
res.job.percent = res.job.progress * 100 //(res.job.successTasks + res.job.runningTasks) * 100 / res.job.totalTasks
res.job.title = `${res.job.successTasks}成功,${res.job.runningTasks}正在运行,${res.job.initedTasks}正在准备`
}
this.jobProgress = res.job
Expand Down
3 changes: 3 additions & 0 deletions web/src/pages/jobManagement/components/dataSource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ export default defineComponent({
source: '/api/rest_j/v1/exchangis/job/partitionInfo',
type: 'MAP'
}
}
if (ui.source) {
ui.source = ui.source + '?_=' + Math.random()
}*/
if (!ui.value && ui.defaultValue) {
ui.value = ui.defaultValue;
Expand Down
21 changes: 13 additions & 8 deletions web/src/pages/jobManagement/components/dyncRender.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@ export default defineComponent({
value.value = val.value
if (type === 'MAP') {
value.value = value.value || {}
partitionArr.value.forEach(partition => {
if (partition.type === 'OPTION') {
partition.value = value.value[partition.label] ? [value.value[partition.label]] : []
} else {
partition.value = value.value[partition.label] ? value.value[partition.label] : partition.defaultValue || ''
}
})
if (val.source === oldVal.source) {
partitionArr.value.forEach(partition => {
if (partition.type === 'OPTION') {
partition.value = value.value[partition.label] ? [value.value[partition.label]] : []
} else {
partition.value = value.value[partition.label] ? value.value[partition.label] : partition.defaultValue || ''
}
})
} else {
_buildMap()
}
}
});
let checkOptions = []
Expand All @@ -90,6 +94,7 @@ export default defineComponent({
}
let partitionArr = ref([])
const _buildMap = function () {
partitionArr.value = []
let url = source.split('?')[0]
getPartitionInfo({
source: url,
Expand Down Expand Up @@ -124,7 +129,7 @@ export default defineComponent({
}
})
.catch(err => {
message.error("或许分区信息失败");
message.error("获取分区信息失败");
})
}
if (type === 'MAP') {
Expand Down
5 changes: 4 additions & 1 deletion web/src/pages/jobManagement/components/jobDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="tools-bar">
<span @click="modalCfg.visible = true"><SettingOutlined />配置</span>
<div class="divider"></div>
<span @click="executeTask" v-if="!spinning" ><CaretRightOutlined />执行</span>
<span @click="executeTask" v-if="!spinning"><CaretRightOutlined />执行</span>
<a-popconfirm
v-else
title="是否终止?"
Expand Down Expand Up @@ -921,6 +921,9 @@ export default {
},
// 执行任务
executeTask() {
if (!this.list.length) {
return message.error('没有子任务')
}
this.saveAll(() => {
const { id } = this.curTab;
this.tasklist = []
Expand Down

0 comments on commit 489fe55

Please sign in to comment.