| | |
| | | <div style="width: 35%;float: left"> |
| | | 任务名称:{{ TaskName }} |
| | | <p v-for="(item, index) in taskUserDetail" :key="index"> |
| | | {{ index }} 共消耗 {{ item }} 工时 |
| | | {{ index }} 共消耗 {{ item | toFixedTwo }} 工时 |
| | | </p> |
| | | </div> |
| | | <div style="width: 65%;float: right"> |
| | |
| | | :format="formatTaskProgress" |
| | | /> |
| | | <br /> |
| | | <i>任务预计时长:{{ expectedHours }}小时</i |
| | | <i>任务预计时长:{{ expectedHours | toFixedTwo }}小时</i |
| | | ><i style="margin-left: 40px" |
| | | >任务实际用时:{{ actualHours }}小时</i |
| | | > |
| | |
| | | taskStatusOne: '' |
| | | }; |
| | | }, |
| | | filters: { |
| | | toFixedTwo(value) { |
| | | return parseFloat(value).toFixed(2); |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["user"]) |
| | | }, |
| | |
| | | for (var key in this.taskUserDetail) { |
| | | this.actualHours += this.taskUserDetail[key]; |
| | | } |
| | | this.actualHours = parseFloat(this.actualHours).toFixed(2); |
| | | |
| | | this.taskProgress = Math.round( |
| | | (this.actualHours / this.expectedHours) * 100 |