Commit 0dea0fdf authored by cellee's avatar cellee

附件下载

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 177a89dd
...@@ -123,7 +123,7 @@ const TitleSearch = (props: any) => { ...@@ -123,7 +123,7 @@ const TitleSearch = (props: any) => {
{/* 小区列表的管理员姓名搜索 */} {/* 小区列表的管理员姓名搜索 */}
{username != null ? ( {username != null ? (
<Col key={'username_' + username[0]}> <Col key={'username_' + username[0]}>
<Form.Item name={username[0]} label="Username"> <Form.Item name={username[0]}>
<Input placeholder={username[1]} allowClear /> <Input placeholder={username[1]} allowClear />
</Form.Item> </Form.Item>
</Col> </Col>
......
...@@ -14,8 +14,10 @@ export default { ...@@ -14,8 +14,10 @@ export default {
curString: {}, curString: {},
Result: null, Result: null,
DataSave: null, DataSave: null,
detailData: {}, detailData: {}, // 详情
imgUrl: '', imgUrl: null, // 预览地址
village: {}, // 小区列表
overCom: null,
}, },
reducers: { reducers: {
...@@ -26,6 +28,7 @@ export default { ...@@ -26,6 +28,7 @@ export default {
return { ...state, Result }; return { ...state, Result };
}, },
returnDataSave(state, { DataSave }) { returnDataSave(state, { DataSave }) {
console.log(DataSave);
return { ...state, DataSave }; return { ...state, DataSave };
}, },
returnDataSaveDetail(state, { detailData }) { returnDataSaveDetail(state, { detailData }) {
...@@ -34,20 +37,30 @@ export default { ...@@ -34,20 +37,30 @@ export default {
returnImgurl(state, { imgUrl }) { returnImgurl(state, { imgUrl }) {
return { ...state, imgUrl }; return { ...state, imgUrl };
}, },
returnVillage(state, { village }) {
return { ...state, village };
},
overComList(state, { overCom }) {
return { ...state, overCom };
},
}, },
effects: { effects: {
//标准请求 //标准请求
*RA({ playload }, { call, put }) { *RA({ playload }, { call, put }) {
const resp = yield call(service.RA, playload); const resp = yield call(service.RA, playload);
console.log(resp);
// if (resp.code == 500||resp.error_code!="0000") { // if (resp.code == 500||resp.error_code!="0000") {
// } // }
if (resp.code == 500 && resp.error_code != '0000') { if (resp.code == 500 && resp.error_code != '0000') {
getObjectInfo(playload.body); getObjectInfo(playload.body);
printf(playload, resp); printf(playload, resp);
message.error(`${resp.code}:${resp.msg}`); message.error(`${resp.code}:${resp.msg}`);
} else if (resp.error_code == '0001') {
getObjectInfo(playload.body);
printf(playload, resp);
message.error(`${resp.error_code}:${resp.error_msg}`);
} else { } else {
console.log('成功?');
switch (playload.index) { switch (playload.index) {
case 24: case 24:
{ {
...@@ -55,28 +68,54 @@ export default { ...@@ -55,28 +68,54 @@ export default {
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
} }
break; break;
case 29: case 29: // 小区编辑
{ {
let Result = resp; let Result = resp;
yield put({ type: 'returnResult', Result }); yield put({ type: 'returnResult', Result });
message.success(`小区信息保存成功!`);
history.push('/CommunityManagement/CellList'); // message.success(`小区信息保存成功!`);
// history.push('/CommunityManagement/CellList');
} }
break; break;
case 32: case 32: // 获取小区详情
{ {
let detailData = resp.data; let detailData = resp.data;
yield put({ type: 'returnDataSaveDetail', detailData }); yield put({ type: 'returnDataSaveDetail', detailData });
} }
break; break;
case 47: case 47: // 图片
{ {
let imgUrl = resp.data; let imgUrl = {
url: resp.data,
name: playload.body.fileName,
};
yield put({ type: 'returnImgurl', imgUrl }); yield put({ type: 'returnImgurl', imgUrl });
} }
break; break;
case 48: {
// 小区列表
let village = resp.data;
yield put({ type: 'returnVillage', village });
break;
} }
case 49: {
// 关闭小区
let overCom = resp.data;
yield put({ type: 'overComList', overCom });
break;
} }
}
}
},
*urlRemove({}, { put }) {
let nus = null;
yield put({ type: 'returnImgurl', nus });
},
*comRemove({}, { put }) {
let nus = null;
yield put({ type: 'overComList', nus });
}, },
*ResultClear({}, { put }) { *ResultClear({}, { put }) {
......
...@@ -4,8 +4,8 @@ import { LeftOutlined, EditOutlined, UploadOutlined, LinkOutlined } from '@ant-d ...@@ -4,8 +4,8 @@ import { LeftOutlined, EditOutlined, UploadOutlined, LinkOutlined } from '@ant-d
import { Form, Input, Button, TimePicker, Checkbox, Upload, message, Spin } from 'antd'; import { Form, Input, Button, TimePicker, Checkbox, Upload, message, Spin } from 'antd';
// 样式 // 样式
import './celllist.less'; import './celllist.less';
import { RA } from '@/utils/method'; import { RA, ResultClear } from '@/utils/method';
import { history } from 'umi';
import { village } from '@/utils/tip'; import { village } from '@/utils/tip';
import moment from 'moment'; import moment from 'moment';
...@@ -14,7 +14,9 @@ import moment from 'moment'; ...@@ -14,7 +14,9 @@ import moment from 'moment';
interface objc {} interface objc {}
const Adds = (props: any) => { const Adds = (props: any) => {
const { Data, dispatch, loading } = props; const { Data, dispatch, loading, Result } = props;
console.log(loading);
const [form] = Form.useForm(); const [form] = Form.useForm();
...@@ -40,6 +42,23 @@ const Adds = (props: any) => { ...@@ -40,6 +42,23 @@ const Adds = (props: any) => {
const [codeStrat, setcodeStrat] = useState(false); const [codeStrat, setcodeStrat] = useState(false);
const [tipMain, setTipMain] = useState(''); const [tipMain, setTipMain] = useState('');
useEffect(() => {
console.log(Result);
if (Result != null) {
console.log('页面结果');
console.log(Result);
if (Result.error_code == undefined) {
console.log('服务器有问题');
message.error('服务器有问题,请求失败', 5);
}
if (Result.error_code == '0000') {
message.success(`Community Saved Successfully`);
history.go(-1);
}
ResultClear(module, dispatch);
}
}, [Result]);
// 赋值 // 赋值
useEffect(() => { useEffect(() => {
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单 // 如果是添加传来没有值的时候 就清空 否则 赋值给表单
...@@ -81,7 +100,7 @@ const Adds = (props: any) => { ...@@ -81,7 +100,7 @@ const Adds = (props: any) => {
// 小区名 -- 上传需要 // 小区名 -- 上传需要
setCodeName(Data.residentialName); setCodeName(Data.residentialName);
setcodeStrat(true); setcodeStrat(true);
setTipMain('已有绑定内容,不可做修改!'); setTipMain('Binding content already exists, cannot be modified');
} else { } else {
console.log('新建'); console.log('新建');
} }
...@@ -161,9 +180,9 @@ const Adds = (props: any) => { ...@@ -161,9 +180,9 @@ const Adds = (props: any) => {
// 上传提示 // 上传提示
function uploadMsg(info: any) { function uploadMsg(info: any) {
if (info.file.status === 'done') { if (info.file.status === 'done') {
message.success(`${info.file.name} file uploaded successfully`); message.success(`${info.file.name} File Uploaded Successfully`);
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} file upload failed.`); message.error(`${info.file.name} File Upload Failed.`);
} }
} }
...@@ -213,7 +232,7 @@ const Adds = (props: any) => { ...@@ -213,7 +232,7 @@ const Adds = (props: any) => {
obj.residentialHotlineName = undeFi(values.help.residentialHotlineName); obj.residentialHotlineName = undeFi(values.help.residentialHotlineName);
obj.residentialHotline = undeFi(values.help.residentialHotline); obj.residentialHotline = undeFi(values.help.residentialHotline);
// 编辑的时候 为空 判断 // 编辑的时候 为空 判断
if (values.help.time !== '') { if (values.help.time !== '' && values.help.time) {
obj.residentialHotlineServieStartTime = undeFi(values.help.time[0]).format('HH:mm'); obj.residentialHotlineServieStartTime = undeFi(values.help.time[0]).format('HH:mm');
obj.residentialHotlineServieEndTime = undeFi(values.help.time[1]).format('HH:mm'); obj.residentialHotlineServieEndTime = undeFi(values.help.time[1]).format('HH:mm');
} else { } else {
...@@ -238,7 +257,7 @@ const Adds = (props: any) => { ...@@ -238,7 +257,7 @@ const Adds = (props: any) => {
// 返回 // 返回
const goToReturn = () => { const goToReturn = () => {
// console.log(fileList) // console.log(fileList)
history.back(); history.go(-1);
}; };
// 小区名输入监听ant // 小区名输入监听ant
...@@ -358,7 +377,7 @@ const Adds = (props: any) => { ...@@ -358,7 +377,7 @@ const Adds = (props: any) => {
<LinkOutlined color="#409EFF" /> <LinkOutlined color="#409EFF" />
{loubaUpload.length > 0 ? loubaUpload[0].name : ''} {loubaUpload.length > 0 ? loubaUpload[0].name : ''}
</p> </p>
<span>支持文件:.pdf,.jpg, .png</span> <span>支持文件:.doc,.docx,.jpg,.png,.pdf</span>
</div> </div>
</Form.Item> </Form.Item>
...@@ -371,12 +390,12 @@ const Adds = (props: any) => { ...@@ -371,12 +390,12 @@ const Adds = (props: any) => {
<LinkOutlined color="#409EFF" /> <LinkOutlined color="#409EFF" />
{guideUpload.length > 0 ? guideUpload[0].name : ''} {guideUpload.length > 0 ? guideUpload[0].name : ''}
</p> </p>
<span>支持文件:.pdf,.jpg, .png</span> <span>支持文件:.doc,.docx,.jpg,.png,.pdf</span>
</div> </div>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="Period of Service" label="Period Of Service"
name="lifeServiceFile" name="lifeServiceFile"
style={{ marginBottom: '0' }} style={{ marginBottom: '0' }}
> >
...@@ -388,13 +407,13 @@ const Adds = (props: any) => { ...@@ -388,13 +407,13 @@ const Adds = (props: any) => {
<LinkOutlined color="#409EFF" /> <LinkOutlined color="#409EFF" />
{periodUpload.length > 0 ? periodUpload[0].name : ''} {periodUpload.length > 0 ? periodUpload[0].name : ''}
</p> </p>
<span>支持文件:.pdf,.jpg, .png</span> <span>支持文件:.doc,.docx,.jpg,.png,.pdf</span>
</div> </div>
</Form.Item> </Form.Item>
<hr /> <hr />
{/* 帮助中心 */} {/* 帮助中心 */}
<Form.Item label="Help" name="help"> <Form.Item label="Help Center" name="help">
<Input.Group compact> <Input.Group compact>
<Form.Item name={['help', 'residentialHotlineName']} noStyle> <Form.Item name={['help', 'residentialHotlineName']} noStyle>
<Input <Input
...@@ -413,9 +432,11 @@ const Adds = (props: any) => { ...@@ -413,9 +432,11 @@ const Adds = (props: any) => {
</Input.Group> </Input.Group>
</Form.Item> </Form.Item>
<Form.Item label=" " colon={false}> <hr />
{/* 提交 */}
<Form.Item label="" colon={false}>
<Button type="primary" htmlType="submit" loading={loading}> <Button type="primary" htmlType="submit" loading={loading}>
Conserve Submit
</Button> </Button>
</Form.Item> </Form.Item>
</Form> </Form>
...@@ -427,8 +448,10 @@ const Adds = (props: any) => { ...@@ -427,8 +448,10 @@ const Adds = (props: any) => {
// export default Adds; // export default Adds;
function map(state: any) { function map(state: any) {
console.log(state);
const Data = state.CellList.DataSave; const Data = state.CellList.DataSave;
const loading = state.loading.models.CellList; const loading = state.loading.models.CellList;
return { Data, loading }; const { Result } = state.CellList;
return { Data, loading, Result };
} }
export default connect(map)(Adds); export default connect(map)(Adds);
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Space, Button, Form, message } from 'antd'; import { Space, Button, Form, message, Pagination } from 'antd';
import { connect, history } from 'umi'; import { connect, history } from 'umi';
// 图标 // 图标
...@@ -9,11 +9,12 @@ import ProTable from '@ant-design/pro-table'; ...@@ -9,11 +9,12 @@ import ProTable from '@ant-design/pro-table';
import TitleSearch from '@/components/TitleSearch/TitleSearch'; import TitleSearch from '@/components/TitleSearch/TitleSearch';
import { RA, SA } from '@/utils/method'; import { RA, SA } from '@/utils/method';
import { objectColumns } from '@/utils/string'; import { objectColumns } from '@/utils/string';
const module = 'CellList'; import { Prompt } from 'react-router';
const module = 'CellList';
import './celllist.less'; import './celllist.less';
const CellList = (props: any) => { const CellLists = (props: any) => {
const columns = objectColumns([ const columns = objectColumns([
['Community', 'residentialName'], ['Community', 'residentialName'],
['Administrator', 'residentialManagerUserName'], ['Administrator', 'residentialManagerUserName'],
...@@ -42,27 +43,26 @@ const CellList = (props: any) => { ...@@ -42,27 +43,26 @@ const CellList = (props: any) => {
], ],
]); ]);
const { dispatch, Data, loading, curString } = props; const { dispatch, Data, loading, curString, village } = props;
console.log(Data); // console.log(Data);
// useEffect(() => {
// let msg = {
// residentialManagerUserName: '',
// communityNameList: [],
// pageNum: 1,
// };
// RA(48, msg, module, dispatch);
// }, [1]);
// 先请求一次 拿到所有小区列表
useEffect(() => { useEffect(() => {
RA(24, { communityName: '' }, module, dispatch); RA(24, { communityName: '' }, module, dispatch);
}, [1]); }, [1]);
// 监听data请求完毕再请求一次
useEffect(() => { useEffect(() => {
if (Data != null) { if (Data != null) {
//console.log(columnsVal) let msg = {
residentialManagerUserName: '',
communityNameList: Data.communityList,
pageNum: 1,
};
RA(48, msg, module, dispatch);
} }
}, [Data]); }, [Data]);
const CallbackSearch = (values: any) => { const CallbackSearch = (values: any) => {
RA(24, { communityName: values }, module, dispatch); RA(24, { communityName: values }, module, dispatch);
}; };
...@@ -105,14 +105,28 @@ const CellList = (props: any) => { ...@@ -105,14 +105,28 @@ const CellList = (props: any) => {
// message.error('请输入管理员姓名或选择小区进行搜索!'); // message.error('请输入管理员姓名或选择小区进行搜索!');
// } // }
}; };
// 页面切换
const paginationHandler = (page: number, pageSize?: number) => {
dispatch({
type: 'ContractModel/getList',
payload: {
index: 19,
page: {
pageNum: page,
},
},
});
};
return ( return (
<div> <div>
{Data != null ? ( {village != null ? (
<> <>
{/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */} {/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */}
<div className="contop"> <div className="contop">
<TitleSearch <TitleSearch
username={['label', '请输入管理员姓名']} username={['label', 'Please enter Administrator name']}
community={'communityName'} community={'communityName'}
checklist={curString.communityNameList != null ? curString.communityNameList : null} checklist={curString.communityNameList != null ? curString.communityNameList : null}
onSubmit={CallBackTitleSearch} onSubmit={CallBackTitleSearch}
...@@ -122,7 +136,7 @@ const CellList = (props: any) => { ...@@ -122,7 +136,7 @@ const CellList = (props: any) => {
// request={requestHeadl} // request={requestHeadl}
pagination={false} // 隐藏默认分页 pagination={false} // 隐藏默认分页
rowKey={'id'} rowKey={'id'}
dataSource={Data.rows} dataSource={village.list}
columns={columns} columns={columns}
search={false} search={false}
loading={loading} loading={loading}
...@@ -143,20 +157,27 @@ const CellList = (props: any) => { ...@@ -143,20 +157,27 @@ const CellList = (props: any) => {
headerTitle="Community List" headerTitle="Community List"
// pagination={{ defaultCurrent: 1, total: Data.totalRow }} // pagination={{ defaultCurrent: 1, total: Data.totalRow }}
/> />
{/* <Table loading={false} rowKey="id" style={{ marginTop: 16 }} <div className="pages">
dataSource={Data.rows} {/* <Pagination
columns={columns} current={village.page}
pagination={{ defaultCurrent: 1, total: Data.total}} /> */} total={village.totalRow}
onChange={paginationHandler}
// onShowSizeChange={pageSizeHandler}
// current={users.meta.page}
// pageSize={users.meta.per_page}
/> */}
</div>
</> </>
) : null} ) : (
'暂无数据'
)}
</div> </div>
); );
}; };
function map(state: any) { function map(state: any) {
console.log(state);
const loading = state.loading.models.CellList; const loading = state.loading.models.CellList;
const { Data, curString } = state[module]; const { Data, curString, village } = state[module];
return { Data, loading, curString }; return { Data, loading, curString, village };
} }
export default connect(map)(CellList); export default connect(map)(CellLists);
...@@ -8,6 +8,7 @@ import { ...@@ -8,6 +8,7 @@ import {
ApiTwoTone, ApiTwoTone,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Modal, Input, Button, Spin, Checkbox, Image, message, Divider, Avatar } from 'antd'; import { Modal, Input, Button, Spin, Checkbox, Image, message, Divider, Avatar } from 'antd';
import { history } from 'umi';
// 样式 // 样式
import './celllist.less'; import './celllist.less';
import { RA } from '@/utils/method'; import { RA } from '@/utils/method';
...@@ -17,12 +18,15 @@ import hfor from '@/assets/h5.png'; ...@@ -17,12 +18,15 @@ import hfor from '@/assets/h5.png';
import moment from 'moment'; import moment from 'moment';
import Axios from 'axios';
import fileDownload from 'js-file-download';
// 接口申明 // 接口申明
const Detail = (props: any) => { const Detail = (props: any) => {
const module = 'CellList'; const module = 'CellList';
const { detailData, DataSave, dispatch, loading, imgUrl } = props; const { detailData, DataSave, dispatch, loading, imgUrl, overCom } = props;
useEffect(() => { useEffect(() => {
if (DataSave) { if (DataSave) {
...@@ -33,6 +37,24 @@ const Detail = (props: any) => { ...@@ -33,6 +37,24 @@ const Detail = (props: any) => {
} }
}, [1]); }, [1]);
useEffect(() => {
if (imgUrl != null) {
// console.log('变化了'); 开始下载
openDows(imgUrl.url, imgUrl.name);
}
}, [imgUrl]);
useEffect(() => {
if (overCom != null) {
message.success(`Community Deleted Successfully`);
history.push('/CommunityManagement/CellList');
// 然后在清空删除成功数据
dispatch({
type: module + '/comRemove',
});
}
}, [overCom]);
//物业费选择 //物业费选择
const plainOptions = [ const plainOptions = [
{ label: '线上缴费', value: '0', disabled: true }, { label: '线上缴费', value: '0', disabled: true },
...@@ -44,11 +66,19 @@ const Detail = (props: any) => { ...@@ -44,11 +66,19 @@ const Detail = (props: any) => {
// 返回 // 返回
const goToReturn = () => { const goToReturn = () => {
// console.log(fileList) // console.log(fileList)
history.back(); history.go(-1);
}; };
// 复制 // 复制
const copy = () => {}; const copy = (msg: string, tip: string = 'Copy Success') => {
var aux = document.createElement('input');
aux.setAttribute('value', msg);
document.body.appendChild(aux);
aux.select();
document.execCommand('copy');
document.body.removeChild(aux);
message.success(tip);
};
// 打开弹窗 // 打开弹窗
const openModel = () => { const openModel = () => {
...@@ -60,26 +90,34 @@ const Detail = (props: any) => { ...@@ -60,26 +90,34 @@ const Detail = (props: any) => {
}; };
// 关闭小区 // 关闭小区
const handleOk = () => { const handleOk = () => {
setModelFee(false); // 删除小区
message.error('后台接口新增中!'); RA(49, { id: DataSave.id }, module, dispatch);
// message.success('您已关闭小区!');
// history.back();
}; };
// 打开附件下载 // 打开附件下载
async function opens(ans: string) { async function opens(ans: string) {
message.warning('接口处理中'); // message.warning('接口处理中');
// let msg = { let msg = {
// // userToken: '', // userToken: '',
// // type: ans.substr(ans.lastIndexOf('.') + 1), // type: ans.substr(ans.lastIndexOf('.') + 1),
// type: 'tosCommunityFileService', type: 'tosCommunityFileService',
// fileName: ans, fileName: ans,
// extends: detailData.rows.residentialName, extends: detailData.rows.residentialName,
// }; };
// let s = await RA(47, msg, module, dispatch); RA(47, msg, module, dispatch);
// console.log(s);
// 监听文件的变化进行下载
} }
// 下载文件到本地
const openDows = (url: any, name: any) => {
Axios.get(url, {
responseType: 'blob',
}).then((res) => {
fileDownload(res.data, name);
});
};
return ( return (
<> <>
<Spin spinning={loading}> <Spin spinning={loading}>
...@@ -97,7 +135,7 @@ const Detail = (props: any) => { ...@@ -97,7 +135,7 @@ const Detail = (props: any) => {
loading={false} loading={false}
onClick={openModel} onClick={openModel}
> >
关闭小区 <span className="capi">Close the community</span>
</Button> </Button>
<Button onClick={goToReturn}> <Button onClick={goToReturn}>
<LeftOutlined /> <LeftOutlined />
...@@ -112,30 +150,22 @@ const Detail = (props: any) => { ...@@ -112,30 +150,22 @@ const Detail = (props: any) => {
{/* 激活码 */} {/* 激活码 */}
<div className="code"> <div className="code">
<li>小区激活码</li> <li>小区激活码</li>
<Avatar <Image width={140} src={detailData.visitorUrl} fallback={imgs} />
shape="square" <li className="lis">{detailData.rows.cdkCode}</li>
style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}
size={140}
src={detailData.visitorUrl ? detailData.visitorUrl : imgs}
/>
</div> </div>
{/* 详情 */} {/* 详情 */}
<div className="list-item"> <div className="list-item">
<div className="inst">
<div className="item"> <div className="item">
<label>小区名称:</label> <label>小区名称:</label>
<span>{detailData.rows.residentialName}</span> <span>{detailData.rows.residentialName}</span>
</div> </div>
<div className="item">
<label>小区邮编:</label>
<span>{detailData.rows.residentialZipCode}</span>
</div>
</div>
{/* ---------- */} {/* ---------- */}
<div className="item"> <div className="item">
<label>详细地址:</label> <label>详细地址:</label>
<span>{detailData.rows.residentialAddress}</span> <span>
{detailData.rows.residentialAddress}&nbsp;{detailData.rows.residentialZipCode}{' '}
</span>
</div> </div>
{/* ---------- */} {/* ---------- */}
<div className="item"> <div className="item">
...@@ -248,13 +278,15 @@ const Detail = (props: any) => { ...@@ -248,13 +278,15 @@ const Detail = (props: any) => {
<div className="list-item"> <div className="list-item">
<div className="item"> <div className="item">
<label>临时到访码下载:</label> <label>临时到访码下载:</label>
<Avatar <Image width={64} src={hfor} />
shape="square" <Button
style={{ color: '#f56a00', backgroundColor: '#fde3cf' }} type="link"
size={64} onClick={() => {
src={hfor} openDows(require('@/assets/h5.png'), 'code.png');
/> }}
<Button type="link">下载</Button> >
下载
</Button>
<Input <Input
placeholder="Basic usage" placeholder="Basic usage"
...@@ -262,7 +294,12 @@ const Detail = (props: any) => { ...@@ -262,7 +294,12 @@ const Detail = (props: any) => {
style={{ width: '280px' }} style={{ width: '280px' }}
value="http://47.74.233.180:8651/tosVisitorNo" value="http://47.74.233.180:8651/tosVisitorNo"
/> />
<Button type="link" onClick={copy}> <Button
type="link"
onClick={() => {
copy('http://47.74.233.180:8651/tosVisitorNo');
}}
>
复制 复制
</Button> </Button>
</div> </div>
...@@ -271,15 +308,21 @@ const Detail = (props: any) => { ...@@ -271,15 +308,21 @@ const Detail = (props: any) => {
{/* 确认关闭框 */} {/* 确认关闭框 */}
<Modal <Modal
title="确认关闭小区吗?" title="Are You Sure You Want To Close The Community??"
visible={ModelFee} visible={ModelFee}
centered={true}
onCancel={handleCancel} onCancel={handleCancel}
onOk={handleOk} onOk={handleOk}
okText="Yes"
cancelText="No"
okType="danger"
confirmLoading={loading}
> >
<p> <p className="capi">
关闭小区将会<span style={{ color: 'red' }}>删除</span>小区内 Close the community will delete <span style={{ color: 'red' }}> all owners </span>in
<span style={{ color: 'red' }}>所有</span>业主,请谨慎操作! the community .
</p> </p>
<p>please operate carefully!</p>
</Modal> </Modal>
</div> </div>
) : ( ) : (
...@@ -292,9 +335,9 @@ const Detail = (props: any) => { ...@@ -292,9 +335,9 @@ const Detail = (props: any) => {
// export default Adds; // export default Adds;
function map(state: any) { function map(state: any) {
const { DataSave, detailData, imgUrl } = state.CellList; // 上层传递来的值 const { DataSave, detailData, imgUrl, overCom } = state.CellList; // 上层传递来的值
const loading = state.loading.models.CellList; const loading = state.loading.models.CellList;
console.log(state);
return { DataSave, detailData, loading, imgUrl }; return { DataSave, detailData, loading, imgUrl, overCom };
} }
export default connect(map)(Detail); export default connect(map)(Detail);
...@@ -117,6 +117,17 @@ li { ...@@ -117,6 +117,17 @@ li {
text-align: center; text-align: center;
line-height: 35px; line-height: 35px;
} }
img {
width: 140px;
border: 1px solid #f0f0f0;
border-radius: 3px;
margin-bottom: 5px;
}
.lis {
color: #67c23a;
font-size: 18px;
font-weight: 500;
}
} }
} }
} }
...@@ -127,3 +138,11 @@ li { ...@@ -127,3 +138,11 @@ li {
font-size: 12px; font-size: 12px;
color: red; color: red;
} }
img {
cursor: pointer;
}
.capi {
text-transform: capitalize;
}
...@@ -130,8 +130,9 @@ export const requestList = [ ...@@ -130,8 +130,9 @@ export const requestList = [
}, },
], ],
['/tos/tosServiceProvider/get', '46 获取服务商', {}], ['/tos/tosServiceProvider/get', '46 获取服务商', {}],
['/tos/image/priview', '47 获取附件地址', {}], ['/tos/fileAndImage/preview', '47 获取附件地址', {}],
['/tos/tosCommunity/get/list', '48 修改获取小区列表', {}], ['/tos/tosCommunity/get/list', '48 修改获取小区列表', {}],
['/tos/community/delete', '49 关闭小区', {}],
]; ];
const params = [ const params = [
......
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