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
eb5c602e
Commit
eb5c602e
authored
Jan 14, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设施大改
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
61c5de68
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
792 additions
and
27 deletions
+792
-27
config.ts
config/config.ts
+20
-1
proxy.ts
config/proxy.ts
+6
-6
menu.ts
src/locales/en-US/menu.ts
+9
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
Bug.ts
src/models/CommunityManagement/Bug.ts
+56
-0
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+2
-2
BugDetail.tsx
src/pages/AccountManagement/SystemFeedback/BugDetail.tsx
+77
-0
SystemFeedback.tsx
...pages/AccountManagement/SystemFeedback/SystemFeedback.tsx
+123
-0
index.less
src/pages/AccountManagement/SystemFeedback/index.less
+42
-0
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+3
-3
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+48
-8
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+384
-0
index.less
...pages/CommunityManagement/FacilityBookings/css/index.less
+4
-6
indexTow.less
...es/CommunityManagement/FacilityBookings/css/indexTow.less
+14
-0
params.ts
src/utils/params.ts
+3
-1
No files found.
config/config.ts
View file @
eb5c602e
/*
* @Author: your name
* @Date: 2020-12-01 18:40:06
* @LastEditTime: 2021-01-13 10:34:13
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\config\config.ts
*/
// https://umijs.org/config/
import
{
defineConfig
}
from
'umi'
;
import
defaultSettings
from
'./defaultSettings'
;
...
...
@@ -314,7 +322,7 @@ export default defineConfig({
},
{
path
:
'./FacilityEdit'
,
component
:
'./CommunityManagement/FacilityBookings/Facility'
,
component
:
'./CommunityManagement/FacilityBookings/Facility
Tow
'
,
},
{
path
:
'./FacilityDetail'
,
...
...
@@ -364,6 +372,17 @@ export default defineConfig({
],
},
{
path
:
'./SystemFeedback'
,
name
:
'systemfeedback'
,
routes
:
[
{
path
:
'./'
,
component
:
'./AccountManagement/SystemFeedback/SystemFeedback'
},
{
path
:
'./BugDetail'
,
component
:
'./AccountManagement/SystemFeedback/BugDetail'
,
},
],
},
{
path
:
'./CompanyInformation'
,
name
:
'companyinformation'
,
...
...
config/proxy.ts
View file @
eb5c602e
...
...
@@ -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/locales/en-US/menu.ts
View file @
eb5c602e
/*
* @Author: your name
* @Date: 2020-12-14 18:52:22
* @LastEditTime: 2021-01-12 14:43:56
* @LastEditors: your name
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\locales\en-US\menu.ts
*/
export
default
{
'menu.welcome'
:
'Welcome'
,
'menu.more-blocks'
:
'More Blocks'
,
...
...
@@ -72,6 +80,7 @@ export default {
'menu.communitymanagement.visitorrecord'
:
'Visitor Record'
,
'menu.accountmanagement'
:
'Account Management'
,
'menu.accountmanagement.accountmanagement1'
:
'Account Management'
,
'menu.accountmanagement.systemfeedback'
:
'System Feedback'
,
'menu.accountmanagement.companyinformation'
:
'Company Information'
,
'menu.accountmanagement.languagesettings'
:
'Language Settings'
,
};
src/locales/zh-CN/menu.ts
View file @
eb5c602e
...
...
@@ -72,6 +72,7 @@ export default {
'menu.communitymanagement.visitorrecord'
:
'访客记录'
,
'menu.accountmanagement'
:
'后台管理'
,
'menu.accountmanagement.accountmanagement1'
:
'账号管理'
,
'menu.accountmanagement.systemfeedback'
:
'BUG反馈'
,
'menu.accountmanagement.companyinformation'
:
'公司信息'
,
'menu.accountmanagement.languagesettings'
:
'语言设置'
,
};
src/models/CommunityManagement/Bug.ts
0 → 100644
View file @
eb5c602e
/*
* @Author: your name
* @Date: 2021-01-14 09:23:51
* @LastEditTime: 2021-01-14 10:51:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts
*/
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
:
'Bug'
,
state
:
{
Data
:
null
,
DataSave
:
null
,
},
reducers
:
{
returnPage
(
state
,
{
Data
})
{
return
{
...
state
,
Data
};
},
returnDataSave
(
state
,
{
DataSave
})
{
return
{
...
state
,
DataSave
};
},
},
effects
:
{
//标准请求
*
RA
({
playload
},
{
call
,
put
})
{
const
resp
=
yield
call
(
service
.
RA
,
playload
);
if
(
resp
.
error_code
!=
'0000'
)
{
printf
(
playload
,
resp
);
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
}
else
{
switch
(
playload
.
index
)
{
case
59
:
// 获取后台所有账号
{
let
Data
=
resp
.
data
;
yield
put
({
type
:
'returnPage'
,
Data
});
}
break
;
}
}
},
*
SA
({
DataSave
},
{
call
,
put
})
{
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
},
};
src/models/CommunityManagement/FacilityBookings.ts
View file @
eb5c602e
...
...
@@ -127,8 +127,8 @@ export default {
yield
put
({
type
:
'returnPage3'
,
Data3
});
}
break
;
case
2
:
{
case
2
:
case
60
:{
let
DataSaveDetail
=
resp
.
data
;
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
});
...
...
src/pages/AccountManagement/SystemFeedback/BugDetail.tsx
0 → 100644
View file @
eb5c602e
import
React
,
{
useEffect
}
from
'react'
;
import
{
Button
,
Descriptions
,
Image
}
from
'antd'
;
import
{
EditOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
'./index.less'
;
import
{
connect
,
history
}
from
'umi'
;
import
moment
from
'moment'
;
const
BugDetail
=
(
props
:
any
)
=>
{
const
{
DataSave
}
=
props
;
useEffect
(()
=>
{
if
(
!
DataSave
)
{
history
.
push
(
'/AccountManagement/SystemFeedback'
);
}
},
[
DataSave
]);
const
goToReturn
=
()
=>
{
history
.
go
(
-
1
);
};
return
(
<>
<
div
className=
"contop bug"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
System Feedback Details
<
div
className=
"back"
onClick=
{
goToReturn
}
>
<
Button
>
<
LeftOutlined
/>
Back
</
Button
>
</
div
>
</
h3
>
<
hr
></
hr
>
<
Descriptions
column=
{
{
xxl
:
1
,
xl
:
1
,
lg
:
1
,
md
:
1
,
sm
:
1
,
xs
:
1
}
}
>
<
Descriptions
.
Item
label=
"Mobile phone brands"
>
{
DataSave
?
DataSave
.
phoneBrand
:
'-'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Phone model"
>
{
DataSave
?
DataSave
.
deviceModel
:
'-'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"System version"
>
{
DataSave
?
DataSave
.
osVersion
:
'-'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Software version"
>
{
DataSave
?
DataSave
.
appVersion
:
'-'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Feedback content"
>
{
DataSave
?
DataSave
.
description
:
'-'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
className=
"diys"
label=
" "
>
{
DataSave
?
DataSave
.
imageUrls
.
map
((
item
:
any
)
=>
{
return
<
Image
width=
{
120
}
src=
{
item
}
/>;
})
:
'-'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Actions"
>
{
DataSave
?
moment
(
DataSave
.
updateTime
.
time
).
calendar
()
:
'-'
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
</>
);
};
function
BugDetailProps
(
state
:
any
)
{
const
{
DataSave
}
=
state
.
Bug
;
const
loading
=
state
.
loading
.
models
.
Bug
||
false
;
return
{
DataSave
,
loading
,
};
}
export
default
connect
(
BugDetailProps
)(
BugDetail
);
src/pages/AccountManagement/SystemFeedback/SystemFeedback.tsx
0 → 100644
View file @
eb5c602e
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Pagination
}
from
'antd'
;
import
{}
from
'@ant-design/icons'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
{
RA
}
from
'@/utils/method'
;
import
{
connect
,
history
}
from
'umi'
;
import
moment
from
'moment'
;
import
'./index.less'
;
const
SystemFeedback
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
,
loading
}
=
props
;
const
module
=
'Bug'
;
const
[
term
,
setTerm
]
=
useState
({
pageNum
:
1
}
as
any
);
//页码
useEffect
(()
=>
{
if
(
!
Data
)
{
Refresh
();
}
},
[
Data
]);
const
columns
=
[
{
title
:
'Brand'
,
dataIndex
:
'phoneBrand'
},
{
title
:
'Phone model'
,
dataIndex
:
'deviceModel'
},
{
title
:
'System version'
,
dataIndex
:
'osVersion'
},
{
title
:
'Software version'
,
dataIndex
:
'appVersion'
},
{
title
:
'Problem Description'
,
dataIndex
:
'description'
,
ellipsis
:
true
},
{
title
:
'Submission time'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
)
=>
{
// let data =
// moment(text.time).format('YYYY-MM-DD hh') +
// ':00' +
// (parseInt(moment(text.time).format('HH')) > 11 ? 'PM' : 'AM');
let
data
=
moment
(
text
.
time
).
calendar
();
return
data
;
},
},
{
title
:
'Actions'
,
valueType
:
'option'
,
render
:
(
text
:
any
)
=>
{
return
(
<
a
key=
"link"
onClick=
{
()
=>
{
Details
(
text
);
}
}
>
Details
</
a
>
);
},
},
];
// 跳到内页
const
Details
=
(
item
:
any
)
=>
{
let
DataSave
=
item
;
dispatch
({
type
:
'Bug/SA'
,
DataSave
});
history
.
push
(
'/AccountManagement/SystemFeedback/BugDetail'
);
};
// 页码切换
const
sopens
=
(
page
:
any
)
=>
{
let
p
=
{
pageNum
:
page
,
};
setTerm
({
...
p
});
RA
(
59
,
p
,
module
,
dispatch
);
};
// 刷新
const
Refresh
=
()
=>
{
RA
(
59
,
term
,
module
,
dispatch
);
};
return
(
<>
<
ProTable
dataSource=
{
Data
?
Data
.
list
:
null
}
rowKey=
{
'id'
}
columns=
{
columns
as
any
}
pagination=
{
false
}
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
Refresh
();
},
setting
:
false
,
}
}
loading=
{
loading
}
search=
{
false
}
headerTitle=
"System Feedback"
/>
<
div
className=
"pages"
>
<
Pagination
// onShowSizeChange={pageSizeHandler}
current=
{
Data
?
Data
.
page
.
currentPage
:
0
}
onChange=
{
sopens
}
total=
{
Data
?
Data
.
page
.
totalRow
:
0
}
pageSize=
{
Data
?
Data
.
page
.
curPageSize
:
0
}
showSizeChanger=
{
false
}
/>
</
div
>
</>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
Bug
;
const
loading
=
state
.
loading
.
models
.
Bug
||
false
;
return
{
Data
,
loading
,
};
}
export
default
connect
(
mapStateToProps
)(
SystemFeedback
);
src/pages/AccountManagement/SystemFeedback/index.less
0 → 100644
View file @
eb5c602e
.contop {
background: #fff;
padding: 20px;
border-right: 4px;
margin-bottom: 0;
h3 {
margin-bottom: 15px;
position: relative;
.back {
position: absolute;
right: 0;
top: 0;
top: -2px;
background: #fff;
}
}
}
hr {
border: 0;
height: 1px;
background: #eee;
margin-bottom: 24px;
}
.bug {
.ant-descriptions-item-label {
display: inline-block;
min-width: 160px;
}
.diys {
.ant-descriptions-item-label {
color: #fff;
}
}
.ant-image {
margin-right: 15px;
}
}
.pages {
text-align: right;
padding: 10px;
}
src/pages/AccountManagement/account/Account.tsx
View file @
eb5c602e
...
...
@@ -69,15 +69,15 @@ const Account = (props: any) => {
key
:
'userAccount'
,
},
{
title
:
'
Grade
'
,
title
:
'
Authority Level
'
,
dataIndex
:
'tosUserLevel'
,
key
:
'userLevel'
,
render
:
(
text
:
any
)
=>
(
<
span
>
{
text
==
0
?
'Administrator'
:
''
}
{
text
==
1
?
'First Level'
:
''
}
{
text
==
2
?
'
Two
Level'
:
''
}
{
text
==
3
?
'Th
ree
Level'
:
''
}
{
text
==
2
?
'
Second
Level'
:
''
}
{
text
==
3
?
'Th
ird
Level'
:
''
}
</
span
>
),
},
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
eb5c602e
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Input
,
Tabs
,
Pagination
,
Space
,
Button
}
from
'antd'
;
import
{
Input
,
Tabs
,
Pagination
,
Space
,
Button
,
message
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
...
...
@@ -42,8 +42,6 @@ const FacilityBookings = (props: any) => {
CommunityList
,
}
=
props
;
// console.log(Data2);
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings/RA'
,
...
...
@@ -63,9 +61,38 @@ const FacilityBookings = (props: any) => {
dispatch
({
type
:
'FacilityBookings/CA'
,
playload
:
null
});
};
// 表头格式
const
[
columns
,
setColumns
]
=
useState
([]);
const
[
columns2
,
setColumns2
]
=
useState
([]);
// 设施列表数据
const
[
Facility
,
setFacility
]
=
useState
([]
as
any
);
useEffect
(()
=>
{
if
(
Data2
!=
null
)
{
// 提取出列表的值
let
Array
=
[];
for
(
let
i
in
Data2
.
data
)
{
let
a
=
{
community
:
''
,
facilities
:
[]
as
any
,
};
a
.
community
=
Object
.
keys
(
Data2
.
data
[
i
])[
0
];
let
arr
=
Data2
.
data
[
i
][
Object
.
keys
(
Data2
.
data
[
i
])[
0
]];
arr
.
map
((
item
:
any
)
=>
{
let
id
=
Object
.
keys
(
item
)[
0
];
let
obj
=
{
id
:
id
,
name
:
item
[
id
],
};
a
.
facilities
.
push
(
obj
);
});
Array
.
push
(
a
);
}
setFacility
(
Array
);
}
},
[
Data2
]);
const
goToFunction
=
()
=>
{
if
(
curString
.
tab
==
2
)
{
CA
();
...
...
@@ -89,6 +116,10 @@ const FacilityBookings = (props: any) => {
// 列表2 点击跳转
const
makeOperator
=
(
values
:
any
,
index
:
any
)
=>
{
const
path
=
[
'/FacilityDetail'
,
'/FacilityEdit'
,
'/FacilityApply'
];
if
(
index
!=
1
)
{
message
.
error
(
'In function development!'
);
return
false
;
}
SA
(
values
);
// 清空设施列表图
let
list
:
any
=
[];
...
...
@@ -127,9 +158,18 @@ const FacilityBookings = (props: any) => {
],
];
const
key2
=
[
[
'Community'
,
'communityName'
],
[
'Facilities'
,
'facilityName'
],
[
'Opening Hours'
,
'categoriesOpenTime'
],
[
'Community'
,
'community'
],
[
'Facilities'
,
'facilities'
,
(
text
:
any
,
record
:
any
)
=>
{
let
a
=
''
;
text
.
map
((
item
:
any
)
=>
{
a
+=
item
.
name
+
'、'
;
});
return
a
;
},
],
[
'Action'
,
null
,
...
...
@@ -356,8 +396,8 @@ const FacilityBookings = (props: any) => {
<
TabPane
tab=
"Facility Management"
key=
"2"
>
<
ProTable
loading=
{
loading
}
rowKey=
"id"
dataSource=
{
Data2
.
data
}
rowKey=
{
'community'
}
dataSource=
{
Facility
}
columns=
{
columns2
}
// pagination={{
// current: curString.curPage2,
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
0 → 100644
View file @
eb5c602e
This diff is collapsed.
Click to expand it.
src/pages/CommunityManagement/FacilityBookings/css/index.less
View file @
eb5c602e
...
...
@@ -331,12 +331,10 @@ hr {
}
.divIconMoney {
position: absolute;
z-index: 99;
top: 50%;
transform: translateY(-50%);
left: 8px;
color: #999;
display: inline-block;
margin-right: 10px;
color: rgba(0, 0, 0, 0.85);
line-height: 32px;
}
.required {
...
...
src/pages/CommunityManagement/FacilityBookings/css/indexTow.less
0 → 100644
View file @
eb5c602e
hr {
border: 0;
height: 1px;
background: #eee;
margin-bottom: 24px;
}
.FacilityName {
margin-bottom: 15px;
label {
display: inline-block;
min-width: 100px;
}
}
src/utils/params.ts
View file @
eb5c602e
/*
* @Author: your name
* @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-01-
07 15:08:08
* @LastEditTime: 2021-01-
14 15:31:59
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts
...
...
@@ -91,4 +91,6 @@ export const requestList = [
[
'/tos/user/twoLevel/get'
,
'56 获取二级账号'
,
{}],
[
'/tos/user/twoLevel/get/CommunityAuth'
,
'57 根据用户id获取用户管辖小区名和权限'
,
{}],
[
'/tos/community/categories/subscribe/reservationNum'
,
'58 获取小区设施可预约次数'
,
{}],
[
'/tos/bug/feedback/list'
,
'59 获取用户反馈列表'
,
{}],
[
'/tos/community/facilities/get/detail'
,
'60 获取小区设施详情'
,
{}],
];
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