Browse Source

fix: appointment time formatter

wangyuan 2 years ago
parent
commit
c1b848893e
1 changed files with 13 additions and 2 deletions
  1. 13 2
      ittpc/src/views/modules/appointment/appointment.vue

+ 13 - 2
ittpc/src/views/modules/appointment/appointment.vue

@@ -51,8 +51,19 @@
           <el-table-column prop="contactName" label="联系人名称" align="center"></el-table-column>
           <el-table-column prop="contactName" label="联系人名称" align="center"></el-table-column>
           <el-table-column prop="contactPhone" label="联系方式" align="center"></el-table-column>
           <el-table-column prop="contactPhone" label="联系方式" align="center"></el-table-column>
           <el-table-column prop="nickname" label="预约用户昵称" align="center"></el-table-column>
           <el-table-column prop="nickname" label="预约用户昵称" align="center"></el-table-column>
-          <el-table-column prop="appointmentTime" label="预约时间" align="center"></el-table-column>
-          <el-table-column prop="appointmentDuration" label="时间区间段" align="center"></el-table-column>
+          <el-table-column prop="appointmentTime" label="预约时间" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.appointmentTime.split(' ')[0]}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="appointmentDuration" label="时间区间段" align="center">
+            <!-- 1 08:30--12:00 2 12:30 -- 17:00 3 18:30 -- 21:30 -->
+            <template slot-scope="scope">
+              <span v-if="scope.row.appointmentDuration == '1'">08:30--12:00</span>
+              <span v-if="scope.row.appointmentDuration == '2'">12:30--17:00</span>
+              <span v-if="scope.row.appointmentDuration == '3'">18:30--21:30</span>
+            </template>
+          </el-table-column>
           <el-table-column label="状态" align="center">
           <el-table-column label="状态" align="center">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <!-- 状态 状态 【1.申请预约  2.撤销预约  3.业务人员撤销预约 4.预约报道成功 5.预约超时  】 -->
               <!-- 状态 状态 【1.申请预约  2.撤销预约  3.业务人员撤销预约 4.预约报道成功 5.预约超时  】 -->