|
@@ -66,6 +66,18 @@
|
|
|
</a-range-picker>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="时间">
|
|
|
+ <!-- 有 时分秒 -->
|
|
|
+ <a-time-picker
|
|
|
+ style="width:100%"
|
|
|
+ showTime
|
|
|
+ @change="continueTimeChange"
|
|
|
+ v-decorator="['planTime', {}]"
|
|
|
+ >
|
|
|
+ </a-time-picker>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
|
<a-row :gutter="24">
|
|
|
<!-- <a-col :span="12">
|
|
@@ -197,18 +209,33 @@ export default {
|
|
|
methods: {
|
|
|
// 回显表单的赋值
|
|
|
getFormInfo (e) {
|
|
|
- // console.log('点击日程ID>>', this.formData.id)
|
|
|
+ console.log('点击日程ID>>', this.formData.planTime)
|
|
|
this.$nextTick(() => {
|
|
|
- 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')
|
|
|
- ]
|
|
|
- })
|
|
|
+ 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('走到这')
|
|
|
})
|
|
@@ -224,6 +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')
|
|
|
+ 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
|
|
|
// 编辑--------------------------------------------
|
|
@@ -235,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() // 调用父组件的查询方法
|
|
|
}
|