Commit 69652474 authored by 熊成伟's avatar 熊成伟

debug

parent 3b1638c9
Pipeline #16519 passed with stages
in 1 minute and 1 second
......@@ -42,5 +42,12 @@
"react-app-rewired": "^1.2.9",
"style-loader": "^1.2.1"
},
"proxy": "http://124.93.101.8:9988"
"proxy": {
"/idtAppServiceV6": {
"target": "http://124.93.101.8:9988"
},
"/department": {
"target": "http://192.168.1.84:8889"
}
}
}
import React, { useEffect, useState } from 'react';
import {Modal, Accordion, List, Checkbox, Button} from "antd-mobile";
import './index.less'
import axios from "axios";
const CheckboxItem = Checkbox.CheckboxItem;
const Send = (props) => {
const {visible, onClose} = props;
const [data, setData] = useState([]);
useEffect(() => {
axios({
method: 'post',
url: 'http://192.168.1.84:8889/department/tree',
data: {},
withCredentials: false,
}).then(res => {
setData(res.data.result)
})
}, []);
const [checked, setChecked] = useState([])
const checkChange = (e, val) => {
const newChecked = [...checked];
const index = newChecked.indexOf(val);
e.target.checked ? newChecked.push(val) : newChecked.splice(index, 1);
setChecked(newChecked);
};
const getProps = data => (
<Accordion>
{ data && data.length > 0 && data.map((item, index) => (
<Accordion.Panel header={item.name} key={index}>
{item.subList && item.subList.length > 0 && getProps(item.subList)}
{item.userList && item.userList.length > 0 && (
<List key={item.name}>
{item.userList.map((child) => (
<CheckboxItem key={child.uid} onChange={(val) => checkChange(val, child.uid)}>
{child.name}
</CheckboxItem>
))}
</List>
)}
</Accordion.Panel>
))
}
</Accordion>
);
return (
<div>
<Modal
title="选择参会人员"
className="date-modal"
visible={visible}
transparent
onClose={() => onClose(false)}
>
{/*<List>*/}
{/*<CheckboxItem onChange={(val) => console.log(val)}>*/}
{/*{11111}*/}
{/*</CheckboxItem>*/}
{/*</List>*/}
<div className="test-box-auto">
{getProps(data)}
</div>
<div className="modal-form-footer">
<Button className="date-button mr-12 bg-gray" inline onClick={() => onClose(false)}>取消</Button>
<Button className="date-button" inline type="primary">确认选择</Button>
</div>
</Modal>
</div>
);
};
export default Send;
import React, {useEffect} from 'react';
import {WingBlank, List, InputItem, TextareaItem, WhiteSpace, Picker} from 'antd-mobile'
import Document from 'react-document-title';
import moment from 'moment'
import axios from 'axios'
import { createForm } from 'rc-form';
const Send = (props) => {
const {getFieldProps} = props.form;
useEffect(() => {
axios({
method: 'post',
url: 'http://192.168.1.84:8889/department/tree',
data: {},
withCredentials: true,
}).then(res => {
})
}, []);
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
const values = props.form.getFieldsValue();
const keys = Object.keys(values);
keys.map(item => {
!values[item] && (delete values[item]);
Array.isArray(values[item]) && values[item].length === 1 && (values[item] = values[item][0]);
values[item] instanceof Date && ( values[item] = moment(values[item]).format("YYYY-MM-DD HH:mm:ss"))
return null;
});
if (!error) {
console.log(values)
}
});
};
return (
<Document title="内部邮局">
<WingBlank>
<WhiteSpace/>
<form>
<List>
<InputItem extra={'1111'}>标题</InputItem>
<InputItem extra={'1111'}>发送人</InputItem>
<InputItem extra={'1111'}>工作日期</InputItem>
<InputItem extra={'1111'}>参会人员</InputItem>
<Picker data={[{label: '是', value: true}, {label: '否', value: false}]} cols={1} {...getFieldProps('xb')}>
<List.Item arrow="horizontal">办理意见</List.Item>
</Picker>
<TextareaItem
title="内容"
rows={4}
{...getFieldProps('gzdh')}
/>
</List>
</form>
<div className="event-footer">
<div className="event-footer-button" onClick={onSubmit}>提交</div>
</div>
</WingBlank>
</Document>
);
};
export default createForm()(Send);
import React, {useState} from 'react';
import {WingBlank, List, InputItem, WhiteSpace, DatePicker} from 'antd-mobile'
import Document from 'react-document-title';
import moment from 'moment'
import axios from 'axios'
import './index.less'
import { createForm } from 'rc-form';
import PeopleInfo from "./PeopleInfo";
const Send = (props) => {
const {getFieldProps} = props.form;
const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => {
const values = props.form.getFieldsValue();
const keys = Object.keys(values);
keys.map(item => {
!values[item] && (delete values[item]);
Array.isArray(values[item]) && values[item].length === 1 && (values[item] = values[item][0]);
values[item] instanceof Date && ( values[item] = moment(values[item]).format("YYYY-MM-DD HH:mm:ss"))
return null;
});
if (!error) {
axios.post('http://192.168.1.84:8889/department', {}).then(res => {
console.log(res)
})
}
});
};
const [sP, setSP] = useState([]);
const [personVisible, setPersonVisible] = useState(false);
return (
<Document title="内部邮局">
<WingBlank>
<PeopleInfo
visible={personVisible}
onClose={setPersonVisible}
peopleData={sP}
onSelect={setSP}
/>
<WhiteSpace/>
<form>
<List>
<InputItem>标题</InputItem>
<InputItem value={'123fd'}>发送人</InputItem>
<DatePicker mode="date" className="send-date-style"{...getFieldProps('gzrq')}>
<List.Item arrow="horizontal">工作日期</List.Item>
</DatePicker>
<List.Item className="auto-flex" extra={
<div className="pos-aline">
<div className="meet-select-btn" onClick={() => setPersonVisible(true)}>选择参会人员</div>
<div className="ml-40 room-num">{sP.length}</div>
</div>
}>参会人员</List.Item>
<InputItem {...getFieldProps('gzdh')}>工作电话</InputItem>
</List>
</form>
<div className="event-footer">
<div className="event-footer-button" onClick={onSubmit}>提交</div>
</div>
</WingBlank>
</Document>
);
};
export default createForm()(Send);
@import "../../variable.less";
.am-list-item .am-list-line .am-list-content{
font-size: 17px !important;
}
.send-content{
position: relative;
top: 10px;
margin-bottom: 60px;
}
.am-switch input[type="checkbox"]:checked + .checkbox{
background: @primary !important;
}
.am-list-item .am-list-line .am-list-extra{
flex: 1;
}
.auto-flex .am-list-line .am-list-extra{
flex: 2.5;
}
.auto-flex-2 .am-list-line .am-list-extra{
flex: 2;
}
.am-list-item .am-input-control input{
text-align: right;
}
.meet-select-btn{
display: flex;
align-items: center;
justify-content: center;
width: 100px;
padding: 4px 7px;
border-radius: 4px;
letter-spacing: 2px;
font-size: 14px !important;
background: rgba(239, 154, 54, 1);
color: #ffffff;
}
.meet-select-btn:active{
background: rgba(239, 154, 54, 0.8);
color: #ffffff;
}
.auto-time-select{
display: flex;
justify-content: space-between;
}
.time-meeting{
width: 70px;
text-align: center;
padding: 4px 13px;
background: rgba(255, 249, 249, 1);
}
.good-btn-content{
display: flex;
justify-content: space-between;
}
.good-btn{
width: 60px;
border-radius: 4px;
padding: 4px 13px;
display: flex;
justify-content: center;
align-items: center;
color: #ffffff;
}
.c-primary{
background: @primary;
}
.c-orange{
background: rgba(239, 154, 54, 0.8);
}
.c-gray{
background: rgba(151, 151, 151, 1) !important;
color: #ffffff !important;
}
.gray-button{
background: rgba(151, 151, 151, 1) !important;
color: #ffffff !important;
margin-right: 12px;
}
.good-item-content{
display: flex;
justify-content: space-between;
align-items: center;
width: 261px;
height: 43.9px;
padding: 0 15px;
}
.am-checkbox-agree{
padding: 0 !important;
}
.mt-10{
margin-top: 10px;
}
.good-item-box {
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 5px;
}
.meet-room-content{
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px;
}
.meet-room > .meet-room-content:not(:last-child){
border-bottom: 1px solid rgba(239, 239, 239, 1);
}
.meet-room > .meet-room-content:first-child{
border-top: 1px solid rgba(239, 239, 239, 1);
}
.room-style{
height: 42px;
}
.room-flex .am-list-line .am-list-content{
flex: 2;
}
.goods-before{
height: 50px;
display: flex;
justify-content: center;
align-items: center;
font-size: 17px;
background: @primary;
color: #ffffff;
margin: 10px 15px;
}
.ml-40{
margin-left: 30px;
}
.room-num-2{
width: 60px;
height: 29px;
border:0 solid rgba(38, 104, 255, 0.2);
border-radius:6px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 249, 249, 1);
text-align: center;
}
.room-num{
width: 60px;
height: 29px;
border:0 solid rgba(38, 104, 255, 0.2);
border-radius:6px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 249, 249, 1);
}
.footer-button{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
background: @primary;
color: #ffffff;
}
.footer-button.btn-disabled{
background: rgba(151, 151, 151, 1) !important;
}
.room-num-2 .am-list-extra, .room-num-2 .am-list-line{
min-width: 80px !important;
text-align: center !important;
padding: 0 !important;
height: 29px !important;
line-height: 29px !important;
}
.room-num-2 .am-list-line:after{
display: none !important;
}
.room-num-2.am-list-item{
min-width: 80px !important;
height: 29px !important;
line-height: 29px !important;
min-height: 29px !important;
}
.am-list-item.room-num-2.am-list-item-middle{
min-width: 80px !important;
padding: 0 !important;
}
.line-number .am-list-content{
display: flex;
flex-direction: column !important;
justify-content: flex-start !important;
align-items: flex-start;
}
.org-btn{
margin-left: 20px;
background: rgba(239, 154, 54, 1);
color: #ffffff;
}
.date-modal{
width: 300px;
margin-bottom: 50px;
.am-accordion .am-accordion-item .am-accordion-header{
text-align: left;
}
}
.test-box-auto{
height: 400px;
overflow: auto;
}
......@@ -24,6 +24,9 @@ import MeetInfo from './pages/Work/components/MeetInfo'
import NoFound from './pages/NoFound'
import User from './pages/User/User'
import Send from './pages/Test/Send'
import Receive from './pages/Test/Receive'
const ReactRouter = () => {
return (
<Router>
......@@ -56,6 +59,9 @@ const ReactRouter = () => {
<Route path="/blank/submit/:flowNodeId/:uuid/:flowTbId" component={SubmitDetail}/>
<Route path="/blank/info/:id/:uuid/:FLOWTBID" component={Process}/>
<Route path="/blank/user" component={User}/>
<Route path="/blank/test/send" component={Send}/>
<Route path="/blank/test/receive/:id" component={Receive}/>
</BlankLayout>
}/>
<Route component={NoFound}/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment