Skip to content

Commit

Permalink
Merge pull request #177 from Kabimon/dev-1.0.0
Browse files Browse the repository at this point in the history
LGTM
  • Loading branch information
FinalTarget authored Feb 24, 2022
2 parents f7ff8a9 + 7c943bb commit 1305cc6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
19 changes: 18 additions & 1 deletion web/src/pages/jobManagement/components/dataSource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,24 @@ export default defineComponent({
dataSource.dataSourceIds.source.type,
"source"
).then((res) => {
res.uis.forEach((ui) => {
res.uis.forEach((ui, index) => {
/*if (!ui) {
res.uis[index] = ui = {
key: 'partition.source',
field: 'partition',
label: '分区信息',
sort: 2,
value: null,
defaultValue: null,
unit: '',
required: false,
validateType: 'REGEX',
validateRange: '',
validateMsg: 'xxx',
source: '/api/rest_j/v1/exchangis/job/partitionInfo',
type: 'MAP'
}
}*/
if (!ui.value && ui.defaultValue) {
ui.value = ui.defaultValue;
}
Expand Down
18 changes: 12 additions & 6 deletions web/src/pages/jobManagement/components/dyncRender.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<a-input
v-if="item.type === 'INPUT'"
v-model:value="item.value"
@change="handleChange"
@change="handleChange(item.value, item)"
style="margin-left: 5px;width: 60%"
/>
<a-select
Expand Down Expand Up @@ -64,13 +64,19 @@ export default defineComponent({
setup(props, context) {
let { type, field, value, unit, source} = props.param;
value = ref(value)
type = ref(type)
let tmlName = field.split(".").pop();
const newProps = computed(() => JSON.parse(JSON.stringify(props.param)));
watch(newProps, (val, oldVal) => {
value.value = val.value;
value.value = val.value
if (type === 'MAP') {
_buildMap()
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 || ''
}
})
}
});
let checkOptions = []
Expand All @@ -84,7 +90,6 @@ export default defineComponent({
}
let partitionArr = ref([])
const _buildMap = function () {
partitionArr.value = []
let url = source.split('?')[0]
getPartitionInfo({
source: url,
Expand All @@ -98,7 +103,8 @@ export default defineComponent({
partitionArr.value.push({
type: 'INPUT',
label: i,
value: value && value[i] ? value[i] : res.render[i]
value: value && value[i] ? value[i] : res.render[i],
defaultValue: res.render[i]
})
} else {
let checkOptions = []
Expand Down
5 changes: 2 additions & 3 deletions web/src/pages/jobManagement/components/jobDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,8 @@ export default {
overflow: hidden;
width: 100%;
.wrap-spin {
height: calc(100vh - 130px)
height: calc(100vh - 82px)
}
/*height: calc(100vh - 130px);*/
.jd_left {
float: left;
width: 250px;
Expand Down Expand Up @@ -1376,7 +1375,7 @@ export default {
}
.emptyTab {
font-size: 16px;
height: calc(100vh - 130px);
height: calc(100vh - 82px);
width: 100%;
display: flex;
justify-content: center;
Expand Down

0 comments on commit 1305cc6

Please sign in to comment.