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
Show 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 {
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
'/tos/'
:
{
target
:
'http://47.74.233.180:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
// '/tos/': {
// target: 'http://
192.168.1.28
:8651',
// target: 'http://
47.74.233.180
:8651',
// changeOrigin: true,
// 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 {
Data3
:
null
,
DataSave
:
null
,
DataSaveDetail
:
null
,
sourceData
:
null
,
curString
:
{
subscribeDate
:
null
,
status
:
0
,
communityNameList
:
null
,
communityNameList2
:
null
,
tab
:
1
,
curPage
:
1
,
curPage2
:
1
,
globalMark
:
'yes'
,
//表格1搜索条件
search
:
{
communityNameList
:
null
,
// 小区
status
:
0
,
//状态
subscribeDate
:
null
,
// 时间
pageNum
:
1
,
// 页码
globalMark
:
'yes'
,
// 状态
},
//表格2搜索条件
search2
:
{
communityNameList
:
null
,
//选择小区
facilityName
:
null
,
// 设施名
pageNum
:
'1'
,
// 页码
},
tab
:
1
,
// 是哪一张表格
Result
:
null
,
...
...
@@ -73,8 +78,19 @@ export default {
returnSource
(
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
})
{
return
{
...
state
,
Result
};
...
...
@@ -238,9 +254,22 @@ export default {
yield
put
({
type
:
'returnSource'
,
sourceData
});
},
// 当前表格
*
TB
({
playload
},
{
call
,
put
})
{
console
.
log
(
playload
);
var
tabs
=
playload
;
yield
put
({
type
:
'returnTab'
,
tabs
});
},
// 搜索条件
*
QA
({
playload
},
{
call
,
put
})
{
var
curString
=
playload
;
yield
put
({
type
:
'returnCurString'
,
curString
});
var
search
=
playload
;
yield
put
({
type
:
'returnCurString'
,
search
});
},
// 拉取条件
*
QA2
({
playload
},
{
call
,
put
})
{
var
search2
=
playload
;
yield
put
({
type
:
'returnCurString2'
,
search2
});
},
*
ResultClear
({},
{
put
})
{
...
...
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
67c11eeb
...
...
@@ -13,7 +13,7 @@ import { RA } from '@/utils/method';
const
Account
=
(
props
:
any
)
=>
{
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
;
...
...
@@ -28,6 +28,9 @@ const Account = (props: any) => {
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
const
[
treeDataList
,
settreeDataList
]
=
useState
(
treeData
);
// 权限列表
// 加载情况
const
[
loading
,
setLoading
]
=
useState
(
true
);
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
formRef
=
useRef
(
null
);
...
...
@@ -82,6 +85,7 @@ const Account = (props: any) => {
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
settreeDataList
(
treeDatas
as
any
);
// 可勾选列表
setLoading
(
false
);
}
},
[
user
,
values
]);
...
...
@@ -93,6 +97,7 @@ const Account = (props: any) => {
message
.
success
(
'Submitted Successfully !'
);
dispatch
({
type
:
module
+
'/ReData'
});
dispatch
({
type
:
module
+
'/AccountClear'
});
setLoading
(
false
);
history
.
go
(
-
1
);
}
}
...
...
@@ -208,6 +213,7 @@ const Account = (props: any) => {
// console.log(obj);
RA
(
38
,
value
,
module
,
dispatch
);
// 信息上传
RA
(
42
,
obj
,
module
,
dispatch
);
// 权限上传
setLoading
(
true
);
return
true
;
}
};
...
...
@@ -272,7 +278,7 @@ const Account = (props: any) => {
};
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
load
||
load
ing
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
...
...
@@ -376,7 +382,7 @@ const Account = (props: any) => {
<
div
className=
"diy"
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
load
||
load
ing
}
>
Submit
</
Button
>
</
div
>
...
...
@@ -389,14 +395,14 @@ const Account = (props: any) => {
const
AccountProps
=
(
state
:
any
)
=>
{
const
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
SubResult
,
Info
}
=
state
.
Account
;
const
load
ing
=
state
.
loading
.
global
;
const
load
=
state
.
loading
.
global
;
const
{
user
}
=
state
;
return
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
load
ing
,
load
,
user
,
// 获取当前账户信息
SubResult
,
Info
,
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
67c11eeb
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
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
'./Account.less'
;
...
...
@@ -13,7 +13,7 @@ import { RA } from '@/utils/method';
const
Account
=
(
props
:
any
)
=>
{
const
module
=
'Account'
;
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
;
...
...
@@ -32,6 +32,9 @@ const Account = (props: any) => {
// const [frequency, setfrequency] = useState(0); // 权限列表
const
[
TreeDisabled
,
setTreeDisabled
]
=
useState
(
true
);
// 权限是否可编辑
// 加载情况
const
[
loading
,
setLoading
]
=
useState
(
true
);
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
formRef
=
useRef
(
null
);
...
...
@@ -75,7 +78,7 @@ const Account = (props: any) => {
}
},
[
DataSave
,
user
]);
//
提交信息结果
//提交信息结果
useEffect
(()
=>
{
if
(
SubResult
!=
null
)
{
if
(
SubResult
.
statr
==
0
&&
SubResult
.
desc
==
0
)
{
...
...
@@ -83,12 +86,13 @@ const Account = (props: any) => {
message
.
success
(
'Submitted Successfully !'
);
dispatch
({
type
:
module
+
'/ReData'
});
dispatch
({
type
:
module
+
'/AccountClear'
});
setLoading
(
true
);
history
.
go
(
-
1
);
}
}
},
[
SubResult
]);
// 已选权限
//
获取
已选权限
useEffect
(()
=>
{
if
(
Permission
!=
null
)
{
let
data
=
Permission
.
curUserPermission
?
Permission
.
curUserPermission
.
split
(
','
)
:
[];
...
...
@@ -150,6 +154,7 @@ const Account = (props: any) => {
}
setCheckedKeys
(
data
);
setLoading
(
false
);
}
},
[
Permission
,
DataSave
]);
...
...
@@ -226,8 +231,17 @@ const Account = (props: any) => {
permissionArray
:
newData
,
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
(
42
,
obj
,
module
,
dispatch
);
// 权限上传
setLoading
(
true
);
return
true
;
}
};
...
...
@@ -540,7 +554,7 @@ const Account = (props: any) => {
/* --------------------------- 更新 End---------------------------------- */
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
||
load
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
...
...
@@ -661,7 +675,7 @@ const Account = (props: any) => {
<
div
className=
"diy"
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
||
load
}
>
Submit
</
Button
>
</
div
>
...
...
@@ -673,20 +687,19 @@ const Account = (props: any) => {
};
const
AccountProps
=
(
state
:
any
)
=>
{
// console.log(state.loading);
const
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
SubResult
,
Permission
,
Info
}
=
state
.
Account
;
const
loading
=
state
.
loading
.
global
;
const
{
user
}
=
state
;
const
load
=
state
.
loading
.
global
;
return
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
loading
,
Permission
,
user
,
// 获取当前账户信息
SubResult
,
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) => {
// 点击搜索
const
onSubmitForm
=
(
value
:
any
)
=>
{
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
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
pageNum
:
1
,
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
67c11eeb
...
...
@@ -46,7 +46,8 @@ const VisitorRecord = (props: any) => {
// 点击搜索
const
onSubmitForm
=
(
value
:
any
)
=>
{
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
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
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