|  | @@ -38,7 +38,7 @@
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  |                <a-select-option value="一般">一般</a-select-option>
 | 
	
		
			
				|  |  |                <a-select-option value="重要">重要</a-select-option>
 | 
	
		
			
				|  |  | -              <a-select-option value="紧机">紧机</a-select-option>
 | 
	
		
			
				|  |  | +              <a-select-option value="紧急">紧急</a-select-option>
 | 
	
		
			
				|  |  |              </a-select>
 | 
	
		
			
				|  |  |            </a-form-item>
 | 
	
		
			
				|  |  |          </a-col>
 | 
	
	
		
			
				|  | @@ -135,14 +135,14 @@
 | 
	
		
			
				|  |  |            </a-form-item>
 | 
	
		
			
				|  |  |          </a-col>
 | 
	
		
			
				|  |  |        </a-row>
 | 
	
		
			
				|  |  | -      <!-- 内容 -->
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      <!-- 日程富文本 -->
 | 
	
		
			
				|  |  |        <a-row :gutter="24">
 | 
	
		
			
				|  |  |          <a-col :span="12">
 | 
	
		
			
				|  |  |            <a-form-item label="日程内容:" style="marginBottom:0;"></a-form-item>
 | 
	
		
			
				|  |  |          </a-col>
 | 
	
		
			
				|  |  |          <a-col :span="24">
 | 
	
		
			
				|  |  | -          <!-- <JEditor ref="JEditor" :richTextVal="smallText" style="margin:0 170px 0 130px;"></JEditor> -->
 | 
	
		
			
				|  |  | -          <JEditor ref="JEditor" :value="smallText" style="margin:0 170px 0 130px;"> </JEditor>
 | 
	
		
			
				|  |  | +          <JEditor ref="JEditor" :value="smallText" style="margin:0 170px 0 130px;"></JEditor>
 | 
	
		
			
				|  |  |          </a-col>
 | 
	
		
			
				|  |  |        </a-row>
 | 
	
		
			
				|  |  |      </a-form>
 | 
	
	
		
			
				|  | @@ -150,7 +150,6 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  import moment from 'moment'
 | 
	
		
			
				|  |  |  import 'moment/locale/zh-cn'
 | 
	
		
			
				|  |  |  import JEditor from '../../../../components/jeecg/JEditor.vue'
 | 
	
	
		
			
				|  | @@ -178,15 +177,20 @@ export default {
 | 
	
		
			
				|  |  |              timeList: [], // 开始/结束时间集合
 | 
	
		
			
				|  |  |              isDate: false, // 默认无时分秒
 | 
	
		
			
				|  |  |              smallText: '', // 富文本内容
 | 
	
		
			
				|  |  | -            title: ''
 | 
	
		
			
				|  |  | +            title: '' // 弹框头部
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      props: {
 | 
	
		
			
				|  |  | -    // 接收父组件方法 (查询日程)
 | 
	
		
			
				|  |  | +    // 接收日历 (父组件方法)
 | 
	
		
			
				|  |  |          fatherMethod: {
 | 
	
		
			
				|  |  |              type: Function,
 | 
	
		
			
				|  |  |              default: null
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | +        // 接收日历列表 (父组件方法)
 | 
	
		
			
				|  |  | +        calTableMethod: {
 | 
	
		
			
				|  |  | +            type: Function,
 | 
	
		
			
				|  |  | +            default: null
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  |          // 接收父组件的属性(点击的时间)
 | 
	
		
			
				|  |  |          fatherData: {
 | 
	
		
			
				|  |  |              type: String,
 | 
	
	
		
			
				|  | @@ -198,7 +202,75 @@ export default {
 | 
	
		
			
				|  |  |      computed: {},
 | 
	
		
			
				|  |  |      mounted () {},
 | 
	
		
			
				|  |  |      methods: {
 | 
	
		
			
				|  |  | -    // 判断点击的时间有无 时分秒
 | 
	
		
			
				|  |  | +        // 回显表单的赋值
 | 
	
		
			
				|  |  | +        getFormInfo (e) {
 | 
	
		
			
				|  |  | +            console.log('点击日程ID>>', this.formData.id)
 | 
	
		
			
				|  |  | +            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')
 | 
	
		
			
				|  |  | +                    ]
 | 
	
		
			
				|  |  | +                })
 | 
	
		
			
				|  |  | +                this.$refs.JEditor.myValue = this.formData.memo
 | 
	
		
			
				|  |  | +                console.log('走到这')
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        // 弹框 保存
 | 
	
		
			
				|  |  | +        handleOk (e) {
 | 
	
		
			
				|  |  | +            this.addForm.validateFields((err, values) => {
 | 
	
		
			
				|  |  | +                // console.log('跑出来', values)
 | 
	
		
			
				|  |  | +                // console.log('>>>>>>>', this.$refs.JEditor.myValue)
 | 
	
		
			
				|  |  | +                if (!err) {
 | 
	
		
			
				|  |  | +                    var scheduleObject = {}
 | 
	
		
			
				|  |  | +                    scheduleObject.title = values.title
 | 
	
		
			
				|  |  | +                    scheduleObject.type = values.type
 | 
	
		
			
				|  |  | +                    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.backgroundColor = values.backgroundColor
 | 
	
		
			
				|  |  | +                    scheduleObject.memo = this.$refs.JEditor.myValue
 | 
	
		
			
				|  |  | +                    // 编辑--------------------------------------------
 | 
	
		
			
				|  |  | +                    if (this.formData.id) {
 | 
	
		
			
				|  |  | +                        scheduleObject.id = this.formData.id
 | 
	
		
			
				|  |  | +                        console.log('这是修改')
 | 
	
		
			
				|  |  | +                        scheduleUpdate(scheduleObject).then(res => {
 | 
	
		
			
				|  |  | +                            if (res.success && this.fatherMethod) {
 | 
	
		
			
				|  |  | +                                this.$message.success('日程计划修改成功')
 | 
	
		
			
				|  |  | +                                this.savePlanModalVisible = false
 | 
	
		
			
				|  |  | +                                this.addForm.resetFields() // 清空表单
 | 
	
		
			
				|  |  | +                                this.$refs.JEditor.myValue = '' // 清空富文本
 | 
	
		
			
				|  |  | +                                this.fatherMethod() // 调用父组件的查询方法
 | 
	
		
			
				|  |  | +                            } else {
 | 
	
		
			
				|  |  | +                                this.$message.success('日程计划列表修改成功')
 | 
	
		
			
				|  |  | +                                this.savePlanModalVisible = false
 | 
	
		
			
				|  |  | +                                this.addForm.resetFields() // 清空表单
 | 
	
		
			
				|  |  | +                                this.$refs.JEditor.myValue = '' // 清空富文本
 | 
	
		
			
				|  |  | +                                this.calTableMethod() // 调用父组件的查询方法
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        })
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        // 新增------------------------------------------
 | 
	
		
			
				|  |  | +                        scheduleAdd(scheduleObject).then(res => {
 | 
	
		
			
				|  |  | +                            if (res.success) {
 | 
	
		
			
				|  |  | +                                this.savePlanModalVisible = false
 | 
	
		
			
				|  |  | +                                this.$message.success('新增日程成功')
 | 
	
		
			
				|  |  | +                                this.addForm.resetFields() // 清空表单
 | 
	
		
			
				|  |  | +                                this.$refs.JEditor.myValue = ''
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        })
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  | +                    this.$message.error('请填写信息')
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 判断点击的时间有无 时分秒
 | 
	
		
			
				|  |  |          isDatetime (dateVal) {
 | 
	
		
			
				|  |  |              console.log('分隔得到的点击事件:', dateVal.split('T'))
 | 
	
		
			
				|  |  |              var t = dateVal.split('T')
 | 
	
	
		
			
				|  | @@ -246,69 +318,6 @@ export default {
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        // 回显表单的赋值
 | 
	
		
			
				|  |  | -        getFormInfo (e) {
 | 
	
		
			
				|  |  | -            console.log('点击日程的ID:', this.formData.id) // 2
 | 
	
		
			
				|  |  | -            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')]
 | 
	
		
			
				|  |  | -                })
 | 
	
		
			
				|  |  | -                this.$refs.JEditor.myValue = this.formData.memo
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        // 弹框 保存
 | 
	
		
			
				|  |  | -        handleOk (e) {
 | 
	
		
			
				|  |  | -            this.addForm.validateFields((err, values) => {
 | 
	
		
			
				|  |  | -                console.log('跑出来', values)
 | 
	
		
			
				|  |  | -                console.log('>>>>>>>', this.$refs.JEditor.myValue)
 | 
	
		
			
				|  |  | -                if (!err) {
 | 
	
		
			
				|  |  | -                    // ---赋值-------------------------------------------
 | 
	
		
			
				|  |  | -                    var scheduleObject = {}
 | 
	
		
			
				|  |  | -                    scheduleObject.title = values.title
 | 
	
		
			
				|  |  | -                    scheduleObject.type = values.type
 | 
	
		
			
				|  |  | -                    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.backgroundColor = values.backgroundColor
 | 
	
		
			
				|  |  | -                    scheduleObject.memo = this.$refs.JEditor.myValue
 | 
	
		
			
				|  |  | -                    // 修改------------------------------------------------
 | 
	
		
			
				|  |  | -                    if (this.formData.id) {
 | 
	
		
			
				|  |  | -                        scheduleObject.id = this.formData.id
 | 
	
		
			
				|  |  | -                        console.log('这是修改')
 | 
	
		
			
				|  |  | -                        scheduleUpdate(scheduleObject).then(res => {
 | 
	
		
			
				|  |  | -                            // console.log('怎么修改功能没有了', res)
 | 
	
		
			
				|  |  | -                            if (res.success) {
 | 
	
		
			
				|  |  | -                                this.$message.success('日程修改成功')
 | 
	
		
			
				|  |  | -                                this.savePlanModalVisible = false
 | 
	
		
			
				|  |  | -                                this.addForm.resetFields() // 清空
 | 
	
		
			
				|  |  | -                                this.fatherMethod()// 调用父组件的查询方法
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | -                        })
 | 
	
		
			
				|  |  | -                    } else {
 | 
	
		
			
				|  |  | -                        // 新增------------------------------------------
 | 
	
		
			
				|  |  | -                        scheduleAdd(scheduleObject).then(res => {
 | 
	
		
			
				|  |  | -                            if (res.success) {
 | 
	
		
			
				|  |  | -                                this.savePlanModalVisible = false
 | 
	
		
			
				|  |  | -                                this.$message.success('新增日程成功')
 | 
	
		
			
				|  |  | -                                this.addForm.resetFields() // 清空表单
 | 
	
		
			
				|  |  | -                                this.$refs.JEditor.myValue = ''
 | 
	
		
			
				|  |  | -                                this.fatherMethod() // 调用父组件的查询方法
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | -                        })
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    // ----------------------------------------------
 | 
	
		
			
				|  |  | -                } else {
 | 
	
		
			
				|  |  | -                    this.$message.error('请填写信息')
 | 
	
		
			
				|  |  | -                    console.log('未填写相关信息')
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          // 日程时间
 | 
	
		
			
				|  |  |          continueTimeChange (date, dateString) {
 | 
	
		
			
				|  |  |              console.log('date>>>>>>>>>>>>>>>', date)
 | 
	
	
		
			
				|  | @@ -321,7 +330,7 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          handleCancel (e) {
 | 
	
		
			
				|  |  |              this.addForm.resetFields() // 清空
 | 
	
		
			
				|  |  | -            this.$refs.JEditor.myValue = ''// 清空富文本
 | 
	
		
			
				|  |  | +            this.$refs.JEditor.myValue = '' // 清空富文本
 | 
	
		
			
				|  |  |              this.savePlanModalVisible = false
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 |