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
113bb4aa
Commit
113bb4aa
authored
Dec 08, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约重新选择小区清空附件
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
c15d8b62
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
78 deletions
+36
-78
PictureOptionsRow.tsx
src/components/PictureOptions/PictureOptionsRow.tsx
+4
-26
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+1
-1
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+2
-2
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+26
-46
VisitorRecord.tsx
...pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
+1
-1
VisitorRecord.tsx
...pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
+1
-1
Template.tsx
src/pages/runTest/Template.tsx
+1
-1
No files found.
src/components/PictureOptions/PictureOptionsRow.tsx
View file @
113bb4aa
...
@@ -16,7 +16,7 @@ function getBase64(file: File) {
...
@@ -16,7 +16,7 @@ function getBase64(file: File) {
import
{
getUrlPicName
}
from
'../../utils/string'
;
import
{
getUrlPicName
}
from
'../../utils/string'
;
const
PictureOptionsRow
=
(
props
:
any
)
=>
{
const
PictureOptionsRow
=
(
props
:
any
)
=>
{
const
{
value
,
onChange
,
limitNums
,
defaultValue
}
=
props
;
const
{
value
,
onChange
,
limitNums
}
=
props
;
const
[
fileList
,
setFileList
]
=
useState
([]
as
any
);
const
[
fileList
,
setFileList
]
=
useState
([]
as
any
);
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
const
[
previewImage
,
setPreviewImage
]
=
useState
(
''
);
const
[
previewImage
,
setPreviewImage
]
=
useState
(
''
);
...
@@ -35,7 +35,9 @@ const PictureOptionsRow = (props: any) => {
...
@@ -35,7 +35,9 @@ const PictureOptionsRow = (props: any) => {
var
tmp
=
value
;
var
tmp
=
value
;
var
result
=
new
Array
();
var
result
=
new
Array
();
var
resultToInside
=
new
Array
();
var
resultToInside
=
new
Array
();
if
(
tmp
.
length
>
0
&&
typeof
tmp
[
0
]
!=
'string'
)
{
if
(
value
.
length
==
0
)
{
setFileList
([]);
}
else
if
(
tmp
.
length
>
0
&&
typeof
tmp
[
0
]
!=
'string'
)
{
//输入输出
//输入输出
tmp
.
map
((
item
:
any
)
=>
{
tmp
.
map
((
item
:
any
)
=>
{
if
(
item
.
name
==
null
)
{
if
(
item
.
name
==
null
)
{
...
@@ -52,30 +54,6 @@ const PictureOptionsRow = (props: any) => {
...
@@ -52,30 +54,6 @@ const PictureOptionsRow = (props: any) => {
}
}
},
[
value
]);
},
[
value
]);
useEffect
(()
=>
{
// if (props.disabled) {
if
(
defaultValue
!=
null
)
{
var
tmp
=
defaultValue
;
var
result
=
new
Array
();
var
resultToInside
=
new
Array
();
tmp
.
map
((
item
:
any
)
=>
{
if
(
item
.
name
==
null
)
{
item
.
name
=
getUrlPicName
(
item
.
url
);
item
.
uid
=
randomString
(
8
);
item
.
status
=
'done'
;
}
result
.
push
(
item
);
resultToInside
.
push
(
item
.
name
);
});
setFileList
(
result
);
onChange
&&
onChange
(
resultToInside
);
}
else
{
// 更改小区删除附件
setFileList
([]);
}
// }
},
[
defaultValue
]);
// 加载logo
// 加载logo
const
uploadButton
=
(
const
uploadButton
=
(
<
div
>
<
div
>
...
...
src/models/CommunityManagement/FacilityBookings.ts
View file @
113bb4aa
...
@@ -228,7 +228,7 @@ export default {
...
@@ -228,7 +228,7 @@ export default {
// 更新列表
// 更新列表
*
genxin
({
list
},
{
put
})
{
*
genxin
({
list
},
{
put
})
{
yield
put
({
type
:
'retImgsList'
,
list
}
)
yield
put
({
type
:
'retImgsList'
,
list
})
}
}
},
},
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
113bb4aa
...
@@ -22,8 +22,8 @@ const BookingDetail = (props: any) => {
...
@@ -22,8 +22,8 @@ const BookingDetail = (props: any) => {
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
// 已预约时间段
// 已预约时间段
let
arr
=
DataSave
.
subscribeTime
.
split
(
','
);
let
arr
=
DataSave
.
subscribeTime
.
split
(
','
);
let
time1
=
parseInt
(
moment
(
arr
[
0
],
'HH:mm'
).
format
(
'
hh
'
));
let
time1
=
parseInt
(
moment
(
arr
[
0
],
'HH:mm'
).
format
(
'
HH
'
));
let
time2
=
parseInt
(
moment
(
arr
[
arr
.
length
-
1
],
'HH:mm'
).
format
(
'
hh
'
));
let
time2
=
parseInt
(
moment
(
arr
[
arr
.
length
-
1
],
'HH:mm'
).
format
(
'
HH
'
));
let
Time
=
''
;
let
Time
=
''
;
for
(
let
i
=
time1
;
i
<=
time2
;
i
++
)
{
for
(
let
i
=
time1
;
i
<=
time2
;
i
++
)
{
i
<
10
?
(
Time
=
`
${
Time
}
0
${
i
}
:00,`
)
:
(
Time
=
`
${
Time
}${
i
}
:00,`
);
i
<
10
?
(
Time
=
`
${
Time
}
0
${
i
}
:00,`
)
:
(
Time
=
`
${
Time
}${
i
}
:00,`
);
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
113bb4aa
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
'./css/index.less'
;
import
'./css/index.less'
;
import
{
import
{
Input
,
InputNumber
,
Button
,
Form
,
Select
,
message
,
Spin
}
from
'antd'
;
Input
,
TimePicker
,
InputNumber
,
Button
,
Space
,
Pagination
,
Tooltip
,
Upload
,
Form
,
Select
,
message
,
Spin
,
}
from
'antd'
;
const
{
RangePicker
}
=
TimePicker
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
import
{
PlusOutlined
,
MinusCircleOutlined
,
ClearOutlined
}
from
'@ant-design/icons'
;
import
{
connect
,
history
}
from
'umi'
;
import
PictureOptionsRow
from
'@/components/PictureOptions/PictureOptionsRow'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
;
import
{
getNumber
}
from
'@/utils/string'
;
import
PictureOptions
from
'../../../components/PictureOptions/PictureOptions'
;
import
PictureOptionsRow
from
'../../../components/PictureOptions/PictureOptionsRow'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
TimeSelect
from
'../../../components/TimeSelect/TimeSelect'
;
import
Line
from
'../../../components/Line/Line'
;
import
{
getNumber
}
from
'../../../utils/string'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
{
NewFaci
}
from
'@/utils/tip'
;
import
{
NewFaci
}
from
'@/utils/tip'
;
// categoriesDetailsImageName: ["test.jpg"],
// categoriesName: ["篮球场A&test.jpg"],
// reservationQuantumTime: ["09:00-07:00"]
import
Facilitys
from
'@/components/Facilitys/Facilitys'
;
import
Facilitys
from
'@/components/Facilitys/Facilitys'
;
import
{
getUrlLast
,
numberToString
}
from
'../../../utils/string'
;
import
{
getUrlLast
}
from
'@/utils/string'
;
import
{
checkParam
,
timeForm
}
from
'@/utils/method'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
{
validateMessages
}
from
'@/utils/params'
;
const
module
=
'FacilityBookings'
;
const
module
=
'FacilityBookings'
;
...
@@ -57,8 +32,6 @@ const Facility = (props: any) => {
...
@@ -57,8 +32,6 @@ const Facility = (props: any) => {
dispatch
({
type
:
'FacilityBookings/ResultClear'
});
dispatch
({
type
:
'FacilityBookings/ResultClear'
});
};
};
const
openCheck
=
true
;
const
[
pictrueExtend
,
setPictrueExtend
]
=
useState
({
pic
:
null
,
pics
:
null
,
tab
:
3
});
const
[
pictrueExtend
,
setPictrueExtend
]
=
useState
({
pic
:
null
,
pics
:
null
,
tab
:
3
});
const
[
facilityDetail
,
setFacilityDetail
]
=
useState
(
false
);
const
[
facilityDetail
,
setFacilityDetail
]
=
useState
(
false
);
const
[
PATHNAME
,
setPATHNAME
]
=
useState
(
''
);
const
[
PATHNAME
,
setPATHNAME
]
=
useState
(
''
);
...
@@ -94,8 +67,7 @@ const Facility = (props: any) => {
...
@@ -94,8 +67,7 @@ const Facility = (props: any) => {
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
sourceData
!=
null
)
{
if
(
sourceData
!=
null
)
{
console
.
log
(
sourceData
.
categoriesDetailsImageName
);
console
.
log
(
sourceData
);
setCtyName
(
DataSave
.
communityName
);
setCtyName
(
DataSave
.
communityName
);
setSoltTime
(
sourceData
.
reservationQuantumTime
);
// 设置时间
setSoltTime
(
sourceData
.
reservationQuantumTime
);
// 设置时间
...
@@ -122,16 +94,14 @@ const Facility = (props: any) => {
...
@@ -122,16 +94,14 @@ const Facility = (props: any) => {
});
});
return
sam
;
return
sam
;
});
});
dispatch
({
type
:
module
+
'/genxin'
,
list
});
dispatch
({
type
:
module
+
'/genxin'
,
list
});
// 当是查看的时候禁止点击
// 当是查看的时候禁止点击
if
(
location
.
pathname
.
indexOf
(
'FacilityDetail'
)
>
-
1
)
{
location
.
pathname
.
indexOf
(
'FacilityDetail'
)
>
-
1
?
setImgOpen
(
true
)
:
setImgOpen
(
false
);
setImgOpen
(
true
);
}
else
{
setImgOpen
(
false
);
}
setFileList
(
sourceData
.
categoriesDetailsImageName
);
//设置图片组
setFileList
(
sourceData
.
categoriesDetailsImageName
);
//设置图片组
名称
delete
sourceData
.
categoriesDetailsImageName
;
//
delete sourceData.categoriesDetailsImageName;
// 设置表单默认值
// 设置表单默认值
formRef
.
current
.
setFieldsValue
(
sourceData
);
formRef
.
current
.
setFieldsValue
(
sourceData
);
...
@@ -248,8 +218,8 @@ const Facility = (props: any) => {
...
@@ -248,8 +218,8 @@ const Facility = (props: any) => {
// 选择小区名字并赋值
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
const
opname
=
(
value
:
any
)
=>
{
console
.
log
(
value
);
console
.
log
(
'选择的小区是:'
+
value
);
console
.
log
(
ctyName
);
console
.
log
(
'储存的小区是:'
+
ctyName
);
if
(
value
==
''
)
{
if
(
value
==
''
)
{
eliminate
();
eliminate
();
}
else
{
}
else
{
...
@@ -260,7 +230,17 @@ const Facility = (props: any) => {
...
@@ -260,7 +230,17 @@ const Facility = (props: any) => {
communityName
:
value
,
// 给表单赋值
communityName
:
value
,
// 给表单赋值
});
});
}
else
if
(
value
!=
ctyName
)
{
}
else
if
(
value
!=
ctyName
)
{
eliminate
();
// eliminate();
// 清空设施列表图
console
.
log
(
'不等于'
);
setCtyName
(
value
);
// 给小区赋值
let
list
:
any
=
[];
dispatch
({
type
:
module
+
'/genxin'
,
list
});
setFileList
(
null
);
//去掉图片组
form
.
setFieldsValue
({
categoriesDetailsImageName
:
[],
});
}
}
}
}
};
};
...
@@ -400,7 +380,7 @@ const Facility = (props: any) => {
...
@@ -400,7 +380,7 @@ const Facility = (props: any) => {
extends
:
ctyName
,
extends
:
ctyName
,
}
}
}
}
limitNums=
{
99
}
limitNums=
{
99
}
defaultValue=
{
DataSave
!=
null
?
fileList
:
null
}
value=
{
fileList
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
View file @
113bb4aa
...
@@ -251,7 +251,7 @@ const VisitorRecord = (props: any) => {
...
@@ -251,7 +251,7 @@ const VisitorRecord = (props: any) => {
Reset
Reset
</
Button
>
</
Button
>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'cal
a(100%+
16px)'
}
}
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'cal
c(100% +
16px)'
}
}
>
<
Form
.
Item
name=
"community"
label=
""
>
<
Form
.
Item
name=
"community"
label=
""
>
<
SelectCommunity
/>
<
SelectCommunity
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
113bb4aa
...
@@ -251,7 +251,7 @@ const VisitorRecord = (props: any) => {
...
@@ -251,7 +251,7 @@ const VisitorRecord = (props: any) => {
Reset
Reset
</
Button
>
</
Button
>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'cal
a(100%+
16px)'
}
}
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'cal
c(100% +
16px)'
}
}
>
<
Form
.
Item
name=
"community"
label=
""
>
<
Form
.
Item
name=
"community"
label=
""
>
<
SelectCommunity
/>
<
SelectCommunity
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/runTest/Template.tsx
View file @
113bb4aa
...
@@ -22,7 +22,7 @@ const Guard = (props: any) => {
...
@@ -22,7 +22,7 @@ const Guard = (props: any) => {
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
TitleGet
title=
{
'Version 1.5.
0
'
}
/>
<
TitleGet
title=
{
'Version 1.5.
1
'
}
/>
{
/* <p>
{
/* <p>
token:{page.token}
token:{page.token}
name:{getCookie('name')}
name:{getCookie('name')}
...
...
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