Commit 34977cee authored by cellee's avatar cellee

账号权限需求变更

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 6b46650b
...@@ -90,6 +90,8 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout ...@@ -90,6 +90,8 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
// 登录 // 登录
if (history.location.pathname == '/') { if (history.location.pathname == '/') {
var isLogin = false; var isLogin = false;
console.log(getCookie('token'));
if (getCookie('token').length != 0) { if (getCookie('token').length != 0) {
isLogin = true; isLogin = true;
} }
......
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
}, },
*SA({ DataSave }, { call, put }) { *SA({ DataSave }, { call, put }) {
console.log(DataSave); // console.log(DataSave);
yield put({ type: 'returnDataSave', DataSave }); yield put({ type: 'returnDataSave', DataSave });
}, },
......
...@@ -7,19 +7,18 @@ import './Account.less'; ...@@ -7,19 +7,18 @@ import './Account.less';
import { zhCnFaci, enUsFaci } from '@/utils/power'; import { zhCnFaci, enUsFaci } from '@/utils/power';
import { AccountTip } from '@/utils/tip'; import { AccountTip } from '@/utils/tip';
import SelectCommunity from '@/components/SelectCommunity/Tow';
import { getNumber } from '@/utils/string'; // 正则 import { getNumber } from '@/utils/string'; // 正则
import { RA } from '@/utils/method'; import { RA } from '@/utils/method';
const Account = (props: any) => { const Account = (props: any) => {
const module = 'Account'; const module = 'Account';
const { dispatch, SubResult, CommunityList, loading, user, Info } = props; const { dispatch, SubResult, loading, user, Info } = props;
// 权限列表 // 权限列表
const treeData = localStorage.getItem('umi_locale') == 'zh-CN' ? zhCnFaci : enUsFaci; const treeData = localStorage.getItem('umi_locale') == 'zh-CN' ? zhCnFaci : enUsFaci;
const [expandedKeys, setExpandedKeys] = useState<string[]>([]); // 展开栏目 const [expandedKeys, setExpandedKeys] = useState<string[]>(['0']); // 展开栏目
const [checkedKeys, setCheckedKeys] = useState([] as any); // 默认已选栏目 const [checkedKeys, setCheckedKeys] = useState([] as any); // 默认已选栏目
const [selectedKeys, setSelectedKeys] = useState<string[]>([]); // 设置选中的树节点 const [selectedKeys, setSelectedKeys] = useState<string[]>([]); // 设置选中的树节点
const [autoExpandParent, setAutoExpandParent] = useState<boolean>(true); // 树形菜单展开关闭 const [autoExpandParent, setAutoExpandParent] = useState<boolean>(true); // 树形菜单展开关闭
...@@ -29,8 +28,6 @@ const Account = (props: any) => { ...@@ -29,8 +28,6 @@ const Account = (props: any) => {
const [disab, setdisab] = useState(false); // 是否禁止选择二级 const [disab, setdisab] = useState(false); // 是否禁止选择二级
const [towAccountId, settowAccountId] = useState(null); // 二级账户id const [towAccountId, settowAccountId] = useState(null); // 二级账户id
const [treeDataList, settreeDataList] = useState(treeData); // 权限列表 const [treeDataList, settreeDataList] = useState(treeData); // 权限列表
//默认选中的小区
const [community, setCommunity] = useState(CommunityList); // 默认全选
// 表单标识 // 表单标识
const [form] = Form.useForm(); const [form] = Form.useForm();
...@@ -103,7 +100,6 @@ const Account = (props: any) => { ...@@ -103,7 +100,6 @@ const Account = (props: any) => {
// 二级管辖小区和权限 // 二级管辖小区和权限
useEffect(() => { useEffect(() => {
if (Info != null) { if (Info != null) {
setCommunity(Info.community);
power(Info.permissions); power(Info.permissions);
setCheckedKeys([]); setCheckedKeys([]);
} }
...@@ -162,10 +158,6 @@ const Account = (props: any) => { ...@@ -162,10 +158,6 @@ const Account = (props: any) => {
// 权限 // 权限
message.error('Please Select Permission!'); message.error('Please Select Permission!');
return false; return false;
} else if (value.community.value == null || value.community.value.length == 0) {
// 小区
message.error('Please Select The Jurisdiction Area!');
return false;
} else if (value.tosUserName.length < 6) { } else if (value.tosUserName.length < 6) {
// 账号长度 // 账号长度
message.error('The Account Password is Greater Than 6 Digits!'); message.error('The Account Password is Greater Than 6 Digits!');
...@@ -175,7 +167,6 @@ const Account = (props: any) => { ...@@ -175,7 +167,6 @@ const Account = (props: any) => {
message.error('Please select affiliated account !'); message.error('Please select affiliated account !');
return false; return false;
} else { } else {
value.tosUserServiceCellList = value.community.value; // 管辖小区
value.tosUserEmail = value.tosUserName; // 邮箱就是账号 value.tosUserEmail = value.tosUserName; // 邮箱就是账号
value.tosUserLevel = values; //级别 value.tosUserLevel = values; //级别
value.creatorName = JSON.parse(userInfo).userModel.tosUserName; //新建者账号 value.creatorName = JSON.parse(userInfo).userModel.tosUserName; //新建者账号
...@@ -210,10 +201,11 @@ const Account = (props: any) => { ...@@ -210,10 +201,11 @@ const Account = (props: any) => {
// 另传权限 // 另传权限
let obj = { let obj = {
userName: value.tosUserName, userName: value.tosUserName,
userPassword: value.tosUserPwd,
permissionArray: newData, permissionArray: newData,
}; };
console.log(value);
console.log(obj);
RA(38, value, module, dispatch); // 信息上传 RA(38, value, module, dispatch); // 信息上传
RA(42, obj, module, dispatch); // 权限上传 RA(42, obj, module, dispatch); // 权限上传
return true; return true;
...@@ -258,7 +250,6 @@ const Account = (props: any) => { ...@@ -258,7 +250,6 @@ const Account = (props: any) => {
if (e.target.value == 2) { if (e.target.value == 2) {
//否则打开 //否则打开
settowAccountId(null); settowAccountId(null);
setCommunity(CommunityList);
} }
}; };
...@@ -281,8 +272,6 @@ const Account = (props: any) => { ...@@ -281,8 +272,6 @@ const Account = (props: any) => {
// 选择哪个二级账号 // 选择哪个二级账号
const handleChange = (value: any) => { const handleChange = (value: any) => {
console.log(`selected ${value}`);
RA(57, { tosUserLevelId: value }, module, dispatch); // 根据用户id获取用户管辖小区名和权限 RA(57, { tosUserLevelId: value }, module, dispatch); // 根据用户id获取用户管辖小区名和权限
settowAccountId(value); settowAccountId(value);
}; };
...@@ -310,15 +299,12 @@ const Account = (props: any) => { ...@@ -310,15 +299,12 @@ const Account = (props: any) => {
name="contract" name="contract"
onFinish={onFinishContract} onFinish={onFinishContract}
> >
<Descriptions column={{ xs: 1, sm: 2, md: 3 }}> <Descriptions column={{ xs: 1, sm: 1, md: 2, xl: 3 }}>
<Descriptions.Item> <Descriptions.Item>
<Form.Item name="tosUserName" label="Account ID" rules={AccountTip[0] as any}> <Form.Item name="tosUserName" label="Account ID" rules={AccountTip[0] as any}>
<Input placeholder="Login Account" className="input" /> <Input placeholder="Login Account" className="input" />
</Form.Item> </Form.Item>
</Descriptions.Item> </Descriptions.Item>
</Descriptions>
<Descriptions column={{ xs: 1, sm: 2, md: 3 }}>
<Descriptions.Item> <Descriptions.Item>
<Form.Item name="tosAccountName" label="Name" rules={AccountTip[1] as any}> <Form.Item name="tosAccountName" label="Name" rules={AccountTip[1] as any}>
<Input placeholder="Name Of Administrator" className="input" /> <Input placeholder="Name Of Administrator" className="input" />
...@@ -336,13 +322,6 @@ const Account = (props: any) => { ...@@ -336,13 +322,6 @@ const Account = (props: any) => {
</Descriptions.Item> </Descriptions.Item>
</Descriptions> </Descriptions>
<Form.Item name="community" label="Community">
<SelectCommunity
checklist={community ? community : null}
list={community ? community : []}
/>
</Form.Item>
<div className="diy" style={{ marginBottom: '14px' }}> <div className="diy" style={{ marginBottom: '14px' }}>
<div className="label"> <div className="label">
<span className="title">Privilege Level:</span> <span className="title">Privilege Level:</span>
...@@ -407,7 +386,6 @@ const Account = (props: any) => { ...@@ -407,7 +386,6 @@ const Account = (props: any) => {
const AccountProps = (state: any) => { const AccountProps = (state: any) => {
const { Data, DataSave, DataSaveDetail, Result, SubResult, Info } = state.Account; const { Data, DataSave, DataSaveDetail, Result, SubResult, Info } = state.Account;
const { CommunityList } = state.Init; // 小区列表
const loading = state.loading.models.Account || false; const loading = state.loading.models.Account || false;
const { user } = state; const { user } = state;
return { return {
...@@ -416,7 +394,6 @@ const AccountProps = (state: any) => { ...@@ -416,7 +394,6 @@ const AccountProps = (state: any) => {
DataSaveDetail, DataSaveDetail,
Result, Result,
loading, loading,
CommunityList,
user, // 获取当前账户信息 user, // 获取当前账户信息
SubResult, SubResult,
Info, Info,
......
...@@ -78,7 +78,7 @@ const CellLists = (props: any) => { ...@@ -78,7 +78,7 @@ const CellLists = (props: any) => {
useEffect(() => { useEffect(() => {
if (village == null) { if (village == null) {
const obj = { const obj = {
communityNameList: JSON.parse(localStorage.getItem('CommunityList') as any), communityNameList: Init.CommunityList,
pageNum: 1, pageNum: 1,
}; };
setTerm(obj); setTerm(obj);
...@@ -134,7 +134,7 @@ const CellLists = (props: any) => { ...@@ -134,7 +134,7 @@ const CellLists = (props: any) => {
<TitleSearch <TitleSearch
username={['label', 'Please Enter Administrator']} username={['label', 'Please Enter Administrator']}
community={'communityName'} community={'communityName'}
checklist={curString.communityNameList != null ? curString.communityNameList : null} checklist={Init ? Init.CommunityList : null}
onSubmit={CallBackTitleSearch} onSubmit={CallBackTitleSearch}
/> />
</div> </div>
......
...@@ -206,18 +206,17 @@ const FacilityBookings = (props: any) => { ...@@ -206,18 +206,17 @@ const FacilityBookings = (props: any) => {
QA(tmp); QA(tmp);
if (tab == 1) { if (tab == 1) {
RA(9, { RA(9, {
communityNameList: JSON.parse(localStorage.getItem('CommunityList') as any), communityNameList: CommunityList,
userToken: token, userToken: token,
status: curString.status, status: curString.status,
subscribeDate: curString.subscribeDate, subscribeDate: curString.subscribeDate,
pageNum: curString.curPage, pageNum: curString.curPage,
// communityNameList: curString.communityNameList,
}); });
} else { } else {
RA(8, { RA(8, {
userToken: token, userToken: token,
pageNum: curString.curPage2, pageNum: curString.curPage2,
communityNameList: JSON.parse(localStorage.getItem('CommunityList') as any), communityNameList: CommunityList,
}); });
} }
} }
...@@ -231,9 +230,7 @@ const FacilityBookings = (props: any) => { ...@@ -231,9 +230,7 @@ const FacilityBookings = (props: any) => {
pageNum: current, pageNum: current,
subscribeDate: curString.subscribeDate, subscribeDate: curString.subscribeDate,
status: curString.status, status: curString.status,
communityNameList: curString.communityNameList communityNameList: CommunityList,
? curString.communityNameList
: JSON.parse(localStorage.getItem('CommunityList') as any),
}); });
} else { } else {
var tmp = curString; var tmp = curString;
......
...@@ -12,23 +12,18 @@ import SelectCommunity from '@/components/SelectCommunity'; ...@@ -12,23 +12,18 @@ import SelectCommunity from '@/components/SelectCommunity';
const module = 'VisitorRecord'; const module = 'VisitorRecord';
const VisitorRecord = (props: any) => { const VisitorRecord = (props: any) => {
const { dispatch, Data, DataSave, loading } = props; const { dispatch, Data, DataSave, loading, CommunityList } = props;
// 新增搜索的时间 原来时间是时间戳格式 // 新增搜索的时间 原来时间是时间戳格式
useEffect(() => { useEffect(() => {
if (Data != null) { if (Data != null && CommunityList != null) {
Data.forEach((item: any) => { Data.forEach((item: any) => {
item.showTime = moment(item.updateTime).format('YYYY-MM-DD'); item.showTime = moment(item.updateTime).format('YYYY-MM-DD');
}); });
} else { } else {
RA( RA(26, { communityNames: CommunityList }, module, dispatch);
26,
{ communityNames: JSON.parse(localStorage.getItem('CommunityList') as any) },
module,
dispatch,
);
} }
}, [Data]); }, [Data, CommunityList]);
// 表头 // 表头
const columns: any = [ const columns: any = [
...@@ -261,8 +256,9 @@ const VisitorRecord = (props: any) => { ...@@ -261,8 +256,9 @@ const VisitorRecord = (props: any) => {
function map(state: any) { function map(state: any) {
const { Data, DataSave } = state[module]; const { Data, DataSave } = state[module];
const { CommunityList } = state['Init'];
const loading = state.loading.models.VisitorRecord; const loading = state.loading.models.VisitorRecord;
return { Data, DataSave, loading }; return { Data, DataSave, loading, CommunityList };
} }
export default connect(map)(VisitorRecord); export default connect(map)(VisitorRecord);
// 备注 // 备注
......
...@@ -12,23 +12,18 @@ import SelectCommunity from '@/components/SelectCommunity'; ...@@ -12,23 +12,18 @@ import SelectCommunity from '@/components/SelectCommunity';
const module = 'VisitorRecord'; const module = 'VisitorRecord';
const VisitorRecord = (props: any) => { const VisitorRecord = (props: any) => {
const { dispatch, Data, DataSave, loading } = props; const { dispatch, Data, DataSave, loading, CommunityList } = props;
// 新增搜索的时间 原来时间是时间戳格式 // 新增搜索的时间 原来时间是时间戳格式
useEffect(() => { useEffect(() => {
if (Data != null) { if (Data != null && CommunityList != null) {
Data.forEach((item: any) => { Data.forEach((item: any) => {
item.showTime = moment(item.updateTime).format('YYYY-MM-DD'); item.showTime = moment(item.updateTime).format('YYYY-MM-DD');
}); });
} else { } else {
RA( RA(26, { communityNames: CommunityList }, module, dispatch);
26,
{ communityNames: JSON.parse(localStorage.getItem('CommunityList') as any) },
module,
dispatch,
);
} }
}, [Data]); }, [Data, CommunityList]);
// 表头 // 表头
const columns: any = [ const columns: any = [
...@@ -261,8 +256,9 @@ const VisitorRecord = (props: any) => { ...@@ -261,8 +256,9 @@ const VisitorRecord = (props: any) => {
function map(state: any) { function map(state: any) {
const { Data, DataSave } = state[module]; const { Data, DataSave } = state[module];
const { CommunityList } = state['Init'];
const loading = state.loading.models.VisitorRecord; const loading = state.loading.models.VisitorRecord;
return { Data, DataSave, loading }; return { Data, DataSave, loading, CommunityList };
} }
export default connect(map)(VisitorRecord); export default connect(map)(VisitorRecord);
// 备注 // 备注
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-11-19 16:54:53 * @Date: 2020-11-19 16:54:53
* @LastEditTime: 2020-12-11 17:23:30 * @LastEditTime: 2020-12-31 17:40:10
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\services\Init.ts * @FilePath: \tostumi\src\services\Init.ts
...@@ -9,22 +9,25 @@ ...@@ -9,22 +9,25 @@
import request from '@/utils/request'; import request from '@/utils/request';
// 新加的根据权限 获取小区的接口 // 新加的根据权限 获取小区的接口
// export function tosCommunityget(values: any) {
// const userInfo = localStorage.getItem('userInfo') || '';
// const id = JSON.parse(userInfo).userModel.id;
// return request('/tos/tosCommunity/get/user', {
// method: 'POST',
// body: JSON.stringify(values),
// headers: { 'Content-Type': 'application/json' },
// data: { mangerId: id },
// });
// }
// 原来的获取小区接口
export function tosCommunityget(values: any) { export function tosCommunityget(values: any) {
const userInfo = localStorage.getItem('userInfo') || ''; const userInfo = localStorage.getItem('userInfo') || '';
const id = JSON.parse(userInfo).userModel.id; const id = JSON.parse(userInfo).userModel.id;
return request('/tos/tosCommunity/get/user', { return request('/tos/tosCommunity/get', {
method: 'POST', method: 'POST',
body: JSON.stringify(values), body: JSON.stringify(values),
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
data: { mangerId: id }, data: { mangerId: id },
}); });
} }
// 原来的获取小区接口
// export function tosCommunityget(values: any) {
// return request('/tos/tosCommunity/get', {
// method: 'POST',
// body: JSON.stringify(values),
// headers: { 'Content-Type': 'application/json' },
// });
// }
/*
* @Author: your name
* @Date: 2020-11-19 20:34:18
* @LastEditTime: 2020-12-30 10:02:48
* @LastEditors: your name
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts
*/
export const validateMessages = { export const validateMessages = {
required: '*it is required!', required: '*it is required!',
types: { types: {
...@@ -29,8 +37,6 @@ export const requestList = [ ...@@ -29,8 +37,6 @@ export const requestList = [
['/tos/community/categories/subscribe/fuzzy/query', '9 预订列表模糊查询', {}], ['/tos/community/categories/subscribe/fuzzy/query', '9 预订列表模糊查询', {}],
['/tos/user/newCurrentUser', '10 后台用户信息', {}], ['/tos/user/newCurrentUser', '10 后台用户信息', {}],
['/tos/community/facilities/categories/subscribe', '11 预订', {}], ['/tos/community/facilities/categories/subscribe', '11 预订', {}],
// ['/tos/tosOwner/getAll', '12 业主查询', {}],
['/tos/owner/query/fuuzy', '12 业主查询', {}], ['/tos/owner/query/fuuzy', '12 业主查询', {}],
['/tos/tosOwner/getDetailAll', '13 业主查询详细', {}], ['/tos/tosOwner/getDetailAll', '13 业主查询详细', {}],
['/tos/tosOwner/save', '14 业主添加', {}], ['/tos/tosOwner/save', '14 业主添加', {}],
...@@ -38,7 +44,6 @@ export const requestList = [ ...@@ -38,7 +44,6 @@ export const requestList = [
['/tos/life/community/account/unit/del', '16 删除单元', {}], ['/tos/life/community/account/unit/del', '16 删除单元', {}],
['/tos/bookingService/edit', '17 编辑小区设施', {}], ['/tos/bookingService/edit', '17 编辑小区设施', {}],
['/tos/tosOwner/info/update', '18 编辑业主信息', {}], ['/tos/tosOwner/info/update', '18 编辑业主信息', {}],
['/tos/contract/list', '19 获取合同列表', {}], ['/tos/contract/list', '19 获取合同列表', {}],
['/tos/contract/detail/query', '20 获取合同列表详情', {}], ['/tos/contract/detail/query', '20 获取合同列表详情', {}],
['/tos/community/service/get/detail', '21 小区服务获取详情', {}], ['/tos/community/service/get/detail', '21 小区服务获取详情', {}],
...@@ -48,20 +53,7 @@ export const requestList = [ ...@@ -48,20 +53,7 @@ export const requestList = [
['/tos/tosCommunityNotic/get', '25 获取小区公告列表', {}], ['/tos/tosCommunityNotic/get', '25 获取小区公告列表', {}],
['/tos/tosVisitorRecord/get', '26 获取访客记录列表', {}], ['/tos/tosVisitorRecord/get', '26 获取访客记录列表', {}],
['/tos/contract/add', '27 合同新增和编辑', {}], ['/tos/contract/add', '27 合同新增和编辑', {}],
[ ['/tos/tosCommunityNotic/add', '28 新增小区公告接口', {}],
'/tos/tosCommunityNotic/add',
'28 新增小区公告接口',
{
noticTitle: 'Garden公告',
communityNum: '珠江丽景小区',
noticText: '今晚晚上停水4小时',
noticScope: '1',
noticStartTime: '2020-07-01 12:30:00',
noticEndTime: '2020-08-01 9:30:00',
file: ['A.jpg'],
},
],
// ['/tos/tosManageCommunity/save', '29 新建一个小区', {}],
['/tos/tosCommunity/save', '29 新建一个小区', {}], ['/tos/tosCommunity/save', '29 新建一个小区', {}],
['/tos/tosOrder/get', '30 获取订单详情', {}], ['/tos/tosOrder/get', '30 获取订单详情', {}],
['/tos/property/community/houseCard/query', '31 获取住户卡列表', {}], ['/tos/property/community/houseCard/query', '31 获取住户卡列表', {}],
...@@ -81,44 +73,11 @@ export const requestList = [ ...@@ -81,44 +73,11 @@ export const requestList = [
}, },
], ],
['/tos/community/service/get', '40 获取小区服务回复列表', {}], ['/tos/community/service/get', '40 获取小区服务回复列表', {}],
[ ['/tos/users/save', '41 添加后台账号', {}],
'/tos/users/save', ['/tos/account/permission/savePermission', '42 添加后台权限', {}],
'41 添加后台账号',
{
id: 'null',
oneself: 0,
tosUserEmail: 'sales@huahui.com',
tosUserName: '小赵2',
tosUserPhone: '020-8888-4444',
tosUserPwd: '123456',
tosUserToCompany: '1',
tosUserServiceCell: '',
tosuserLevel: 1,
userStatus: 1,
},
],
[
'/tos/account/permission/savePermission',
'42 添加后台权限',
{
userName: '小赵2',
userPassword: '123456',
permissionArray: ['2', '1', '3', '4'],
},
],
['/tos/tosServiceScope/get', '43 获取服务范围'], ['/tos/tosServiceScope/get', '43 获取服务范围'],
['/tos/tosServiceScope/save', '44 添加服务范围'], ['/tos/tosServiceScope/save', '44 添加服务范围'],
[ ['/tos/user/getAllInfrom', '45 获取后台列表', {}],
'/tos/user/getAllInfrom',
'45 获取后台列表',
{
id: '',
moment: [],
name: '',
leaderID: '1',
userPhone: '',
},
],
['/tos/tosServiceProvider/get', '46 获取服务商', {}], ['/tos/tosServiceProvider/get', '46 获取服务商', {}],
['/tos/fileAndImage/preview', '47 获取附件地址', {}], ['/tos/fileAndImage/preview', '47 获取附件地址', {}],
['/tos/tosCommunity/get/list', '48 修改获取小区列表', {}], ['/tos/tosCommunity/get/list', '48 修改获取小区列表', {}],
......
import React, { useState, useEffect,useRef} from 'react';
import { Input ,Tabs,Table,Space, Button} from 'antd';
const { TabPane } = Tabs;
import {connect,history} from 'umi';
import { RA } from '@/utils/method';
const module="XXX"
const XXX = (props:any) => {
const { dispatch, Data } = props;
const formRef = useRef(null)
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
</div>
);
};
function map(state:any) {
const { Data} = state[module]
return { Data}
}
export default connect(map)(XXX);
\ No newline at end of file
import * as service from '../../services/tos';
import { message } from 'antd';
import { Link, useIntl, connect, Dispatch, history } from 'umi';
import { routerRedux } from 'dva/router'
import { printf } from '@/utils/log';
export default {
namespace: 'XXX',
state: {
Data: null,
Result: null,
DataSave: null,
DataSaveDetail:null,
},
reducers: {
returnPage(state, { Data}) {
return { ...state, Data };
},
returnResult(state, { Result}) {
return { ...state, Result};
},
returnDataSave(state, { DataSave }) {
return {...state,DataSave}
},
returnDataSaveDetail(state, { DataSaveDetail }) {
return {...state,DataSaveDetail}
},
},
effects: {
//标准请求
*RA({ playload }, { call, put }) {
const resp = yield call(service.RA, playload);
console.log(resp)
if (resp.code == 500||resp.error_code!="0000") {
}
if (resp.error_code != "0000") {
printf(playload, resp)
}
else {
switch (playload.index) {
case 24: {
let Data = resp.data;
yield put({ type: 'returnPage', Data });
} break;
}
}
},
*ResultClear({ }, { put }) {
var tmp=null
yield put({type: 'returnResult', tmp} )
},
*SA({ playload }, { call, put }) {
var DataSave = playload
yield put({type: 'returnDataSave', DataSave} )
},
},
};
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