文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 7efe8f2e by Wang Yuhang

修改获取文件接口,新增返回标注关系id,实现审核进度功能

parent 677c8ddb
......@@ -15,7 +15,7 @@
<el-table-column prop="template" label="模板/说明" :width="showProgress ? 240 : ''"></el-table-column>
<el-table-column v-if="showProgress" label="进度">
<template slot-scope="props">
<el-progress :percentage="percentage(props.row.fileNum, props.row.completedNum)" style="width:150px"></el-progress>
<el-progress :percentage="percentage(props.row)" style="width:150px"></el-progress>
</template>
</el-table-column>
<el-table-column type="expand">
......@@ -68,7 +68,10 @@ export default {
beforeMount () {
// 拉取分片信息
var self = this, params = { taskId: this.taskId }
if (this.showProgress && !this.isCheck) { params.userId = this.userId }
if (this.showProgress) {
if (this.isCheck) params.isCheck = true
else params.userId = this.userId
}
this.axios.get('/slice/getPieces', { params }).then(res => { self.tableData = res.data })
},
methods: {
......@@ -139,9 +142,10 @@ export default {
return 'text-row'
}
},
percentage (fileNum, completedNum) {
if (!completedNum) return 0
return Math.floor(completedNum / fileNum * 100)
percentage (piece) {
var self = this
if (piece.fileNum === 0 || piece.totalNum === 0) return 100
return Math.floor(piece.completedNum / (self.isCheck ? piece.totalNum : piece.fileNum) * 100)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment