|
|
@ -19,7 +19,7 @@ |
|
|
|
<m-list-box> |
|
|
|
<m-list-box> |
|
|
|
<div slot="text">{{$t('Program Type')}}</div> |
|
|
|
<div slot="text">{{$t('Program Type')}}</div> |
|
|
|
<div slot="content"> |
|
|
|
<div slot="content"> |
|
|
|
<x-select v-model="programType" :disabled="isDetails" style="width: 110px;"> |
|
|
|
<x-select v-model="programType" @on-change="_onChange" :disabled="isDetails" style="width: 110px;"> |
|
|
|
<x-option |
|
|
|
<x-option |
|
|
|
v-for="city in programTypeList" |
|
|
|
v-for="city in programTypeList" |
|
|
|
:key="city.code" |
|
|
|
:key="city.code" |
|
|
@ -117,6 +117,8 @@ |
|
|
|
// Main jar package (List) |
|
|
|
// Main jar package (List) |
|
|
|
mainJarLists: [], |
|
|
|
mainJarLists: [], |
|
|
|
mainJarList: [], |
|
|
|
mainJarList: [], |
|
|
|
|
|
|
|
jarList: [], |
|
|
|
|
|
|
|
pyList: [], |
|
|
|
// Resource(list) |
|
|
|
// Resource(list) |
|
|
|
resourceList: [], |
|
|
|
resourceList: [], |
|
|
|
// Cache ResourceList |
|
|
|
// Cache ResourceList |
|
|
@ -145,6 +147,16 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
mixins: [disabledState], |
|
|
|
mixins: [disabledState], |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* programType change |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
_onChange(o) { |
|
|
|
|
|
|
|
if(o.value === 'PYTHON') { |
|
|
|
|
|
|
|
this.mainJarLists = this.pyList |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.mainJarLists = this.jarList |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
/** |
|
|
|
/** |
|
|
|
* getResourceId |
|
|
|
* getResourceId |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -230,19 +242,20 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
let noResources = [{ |
|
|
|
let noResources = [{ |
|
|
|
id: -1, |
|
|
|
id: -1, |
|
|
|
name: $t('Unauthorized or deleted resources'), |
|
|
|
name: $t('No resources exist'), |
|
|
|
fullName: '/'+$t('Unauthorized or deleted resources'), |
|
|
|
fullName: '/'+$t('No resources exist'), |
|
|
|
children: [] |
|
|
|
children: [] |
|
|
|
}] |
|
|
|
}] |
|
|
|
if(optionsCmp.length>0) { |
|
|
|
if(optionsCmp.length>0) { |
|
|
|
this.allNoResources = optionsCmp |
|
|
|
this.allNoResources = optionsCmp |
|
|
|
optionsCmp = optionsCmp.map(item=>{ |
|
|
|
optionsCmp = optionsCmp.map(item=>{ |
|
|
|
return {id: item.id,name: item.name,fullName: item.res} |
|
|
|
return {id: item.id,name: item.name || item.res,fullName: item.res} |
|
|
|
}) |
|
|
|
}) |
|
|
|
optionsCmp.forEach(item=>{ |
|
|
|
optionsCmp.forEach(item=>{ |
|
|
|
item.isNew = true |
|
|
|
item.isNew = true |
|
|
|
}) |
|
|
|
}) |
|
|
|
noResources[0].children = optionsCmp |
|
|
|
noResources[0].children = optionsCmp |
|
|
|
|
|
|
|
this.mainJarList = _.filter(this.mainJarList, o=> { return o.id!==-1 }) |
|
|
|
this.mainJarList = this.mainJarList.concat(noResources) |
|
|
|
this.mainJarList = this.mainJarList.concat(noResources) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -263,7 +276,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
// noRes |
|
|
|
// noRes |
|
|
|
if (this.noRes.length>0) { |
|
|
|
if (this.noRes.length>0) { |
|
|
|
this.$message.warning(`${i18n.$t('Please delete all non-existent resources')}`) |
|
|
|
this.$message.warning(`${i18n.$t('Please delete all non-existing resources')}`) |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -343,13 +356,24 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
created () { |
|
|
|
|
|
|
|
let o = this.backfillItem |
|
|
|
let item = this.store.state.dag.resourcesListS |
|
|
|
let item = this.store.state.dag.resourcesListS |
|
|
|
let items = this.store.state.dag.resourcesListJar |
|
|
|
let items = this.store.state.dag.resourcesListJar |
|
|
|
|
|
|
|
let pythonList = this.store.state.dag.resourcesListPy |
|
|
|
this.diGuiTree(item) |
|
|
|
this.diGuiTree(item) |
|
|
|
this.diGuiTree(items) |
|
|
|
this.diGuiTree(items) |
|
|
|
|
|
|
|
this.diGuiTree(pythonList) |
|
|
|
|
|
|
|
|
|
|
|
this.mainJarList = item |
|
|
|
this.mainJarList = item |
|
|
|
this.mainJarLists = items |
|
|
|
this.jarList = items |
|
|
|
let o = this.backfillItem |
|
|
|
this.pyList = pythonList |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!_.isEmpty(o) && o.params.programType === 'PYTHON') { |
|
|
|
|
|
|
|
this.mainJarLists = pythonList |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.mainJarLists = items |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Non-null objects represent backfill |
|
|
|
// Non-null objects represent backfill |
|
|
|
if (!_.isEmpty(o)) { |
|
|
|
if (!_.isEmpty(o)) { |
|
|
|