Skip to content

Commit

Permalink
upd: 任务列表:增加对上传的控制
Browse files Browse the repository at this point in the history
  • Loading branch information
bertcai committed Mar 25, 2024
1 parent 4848a47 commit c620a00
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
18 changes: 15 additions & 3 deletions web/src/apps/streamis/module/jobList/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,19 @@
:on-success="jarUploadSuccess"
:on-error="jarUploadError"
:show-upload-list="false"
v-if="enableUpload"
>
<Icon type="md-add" class="upload" />
<span>{{
$t('message.streamis.jobListTableColumns.upload')
}}</span></Upload
>
}}</span>
</Upload>
<div v-else @click="beforeUpload()">
<Icon type="md-add" class="upload" />
<span>{{
$t('message.streamis.jobListTableColumns.upload')
}}</span>
</div>
</div>
<div class="jobName" v-show="index !== 0">
<Dropdown transfer transfer-class-name="joblist-table-ivu-select-dropdown" @on-click="name => handleRouter(row, name)">
Expand Down Expand Up @@ -724,7 +731,8 @@ export default {
failureReason: '',
failureReasonShow: false,
solutionURL: '',
knowledgeLibraryUrl: ''
knowledgeLibraryUrl: '',
enableUpload: true,
}
},
async mounted() {
Expand All @@ -751,6 +759,7 @@ export default {
})
this.getJobList(false)
this.knowledgeLibraryUrl = window.knowledgeLibraryUrl || 'http://kn.dss.weoa.com/'
this.enableUpload = window.enableUpload
},
methods: {
// 获取任务列表
Expand Down Expand Up @@ -867,6 +876,9 @@ export default {
handleUpload() {
this.uploadVisible = true
},
beforeUpload() {
this.$Message.error({ content: '禁止页面上传任务,请通过aomp发布' });
},
handleStop(data, type, index) {
const { id } = data
const path = 'streamis/streamJobManager/job/stop'
Expand Down
5 changes: 4 additions & 1 deletion web/src/apps/streamis/view/projectResourceFiles/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ export default {
},

handleUpload() {
console.log(1234444)
if (!window.enableUpload) {
this.$Message.error({ content: '禁止页面上传任务,请通过aomp发布' });
return false
}
this.uploadVisible = true
},
fileModalCancel() {
Expand Down

0 comments on commit c620a00

Please sign in to comment.