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
Expand all
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
This diff is collapsed.
Click to expand it.
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