Explorar o código

导师带徒 bugfix

jiangbiao hai 1 ano
pai
achega
cc8dc8661a
Modificáronse 1 ficheiros con 8 adicións e 7 borrados
  1. 8 7
      ui/src/views/training/bccnew/tsnew/index.vue

+ 8 - 7
ui/src/views/training/bccnew/tsnew/index.vue

@@ -240,9 +240,9 @@
           <el-select v-model="form.staffId" filterable :placeholder="$t('请选择')+$t('培训员工')" :disabled="isEdit">
             <el-option
               v-for="item in userOption"
-              :key="item.staffid"
+              :key="item.staffId"
               :label="item.nickName +'  '+ item.dept.deptName"
-              :value="item.staffid"
+              :value="item.staffId"
               :disabled="item.disabled">
             </el-option>
           </el-select>
@@ -262,6 +262,7 @@
             v-model="form.trainingDate"
             type="daterange"
             :picker-options="pickerOptions"
+            value-format="yyyy-MM-dd"
             range-separator="至"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
@@ -272,9 +273,9 @@
           <el-select v-model="form.mentorStaffId" filterable :placeholder="$t('请选择')+$t('导师员工')">
             <el-option
               v-for="item in userOption"
-              :key="item.staffid"
+              :key="item.staffId"
               :label="item.nickName +'  '+ item.dept.deptName"
-              :value="item.staffid"
+              :value="item.staffId"
               :disabled="item.disabled">
             </el-option>
           </el-select>
@@ -733,12 +734,12 @@ export default {
       this.reset();
       const newId = row.newId || this.ids
       getTsnew(newId).then(response => {
+        response.data.trainingDate=[];
+        response.data.trainingDate[0]=new Date( response.data.startdate);
+        response.data.trainingDate[1]=new Date( response.data.enddate);
         this.form = response.data;
         this.open = true;
         this.title = "修改新员工培训";
-        this.form.trainingDate=[];
-        this.form.trainingDate.push(new Date(this.form.startdate));
-        this.form.trainingDate.push(new Date(this.form.enddate));
         console.log(this.form)
       });
     },