|
|
|
@ -2,7 +2,7 @@ import React, {Component} from 'react';
|
|
|
|
|
|
|
|
|
|
import {TPMIndexHOC} from '../TPMIndexHOC';
|
|
|
|
|
|
|
|
|
|
import {SnackbarHOC,handleDateString} from 'educoder';
|
|
|
|
|
import {SnackbarHOC} from 'educoder';
|
|
|
|
|
|
|
|
|
|
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
|
|
|
|
|
|
|
|
|
@ -16,6 +16,7 @@ import './css/Newshixuns.css';
|
|
|
|
|
|
|
|
|
|
import {getUrl} from 'educoder'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let path = getUrl("/editormd/lib/")
|
|
|
|
|
|
|
|
|
|
const $ = window.$;
|
|
|
|
@ -28,6 +29,34 @@ const Option = Select.Option;
|
|
|
|
|
|
|
|
|
|
const RadioGroup = Radio.Group;
|
|
|
|
|
const confirm = Modal.confirm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理整点 半点
|
|
|
|
|
// 取传入时间往后的第一个半点
|
|
|
|
|
export function handleDateStrings(dateString) {
|
|
|
|
|
if (!dateString) return dateString;
|
|
|
|
|
const ar = dateString.split(':')
|
|
|
|
|
if (ar[1] == '00' || ar[1] == '30') {
|
|
|
|
|
return dateString
|
|
|
|
|
}
|
|
|
|
|
const miniute = parseInt(ar[1]);
|
|
|
|
|
if (miniute < 30 || miniute == 60) {
|
|
|
|
|
return [ar[0], '30'].join(':')
|
|
|
|
|
}
|
|
|
|
|
if (miniute < 60) {
|
|
|
|
|
// 加一个小时
|
|
|
|
|
const tempStr = [ar[0], '00'].join(':');
|
|
|
|
|
const format = "YYYY-MM-DD HH:mm";
|
|
|
|
|
const _moment = moment(tempStr, format)
|
|
|
|
|
_moment.add(1, 'hours')
|
|
|
|
|
return _moment.format(format)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dateString
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 恢复数据
|
|
|
|
|
function md_rec_data(k, mdu, id, editor) {
|
|
|
|
|
if (window.sessionStorage.getItem(k + mdu) !== null) {
|
|
|
|
@ -713,7 +742,7 @@ class Newshixuns extends Component {
|
|
|
|
|
|
|
|
|
|
onChangeTimePicker = (value, dateString) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
TimePickervalue: handleDateString(dateString)
|
|
|
|
|
TimePickervalue: handleDateStrings(dateString)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 附件相关 START
|
|
|
|
|