Commit 46efa679 authored by maple's avatar maple

[fix]数组

parent a9a1ed0c
File added
......@@ -70,7 +70,10 @@ class ShowOptions extends React.Component {
const {list, dispatch,defaultValue } = this.props;
if(list==null){
//console.error("组件错误:没有数据导入")
console.error("组件错误:没有数据导入")
}else{
// console.log("显示组件")
// console.log(list)
}
this.state = {
selectoptionsOpen : 'Open',
......
......@@ -23,7 +23,9 @@ const Detail = (props:any) => {
getSecurityGuarder({companyName:location.query.providerName})
}, []);
const [showList,setShowList]=useState([])
useEffect(() => {
console.log("详情接收")
console.log(CurData)
console.log(CurDataFollow)
}, [CurData,CurDataFollow]);
......@@ -62,10 +64,11 @@ const Detail = (props:any) => {
<TitleBack title="Service Provider Details" />
<div className={styles.bigbox}>
<div className={styles.box0}>
<div className={styles.box0item1}></div>
<div className={styles.box0item2}>334562</div>
<div className={styles.box0item2}>{CurData.serviceCommunityList}</div>
</div>
<div className={styles.box1}>
<div className={styles.box1item1}>Company Name</div>
......@@ -95,7 +98,12 @@ const Detail = (props:any) => {
<div className={styles.box6}>
<div className={styles.box1item1}>Service Community</div>
</div>
<ShowOptions list={['小区']} defaultValue={"Put It Away"} onSubmit={printContent} />
{
CurData.serviceCommunityList != null
?
<ShowOptions list={CurData.serviceCommunityList} defaultValue={"Put It Away"} onSubmit={printContent} />
:<></>
}
<div className={styles.box7}>
<div className={styles.box1item1}>Security Guard Account</div>
......
......@@ -8,7 +8,7 @@ import SelectOptions from '../../../components/SelectOptions/index';
const Edit= (props:any) => {
const { dispatch,CurData,location } = props;
const { dispatch,CurData,location,CommunityList} = props;
const getByProviderName = (values: any) => { dispatch({ type: 'ServiceProvider/getByProviderName', playload: values }) };
const req_1001 = (values:any) => {dispatch({type: 'ServiceProvider/model_1003',playload:values}) };
......@@ -57,7 +57,7 @@ const Edit= (props:any) => {
<div className={styles.line}></div>
<SelectOptions list={["小区A",].sort()} onSubmit={printContent} />
<SelectOptions list={CommunityList} onSubmit={printContent} />
<div className={styles.box2}>
<div className={styles.box2item1}>Services Available</div>
......@@ -88,8 +88,10 @@ const Edit= (props:any) => {
function mapStateToProps(state:any) {
const { CurData } = state.ServiceProvider;
const { CommunityList } = state.Init;
return {
CurData
CurData,
CommunityList
};
}
......
......@@ -64,10 +64,10 @@ const ServiceProviderManagement = (props: any) => {
const printContent = (comment: any)=>{
console.log(comment)
}
const test=['A','B']
return (
<div className={styles.base}>
{/* 头部组件 */}
<h1>CommunityList({CommunityList[0]}):{CommunityList}</h1>
<Form ref={formRef} name="basic" initialValues={{}} onFinish={onFinish} onFinishFailed={onFinishFailed}>
<div className={styles.box}><Form.Item name="providerName" ><Input style={{width:200}} placeholder="Service Provider" /></Form.Item></div>
<SelectOptions list={CommunityList} onSubmit={printContent}/>
......
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