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
86851cfb
Commit
86851cfb
authored
Dec 02, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改需求,修复bug
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
16620118
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
101 additions
and
112 deletions
+101
-112
AvatarDropdown.tsx
src/components/GlobalHeader/AvatarDropdown.tsx
+6
-30
RightContent.tsx
src/components/GlobalHeader/RightContent.tsx
+0
-34
PictureOptionsRow.tsx
src/components/PictureOptions/PictureOptionsRow.tsx
+3
-0
LanguageSettings.tsx
...s/AccountManagement/LanguageSettings/LanguageSettings.tsx
+16
-17
Add.tsx
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
+5
-0
CommunityAnnouncement.tsx
...anagement/CommunityAnnouncement/CommunityAnnouncement.tsx
+2
-2
Detail.tsx
...ages/CommunityManagement/CommunityAnnouncement/Detail.tsx
+8
-6
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+1
-0
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+53
-18
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+4
-2
tip.ts
src/utils/tip.ts
+3
-3
No files found.
src/components/GlobalHeader/AvatarDropdown.tsx
View file @
86851cfb
import
{
LogoutOutlined
,
SettingOutlined
,
UserOutlined
}
from
'@ant-design/icons'
;
import
{
LogoutOutlined
}
from
'@ant-design/icons'
;
import
{
Avatar
,
Menu
,
Spin
}
from
'antd'
;
import
{
ClickParam
}
from
'antd/es/menu'
;
import
{
setCookie
}
from
'@/utils/method'
;
import
React
from
'react'
;
import
{
history
,
ConnectProps
,
connect
}
from
'umi'
;
import
{
ConnectState
}
from
'@/models/connect'
;
...
...
@@ -58,50 +57,27 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
render
():
React
.
ReactNode
{
const
{
currentUser
=
{
avatar
:
''
,
name
:
''
,
avatar
:
'
http://120.77.240.215:5205/file/ce90a1cd01cf4c2bb6ab12b295c25c16.png
'
,
name
:
'
Login Again Please
'
,
},
menu
,
}
=
this
.
props
;
const
menuHeaderDropdown
=
(
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
this
.
onMenuClick
}
>
{
menu
&&
(
<
Menu
.
Item
key=
"center"
>
<
UserOutlined
/>
个人中心
</
Menu
.
Item
>
)
}
{
menu
&&
(
<
Menu
.
Item
key=
"settings"
>
<
SettingOutlined
/>
个人设置
</
Menu
.
Item
>
)
}
{
menu
&&
<
Menu
.
Divider
/>
}
<
Menu
.
Item
key=
"logout"
>
<
LogoutOutlined
/>
Sign Out
</
Menu
.
Item
>
</
Menu
>
);
return
currentUser
&&
currentUser
.
name
?
(
return
(
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Avatar
size=
"small"
className=
{
styles
.
avatar
}
src=
{
currentUser
.
avatar
}
alt=
"avatar"
/>
<
span
className=
{
styles
.
name
}
>
{
currentUser
.
name
}
</
span
>
</
span
>
</
HeaderDropdown
>
)
:
(
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Spin
size=
"small"
style=
{
{
marginLeft
:
8
,
marginRight
:
8
,
}
}
/>
</
span
>
);
}
}
...
...
src/components/GlobalHeader/RightContent.tsx
View file @
86851cfb
...
...
@@ -29,46 +29,12 @@ const GlobalHeaderRight: React.SFC<GlobalHeaderRightProps> = (props) => {
}
return
(
<
div
className=
{
className
}
>
{
/* <HeaderSearch
className={`${styles.action} ${styles.search}`}
placeholder="站内搜索"
defaultValue="umi ui"
options={[
{ label: <a href="https://umijs.org/zh/guide/umi-ui.html">umi ui</a>, value: 'umi ui' },
{
label: <a href="next.ant.design">Ant Design</a>,
value: 'Ant Design',
},
{
label: <a href="https://protable.ant.design/">Pro Table</a>,
value: 'Pro Table',
},
{
label: <a href="https://prolayout.ant.design/">Pro Layout</a>,
value: 'Pro Layout',
},
]}
// onSearch={value => {
// //console.log('input', value);
// }}
/> */
}
{
/* <Tooltip title="使用文档">
<a
target="_blank"
href="https://pro.ant.design/docs/getting-started"
rel="noopener noreferrer"
className={styles.action}
>
<QuestionCircleOutlined />
</a>
</Tooltip> */
}
<
Avatar
/>
{
REACT_APP_ENV
&&
(
<
span
>
<
Tag
color=
{
ENVTagColor
[
REACT_APP_ENV
]
}
>
{
REACT_APP_ENV
}
</
Tag
>
</
span
>
)
}
{
/* <SelectLang className={styles.action} /> */
}
</
div
>
);
};
...
...
src/components/PictureOptions/PictureOptionsRow.tsx
View file @
86851cfb
...
...
@@ -69,6 +69,9 @@ const PictureOptionsRow = (props: any) => {
});
setFileList
(
result
);
onChange
&&
onChange
(
resultToInside
);
}
else
{
// 更改小区删除附件
setFileList
([]);
}
// }
},
[
defaultValue
]);
...
...
src/pages/AccountManagement/LanguageSettings/LanguageSettings.tsx
View file @
86851cfb
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Radio
}
from
'antd'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Radio
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
getLocale
,
setLocale
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
getLocale
,
setLocale
}
from
'umi'
;
const
locales
=
[
'zh-CN'
,
'en-US'
];
const
locales
=
[
'zh-CN'
,
'en-US'
];
const
LanguageSettings
=
()
=>
{
const
languageSelect
=
(
e
)
=>
{
setLocale
(
locales
[
e
.
target
.
value
])
const
languageSelect
=
(
e
:
any
)
=>
{
setLocale
(
locales
[
e
.
target
.
value
]);
};
const
[
curLang
,
setCurLang
]
=
useState
(
0
);
useEffect
(()
=>
{
if
(
getLocale
()
==
"en-US"
)
{
setCurLang
(
1
)
if
(
getLocale
()
==
'en-US'
)
{
setCurLang
(
1
)
;
}
else
{
setCurLang
(
0
)
setCurLang
(
0
)
;
}
},
[
curLang
]);
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
box
}
>
Language Selection
</
div
>
<
Radio
.
Group
onChange=
{
languageSelect
}
value=
{
curLang
}
>
<
div
className=
{
styles
.
box
}
><
Radio
value=
{
0
}
>
Chinese
</
Radio
></
div
>
<
div
className=
{
styles
.
box
}
><
Radio
value=
{
1
}
>
English
</
Radio
></
div
>
<
Radio
.
Group
onChange=
{
languageSelect
}
value=
{
curLang
}
>
<
div
className=
{
styles
.
box
}
>
<
Radio
value=
{
0
}
>
Chinese
</
Radio
>
</
div
>
<
div
className=
{
styles
.
box
}
>
<
Radio
value=
{
1
}
>
English
</
Radio
>
</
div
>
</
Radio
.
Group
>
</
div
>
);
};
export
default
LanguageSettings
;
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
View file @
86851cfb
...
...
@@ -52,6 +52,11 @@ const Add = (props: any) => {
// 解除结束时间不可选
settimeT
(
false
);
// 设置结束时间 到开始时间不能选
let
difference
=
moment
().
diff
(
moment
(
DataSave
.
noticStartTime
.
time
),
'days'
);
settimeOver
(
difference
);
// 图片名
setImageName
(
DataSave
.
noticImageName
.
split
(
','
));
}
...
...
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
86851cfb
...
...
@@ -151,7 +151,7 @@ const CommunityAnnouncement = (props: any) => {
let
mlist
=
{
...
value
};
mlist
.
communityNumList
=
value
.
communityNumList
!=
null
&&
value
.
communityNumList
.
length
>
0
?
value
.
communityNumList
?
[
value
.
communityNumList
]
:
null
;
mlist
.
pageNum
=
1
;
// 把内容存进去
...
...
@@ -196,7 +196,7 @@ const CommunityAnnouncement = (props: any) => {
<
SearchOptionsCommnity
// ubmit={extendName}
opname=
{
opname
}
type=
{
1
}
// 单选还是多选 单选就直接去掉
//
type={1} // 单选还是多选 单选就直接去掉
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"noticTitlel"
>
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Detail.tsx
View file @
86851cfb
...
...
@@ -38,12 +38,14 @@ const Add = (props: any) => {
noticStartTime
:
day
,
noticEndTime
:
day2
,
});
// 发起请求图片
let
msg
=
{
type
:
'tosCommunityNoticePreview'
,
fileName
:
DataSave
.
noticImageName
,
};
RA
(
47
,
msg
,
module
,
dispatch
);
if
(
DataSave
.
noticImageName
)
{
// 发起请求图片
let
msg
=
{
type
:
'tosCommunityNoticePreview'
,
fileName
:
DataSave
.
noticImageName
,
};
RA
(
47
,
msg
,
module
,
dispatch
);
}
}
},
[
DataSave
]);
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
86851cfb
...
...
@@ -371,6 +371,7 @@ const Bookings = (props: any) => {
limit=
{
curString
.
categoriesOpenTime
}
// 禁止时间段
openSelect=
{
endTimes
}
// 时间类型
type=
{
0
}
inhibitTime=
{
result
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
86851cfb
...
...
@@ -65,6 +65,8 @@ const Facility = (props: any) => {
const
formRef
=
useRef
(
null
as
any
);
const
[
fileList
,
setFileList
]
=
useState
([]
as
any
);
// 图片列表组
// 监听是否选择了小区
const
[
imgOpen
,
setImgOpen
]
=
useState
(
true
);
const
[
ctyName
,
setCtyName
]
=
useState
(
null
);
...
...
@@ -92,6 +94,8 @@ const Facility = (props: any) => {
};
useEffect
(()
=>
{
if
(
sourceData
!=
null
)
{
console
.
log
(
sourceData
.
categoriesDetailsImageName
);
setCtyName
(
DataSave
.
communityName
);
setSoltTime
(
sourceData
.
reservationQuantumTime
);
// 设置时间
...
...
@@ -126,6 +130,9 @@ const Facility = (props: any) => {
setImgOpen
(
false
);
}
setFileList
(
sourceData
.
categoriesDetailsImageName
);
//设置图片组
delete
sourceData
.
categoriesDetailsImageName
;
// 设置表单默认值
formRef
.
current
.
setFieldsValue
(
sourceData
);
}
else
{
...
...
@@ -176,18 +183,22 @@ const Facility = (props: any) => {
}
else
if
(
soltTime
.
length
<
2
||
!
soltTime
[
0
])
{
// 判断时间选择
message
.
error
(
'Please Fill In The Appointment Period!'
);
}
else
if
(
soltTime
[
1
]
<=
soltTime
[
0
])
{
// 开始时间与结束时间选择错误
message
.
error
(
'Wrong selection of start time and end time!'
);
}
else
if
(
// 提前预订时间大于 取消时间
result
.
canReservationDay
<
result
.
cancelReservationDay
||
result
.
canReservationDay
<
result
.
nomarginCancelReservationDay
)
{
message
.
error
(
'Reservation should be greater than cancellation time!'
);
// } else if ( // 暂时去掉这个需求判断
// // 不为 0 的时候 No Deposit To Cancel Reservation 必须要小于 Booking
// result.nomarginCancelReservationDay != 0 &&
// result.canReservationDay <= result.nomarginCancelReservationDay
// ) {
// message.error('nomarginCancelReservationDay 要小于 Booking !');
}
else
{
// 处理 开放时间段
// let reservationQuantumTime: any = [
// moment(soltTime[0], 'HH:mm').format('HH:mm'),
// moment(soltTime[1], 'HH:mm').format('HH:mm'),
// ];
let
categoriesName
:
any
=
imgs
;
// 设施图片
result
.
categoriesName
=
categoriesName
;
// 设施内容
result
.
reservationQuantumTime
=
soltTime
;
// 开放时间段
...
...
@@ -197,6 +208,7 @@ const Facility = (props: any) => {
delete
result
.
startTime
;
delete
result
.
endTime
;
delete
result
.
picList
;
if
(
sourceData
!=
null
)
{
result
.
id
=
DataSave
.
id
;
if
(
Result
==
null
)
{
...
...
@@ -236,21 +248,39 @@ const Facility = (props: any) => {
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
if
(
value
)
{
setImgOpen
(
false
);
// 允许图片上传
setCtyName
(
value
);
// 给小区赋值
form
.
setFieldsValue
({
communityName
:
value
,
// 给表单赋值
});
console
.
log
(
value
);
console
.
log
(
ctyName
);
if
(
value
==
''
)
{
eliminate
();
}
else
{
// 设置是否能点击上传
setImgOpen
(
true
);
// 清空设施列表图
let
list
:
any
=
[];
dispatch
({
type
:
module
+
'/genxin'
,
list
});
if
(
ctyName
==
null
)
{
setImgOpen
(
false
);
// 允许图片上传
setCtyName
(
value
);
// 给小区赋值
form
.
setFieldsValue
({
communityName
:
value
,
// 给表单赋值
});
}
else
if
(
value
!=
ctyName
)
{
eliminate
();
}
}
};
// 切换小区清除小区附件列表
const
eliminate
=
()
=>
{
setCtyName
(
null
);
// 设置是否能点击上传
setImgOpen
(
true
);
// 清空设施列表图
let
list
:
any
=
[];
dispatch
({
type
:
module
+
'/genxin'
,
list
});
setFileList
(
null
);
//去掉图片组
form
.
setFieldsValue
({
categoriesDetailsImageName
:
[],
});
};
// 子组件清除表单的 输入框值
const
dumps
=
(
key
:
any
)
=>
{
form
.
setFieldsValue
({
...
...
@@ -297,7 +327,7 @@ const Facility = (props: any) => {
<
Form
.
Item
label=
"Community"
name=
"communityName"
rules=
{
NewFaci
[
0
]
}
>
<
SearchOptionsCommnity
// ubmit={extendName}
defaultName=
{
sourceData
!=
null
?
DataSave
.
communityName
:
null
}
defaultName=
{
DataSave
!=
null
?
DataSave
.
communityName
:
null
}
opname=
{
opname
}
disabled=
{
facilityDetail
}
/>
...
...
@@ -340,7 +370,11 @@ const Facility = (props: any) => {
<
hr
></
hr
>
{
/* 设施品类上传 */
}
<
Form
.
Item
label=
"Facility Classification"
className=
"flex required"
>
<
Form
.
Item
label=
"Facility Classification"
className=
"flex required"
style=
{
{
marginBottom
:
0
}
}
>
<
Facilitys
disabled=
{
imgOpen
}
updata=
{
{
...
...
@@ -366,6 +400,7 @@ const Facility = (props: any) => {
extends
:
ctyName
,
}
}
limitNums=
{
99
}
defaultValue=
{
DataSave
!=
null
?
fileList
:
null
}
/>
</
Form
.
Item
>
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
86851cfb
...
...
@@ -57,6 +57,8 @@ const FacilityBookings = (props: any) => {
CA
();
// 先清空上传图片列表
dispatch
({
type
:
'FacilityBookings/overAllImgList'
});
// 在清空详情信息
SA
(
null
);
}
else
{
// 清空之前的数据
SA
(
null
);
...
...
@@ -130,8 +132,8 @@ const FacilityBookings = (props: any) => {
),
],
];
setColumns
(
objectColumns
(
key
));
setColumns2
(
objectColumns
(
key2
));
setColumns
(
objectColumns
(
key
)
as
any
);
setColumns2
(
objectColumns
(
key2
)
as
any
);
if
(
curString
.
tab
==
1
)
{
RA
(
9
,
{
userToken
:
token
,
...
...
src/utils/tip.ts
View file @
86851cfb
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2020-1
1-30 15:00:30
* @LastEditTime: 2020-1
2-02 16:32:42
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
...
...
@@ -61,8 +61,8 @@ export const NewFaci = [
export
const
BookingsTip
=
[
[{
required
:
true
,
message
:
'Please input Name '
}],
[{
required
:
true
,
message
:
'Please input Contact Details'
}],
[{
required
:
true
,
message
:
'Required
'
}],
[{
required
:
true
,
message
:
'Required
'
}],
[{
required
:
true
,
pattern
:
new
RegExp
(
/^
[
1-9
]\d
*$/
,
'g'
),
message
:
'Only numbers!
'
}],
[{
required
:
true
,
pattern
:
new
RegExp
(
/^
[
1-9
]\d
*$/
,
'g'
),
message
:
'Only numbers!
'
}],
[{
required
:
true
,
message
:
'Required'
}],
[{
required
:
true
,
message
:
'Please Select The Date'
}],
];
...
...
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