Skip to content

Commit

Permalink
feat(modelapp): add project result list
Browse files Browse the repository at this point in the history
  • Loading branch information
TzeHimSung committed Apr 22, 2021
1 parent 3a1b2a3 commit 54df9b9
Showing 1 changed file with 79 additions and 3 deletions.
82 changes: 79 additions & 3 deletions src/views/ModelApp/index.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,92 @@
<template>
<p>{{ haha }}</p>
<div id="ModelApp">
<div id="ProjectResultTable">
<bk-table
style="margin-top: 15px"
:data="tableData"
:size="'small'"
:pagination="pagination"
v-bkloading="{ isLoading: projectResultTableLoading, zIndex: 10 }"
@page-change="handlePageChange"
@page-limit-change="handlePageLimitChange"
>
<bk-table-column
type="index"
label="ID"
width="60"
></bk-table-column>
<bk-table-column
label="结果目录"
prop="resultDirName"
></bk-table-column>
<bk-table-column
label="创建时间"
prop="createTime"
></bk-table-column>
<bk-table-column
label="操作"
width="150"
>
<template slot-scope="props">
<bk-button
class="mr10"
theme="primary"
text
:disabled="props.row.status === '上传中'"
@click="detail(props.row)"
>详情
</bk-button>
</template>
</bk-table-column>
</bk-table>
</div>
</div>
</template>

<script>
import axios from 'axios'
import { bkButton, bkTable, bkTableColumn } from 'bk-magic-vue'
export default {
name: 'ModelApp',
components: {
//
bkButton,
bkTable,
bkTableColumn
},
created () {
axios.get('http://localhost:8000/api/getProjectResult').then((res) => {
if (res.status === 200) {
this.tableData = res.data.projectResultList
} else {
this.$bkNotify({
theme: 'error',
title: 'Can not get project result information',
message: res.data.error,
limitLine: 3,
offsetY: 80
})
}
}).catch((err) => {
console.log(err)
this.$bkNotify({
theme: 'error',
title: 'Can not get project result information',
message: err,
limitLine: 3,
offsetY: 80
})
})
},
data () {
return {
haha: 'Model Application'
tableData: [],
projectResultTableLoading: false
}
},
methods: {
detail (row) {
console.log(row)
}
}
}
Expand Down

0 comments on commit 54df9b9

Please sign in to comment.