如何把这个计划之间转化成天数

如何把这个计划之间转化成天数,然后如何展示在这个位置,该怎么写呢


<el-descriptions-item label="预估工时">
     <template slot="label">
        <span class="desc-label">预估工时 span>
      template>
      <el-input-number style="width: 180px">
      el-input-number>
el-descriptions-item>

img

1、拿到计划时间的2个value,通过moment对应的方法(valueOf)计算相对应(开始日期、截止日期)的时间戳
2、计算截止日期减去开始日期的时间戳
3、将时间戳转化为小时,生成结果
4、将结果放入到预估工时里面去