Bladeren bron

格式化日历时间

DESKTOP-6ESHLVF\admin 4 jaren geleden
bovenliggende
commit
bb7b2cc63c

+ 11 - 5
UI/src/pages/vedioManage/healthStatics.js

@@ -40,7 +40,7 @@ class HealthStatics extends React.Component{
             keywordColums: [
                 { title: '序号', dataIndex: 'index', id: 'index', render: (a,b,index) => (<div>{index+1}</div>) },
                 { title: '关键词', dataIndex: 'superiorName', id: 'superiorName' },
-                { title: '搜索次数', dataIndex: 'totalSearch', id: 'totalSearch' },
+                { title: '搜索次数', dataIndex: 'totalSearch', id: 'totalSearch' },
                 { title: '最新时间', dataIndex: 'lastSearchTime', id: 'lastSearchTime' },
             ],
             keywordList: []
@@ -75,6 +75,8 @@ class HealthStatics extends React.Component{
     //视频列表
     async loadVedioList() {
         let {startTime, endTime} = this.state
+        if(!startTime) startTime = ''
+        if(!endTime) endTime = ''
         let res = await request({
             url: ymallAPI + `/ymall/videointermediate/getHotVideoTop10?activeTimeBegin=${startTime}&activeTimeEnd=${endTime}`,
             method: 'get'
@@ -90,6 +92,8 @@ class HealthStatics extends React.Component{
     //医生列表
     async loadDoctorList() {
         let {startTime, endTime} = this.state
+        if(!startTime) startTime = ''
+        if(!endTime) endTime = ''
         let res = await request({
             url: ymallAPI + `/ymall/videointermediate/getHotDoctorTop10?activeTimeBegin=${startTime}&activeTimeEnd=${endTime}`,
             method: 'get'
@@ -104,6 +108,8 @@ class HealthStatics extends React.Component{
     //关键词列表
     async loadKeyWordList() {
         let {startTime, endTime} = this.state
+        if(!startTime) startTime = ''
+        if(!endTime) endTime = ''
         let res = await request({
             url: ymallAPI + `/ymall/videointermediate/getHotSearchTop10?activeTimeBegin=${startTime}&activeTimeEnd=${endTime}`,
             method: 'get'
@@ -128,7 +134,7 @@ class HealthStatics extends React.Component{
                     <Col span={8}>开始时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.startTime)}
+                            value={!this.state.startTime ? null : moment(this.state.startTime)}
                             defaultValue={moment(this.state.startTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() > this.state.endtTimeStamp) {
@@ -137,7 +143,7 @@ class HealthStatics extends React.Component{
                                 }
                                 this.setState({
                                     startTimeStamp: moment(dateStr).valueOf(),
-                                    startTime: dateStr
+                                    startTime: !date ? null : dateStr
                                 })
                             }}
                         >
@@ -146,7 +152,7 @@ class HealthStatics extends React.Component{
                     <Col span={8}>结束时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.endTime)}
+                            value={!this.state.endTime ? null : moment(this.state.endTime)}
                             defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() < this.state.startTimeStamp) {
@@ -155,7 +161,7 @@ class HealthStatics extends React.Component{
                                 }
                                 this.setState({
                                     endtTimeStamp: moment(dateStr).valueOf(),
-                                    endTime: dateStr
+                                    endTime: !date ? null: dateStr
                                 })
                             }}
                         >

+ 4 - 4
UI/src/pages/vedioManage/hotDoctorList.js

@@ -65,7 +65,7 @@ class HotDoctorList extends React.Component {
                     <Col span={7}>开始时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.startTime)}
+                            value={!this.state.startTime ? null : moment(this.state.startTime)}
                             defaultValue={ moment(this.state.startTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() > this.state.endtTimeStamp) {
@@ -74,7 +74,7 @@ class HotDoctorList extends React.Component {
                                 }
                                 this.setState({
                                     startTimeStamp: moment(dateStr).valueOf(),
-                                    startTime: dateStr
+                                    startTime: !date ? '' : dateStr
                                 })
                             }}
                         >
@@ -83,7 +83,7 @@ class HotDoctorList extends React.Component {
                     <Col span={7}>结束时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.endTime)}
+                            value={!this.state.endTime ? null : moment(this.state.endTime)}
                             defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() < this.state.startTimeStamp) {
@@ -92,7 +92,7 @@ class HotDoctorList extends React.Component {
                                 }
                                 this.setState({
                                     endtTimeStamp: moment(dateStr).valueOf(),
-                                    endTime: dateStr
+                                    endTime: !date ? '' : dateStr
                                 })
                             }}
                         >

+ 4 - 4
UI/src/pages/vedioManage/hotKeyword.js

@@ -65,7 +65,7 @@ class HotKeyword extends React.Component {
                     <Col span={7}>开始时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.startTime)}
+                            value={!this.state.startTime ? null : moment(this.state.startTime)}
                             defaultValue={ moment(this.state.startTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() > this.state.endtTimeStamp) {
@@ -74,7 +74,7 @@ class HotKeyword extends React.Component {
                                 }
                                 this.setState({
                                     startTimeStamp: moment(dateStr).valueOf(),
-                                    startTime: dateStr
+                                    startTime: !date ? '' : dateStr
                                 })
                             }}
                         >
@@ -83,7 +83,7 @@ class HotKeyword extends React.Component {
                     <Col span={7}>结束时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.endTime)}
+                            value={!this.state.endTime ? null : moment(this.state.endTime)}
                             defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() < this.state.startTimeStamp) {
@@ -92,7 +92,7 @@ class HotKeyword extends React.Component {
                                 }
                                 this.setState({
                                     endtTimeStamp: moment(dateStr).valueOf(),
-                                    endTime: dateStr
+                                    endTime: !date ? '' : dateStr
                                 })
                             }}
                         >

+ 4 - 4
UI/src/pages/vedioManage/hotVedioList.js

@@ -68,7 +68,7 @@ class HotVedioList extends React.Component {
                     <Col span={7}>开始时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.startTime)}
+                            value={!this.state.startTime ? null : moment(this.state.startTime)}
                             defaultValue={ moment(this.state.startTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() > this.state.endtTimeStamp) {
@@ -77,7 +77,7 @@ class HotVedioList extends React.Component {
                                 }
                                 this.setState({
                                     startTimeStamp: moment(dateStr).valueOf(),
-                                    startTime: dateStr
+                                    startTime: !date ? '' : dateStr
                                 })
                             }}
                         >
@@ -86,7 +86,7 @@ class HotVedioList extends React.Component {
                     <Col span={7}>结束时间: 
                         <DatePicker
                             showNow={true}
-                            value={moment(this.state.endTime)}
+                            value={!this.state.endTime ? null : moment(this.state.endTime)}
                             defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() < this.state.startTimeStamp) {
@@ -95,7 +95,7 @@ class HotVedioList extends React.Component {
                                 }
                                 this.setState({
                                     endtTimeStamp: moment(dateStr).valueOf(),
-                                    endTime: dateStr
+                                    endTime: !date ? '' : dateStr
                                 })
                             }}
                         >

+ 13 - 7
UI/src/pages/vedioManage/vedioList.js

@@ -411,7 +411,8 @@ class VedioList extends React.Component{
                         field: "phone",
                         operate: "contains",
                         value: this.state.searchDoctorPhone
-                    }
+                    },
+                    { field: "checkStatus", operate: "equal", value: "2" }
                 ]
             }
         }).then(res =>{
@@ -458,7 +459,8 @@ class VedioList extends React.Component{
             //单个视频关联医生
             this.setState({
                 edidData: Object.assign(this.state.edidData, {
-                    doctorName: this.state.selectedDoctorName
+                    doctorName: this.state.selectedDoctorName,
+                    doctorID: this.state.selectedDocdtorId
                 }),
                 doctorModal: false
             })
@@ -672,6 +674,7 @@ class VedioList extends React.Component{
         if(!!res && !!res.success) {
             message.success(res.message)
             this.setState({
+                selectedAliId: [],
                 aliVedioModal: false,
                 searchAliVedioName: '',
                 selectedAliVedioList: []
@@ -1161,9 +1164,12 @@ class VedioList extends React.Component{
                         <Col span={6}>
                             <Input 
                                 placeholder="视频标题"
-                                disabled={this.state.publishTitleInput}
+                                // disabled={this.state.publishTitleInput}
                                 value={this.state.searchAliVedioName}
-                                onChange={(e) => {this.setState({ searchAliVedioName: e.target.value }) }}
+                                onChange={(e) => {this.setState({ 
+                                    searchAliVedioName: e.target.value,
+                                    aliPageIndex: 1
+                                }) }}
                             />
                         </Col>
                         <Col span={6}>
@@ -1174,10 +1180,10 @@ class VedioList extends React.Component{
                             },() => {  this.loadAliVediosList() }) }}>查询</Button>
                         </Col>
                     </Row>
-                    <Spin spinning={this.state.loadingAliVideo}
+                    {/* <Spin spinning={this.state.loadingAliVideo}
                         tip="加载中"
                         size="large"
-                    >
+                    > */}
                     <Table
                         columns={this.state.aliVedioColumns}
                         dataSource={this.state.aliVedioList}
@@ -1190,7 +1196,7 @@ class VedioList extends React.Component{
                         }}
                     >
                     </Table>
-                    </Spin>
+                    {/* </Spin> */}
                 </Modal>
             </div>
         )

+ 13 - 14
UI/src/pages/ymall/accountDetails.js

@@ -144,7 +144,7 @@ class AccountDetails extends React.Component {
 
     componentWillMount() {
         let str = formatDate(new Date())
-
+        console.log(str)
         this.props.history.listen(router => {
             console.log('router:', router)
             if(router.pathname == '/ymall/accountDetails' && !!router.query.id) {
@@ -190,7 +190,7 @@ class AccountDetails extends React.Component {
 
     formatSearch() {
         let filters = [
-            { field:"beginDate", operate: "equal",value: this.state.startTime }, //beginSynOrderTime
+            { field:"beginDate", operate: "equal",value: this.state.startTime }, 
             { field:"endDate", operate: "equal",value: this.state.endTime },
             { field:"beginSynOrderTime", operate: "equal",value: this.state.orderStartTime },
             { field:"endSynOrderTime", operate: "equal",value: this.state.orderEndTime },
@@ -198,6 +198,7 @@ class AccountDetails extends React.Component {
             { field:"status", operate: "equal",value: this.state.searchStatusValue },
         ]
         console.log(filters)
+        
         this.setState({ 
             filters
         }, () => { this.loadDataList() })
@@ -452,9 +453,9 @@ class AccountDetails extends React.Component {
                     <Col span={10}>
                         收益开始时间: 
                         <DatePicker
-                            allowClear={false}
+                            // allowClear={false}
                             showNow={true}
-                            value={moment(this.state.startTime)}
+                            value={!this.state.startTime ? null : moment(this.state.startTime)}
                             defaultValue={ moment(this.state.startTime, 'YYYY-MM-DD')}
                             // format={['YYYY-MM-DD hh:mm']}
                             onChange={(date, dateStr) => {
@@ -464,7 +465,7 @@ class AccountDetails extends React.Component {
                                 }
                                 this.setState({
                                     startTimeStamp: moment(dateStr).valueOf(),
-                                    startTime: dateStr + ' 00:00'
+                                    startTime: !date ? null : dateStr + ' 00:00'
                                 })
                             }}
                         >
@@ -473,9 +474,9 @@ class AccountDetails extends React.Component {
                     <Col span={10}>
                         收益结束时间:
                         <DatePicker
-                            allowClear={false}
+                            // allowClear={false}
                             showNow={true}
-                            value={moment(this.state.endTime)}
+                            value={!this.state.endTime ? null : moment(this.state.endTime)}
                             defaultValue={moment(this.state.endTime, 'YYYY-MM-DD')}
                             // format={['YYYY-MM-DD hh:mm']}
                             onChange={(date, dateStr) => {
@@ -485,7 +486,7 @@ class AccountDetails extends React.Component {
                                 }
                                 this.setState({
                                     endtTimeStamp: moment(dateStr).valueOf(),
-                                    endTime: dateStr + ' 00:00'
+                                    endTime: !date ? null : dateStr + ' 00:00'
                                 })
                             }}
                         >
@@ -497,9 +498,8 @@ class AccountDetails extends React.Component {
                     <Col span={10}>
                         下单开始时间: 
                         <DatePicker
-                            allowClear={false}
                             showNow={true}
-                            value={moment(this.state.orderStartTime)}
+                            value={!this.state.orderStartTime ? null : moment(this.state.orderStartTime)}
                             defaultValue={ moment(this.state.orderStartTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() > this.state.orderEndtTimeStamp) {
@@ -508,7 +508,7 @@ class AccountDetails extends React.Component {
                                 }
                                 this.setState({
                                     orderStartTimeStamp: moment(dateStr).valueOf(),
-                                    orderStartTime: dateStr + ' 00:00'
+                                    orderStartTime: !date ? null : dateStr + ' 00:00'
                                 })
                             }}
                         >
@@ -517,9 +517,8 @@ class AccountDetails extends React.Component {
                     <Col span={10}>
                         下单结束时间:
                         <DatePicker
-                            allowClear={false}
                             showNow={true}
-                            value={moment(this.state.orderEndTime)}
+                            value={!this.state.orderEndTime ? null : moment(this.state.orderEndTime)}
                             defaultValue={moment(this.state.orderEndTime, 'YYYY-MM-DD')}
                             onChange={(date, dateStr) => {
                                 if(moment(dateStr).valueOf() < this.state.orderStartTimeStamp) {
@@ -528,7 +527,7 @@ class AccountDetails extends React.Component {
                                 }
                                 this.setState({
                                     orderEndtTimeStamp: moment(dateStr).valueOf(),
-                                    orderEndTime: dateStr + ' 00:00'
+                                    orderEndTime: !date ? null : dateStr + ' 00:00'
                                 })
                             }}
                         >