Commit 7eab4fdc authored by cellee's avatar cellee

Merge branch 'final' of http://120.77.240.215:9701/Maple/tostumi.git into final

parents 212aeb1a 37a02ed2
......@@ -5,4 +5,7 @@ module.exports = {
page: true,
REACT_APP_ENV: true,
},
rules: {
}
};
import React, { useState, useEffect, useRef } from 'react';
import styles from './Edit.less';
import { Input, Button, Form, Spin, Radio, message, Checkbox } from 'antd';
import { Input, Button, Form, Spin, message, Checkbox } from 'antd';
import { connect, history } from 'umi';
import { RA } from '@/utils/method';
import { CheckboxValueType } from 'antd/lib/checkbox/Group';
import SelectOptions from '../../../components/SelectOptions/index';
import TitleBack from '../../../components/TitleBack/TitleBack';
import { RA } from '@/utils/method';
import styles from './Edit.less';
const module = 'User';
let options: Array<{ label: string; value: number }> = [];
......@@ -30,6 +31,11 @@ const Edit = (props: any) => {
};
const formRef = useRef(null as any);
// 选择服务商事件
const onSelectCheckBox = (checkedValue: CheckboxValueType[]) => {
console.log(checkedValue);
};
// 拿取服务范围数据
useEffect(() => {
RA(43, {}, module, dispatch);
......@@ -57,7 +63,6 @@ const Edit = (props: any) => {
}, []);
useEffect(() => {
console.log(CurData);
if (CurData != null) {
setload(false);
dispatch({ type: 'ServiceProvider/CurDataClear', playload: {} });
......@@ -69,7 +74,7 @@ const Edit = (props: any) => {
setCList(SaveChooseData.serviceCommunityList);
if (SaveChooseData.serviceScopeList.length <= 1) {
// 处理服务范围数据
optionsList.forEach((v, index) => {
optionsList.forEach((v) => {
if (v.serviceName === SaveChooseData.serviceScope) {
SaveChooseData.serviceScopeList[0] = v.serviceCode;
}
......@@ -92,10 +97,10 @@ const Edit = (props: any) => {
// 提交按钮
const onFinish = (values: any) => {
if (CList.length === 0) {
message.warning('Please select at least one service Community!', 3);
// message.warning('Please select at least one service Community!', 3);
return;
}
var val = values;
const val = values;
val.serviceCommunityList = CList;
val.creator = 'admin';
val.updater = 'admin';
......@@ -147,7 +152,7 @@ const Edit = (props: any) => {
</div>
</div>
<div className={styles.line}></div>
<div className={styles.line} />
<SelectOptions
list={CommunityList ? CommunityList.sort() : []}
......@@ -167,7 +172,7 @@ const Edit = (props: any) => {
},
]}
>
<Checkbox.Group options={options as any} />
<Checkbox.Group options={options as any} onChange={onSelectCheckBox} />
{/* <Radio.Group options={options as any} /> */}
</Form.Item>
</div>
......@@ -227,7 +232,7 @@ const Edit = (props: any) => {
</div>
</div>
<div className={styles.line}></div>
<div className={styles.line} />
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
......
import React, { useEffect } from 'react';
import styles from './Guard.less';
import { Modal, Button, message } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
const { confirm } = Modal;
import { connect } from 'umi';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import styles from './Guard.less';
import { timestampToTime } from '../../../utils/time';
import Line from '../../../components/Line/Line';
import BackButton from '../../../components/BackButton/BackButton';
import TitleGet from '../../../components/TitleGet/TitleGet';
import { timestampToTime } from '../../../utils/time';
const { confirm } = Modal;
const Guard = (props: any) => {
const { CurDataFollowDetail, dispatch, history } = props;
console.log(CurDataFollowDetail);
useEffect(() => {
if (!CurDataFollowDetail) {
history.goBack();
......@@ -25,7 +23,7 @@ const Guard = (props: any) => {
const handleClickBtn = (id: string) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
if (permissionArr.indexOf('14') < 0) {
message.error('No Permissions!!!', 3);
// message.error('No Permissions!!!', 3);
return;
}
confirm({
......@@ -38,16 +36,13 @@ const Guard = (props: any) => {
playload: { id },
});
},
onCancel() {
console.log('Cancel');
},
});
};
return CurDataFollowDetail ? (
<div className={styles.base}>
<div className={styles.item0}>
<TitleGet title={'Edit Security Guard Account'} />
<TitleGet title="Security Guard Account Details" />
</div>
<div className={styles.item0_1}>Status:Normal</div>
<div className={styles.item0_1}>
......@@ -59,23 +54,23 @@ const Guard = (props: any) => {
<div className={styles.item2}>
<BackButton />
</div>
<div className={styles.clear0}></div>
<div className={styles.clear0} />
<div className={styles.item1}>Company Name</div>
<div className={styles.item1_1}>{CurDataFollowDetail.companyName}</div>
<div className={styles.clear1}></div>
<div className={styles.clear1} />
<div className={styles.item1}>User Name</div>
<div className={styles.item1_1}>{CurDataFollowDetail.saferName}</div>
<div className={styles.clear1}></div>
<div className={styles.clear1} />
<div className={styles.item1}>Contact Details</div>
<div className={styles.item1_1}>{CurDataFollowDetail.saferPhone}</div>
<div className={styles.clear1}></div>
<div className={styles.clear1} />
<div className={styles.item1}>Email</div>
<div className={styles.item1_1}>{CurDataFollowDetail.saferEmail}</div>
<div className={styles.clear1}></div>
<div className={styles.clear1} />
<Line />
......
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