|
@@ -211,17 +211,31 @@ export default {
|
|
|
getFormInfo (e) {
|
|
|
console.log('点击日程ID>>', this.formData.planTime)
|
|
|
this.$nextTick(() => {
|
|
|
- this.addForm.setFieldsValue({
|
|
|
- title: this.formData.title,
|
|
|
- planTime: moment(this.formData.planTime, 'HH:mm:ss'),
|
|
|
- type: this.formData.type,
|
|
|
- degreeOfUrgency: this.formData.degreeOfUrgency,
|
|
|
- backgroundColor: this.formData.backgroundColor,
|
|
|
- continue: [
|
|
|
- moment(this.formData.startTime, 'YYYY/MM/DD HH:mm'),
|
|
|
- moment(this.formData.endTime, 'YYYY/MM/DD HH:mm')
|
|
|
- ]
|
|
|
- })
|
|
|
+ if(this.formData.planTime !='' && this.formData.planTime != null){
|
|
|
+ this.addForm.setFieldsValue({
|
|
|
+ title: this.formData.title,
|
|
|
+ planTime: moment(this.formData.planTime, 'YYYY/MM/DD HH:mm:ss'),
|
|
|
+ type: this.formData.type,
|
|
|
+ degreeOfUrgency: this.formData.degreeOfUrgency,
|
|
|
+ backgroundColor: this.formData.backgroundColor,
|
|
|
+ continue: [
|
|
|
+ moment(this.formData.startTime, 'YYYY/MM/DD HH:mm'),
|
|
|
+ moment(this.formData.endTime, 'YYYY/MM/DD HH:mm')
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.addForm.setFieldsValue({
|
|
|
+ title: this.formData.title,
|
|
|
+ type: this.formData.type,
|
|
|
+ degreeOfUrgency: this.formData.degreeOfUrgency,
|
|
|
+ backgroundColor: this.formData.backgroundColor,
|
|
|
+ continue: [
|
|
|
+ moment(this.formData.startTime, 'YYYY/MM/DD HH:mm'),
|
|
|
+ moment(this.formData.endTime, 'YYYY/MM/DD HH:mm')
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.$refs.JEditor.myValue = this.formData.memo
|
|
|
console.log('走到这')
|
|
|
})
|
|
@@ -237,7 +251,9 @@ export default {
|
|
|
scheduleObject.degreeOfUrgency = values.degreeOfUrgency
|
|
|
scheduleObject.startTime = values.continue[0].format('YYYY-MM-DD HH:mm:ss')
|
|
|
scheduleObject.endTime = values.continue[1].format('YYYY-MM-DD HH:mm:ss')
|
|
|
- scheduleObject.planTime = values.planTime.format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ if(values.planTime != null && values.planTime !=''){
|
|
|
+ scheduleObject.planTime = values.planTime.format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ }
|
|
|
scheduleObject.backgroundColor = values.backgroundColor
|
|
|
scheduleObject.memo = this.$refs.JEditor.myValue
|
|
|
// 编辑--------------------------------------------
|
|
@@ -249,12 +265,14 @@ export default {
|
|
|
this.$message.success('修改成功')
|
|
|
this.savePlanModalVisible = false
|
|
|
this.addForm.resetFields() // 清空表单
|
|
|
+ this.formData.id=''
|
|
|
this.$refs.JEditor.myValue = '' // 清空富文本
|
|
|
this.fatherMethod() // 调用父组件的查询方法
|
|
|
} else {
|
|
|
this.$message.success('修改成功')
|
|
|
this.savePlanModalVisible = false
|
|
|
this.addForm.resetFields() // 清空表单
|
|
|
+ this.formData.id=''
|
|
|
this.$refs.JEditor.myValue = '' // 清空富文本
|
|
|
this.calTableMethod() // 调用父组件的查询方法
|
|
|
}
|