Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
67c11eeb
Commit
67c11eeb
authored
Feb 05, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
64e50d1e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
224 additions
and
204 deletions
+224
-204
proxy.ts
config/proxy.ts
+6
-6
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+43
-14
AccountAdds.tsx
src/pages/AccountManagement/account/AccountAdds.tsx
+11
-5
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+22
-9
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+138
-168
VisitorRecord.tsx
...pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
+2
-1
VisitorRecord.tsx
...pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
+2
-1
No files found.
config/proxy.ts
View file @
67c11eeb
...
@@ -86,15 +86,15 @@ export default {
...
@@ -86,15 +86,15 @@ export default {
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
'/tos/'
:
{
target
:
'http://47.74.233.180:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
// '/tos/': {
// '/tos/': {
// target: 'http://
192.168.1.28
:8651',
// target: 'http://
47.74.233.180
:8651',
// changeOrigin: true,
// changeOrigin: true,
// pathRewrite: { '^': '' },
// pathRewrite: { '^': '' },
// },
// },
'/tos/'
:
{
target
:
'http://192.168.1.28:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
},
},
};
};
src/models/CommunityManagement/FacilityBookings.ts
View file @
67c11eeb
...
@@ -14,18 +14,23 @@ export default {
...
@@ -14,18 +14,23 @@ export default {
Data3
:
null
,
Data3
:
null
,
DataSave
:
null
,
DataSave
:
null
,
DataSaveDetail
:
null
,
DataSaveDetail
:
null
,
sourceData
:
null
,
sourceData
:
null
,
curString
:
{
subscribeDate
:
null
,
//表格1搜索条件
status
:
0
,
search
:
{
communityNameList
:
null
,
communityNameList
:
null
,
// 小区
communityNameList2
:
null
,
status
:
0
,
//状态
tab
:
1
,
subscribeDate
:
null
,
// 时间
curPage
:
1
,
pageNum
:
1
,
// 页码
curPage2
:
1
,
globalMark
:
'yes'
,
// 状态
globalMark
:
'yes'
,
},
},
//表格2搜索条件
search2
:
{
communityNameList
:
null
,
//选择小区
facilityName
:
null
,
// 设施名
pageNum
:
'1'
,
// 页码
},
tab
:
1
,
// 是哪一张表格
Result
:
null
,
Result
:
null
,
...
@@ -73,8 +78,19 @@ export default {
...
@@ -73,8 +78,19 @@ export default {
returnSource
(
state
,
{
sourceData
})
{
returnSource
(
state
,
{
sourceData
})
{
return
{
...
state
,
sourceData
};
return
{
...
state
,
sourceData
};
},
},
returnCurString
(
state
,
{
curString
})
{
// 表格
return
{
...
state
,
curString
};
returnTab
(
state
,
{
tabs
})
{
let
tab
=
tabs
;
console
.
log
({
...
state
,
tab
});
return
{
...
state
,
tab
};
},
// 表格1 搜索条件
returnCurString
(
state
,
{
search
})
{
return
{
...
state
,
search
};
},
// 表格2 搜索条件
returnCurString2
(
state
,
{
search2
})
{
return
{
...
state
,
search2
};
},
},
returnResult
(
state
,
{
Result
})
{
returnResult
(
state
,
{
Result
})
{
return
{
...
state
,
Result
};
return
{
...
state
,
Result
};
...
@@ -238,9 +254,22 @@ export default {
...
@@ -238,9 +254,22 @@ export default {
yield
put
({
type
:
'returnSource'
,
sourceData
});
yield
put
({
type
:
'returnSource'
,
sourceData
});
},
},
// 当前表格
*
TB
({
playload
},
{
call
,
put
})
{
console
.
log
(
playload
);
var
tabs
=
playload
;
yield
put
({
type
:
'returnTab'
,
tabs
});
},
// 搜索条件
*
QA
({
playload
},
{
call
,
put
})
{
*
QA
({
playload
},
{
call
,
put
})
{
var
curString
=
playload
;
var
search
=
playload
;
yield
put
({
type
:
'returnCurString'
,
curString
});
yield
put
({
type
:
'returnCurString'
,
search
});
},
// 拉取条件
*
QA2
({
playload
},
{
call
,
put
})
{
var
search2
=
playload
;
yield
put
({
type
:
'returnCurString2'
,
search2
});
},
},
*
ResultClear
({},
{
put
})
{
*
ResultClear
({},
{
put
})
{
...
...
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
67c11eeb
...
@@ -13,7 +13,7 @@ import { RA } from '@/utils/method';
...
@@ -13,7 +13,7 @@ import { RA } from '@/utils/method';
const
Account
=
(
props
:
any
)
=>
{
const
Account
=
(
props
:
any
)
=>
{
const
module
=
'Account'
;
const
module
=
'Account'
;
const
{
dispatch
,
SubResult
,
load
ing
,
user
,
Info
}
=
props
;
const
{
dispatch
,
SubResult
,
load
,
user
,
Info
}
=
props
;
// 权限列表
// 权限列表
const
treeData
=
localStorage
.
getItem
(
'umi_locale'
)
==
'zh-CN'
?
zhCnFaci
:
enUsFaci
;
const
treeData
=
localStorage
.
getItem
(
'umi_locale'
)
==
'zh-CN'
?
zhCnFaci
:
enUsFaci
;
...
@@ -28,6 +28,9 @@ const Account = (props: any) => {
...
@@ -28,6 +28,9 @@ const Account = (props: any) => {
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
const
[
treeDataList
,
settreeDataList
]
=
useState
(
treeData
);
// 权限列表
const
[
treeDataList
,
settreeDataList
]
=
useState
(
treeData
);
// 权限列表
// 加载情况
const
[
loading
,
setLoading
]
=
useState
(
true
);
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
...
@@ -82,6 +85,7 @@ const Account = (props: any) => {
...
@@ -82,6 +85,7 @@ const Account = (props: any) => {
// 赋值改变
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
treeDatas
[
0
].
children
=
_p
;
settreeDataList
(
treeDatas
as
any
);
// 可勾选列表
settreeDataList
(
treeDatas
as
any
);
// 可勾选列表
setLoading
(
false
);
}
}
},
[
user
,
values
]);
},
[
user
,
values
]);
...
@@ -93,6 +97,7 @@ const Account = (props: any) => {
...
@@ -93,6 +97,7 @@ const Account = (props: any) => {
message
.
success
(
'Submitted Successfully !'
);
message
.
success
(
'Submitted Successfully !'
);
dispatch
({
type
:
module
+
'/ReData'
});
dispatch
({
type
:
module
+
'/ReData'
});
dispatch
({
type
:
module
+
'/AccountClear'
});
dispatch
({
type
:
module
+
'/AccountClear'
});
setLoading
(
false
);
history
.
go
(
-
1
);
history
.
go
(
-
1
);
}
}
}
}
...
@@ -208,6 +213,7 @@ const Account = (props: any) => {
...
@@ -208,6 +213,7 @@ const Account = (props: any) => {
// console.log(obj);
// console.log(obj);
RA
(
38
,
value
,
module
,
dispatch
);
// 信息上传
RA
(
38
,
value
,
module
,
dispatch
);
// 信息上传
RA
(
42
,
obj
,
module
,
dispatch
);
// 权限上传
RA
(
42
,
obj
,
module
,
dispatch
);
// 权限上传
setLoading
(
true
);
return
true
;
return
true
;
}
}
};
};
...
@@ -272,7 +278,7 @@ const Account = (props: any) => {
...
@@ -272,7 +278,7 @@ const Account = (props: any) => {
};
};
return
(
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
load
||
load
ing
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
<
h3
className=
"capi"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
<
EditOutlined
/>
...
@@ -376,7 +382,7 @@ const Account = (props: any) => {
...
@@ -376,7 +382,7 @@ const Account = (props: any) => {
<
div
className=
"diy"
>
<
div
className=
"diy"
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
>
<
div
className=
"label"
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
load
||
load
ing
}
>
Submit
Submit
</
Button
>
</
Button
>
</
div
>
</
div
>
...
@@ -389,14 +395,14 @@ const Account = (props: any) => {
...
@@ -389,14 +395,14 @@ 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
load
ing
=
state
.
loading
.
global
;
const
load
=
state
.
loading
.
global
;
const
{
user
}
=
state
;
const
{
user
}
=
state
;
return
{
return
{
Data
,
Data
,
DataSave
,
DataSave
,
DataSaveDetail
,
DataSaveDetail
,
Result
,
Result
,
load
ing
,
load
,
user
,
// 获取当前账户信息
user
,
// 获取当前账户信息
SubResult
,
SubResult
,
Info
,
Info
,
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
67c11eeb
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Form
,
Input
,
Button
,
message
,
Descriptions
,
Spin
,
Tree
,
Radio
,
Select
,
Modal
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
message
,
Descriptions
,
Spin
,
Tree
,
Radio
,
Select
,
Modal
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
,
Prompt
}
from
'umi'
;
import
{
EditOutlined
,
LeftOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
EditOutlined
,
LeftOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
'./Account.less'
;
import
'./Account.less'
;
...
@@ -13,7 +13,7 @@ import { RA } from '@/utils/method';
...
@@ -13,7 +13,7 @@ import { RA } from '@/utils/method';
const
Account
=
(
props
:
any
)
=>
{
const
Account
=
(
props
:
any
)
=>
{
const
module
=
'Account'
;
const
module
=
'Account'
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
{
dispatch
,
SubResult
,
loading
,
user
,
DataSave
,
Permission
,
Info
}
=
props
;
const
{
dispatch
,
SubResult
,
user
,
DataSave
,
Permission
,
Info
,
load
}
=
props
;
// 权限列表
// 权限列表
const
treeData
=
localStorage
.
getItem
(
'umi_locale'
)
==
'zh-CN'
?
zhCnFaci
:
enUsFaci
;
const
treeData
=
localStorage
.
getItem
(
'umi_locale'
)
==
'zh-CN'
?
zhCnFaci
:
enUsFaci
;
...
@@ -32,6 +32,9 @@ const Account = (props: any) => {
...
@@ -32,6 +32,9 @@ const Account = (props: any) => {
// const [frequency, setfrequency] = useState(0); // 权限列表
// const [frequency, setfrequency] = useState(0); // 权限列表
const
[
TreeDisabled
,
setTreeDisabled
]
=
useState
(
true
);
// 权限是否可编辑
const
[
TreeDisabled
,
setTreeDisabled
]
=
useState
(
true
);
// 权限是否可编辑
// 加载情况
const
[
loading
,
setLoading
]
=
useState
(
true
);
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
...
@@ -75,7 +78,7 @@ const Account = (props: any) => {
...
@@ -75,7 +78,7 @@ const Account = (props: any) => {
}
}
},
[
DataSave
,
user
]);
},
[
DataSave
,
user
]);
//
提交信息结果
//提交信息结果
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
SubResult
!=
null
)
{
if
(
SubResult
!=
null
)
{
if
(
SubResult
.
statr
==
0
&&
SubResult
.
desc
==
0
)
{
if
(
SubResult
.
statr
==
0
&&
SubResult
.
desc
==
0
)
{
...
@@ -83,12 +86,13 @@ const Account = (props: any) => {
...
@@ -83,12 +86,13 @@ const Account = (props: any) => {
message
.
success
(
'Submitted Successfully !'
);
message
.
success
(
'Submitted Successfully !'
);
dispatch
({
type
:
module
+
'/ReData'
});
dispatch
({
type
:
module
+
'/ReData'
});
dispatch
({
type
:
module
+
'/AccountClear'
});
dispatch
({
type
:
module
+
'/AccountClear'
});
setLoading
(
true
);
history
.
go
(
-
1
);
history
.
go
(
-
1
);
}
}
}
}
},
[
SubResult
]);
},
[
SubResult
]);
// 已选权限
//
获取
已选权限
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Permission
!=
null
)
{
if
(
Permission
!=
null
)
{
let
data
=
Permission
.
curUserPermission
?
Permission
.
curUserPermission
.
split
(
','
)
:
[];
let
data
=
Permission
.
curUserPermission
?
Permission
.
curUserPermission
.
split
(
','
)
:
[];
...
@@ -150,6 +154,7 @@ const Account = (props: any) => {
...
@@ -150,6 +154,7 @@ const Account = (props: any) => {
}
}
setCheckedKeys
(
data
);
setCheckedKeys
(
data
);
setLoading
(
false
);
}
}
},
[
Permission
,
DataSave
]);
},
[
Permission
,
DataSave
]);
...
@@ -226,8 +231,17 @@ const Account = (props: any) => {
...
@@ -226,8 +231,17 @@ const Account = (props: any) => {
permissionArray
:
newData
,
permissionArray
:
newData
,
subPermissionArray
,
subPermissionArray
,
};
};
// Promise.all([RA(38, value, module, dispatch), RA(42, obj, module, dispatch)]).then(
// (v: any) => {
// console.log(v);
// },
// (e: any) => {
// console.log(e);
// },
// );
RA
(
38
,
value
,
module
,
dispatch
);
// 信息上传
RA
(
38
,
value
,
module
,
dispatch
);
// 信息上传
RA
(
42
,
obj
,
module
,
dispatch
);
// 权限上传
RA
(
42
,
obj
,
module
,
dispatch
);
// 权限上传
setLoading
(
true
);
return
true
;
return
true
;
}
}
};
};
...
@@ -540,7 +554,7 @@ const Account = (props: any) => {
...
@@ -540,7 +554,7 @@ const Account = (props: any) => {
/* --------------------------- 更新 End---------------------------------- */
/* --------------------------- 更新 End---------------------------------- */
return
(
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
||
load
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
<
h3
className=
"capi"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
<
EditOutlined
/>
...
@@ -661,7 +675,7 @@ const Account = (props: any) => {
...
@@ -661,7 +675,7 @@ const Account = (props: any) => {
<
div
className=
"diy"
>
<
div
className=
"diy"
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
>
<
div
className=
"label"
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
||
load
}
>
Submit
Submit
</
Button
>
</
Button
>
</
div
>
</
div
>
...
@@ -673,20 +687,19 @@ const Account = (props: any) => {
...
@@ -673,20 +687,19 @@ const Account = (props: any) => {
};
};
const
AccountProps
=
(
state
:
any
)
=>
{
const
AccountProps
=
(
state
:
any
)
=>
{
// console.log(state.loading);
const
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
SubResult
,
Permission
,
Info
}
=
state
.
Account
;
const
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
SubResult
,
Permission
,
Info
}
=
state
.
Account
;
const
loading
=
state
.
loading
.
global
;
const
{
user
}
=
state
;
const
{
user
}
=
state
;
const
load
=
state
.
loading
.
global
;
return
{
return
{
Data
,
Data
,
DataSave
,
DataSave
,
DataSaveDetail
,
DataSaveDetail
,
Result
,
Result
,
loading
,
Permission
,
Permission
,
user
,
// 获取当前账户信息
user
,
// 获取当前账户信息
SubResult
,
SubResult
,
Info
,
Info
,
load
,
};
};
};
};
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
67c11eeb
...
@@ -33,29 +33,39 @@ const FacilityBookings = (props: any) => {
...
@@ -33,29 +33,39 @@ const FacilityBookings = (props: any) => {
Data2
,
Data2
,
token
,
token
,
DataSave
,
DataSave
,
curString
,
search
,
Result
,
tab
,
search2
,
loading
,
loading
,
CommunityList
,
CommunityList
,
}
=
props
;
}
=
props
;
const
Model
=
'FacilityBookings'
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
dispatch
({
type
:
'FacilityBookings
/RA'
,
type
:
Model
+
'
/RA'
,
playload
:
{
index
:
index
,
body
:
values
},
playload
:
{
index
:
index
,
body
:
values
},
});
});
};
};
const
SA
=
(
values
:
any
)
=>
{
const
SA
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings
/SA'
,
playload
:
values
});
dispatch
({
type
:
Model
+
'
/SA'
,
playload
:
values
});
};
};
const
QA
=
(
values
:
any
)
=>
{
const
QA
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings/QA'
,
playload
:
values
});
dispatch
({
type
:
Model
+
'/QA'
,
playload
:
values
});
};
const
QA2
=
(
values
:
any
)
=>
{
dispatch
({
type
:
Model
+
'/QA2'
,
playload
:
values
});
};
const
TB
=
(
values
:
any
)
=>
{
dispatch
({
type
:
Model
+
'/TB'
,
playload
:
values
});
};
};
const
IA
=
()
=>
{
const
IA
=
()
=>
{
dispatch
({
type
:
'FacilityBookings
/IA'
});
dispatch
({
type
:
Model
+
'
/IA'
});
};
};
const
CA
=
()
=>
{
const
CA
=
()
=>
{
dispatch
({
type
:
'FacilityBookings
/CA'
,
playload
:
null
});
dispatch
({
type
:
Model
+
'
/CA'
,
playload
:
null
});
};
};
// 表头格式
// 表头格式
...
@@ -91,15 +101,15 @@ const FacilityBookings = (props: any) => {
...
@@ -91,15 +101,15 @@ const FacilityBookings = (props: any) => {
},
[
Data2
]);
},
[
Data2
]);
const
goToFunction
=
()
=>
{
const
goToFunction
=
()
=>
{
if
(
curString
.
tab
==
2
)
{
if
(
tab
==
2
)
{
CA
();
CA
();
// 先清空上传图片列表
// 先清空上传图片列表
let
list
:
any
=
[];
let
list
:
any
=
[];
dispatch
({
type
:
'FacilityBookings
/genxin'
},
list
);
dispatch
({
type
:
Model
+
'
/genxin'
},
list
);
}
}
// 清空之前的数据
// 清空之前的数据
SA
(
null
);
SA
(
null
);
history
.
push
(
location
.
pathname
+
(
curString
.
tab
==
1
?
'/Booking'
:
'/Adding'
));
history
.
push
(
location
.
pathname
+
(
tab
==
1
?
'/Booking'
:
'/Adding'
));
};
};
// 预约详情跳转
// 预约详情跳转
...
@@ -122,7 +132,7 @@ const FacilityBookings = (props: any) => {
...
@@ -122,7 +132,7 @@ const FacilityBookings = (props: any) => {
// 清空设施列表图;
// 清空设施列表图;
let
list
:
any
=
[];
let
list
:
any
=
[];
dispatch
({
type
:
'FacilityBookings
/genxin'
,
list
});
dispatch
({
type
:
Model
+
'
/genxin'
,
list
});
history
.
push
(
location
.
pathname
+
path
[
index
]);
history
.
push
(
location
.
pathname
+
path
[
index
]);
};
};
...
@@ -197,149 +207,145 @@ const FacilityBookings = (props: any) => {
...
@@ -197,149 +207,145 @@ const FacilityBookings = (props: any) => {
//发起请求--有小区再发起,没有就没必要了
//发起请求--有小区再发起,没有就没必要了
if
(
CommunityList
)
{
if
(
CommunityList
)
{
if
(
curString
.
tab
==
1
)
{
if
(
tab
==
1
&&
CommunityList
!==
null
)
{
let
tmp
=
curString
;
// let tmp = JSON.parse(JSON.stringify(search));
tmp
.
communityNameList
=
CommunityList
;
let
obj
=
{
tmp
.
communityNameList2
=
CommunityList
;
communityNameList
:
search
.
communityNameList
?
search
.
communityNameList
:
CommunityList
,
QA
(
tmp
);
subscribeDate
:
search
.
subscribeDate
?
search
.
subscribeDate
:
null
,
// 时间
status
:
search
.
status
?
search
.
status
:
null
,
// 状态
RA
(
9
,
{
pageNum
:
search
.
pageNum
?
search
.
pageNum
:
1
,
// 实际搜索页码
communityNameList
:
CommunityList
,
globalMark
:
search
.
globalMark
?
search
.
globalMark
:
'no'
,
// 搜索全部内容
userToken
:
token
,
};
pageNum
:
curString
.
curPage
,
requse
(
obj
,
tab
);
subscribeDate
:
curString
.
subscribeDate
,
status
:
curString
.
status
,
globalMark
:
curString
.
globalMark
,
});
}
else
{
}
else
{
RA
(
8
,
{
let
obj
=
{
userToken
:
token
,
communityNameList
:
search2
.
communityNameList
?
search2
.
communityNameList
:
CommunityList
,
pageNum
:
curString
.
curPage2
,
facilityName
:
search2
.
facilityName
?
search2
.
facilityName
:
null
,
communityNameList
:
CommunityList
,
};
}
);
requse
(
obj
,
tab
);
}
}
}
}
},
[
CommunityList
]);
},
[
CommunityList
]);
// 发起搜索
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
if
(
curString
.
tab
==
1
)
{
if
(
tab
==
1
)
{
// 没有选小区就不让他提交
if
(
if
(
comment
.
communityName
&&
comment
.
communityName
.
length
==
0
)
{
comment
.
communityName
&&
message
.
info
(
'Please Select A Community !'
);
comment
.
communityName
.
length
==
0
&&
return
;
comment
.
status
==
null
&&
comment
.
key
==
null
)
{
message
.
warning
(
'Please fill in at least one condition'
);
return
false
;
}
}
if
(
comment
.
communityName
!=
null
||
comment
.
key
!=
null
||
comment
.
status
!=
null
)
{
if
(
comment
.
communityName
!=
null
||
comment
.
key
!=
null
||
comment
.
status
!=
null
)
{
var
tmp
=
curString
;
let
obj
=
{
tmp
.
subscribeDate
=
comment
.
key
;
communityNameList
:
comment
.
communityName
?
comment
.
communityName
:
null
,
// 所选小区
subscribeDate
:
comment
.
key
?
comment
.
key
:
null
,
// 时间
if
(
comment
.
status
==
null
||
comment
.
status
==
undefined
)
{
status
:
comment
.
status
?
comment
.
status
:
null
,
// 状态
tmp
.
status
=
null
;
pageNum
:
1
,
// 实际搜索页码
}
else
{
globalMark
:
'no'
,
// 搜索全部内容
tmp
.
status
=
comment
.
status
;
};
}
requse
(
obj
,
tab
);
tmp
.
communityNameList
=
comment
.
communityName
;
tmp
.
curPage
=
1
;
tmp
.
globalMark
=
'no'
;
QA
(
tmp
);
//中断
RA
(
9
,
{
userToken
:
token
,
pageNum
:
'1'
,
subscribeDate
:
tmp
.
subscribeDate
,
status
:
tmp
.
status
,
communityNameList
:
comment
.
communityName
,
globalMark
:
'no'
,
});
}
}
}
else
{
}
else
{
// 没有选小区就不让他提交
if
(
if
(
comment
.
communityName2
&&
comment
.
communityName2
.
length
==
0
)
{
comment
.
communityName2
&&
message
.
info
(
'Please Select A Community !'
);
comment
.
communityName2
.
length
==
0
&&
return
;
comment
.
facilityName
==
''
)
{
message
.
warning
(
'Please fill in at least one condition'
);
return
false
;
}
}
if
(
comment
.
communityName2
!=
null
||
comment
.
facilityName
!=
null
)
{
if
(
comment
.
communityName2
!=
null
||
comment
.
facilityName
!=
null
)
{
var
tmp
=
curString
;
let
obj
=
{
tmp
.
communityNameList2
=
comment
.
communityName2
;
communityNameList
:
comment
.
communityName2
?
comment
.
communityName2
:
null
,
tmp
.
facilityName
=
comment
.
facilityName
;
facilityName
:
comment
.
facilityName
?
comment
.
facilityName
:
null
,
tmp
.
curPage
=
1
;
QA
(
tmp
);
RA
(
8
,
{
communityNameList
:
comment
.
communityName2
,
facilityName
:
comment
.
facilityName
,
pageNum
:
'1'
,
pageNum
:
'1'
,
});
};
requse
(
obj
,
tab
);
}
}
}
}
};
};
// 切换tab
function
TabCallback
(
tab
:
any
)
{
function
TabCallback
(
tab
:
any
)
{
var
tmp
=
curString
;
TB
(
tab
);
tmp
.
tab
=
tab
;
QA
(
tmp
);
if
(
tab
==
1
)
{
if
(
tab
==
1
)
{
RA
(
9
,
{
// 搜索t
communityNameList
:
curString
.
communityNameList
,
let
obj
=
{
communityNameList
:
search
.
communityNameList
,
userToken
:
token
,
userToken
:
token
,
status
:
curString
.
status
,
status
:
search
.
status
,
subscribeDate
:
curString
.
subscribeDate
,
subscribeDate
:
search
.
subscribeDate
,
pageNum
:
curString
.
curPage
,
pageNum
:
search
.
pageNum
,
globalMark
:
curString
.
globalMark
,
globalMark
:
search
.
globalMark
,
});
};
requse
(
obj
,
tab
);
}
else
{
}
else
{
RA
(
8
,
{
// 储存的值
let
obj
=
{
communityNameList
:
search2
.
communityNameList
?
search2
.
communityNameList
:
CommunityList
,
pageNum
:
search2
.
pageNum
,
userToken
:
token
,
userToken
:
token
,
pageNum
:
curString
.
curPage2
,
};
communityNameList
:
curString
.
communityNameList2
,
requse
(
obj
,
tab
);
});
}
}
}
}
// 点击分页
function
Pagechange
(
current
:
any
,
pageSize
:
any
)
{
function
Pagechange
(
current
:
any
,
pageSize
:
any
)
{
if
(
curString
.
tab
==
1
)
{
if
(
tab
==
1
)
{
var
tmp
=
curString
;
let
obj
=
{
tmp
.
curPage
=
current
;
communityNameList
:
search
.
communityNameList
,
QA
(
tmp
);
RA
(
9
,
{
userToken
:
token
,
userToken
:
token
,
status
:
search
.
status
,
subscribeDate
:
search
.
subscribeDate
,
pageNum
:
current
,
pageNum
:
current
,
subscribeDate
:
curString
.
subscribeDate
,
globalMark
:
search
.
globalMark
,
status
:
curString
.
status
,
};
communityNameList
:
curString
.
communityNameList
,
requse
(
obj
,
tab
);
globalMark
:
curString
.
globalMark
,
});
}
else
{
}
else
{
var
tmp
=
curString
;
let
obj
=
{
tmp
.
curPage2
=
current
;
communityNameList
:
search2
.
communityNameList
?
search2
.
communityNameList
:
CommunityList
,
QA
(
tmp
);
pageNum
:
current
,
if
(
curString
.
communityNameList
!=
null
)
{
userToken
:
token
,
RA
(
8
,
{
};
userToken
:
token
,
requse
(
obj
,
tab
);
pageNum
:
current
,
communityNameList
:
curString
.
communityNameList2
?
curString
.
communityNameList2
:
JSON
.
parse
(
localStorage
.
getItem
(
'CommunityList'
)
as
any
),
});
}
else
{
RA
(
8
,
{
userToken
:
token
,
pageNum
:
current
});
}
}
}
}
}
// 预约刷新
// 储存并发起请求
// const onReset = () => {
const
requse
=
(
v
:
any
,
tab
:
any
)
=>
{
// RA(9, {
if
(
tab
==
1
)
{
// userToken: token,
let
obj
=
{
// pageNum: curString.curPage,
communityNameList
:
v
.
communityNameList
?
v
.
communityNameList
:
null
,
// subscribeDate: curString.subscribeDate,
userToken
:
token
,
// status: curString.status,
pageNum
:
v
.
pageNum
?
v
.
pageNum
:
'1'
,
// communityNameList: CommunityList,
subscribeDate
:
v
.
subscribeDate
?
v
.
subscribeDate
:
null
,
// globalMark: curString.globalMark,
status
:
v
.
status
?
v
.
status
:
null
,
// });
globalMark
:
v
.
globalMark
?
v
.
globalMark
:
'yes'
,
// };
};
QA
({
...
obj
});
RA
(
9
,
{
...
obj
});
}
else
{
// 储存的
// 搜索的
let
obj
=
{
communityNameList
:
v
.
communityNameList
?
v
.
communityNameList
:
null
,
facilityName
:
v
.
facilityName
?
v
.
facilityName
:
null
,
pageNum
:
v
.
curPage
?
v
.
curPage
:
'1'
,
};
QA2
({
...
obj
});
RA
(
8
,
{
...
obj
});
}
};
const
operations
=
(
const
operations
=
(
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToFunction
}
>
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToFunction
}
>
<
PlusOutlined
/>
<
PlusOutlined
/>
{
curString
.
tab
==
1
?
'Add Appointment'
:
'Add Facilities'
}
{
tab
==
1
?
'Add Appointment'
:
'Add Facilities'
}
</
Button
>
</
Button
>
);
);
...
@@ -347,7 +353,7 @@ const FacilityBookings = (props: any) => {
...
@@ -347,7 +353,7 @@ const FacilityBookings = (props: any) => {
<>
<>
<
div
className=
"base"
>
<
div
className=
"base"
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
{
curString
.
tab
==
1
?
(
{
tab
==
1
?
(
<>
<>
<
TitleSearch
<
TitleSearch
status=
{
[
status=
{
[
...
@@ -360,12 +366,12 @@ const FacilityBookings = (props: any) => {
...
@@ -360,12 +366,12 @@ const FacilityBookings = (props: any) => {
[
3
,
'Used'
],
[
3
,
'Used'
],
[
4
,
'Cancelled'
],
[
4
,
'Cancelled'
],
],
],
default
:
curString
.
status
,
default
:
search
.
status
,
},
},
]
}
]
}
time=
{
[
'key'
,
'Booking time '
]
}
time=
{
[
'key'
,
'Booking time '
]
}
community=
{
'communityName'
}
community=
{
'communityName'
}
checklist=
{
curString
.
communityNameList
?
curString
.
communityNameList
:
[]
}
checklist=
{
search
.
communityNameList
?
search
.
communityNameList
:
[]
}
onSubmit=
{
CallBackTitleSearch
}
onSubmit=
{
CallBackTitleSearch
}
/>
/>
</>
</>
...
@@ -375,7 +381,7 @@ const FacilityBookings = (props: any) => {
...
@@ -375,7 +381,7 @@ const FacilityBookings = (props: any) => {
listkey=
{
[
'facilityName'
]
}
listkey=
{
[
'facilityName'
]
}
list=
{
[
'Facility name'
]
}
list=
{
[
'Facility name'
]
}
community=
{
'communityName2'
}
community=
{
'communityName2'
}
checklist=
{
curString
.
communityNameList2
?
curString
.
communityNameList2
:
[]
}
checklist=
{
search2
.
communityNameList
?
search2
.
communityNameList
:
[]
}
onSubmit=
{
CallBackTitleSearch
}
onSubmit=
{
CallBackTitleSearch
}
/>
/>
</>
</>
...
@@ -386,12 +392,12 @@ const FacilityBookings = (props: any) => {
...
@@ -386,12 +392,12 @@ const FacilityBookings = (props: any) => {
<
div
className=
{
'base'
}
>
<
div
className=
{
'base'
}
>
{
/* <div style={{ position: 'relative', height: 40 }}>
{
/* <div style={{ position: 'relative', height: 40 }}>
<Button type="primary" style={{ position: 'absolute', right: 0 }} onClick={goToFunction}>
<Button type="primary" style={{ position: 'absolute', right: 0 }} onClick={goToFunction}>
{
curString
.tab == 1 ? 'Booking' : 'Add Facility'}
{
search
.tab == 1 ? 'Booking' : 'Add Facility'}
</Button>
</Button>
</div> */
}
</div> */
}
<
Tabs
<
Tabs
defaultActiveKey=
{
curString
.
tab
.
toString
()
}
defaultActiveKey=
{
tab
.
toString
()
}
onChange=
{
TabCallback
}
onChange=
{
TabCallback
}
className=
"diytabs"
className=
"diytabs"
tabBarExtraContent=
{
operations
}
tabBarExtraContent=
{
operations
}
...
@@ -402,34 +408,15 @@ const FacilityBookings = (props: any) => {
...
@@ -402,34 +408,15 @@ const FacilityBookings = (props: any) => {
rowKey=
"id"
rowKey=
"id"
dataSource=
{
Data
?
Data
.
list
:
null
}
dataSource=
{
Data
?
Data
.
list
:
null
}
columns=
{
columns
}
columns=
{
columns
}
// pagination={{
// current: curString.curPage,
// total: Data.total.totalRow,
// showSizeChanger: false,
// onChange: Pagechange,
// }}
pagination=
{
false
}
pagination=
{
false
}
search=
{
false
}
search=
{
false
}
toolBarRender=
{
false
}
toolBarRender=
{
false
}
// toolBarRender={() => [
// <Button key="3" type="primary" onClick={goToFunction}>
// <PlusOutlined />
// Add Appointment
// </Button>,
// ]}
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
false
,
setting
:
false
,
}
}
// headerTitle="预约列表"
/>
/>
{
Data
?
(
{
Data
?
(
<
div
className=
"pages"
>
<
div
className=
"pages"
>
<
Pagination
<
Pagination
current=
{
curString
.
curPage
?
curString
.
curPage
:
0
}
current=
{
search
.
pageNum
?
search
.
pageNum
:
0
}
total=
{
Data
.
page
.
totalRow
?
Data
.
page
.
totalRow
:
0
}
total=
{
Data
.
page
.
totalRow
?
Data
.
page
.
totalRow
:
0
}
// pageSizeOptions=
{[]}
// pageSizeOptions=
{[]}
showSizeChanger=
{
false
}
showSizeChanger=
{
false
}
...
@@ -449,30 +436,11 @@ const FacilityBookings = (props: any) => {
...
@@ -449,30 +436,11 @@ const FacilityBookings = (props: any) => {
dataSource=
{
Facility
}
dataSource=
{
Facility
}
columns=
{
columns2
}
columns=
{
columns2
}
toolBarRender=
{
false
}
toolBarRender=
{
false
}
// pagination={{
// current: curString.curPage2,
// total: Data2.total.totalRow,
// showSizeChanger: false,
// onChange: Pagechange,
// }}
pagination=
{
false
}
// 隐藏默认分页
pagination=
{
false
}
// 隐藏默认分页
search=
{
false
}
search=
{
false
}
// toolBarRender={() => [
// <Button key="3" type="primary" onClick={goToFunction}>
// <PlusOutlined />
// Add Facilities
// </Button>,
// ]}
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
false
,
setting
:
false
,
}
}
// headerTitle="Facilities List"
/>
/>
{
curString
?
(
{
search
?
(
<
div
className=
"pages"
>
<
div
className=
"pages"
>
<
Pagination
<
Pagination
current=
{
Data2
.
total
.
currentPage
}
current=
{
Data2
.
total
.
currentPage
}
...
@@ -494,7 +462,7 @@ const FacilityBookings = (props: any) => {
...
@@ -494,7 +462,7 @@ const FacilityBookings = (props: any) => {
};
};
function
mapStateToProps
(
state
:
any
)
{
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
,
Data2
,
DataSave
,
curString
,
Result
}
=
state
.
FacilityBookings
;
const
{
Data
,
Data2
,
DataSave
,
search
,
search2
,
Result
,
tab
}
=
state
.
FacilityBookings
;
const
{
token
}
=
state
.
login
;
const
{
token
}
=
state
.
login
;
const
loading
=
state
.
loading
.
models
.
FacilityBookings
const
loading
=
state
.
loading
.
models
.
FacilityBookings
?
state
.
loading
.
models
.
FacilityBookings
?
state
.
loading
.
models
.
FacilityBookings
...
@@ -502,10 +470,12 @@ function mapStateToProps(state: any) {
...
@@ -502,10 +470,12 @@ function mapStateToProps(state: any) {
const
{
CommunityList
}
=
state
.
Init
;
// 小区列表
const
{
CommunityList
}
=
state
.
Init
;
// 小区列表
return
{
return
{
tab
,
Data
,
Data
,
Data2
,
Data2
,
DataSave
,
DataSave
,
curString
,
search
,
search2
,
Result
,
Result
,
token
,
token
,
loading
,
loading
,
...
...
src/pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
View file @
67c11eeb
...
@@ -46,7 +46,8 @@ const VisitorRecord = (props: any) => {
...
@@ -46,7 +46,8 @@ const VisitorRecord = (props: any) => {
// 点击搜索
// 点击搜索
const
onSubmitForm
=
(
value
:
any
)
=>
{
const
onSubmitForm
=
(
value
:
any
)
=>
{
let
obj
=
{
let
obj
=
{
communityNames
:
value
.
community
.
value
,
communityNames
:
value
.
community
.
value
&&
value
.
community
.
value
.
length
>
0
?
value
.
community
.
value
:
null
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
null
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
null
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
pageNum
:
1
,
pageNum
:
1
,
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
67c11eeb
...
@@ -46,7 +46,8 @@ const VisitorRecord = (props: any) => {
...
@@ -46,7 +46,8 @@ const VisitorRecord = (props: any) => {
// 点击搜索
// 点击搜索
const
onSubmitForm
=
(
value
:
any
)
=>
{
const
onSubmitForm
=
(
value
:
any
)
=>
{
let
obj
=
{
let
obj
=
{
communityNames
:
value
.
community
.
value
,
communityNames
:
value
.
community
.
value
&&
value
.
community
.
value
.
length
>
0
?
value
.
community
.
value
:
null
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
null
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
null
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
pageNum
:
1
,
pageNum
:
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment