weicd
2023-12-28 ff671be57f9b54f76eb6c761e9e5f5cba91880b4
eladmin-web-master/src/views/task/taskUser/index.vue
@@ -97,7 +97,7 @@
              <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">
@@ -108,7 +108,7 @@
                  :format="formatTaskProgress"
                />
                <br />
                <i>任务预计时长:{{ expectedHours }}小时</i
                <i>任务预计时长:{{ expectedHours | toFixedTwo }}小时</i
                ><i style="margin-left: 40px"
                  >任务实际用时:{{ actualHours }}小时</i
                >
@@ -849,6 +849,11 @@
      taskStatusOne: ''
    };
  },
  filters: {
    toFixedTwo(value) {
      return parseFloat(value).toFixed(2);
    }
  },
  computed: {
    ...mapGetters(["user"])
  },
@@ -1301,6 +1306,7 @@
        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