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
c568b1a4
Commit
c568b1a4
authored
Sep 10, 2020
by
maple
Committed by
MrShi
Sep 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]新建小区
(cherry picked from commit
97d1d9ff
)
parent
19cc11ab
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
417 additions
and
285 deletions
+417
-285
config.ts
config/config.ts
+38
-101
FileUpload.tsx
src/components/FileUpload/FileUpload.tsx
+54
-0
Picture.tsx
src/components/PictureOptions/Picture.tsx
+2
-2
PictureOptions.tsx
src/components/PictureOptions/PictureOptions.tsx
+16
-16
PictureOptionsRow.tsx
src/components/PictureOptions/PictureOptionsRow.tsx
+8
-8
SearchOptionsCommnity.tsx
src/components/SearchOptions/SearchOptionsCommnity.tsx
+4
-4
TimeSelect.tsx
src/components/TimeSelect/TimeSelect.tsx
+9
-9
TitleGet.tsx
src/components/组件模板/TitleGet.tsx
+13
-0
index.less
src/components/组件模板/index.less
+14
-0
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+7
-3
Add.tsx
src/pages/CommunityManagement/CellList/Add.tsx
+126
-0
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+9
-1
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+44
-124
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+9
-9
Template.tsx
src/pages/runTest/Template.tsx
+2
-4
tos.ts
src/services/tos.ts
+40
-1
method.ts
src/utils/method.ts
+22
-3
No files found.
config/config.ts
View file @
c568b1a4
This diff is collapsed.
Click to expand it.
src/components/FileUpload/FileUpload.tsx
0 → 100644
View file @
c568b1a4
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Upload
,
Button
,
message
,
Row
,
Col
}
from
'antd'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
// { imageType: "tosContract", extends: extend }
//"/tos/image/upload"
import
{
Fromate2
}
from
'@/utils/method'
const
FileUpload
=
(
props
:
any
)
=>
{
const
{
value
,
onChange
}
=
props
const
[
fileList
,
setFileList
]
=
useState
([]);
const
uploadProps
=
{
accept
:
".pdf,"
,
action
:
props
.
url
,
data
:
props
.
data
,
fileList
:
fileList
,
onChange
({
file
,
fileList
})
{
let
tmp
=
fileList
setFileList
(
tmp
.
filter
(
file
=>
!!
file
.
status
))
if
(
file
.
status
==
'done'
)
{
console
.
log
(
fileList
);
message
.
success
(
file
.
name
,
3
)
if
(
props
.
reg
!=
null
)
{
onChange
(
Fromate2
(
fileList
,
props
.
reg
))
}
else
{
onChange
(
fileList
)
}
}
},
};
return
(
<>
<
Row
gutter=
{
8
}
>
<
Col
><
div
style=
{
{
lineHeight
:
2
}
}
>
{
props
.
title
}
</
div
></
Col
>
<
Col
>
<
Upload
{
...
uploadProps
}
>
<
Button
>
<
UploadOutlined
/>
Upload
</
Button
>
</
Upload
>
</
Col
>
</
Row
>
</>
);
};
export
default
FileUpload
;
src/components/PictureOptions/Picture.tsx
View file @
c568b1a4
...
@@ -22,7 +22,7 @@ const Picture = (props:any) => {
...
@@ -22,7 +22,7 @@ const Picture = (props:any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
var
tmp
=
props
.
defaultValue
var
tmp
=
props
.
defaultValue
//
console.log(tmp)
console
.
log
(
tmp
)
var
checkFlag
=
false
var
checkFlag
=
false
if
(
tmp
!=
null
)
{
if
(
tmp
!=
null
)
{
tmp
.
map
((
item
,
index
)
=>
{
tmp
.
map
((
item
,
index
)
=>
{
...
@@ -37,7 +37,7 @@ const Picture = (props:any) => {
...
@@ -37,7 +37,7 @@ const Picture = (props:any) => {
}
}
}
}
},[])
},[
props
.
defaultValue
])
const
handleCancel
=
()
=>
{
const
handleCancel
=
()
=>
{
setPreviewVisible
(
false
)
setPreviewVisible
(
false
)
}
}
...
...
src/components/PictureOptions/PictureOptions.tsx
View file @
c568b1a4
...
@@ -11,7 +11,7 @@ import Picture from './Picture';
...
@@ -11,7 +11,7 @@ import Picture from './Picture';
import
{
getUrlPicName
}
from
'../../utils/string'
;
import
{
getUrlPicName
}
from
'../../utils/string'
;
const
PictureOptions
=
(
props
:
any
)
=>
{
const
PictureOptions
=
(
props
:
any
)
=>
{
const
{
value
,
onChange
}
=
props
const
[
fileList
,
setFileList
]
=
useState
([])
const
[
fileList
,
setFileList
]
=
useState
([])
const
[
fileListLen
,
setFileListLen
]
=
useState
(
0
)
const
[
fileListLen
,
setFileListLen
]
=
useState
(
0
)
const
add
=
()
=>
{
const
add
=
()
=>
{
...
@@ -19,8 +19,10 @@ const PictureOptions = (props:any) => {
...
@@ -19,8 +19,10 @@ const PictureOptions = (props:any) => {
setFileList
(
fileList
=>
([...
fileList
,
{
index
:
fileListLen
+
1
,
name
:
null
,
pic
:
null
}]))
setFileList
(
fileList
=>
([...
fileList
,
{
index
:
fileListLen
+
1
,
name
:
null
,
pic
:
null
}]))
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
var
tmp
=
props
.
defultValue
var
tmp
=
value
if
(
tmp
!=
null
)
{
if
(
tmp
!=
null
&&
tmp
.
length
>
0
&&
(
typeof
tmp
[
0
])
==
"object"
)
{
console
.
log
(
"图片默认值"
)
console
.
log
(
tmp
)
var
initArray
=
new
Array
()
var
initArray
=
new
Array
()
tmp
.
map
((
item
:
any
,
index
:
any
)
=>
{
tmp
.
map
((
item
:
any
,
index
:
any
)
=>
{
if
(
item
.
pic
==
null
)
{
if
(
item
.
pic
==
null
)
{
...
@@ -35,21 +37,16 @@ const PictureOptions = (props:any) => {
...
@@ -35,21 +37,16 @@ const PictureOptions = (props:any) => {
status
:
"Done"
})
status
:
"Done"
})
})
})
setFileList
(
initArray
)
setFileList
(
initArray
)
props
.
putSubmit
(
CheckParm
(
initArray
))
setFileListLen
(
initArray
.
length
+
1
)
setFileListLen
(
initArray
.
length
+
1
)
}
else
{
setFileList
([{
index
:
0
,
name
:
null
,
pic
:
null
}])
}
}
},[])
},
[
value
])
const
Delete
=
(
index
:
any
,
e
:
any
)
=>
{
const
Delete
=
(
index
:
any
,
e
:
any
)
=>
{
var
tmp
=
fileList
var
tmp
=
fileList
tmp
.
splice
(
index
,
1
);
tmp
.
splice
(
index
,
1
);
// console.log("删除")
// console.log(tmp)
setFileList
(
fileList
=>
([...
tmp
]))
setFileList
(
fileList
=>
([...
tmp
]))
// console.log(fileList)
onChange
(
CheckParm
(
tmp
))
props
.
putSubmit
(
CheckParm
(
tmp
))
}
}
const
CheckParm
=
(
values
:
Array
<
any
>
)
=>
{
const
CheckParm
=
(
values
:
Array
<
any
>
)
=>
{
var
tmp
=
new
Array
()
var
tmp
=
new
Array
()
...
@@ -65,8 +62,9 @@ const PictureOptions = (props:any) => {
...
@@ -65,8 +62,9 @@ const PictureOptions = (props:any) => {
}
}
const
PictureName
=
(
index
:
any
,
values
:
any
)
=>
{
const
PictureName
=
(
index
:
any
,
values
:
any
)
=>
{
var
tmp
=
fileList
var
tmp
=
fileList
tmp
[
index
].
pic
=
values
tmp
[
index
].
pic
=
values
props
.
putSubmit
(
CheckParm
(
tmp
))
console
.
log
(
tmp
)
onChange
(
CheckParm
(
tmp
))
}
}
const
InputGet
=
(
index
:
any
,
e
:
any
)
=>
{
const
InputGet
=
(
index
:
any
,
e
:
any
)
=>
{
var
tmp
=
fileList
var
tmp
=
fileList
...
@@ -75,14 +73,16 @@ const PictureOptions = (props:any) => {
...
@@ -75,14 +73,16 @@ const PictureOptions = (props:any) => {
}
else
{
}
else
{
tmp
[
index
].
name
=
e
.
target
.
value
tmp
[
index
].
name
=
e
.
target
.
value
}
}
//
console.log(tmp)
console
.
log
(
tmp
)
props
.
putSubmit
(
CheckParm
(
tmp
))
onChange
(
CheckParm
(
tmp
))
}
}
return
(
return
(
<
div
>
<
div
>
{
{
fileList
.
map
((
item
,
index
)
=>
{
fileList
.
map
((
item
,
index
)
=>
{
console
.
log
(
index
)
console
.
log
(
item
)
return
(
return
(
<
Row
key=
{
item
.
index
}
>
<
Row
key=
{
item
.
index
}
>
<
Col
><
Picture
onSubmit=
{
PictureName
.
bind
(
this
,
index
)
}
data=
{
props
.
data
}
defaultValue=
{
[
item
]
}
disabled=
{
props
.
disabled
}
/></
Col
>
<
Col
><
Picture
onSubmit=
{
PictureName
.
bind
(
this
,
index
)
}
data=
{
props
.
data
}
defaultValue=
{
[
item
]
}
disabled=
{
props
.
disabled
}
/></
Col
>
...
...
src/components/PictureOptions/PictureOptionsRow.tsx
View file @
c568b1a4
...
@@ -22,20 +22,20 @@ const uploadButton = (
...
@@ -22,20 +22,20 @@ const uploadButton = (
</
div
>
</
div
>
);
);
import
{
getUrlPicName
}
from
'../../utils/string'
;
import
{
getUrlPicName
}
from
'../../utils/string'
;
const
PictureOptionsRow
=
(
props
:
any
)
=>
{
const
PictureOptionsRow
=
(
props
:
any
)
=>
{
// const [defa]
= props;
const
{
value
,
onChange
}
=
props
;
const
[
fileList
,
setFileList
]
=
useState
([])
const
[
fileList
,
setFileList
]
=
useState
([])
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
)
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
)
const
[
previewImage
,
setPreviewImage
]
=
useState
(
''
)
const
[
previewImage
,
setPreviewImage
]
=
useState
(
''
)
const
handleCancel
=
()
=>
setPreviewVisible
(
false
);
const
handleCancel
=
()
=>
setPreviewVisible
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
props
.
defultV
alue
!=
null
)
{
if
(
v
alue
!=
null
)
{
var
tmp
=
props
.
defultValue
;
var
tmp
=
value
var
result
=
new
Array
()
var
result
=
new
Array
()
var
resultToInside
=
new
Array
()
var
resultToInside
=
new
Array
()
tmp
.
map
((
item
,
index
)
=>
{
tmp
.
map
((
item
:
any
,
index
:
any
)
=>
{
if
(
item
.
name
==
null
)
{
if
(
item
.
name
==
null
)
{
item
.
name
=
getUrlPicName
(
item
.
url
)
item
.
name
=
getUrlPicName
(
item
.
url
)
item
.
uid
=
index
item
.
uid
=
index
...
@@ -44,7 +44,7 @@ const PictureOptionsRow = (props:any) => {
...
@@ -44,7 +44,7 @@ const PictureOptionsRow = (props:any) => {
resultToInside
.
push
(
item
.
name
)
resultToInside
.
push
(
item
.
name
)
})
})
setFileList
(
result
)
setFileList
(
result
)
props
.
putSubmit
(
resultToInside
)
onChange
(
resultToInside
)
}
}
},
[])
},
[])
...
@@ -54,7 +54,7 @@ const PictureOptionsRow = (props:any) => {
...
@@ -54,7 +54,7 @@ const PictureOptionsRow = (props:any) => {
}
}
setPreviewImage
(
file
.
url
||
file
.
preview
)
setPreviewImage
(
file
.
url
||
file
.
preview
)
setPreviewVisible
(
true
)
setPreviewVisible
(
true
)
}
;
}
const
handleChange
=
({
file
,
fileList
})
=>
{
const
handleChange
=
({
file
,
fileList
})
=>
{
...
@@ -64,7 +64,7 @@ const PictureOptionsRow = (props:any) => {
...
@@ -64,7 +64,7 @@ const PictureOptionsRow = (props:any) => {
fileList
.
map
((
item
,
index
)
=>
{
fileList
.
map
((
item
,
index
)
=>
{
result
.
push
(
item
.
name
)
result
.
push
(
item
.
name
)
})
})
props
.
putSubmit
(
result
)
onChange
(
result
)
}
}
const
beforeUpload
=
(
file
:
any
)
=>
{
const
beforeUpload
=
(
file
:
any
)
=>
{
if
(
file
.
type
===
'image/png'
||
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/jpg'
)
{
if
(
file
.
type
===
'image/png'
||
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/jpg'
)
{
...
...
src/components/SearchOptions/SearchOptionsCommnity.tsx
View file @
c568b1a4
...
@@ -5,7 +5,7 @@ import SearchOptions from './SearchOptions';
...
@@ -5,7 +5,7 @@ import SearchOptions from './SearchOptions';
const
SearchOptionsCommnity
=
(
props
:
any
)
=>
{
const
SearchOptionsCommnity
=
(
props
:
any
)
=>
{
const
{
dispatch
,
CommunityList
,
defaultValue
,
placeholder
,
disabled
}
=
props
;
const
{
dispatch
,
CommunityList
,
defaultValue
,
placeholder
,
disabled
,
value
,
onChange
}
=
props
;
const
tosCommunityget
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'Init/tosCommunityget'
,
playload
:
values
})};
const
tosCommunityget
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'Init/tosCommunityget'
,
playload
:
values
})};
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -16,12 +16,12 @@ const SearchOptionsCommnity = (props: any) => {
...
@@ -16,12 +16,12 @@ const SearchOptionsCommnity = (props: any) => {
const
extendName
=
(
values
:
any
)
=>
{
const
extendName
=
(
values
:
any
)
=>
{
// console.log(values)
props
.
onSubmit
(
values
);
onChange
(
values
);
}
}
return
(
return
(
<>
{
CommunityList
!=
null
?
<>
{
CommunityList
!=
null
?
<
SearchOptions
disabled=
{
disabled
}
placeholder=
{
placeholder
}
defaultValue=
{
defaultV
alue
}
list=
{
CommunityList
}
onSubmit=
{
extendName
}
/>
<
SearchOptions
disabled=
{
disabled
}
placeholder=
{
placeholder
}
defaultValue=
{
v
alue
}
list=
{
CommunityList
}
onSubmit=
{
extendName
}
/>
:
null
:
null
}
}
</>
</>
...
...
src/components/TimeSelect/TimeSelect.tsx
View file @
c568b1a4
...
@@ -30,19 +30,19 @@ const TimeSelect = (props:any) => {
...
@@ -30,19 +30,19 @@ const TimeSelect = (props:any) => {
}
else
if
(
type
==
1
&&
buttonNum
.
ButtonNum
==
0
)
{
}
else
if
(
type
==
1
&&
buttonNum
.
ButtonNum
==
0
)
{
buttonNum
.
ButtonNum
+=
1
buttonNum
.
ButtonNum
+=
1
}
}
console
.
log
(
buttonNum
)
//
console.log(buttonNum)
setCurString
(
buttonNum
)
setCurString
(
buttonNum
)
}
}
const
saveResult
=
(
values
:
any
)
=>
{
const
saveResult
=
(
values
:
any
)
=>
{
var
tmp
=
curString
var
tmp
=
curString
tmp
.
resultList
=
values
tmp
.
resultList
=
values
setCurString
(
tmp
)
setCurString
(
tmp
)
console
.
log
(
"这里"
)
//
console.log("这里")
console
.
log
(
curString
)
//
console.log(curString)
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
"时段选择器"
)
//
console.log("时段选择器")
console
.
log
(
defaultValue
)
//
console.log(defaultValue)
if
(
defaultValue
!=
null
)
{
if
(
defaultValue
!=
null
)
{
var
tmp
=
defaultValue
var
tmp
=
defaultValue
var
result
=
new
Array
()
var
result
=
new
Array
()
...
@@ -53,7 +53,7 @@ const TimeSelect = (props:any) => {
...
@@ -53,7 +53,7 @@ const TimeSelect = (props:any) => {
setTimesLen
(
result
.
length
)
setTimesLen
(
result
.
length
)
var
resultList
=
CheckParm
(
result
)
var
resultList
=
CheckParm
(
result
)
saveResult
(
resultList
)
saveResult
(
resultList
)
console
.
log
(
resultList
)
//
console.log(resultList)
props
.
putSubmit
(
resultList
)
props
.
putSubmit
(
resultList
)
}
}
},
[
defaultValue
]);
},
[
defaultValue
]);
...
@@ -84,7 +84,7 @@ const TimeSelect = (props:any) => {
...
@@ -84,7 +84,7 @@ const TimeSelect = (props:any) => {
showBtn
(
1
)
showBtn
(
1
)
}
}
saveResult
(
resultList
)
saveResult
(
resultList
)
console
.
log
(
resultList
)
//
console.log(resultList)
props
.
putSubmit
(
resultList
)
props
.
putSubmit
(
resultList
)
}
}
const
timeForm
=
(
values
:
any
)
=>
{
const
timeForm
=
(
values
:
any
)
=>
{
...
@@ -108,8 +108,8 @@ const TimeSelect = (props:any) => {
...
@@ -108,8 +108,8 @@ const TimeSelect = (props:any) => {
const
timeChange
=
(
index
:
any
,
values
:
any
)
=>
{
const
timeChange
=
(
index
:
any
,
values
:
any
)
=>
{
var
tmp
=
times
;
var
tmp
=
times
;
console
.
log
(
"Maple诊断"
+
index
)
//
console.log("Maple诊断"+index)
console
.
log
(
values
)
//
console.log(values)
if
(
values
!=
null
)
{
if
(
values
!=
null
)
{
tmp
[
index
].
time
=
timeForm
(
values
)
tmp
[
index
].
time
=
timeForm
(
values
)
}
else
{
}
else
{
...
...
src/components/组件模板/TitleGet.tsx
0 → 100644
View file @
c568b1a4
import
React
from
'react'
;
import
styles
from
'./index.less'
;
const
TitleGet
=
(
props
:
any
)
=>
{
return
(
<>
<
div
className=
{
styles
.
item
}
>
{
props
.
title
}
</
div
>
</>
);
};
export
default
TitleGet
;
src/components/组件模板/index.less
0 → 100644
View file @
c568b1a4
// 线栏
.font{
border-left: 5px solid rgba(24,144,255,1);
font-family:'Source Han Sans CN';
font-size: 18px;
font-weight: 600;
color: #000000;
}
.item{
.font();
text-indent: 15px;
}
\ No newline at end of file
src/models/CommunityManagement/FacilityBookings.ts
View file @
c568b1a4
...
@@ -4,6 +4,7 @@ import { Link, useIntl, connect, Dispatch, history } from 'umi';
...
@@ -4,6 +4,7 @@ import { Link, useIntl, connect, Dispatch, history } from 'umi';
import
{
routerRedux
}
from
'dva/router'
import
{
routerRedux
}
from
'dva/router'
import
{
Fromate
}
from
'@/utils/method'
export
default
{
export
default
{
namespace
:
'FacilityBookings'
,
namespace
:
'FacilityBookings'
,
state
:
{
state
:
{
...
@@ -113,6 +114,8 @@ export default {
...
@@ -113,6 +114,8 @@ export default {
}
break
;
}
break
;
case
7
:
{
case
7
:
{
let
tmp
=
resp
.
data
;
let
tmp
=
resp
.
data
;
const
reg
=
[[
"url"
,
"categoriesImageUrl"
],
[
"name"
,
"categoriesName"
]]
const
reg2
=
[[
"url"
,
null
]]
let
sourceData
=
{
let
sourceData
=
{
canReservationDay
:
tmp
.
canReservationDay
,
canReservationDay
:
tmp
.
canReservationDay
,
canReservationNum
:
tmp
.
canReservationNum
,
canReservationNum
:
tmp
.
canReservationNum
,
...
@@ -125,10 +128,11 @@ export default {
...
@@ -125,10 +128,11 @@ export default {
nomarginCancelReservationDay
:
tmp
.
nomarginCancelReservationDay
,
nomarginCancelReservationDay
:
tmp
.
nomarginCancelReservationDay
,
periodType
:
tmp
.
periodType
,
periodType
:
tmp
.
periodType
,
reservationQuantumTime
:
tmp
.
reservationQuantumTime
,
reservationQuantumTime
:
tmp
.
reservationQuantumTime
,
facilitiesImageList
:
tmp
.
facilitiesImageList
,
categoriesName
:
Fromate
(
tmp
.
categoriesList
,
reg
)
,
categories
List
:
tmp
.
categoriesList
,
categories
DetailsImageName
:
Fromate
(
tmp
.
facilitiesImageList
,
reg2
)
}
}
// console.log(sourceData)
console
.
log
(
sourceData
)
console
.
log
(
"##############################"
)
yield
put
({
type
:
'returnSource'
,
sourceData
});
yield
put
({
type
:
'returnSource'
,
sourceData
});
}
break
;
}
break
;
case
8
:
{
case
8
:
{
...
...
src/pages/CommunityManagement/CellList/Add.tsx
0 → 100644
View file @
c568b1a4
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Tabs
,
Form
,
InputNumber
,
Col
,
Button
,
Row
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
}
from
'umi'
;
const
layout
=
{
labelCol
:
{
span
:
2
},
// wrapperCol: { span: 8 },
};
import
{
RA
}
from
'@/utils/method'
;
const
module
=
"CellList"
// const params=[
// ["residentialName":"A8",]
// ["residentialAddress":"TianHe Road No.28"]
// ["residentialHotline":"hotline"]
// ["residentialPhone":"200-8888888"]
// ["residentialEmail":"sales@huahuico.com"]
// ["residentialManagerUserName":"Mr Chen"]
// ["residentialHotlineName":"200-22122221"]
// [ "balouscheduleFile":["A.pdf"],]
// [ "serviceGuideFile":["B.pdf"],]
// ["lifeServiceFile": ["C.pdf"]]
// ]
// 小区名
// #工作时间
// 小区联系方式
// 小区管理员
// 楼巴时刻表
// 物业办事指南
// 保质期服务
// 帮助中心
import
FileUpload
from
'@/components/FileUpload/FileUpload'
import
TitleBack
from
'@/components/TitleBack/TitleBack'
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
import
Line
from
'@/components/Line/Line'
;
const
Add
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
}
=
props
;
const
formRef
=
useRef
(
null
)
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
RA
(
29
,
values
,
module
,
dispatch
);
}
useEffect
(()
=>
{
},[])
const
validateMessages
=
{
required
:
'${label} is required!'
,
types
:
{
email
:
'${label} is not validate email!'
,
number
:
'${label} is not a validate number!'
,
string
:
'${label} is not a validate number!'
},
string
:
{
range
:
'${label} must be between ${min} and ${max}'
,
},
number
:
{
range
:
'${label} must be between ${min} and ${max}'
,
},
}
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
<
TitleBack
title=
"Add Commnunity Infomation"
></
TitleBack
>
<
Form
ref=
{
formRef
}
{
...
layout
}
name=
"nest-messages"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Form
.
Item
name=
{
"name"
}
label=
"小区名"
rules=
{
[{
required
:
true
}]
}
><
SearchOptionsCommnity
/></
Form
.
Item
>
<
Form
.
Item
name=
{
"zipcode"
}
label=
"邮编"
rules=
{
[]
}
><
Input
style=
{
{
width
:
200
}
}
/></
Form
.
Item
>
<
Form
.
Item
name=
{
"residentialAddress"
}
label=
"地址"
rules=
{
[]
}
><
Input
style=
{
{
width
:
300
}
}
/></
Form
.
Item
>
<
Form
.
Item
label=
"小区联系方式"
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
style=
{
{
display
:
'inline-block'
,
width
:
'200'
}
}
name=
{
"residentialPhone"
}
rules=
{
[]
}
><
Input
placeholder=
"小区联系电话"
/></
Form
.
Item
>
<
Form
.
Item
style=
{
{
display
:
'inline-block'
,
width
:
'200'
,
marginLeft
:
20
}
}
name=
{
"residentialEmail"
}
rules=
{
[]
}
><
Input
placeholder=
"小区联系邮箱"
/></
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name=
{
"residentialManagerUserName"
}
label=
"小区管理人员"
rules=
{
[]
}
><
Input
style=
{
{
width
:
200
}
}
/></
Form
.
Item
>
<
Line
/>
<
Form
.
Item
label=
"帮助中心"
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
style=
{
{
display
:
'inline-block'
,
width
:
'200'
}
}
name=
{
"residentialHotlineName"
}
rules=
{
[]
}
><
Input
placeholder=
"热线电话名称"
/></
Form
.
Item
>
<
Form
.
Item
style=
{
{
display
:
'inline-block'
,
width
:
'200'
,
marginLeft
:
20
}
}
name=
{
"residentialHotline"
}
rules=
{
[]
}
><
Input
placeholder=
"热线电话"
/></
Form
.
Item
>
</
Form
.
Item
>
<
Line
/>
<
Form
.
Item
wrapperCol=
{
{
...
layout
.
wrapperCol
,
offset
:
2
}
}
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
style=
{
{
display
:
'inline-block'
,
width
:
'200'
}
}
name=
{
"balouscheduleFile"
}
><
FileUpload
title=
"choose"
url=
{
"/tos/image/upload"
}
data=
{
{
imageType
:
"tosCreateCommunity"
,
extends
:
"A9"
}
}
reg=
"name"
/></
Form
.
Item
>
<
Form
.
Item
style=
{
{
display
:
'inline-block'
,
width
:
'200'
,
marginLeft
:
100
}
}
name=
{
"serviceGuideFile"
}
><
FileUpload
title=
"choose"
url=
{
"/tos/image/upload"
}
data=
{
{
imageType
:
"tosCreateCommunity"
,
extends
:
"A9"
}
}
reg=
"name"
/></
Form
.
Item
>
<
Form
.
Item
style=
{
{
display
:
'inline-block'
,
width
:
'200'
,
marginLeft
:
100
}
}
name=
{
"lifeServiceFile"
}
><
FileUpload
title=
"choose"
url=
{
"/tos/image/upload"
}
data=
{
{
imageType
:
"tosCreateCommunity"
,
extends
:
"A9"
}
}
reg=
"name"
/></
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
wrapperCol=
{
{
...
layout
.
wrapperCol
,
offset
:
2
}
}
><
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
></
Form
.
Item
>
</
Form
>
</
div
>
);
};
function
map
(
state
:
any
)
{
const
{
Data
}
=
state
[
module
]
return
{
Data
}
}
export
default
connect
(
map
)(
Add
);
{
/* "zipcode":"510000"
"residentialName":"A8",
"residentialAddress":"TianHe Road No.28",
"residentialHotline":"hotline",
"residentialPhone":"200-8888888",
"residentialEmail":"sales@huahuico.com",
"residentialManagerUserName":"Mr Chen",
"residentialHotlineName":"200-22122221",
"balouscheduleFile":["A.pdf"],
"serviceGuideFile":["B.pdf"],
"lifeServiceFile":["C.pdf"] */
}
\ No newline at end of file
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
c568b1a4
...
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
...
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
}
from
'antd'
;
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
const
columns
=
[
const
columns
=
[
...
@@ -45,12 +45,20 @@ const CellList = (props:any) => {
...
@@ -45,12 +45,20 @@ const CellList = (props:any) => {
const
CallbackSearch
=
(
values
:
any
)
=>
{
const
CallbackSearch
=
(
values
:
any
)
=>
{
RA
(
24
,
{
communityName
:
values
},
module
,
dispatch
);
RA
(
24
,
{
communityName
:
values
},
module
,
dispatch
);
}
}
const
goToAdd
=
()
=>
{
history
.
push
(
"./CellList/add"
);
}
return
(
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
{
{
Data
!=
null
?
<>
Data
!=
null
?
<>
{
/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */
}
{
/* <TitleSearch listkey={['communityName']} list={['Community Name']} onSubmit={CallBackTitleSearch}/> */
}
<
SearchOptionsCommnity
onSubmit=
{
CallbackSearch
}
/>
<
SearchOptionsCommnity
onSubmit=
{
CallbackSearch
}
/>
<
div
style=
{
{
height
:
80
,
position
:
"relative"
}
}
>
<
div
style=
{
{
position
:
"absolute"
,
right
:
0
}
}
>
<
Button
type=
"primary"
onClick=
{
goToAdd
}
>
Create new Community
</
Button
>
</
div
>
</
div
>
<
Table
loading=
{
false
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
<
Table
loading=
{
false
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data
.
rows
}
dataSource=
{
Data
.
rows
}
columns=
{
columnsVal
}
columns=
{
columnsVal
}
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
c568b1a4
...
@@ -20,7 +20,7 @@ import SearchOptionsCommnity from '../../../components/SearchOptions/SearchOptio
...
@@ -20,7 +20,7 @@ import SearchOptionsCommnity from '../../../components/SearchOptions/SearchOptio
// reservationQuantumTime: ["09:00-07:00"]
// reservationQuantumTime: ["09:00-07:00"]
import
{
getUrlLast
,
numberToString
}
from
'../../../utils/string'
import
{
getUrlLast
,
numberToString
}
from
'../../../utils/string'
import
{
checkParam
}
from
'@/utils/method'
const
Facility
=
(
props
:
any
)
=>
{
const
Facility
=
(
props
:
any
)
=>
{
...
@@ -28,8 +28,7 @@ const Facility = (props:any) => {
...
@@ -28,8 +28,7 @@ const Facility = (props:any) => {
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
const
ResultClear
=
()
=>
{
dispatch
({
type
:
'FacilityBookings/ResultClear'
})}
const
ResultClear
=
()
=>
{
dispatch
({
type
:
'FacilityBookings/ResultClear'
})}
const
[
Ref1
,
setRef1
]
=
useState
([])
const
[
Ref2
,
setRef2
]
=
useState
([])
const
[
Ref3
,
setRef3
]
=
useState
([])
const
[
Ref3
,
setRef3
]
=
useState
([])
const
[
extend
,
setExtend
]
=
useState
(
null
)
const
[
extend
,
setExtend
]
=
useState
(
null
)
...
@@ -40,31 +39,9 @@ const Facility = (props:any) => {
...
@@ -40,31 +39,9 @@ const Facility = (props:any) => {
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
const
picFromate
=
(
values
:
any
)
=>
{
var
result
=
new
Array
()
if
(
values
!=
null
)
{
values
.
map
((
item
:
any
,
index
:
any
)
=>
{
result
.
push
({
url
:
item
})
})
}
return
result
}
const
picFromate2
=
(
values
:
any
)
=>
{
var
result
=
new
Array
()
if
(
values
!=
null
)
{
values
.
map
((
item
:
any
,
index
:
any
)
=>
{
result
.
push
({
url
:
item
.
categoriesImageUrl
,
name
:
item
.
categoriesName
})
})
}
console
.
log
(
result
)
return
result
}
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
console
.
log
(
"页面
请求
"
)
console
.
log
(
"页面
结果
"
)
console
.
log
(
Result
)
console
.
log
(
Result
)
ResultClear
()
ResultClear
()
history
.
push
(
"/CommunityManagement/FacilityBookings"
)
history
.
push
(
"/CommunityManagement/FacilityBookings"
)
...
@@ -84,15 +61,13 @@ const Facility = (props:any) => {
...
@@ -84,15 +61,13 @@ const Facility = (props:any) => {
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
sourceData
!=
null
)
{
if
(
sourceData
!=
null
)
{
console
.
log
(
"
当前数据不为空
"
)
console
.
log
(
"
【传入详情,当前数据不为空】
"
)
console
.
log
(
sourceData
)
console
.
log
(
sourceData
)
setExtend
(
sourceData
.
communityName
)
setExtend
(
sourceData
.
communityName
)
setTimeExtend
(
sourceData
.
reservationQuantumTime
)
setTimeExtend
(
sourceData
.
reservationQuantumTime
)
// 中断
// 中断
var
data
=
sourceData
.
facilitiesImageList
// setPictrueExtend({tab:null,pic:null,pics:null})
var
data2
=
sourceData
.
categoriesList
setPictrueExtend
({
tab
:
null
,
pic
:
picFromate2
(
data2
),
pics
:
picFromate
(
data
)})
formRef
.
current
.
setFieldsValue
(
sourceData
)
formRef
.
current
.
setFieldsValue
(
sourceData
)
}
}
},
[
sourceData
])
},
[
sourceData
])
...
@@ -117,42 +92,21 @@ const Facility = (props:any) => {
...
@@ -117,42 +92,21 @@ const Facility = (props:any) => {
setPATHNAME
(
"Add Facility"
)
setPATHNAME
(
"Add Facility"
)
}
}
},[])
},[])
const
PictureOptionsRef
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
setRef1
(
values
)
}
const
TimeSelectRef
=
(
values
:
any
)
=>
{
const
TimeSelectRef
=
(
values
:
any
)
=>
{
// console.log(values)
// console.log(values)
setRef3
(
values
)
setRef3
(
values
)
}
}
const
PictureOptionsRowRef
=
(
values
:
any
)
=>
{
// console.log(values)
setRef2
(
values
)
}
const
checkParam
=
(
values
:
any
)
=>
{
var
flag
=
true
for
(
var
i
in
values
)
{
// console.log(values[i]);
if
(
values
[
i
]
==
null
)
{
flag
=
false
}
else
{
if
(
values
[
i
].
length
==
0
){
flag
=
false
}
}
}
return
flag
}
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
var
result
=
values
var
result
=
values
result
.
communityName
=
extend
result
.
categoriesName
=
Ref1
result
.
categoriesDetailsImageName
=
Ref2
if
(
Ref3
.
length
!=
0
)
{
if
(
Ref3
.
length
!=
0
)
{
result
.
reservationQuantumTime
=
Ref3
result
.
reservationQuantumTime
=
Ref3
}
else
{
}
else
{
result
.
reservationQuantumTime
=
[
"09:00-20:00"
]
result
.
reservationQuantumTime
=
[
"09:00-20:00"
]
}
}
result
.
categoriesOpenTime
=
"09:00-20:00"
result
.
categoriesOpenTime
=
"09:00-20:00"
if
(
result
.
communityManagerFee
==
null
)
{
if
(
result
.
communityManagerFee
==
null
)
{
result
.
communityManagerFee
=
numberToString
(
0
)
result
.
communityManagerFee
=
numberToString
(
0
)
...
@@ -172,10 +126,10 @@ const Facility = (props:any) => {
...
@@ -172,10 +126,10 @@ const Facility = (props:any) => {
if
(
checkParam
(
result
))
{
if
(
checkParam
(
result
))
{
console
.
log
(
'Success:'
,
result
);
console
.
log
(
'Success:'
,
result
);
//中断
//中断
if
(
pictrueExtend
.
tab
==
3
)
{
if
(
pictrueExtend
.
tab
==
3
)
{
console
.
log
(
"提交"
)
if
(
Result
==
null
)
{
if
(
Result
==
null
)
{
RA
(
6
,
result
);
console
.
log
(
"提交"
)
// RA(6, result);
}
}
}
else
{
}
else
{
result
.
id
=
DataSave
.
id
result
.
id
=
DataSave
.
id
...
@@ -190,12 +144,15 @@ const Facility = (props:any) => {
...
@@ -190,12 +144,15 @@ const Facility = (props:any) => {
}
else
{
message
.
error
(
"Error,Please finish it,not empty!"
,
3
)}
}
else
{
message
.
error
(
"Error,Please finish it,not empty!"
,
3
)}
};
};
const
onBillChange
=
(
values
:
any
,
allValues
:
any
)
=>
{
if
(
values
[
"communityName"
]
!=
null
)
{
setExtend
(
values
[
"communityName"
])
}
}
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
console
.
log
(
'Failed:'
,
errorInfo
);
};
};
const
extendName
=
(
values
:
any
)
=>
{
setExtend
(
values
)
}
const
Subscribe
=
()
=>
{
const
Subscribe
=
()
=>
{
history
.
push
(
getUrlLast
(
location
.
pathname
)
+
"/FacilityApply"
)
history
.
push
(
getUrlLast
(
location
.
pathname
)
+
"/FacilityApply"
)
}
}
...
@@ -218,16 +175,19 @@ const Facility = (props:any) => {
...
@@ -218,16 +175,19 @@ const Facility = (props:any) => {
formRef
.
current
.
setFieldsValue
(
tmp
)
formRef
.
current
.
setFieldsValue
(
tmp
)
}
}
const
test
=
()
=>
{
console
.
log
(
extend
)
}
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件v1.2 */
}
{
/* 头部组件v1.2 */
}
<
TitleBack
title=
{
PATHNAME
}
url=
{
getUrlLast
(
location
.
pathname
)
+
"?Facility=true"
}
/>
<
TitleBack
title=
{
PATHNAME
}
url=
{
getUrlLast
(
location
.
pathname
)
+
"?Facility=true"
}
/>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
onValuesChange=
{
onBillChange
}
>
<
Row
gutter=
{
32
}
>
<
Row
gutter=
{
32
}
>
<
Col
>
所属小区
</
Col
>
<
Col
>
所属小区
</
Col
>
<
Col
><
SearchOptionsCommnity
defaultValue=
{
extend
}
onSubmit=
{
extendName
}
disabled=
{
pictrueExtend
.
tab
!=
3
?
true
:
false
}
/
></
Col
>
<
Col
><
Form
.
Item
name=
"communityName"
><
SearchOptionsCommnity
disabled=
{
pictrueExtend
.
tab
!=
3
?
true
:
false
}
/></
Form
.
Item
></
Col
>
</
Row
>
</
Row
>
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
<
Col
>
设施名称
</
Col
>
<
Col
>
设施名称
</
Col
>
...
@@ -240,74 +200,34 @@ const Facility = (props:any) => {
...
@@ -240,74 +200,34 @@ const Facility = (props:any) => {
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
{
{
extend
!=
null
?
extend
!=
null
?<>
<><
Col
>
设施品类
</
Col
>
<
Col
>
设施品类
</
Col
>
<
Col
>
<
Col
>
{
<
Form
.
Item
name=
"categoriesName"
>
pictrueExtend
.
pic
!=
null
<
PictureOptions
disabled=
{
facilityDetail
}
?
data=
{
{
<
PictureOptions
disabled=
{
facilityDetail
}
defultValue=
{
[]
}
putSubmit=
{
PictureOptionsRef
}
userToken
:
token
,
imageType
:
'categoriesImageName'
,
data=
{
{
extends
:
extend
,
userToken
:
token
,
}
}
/></
Form
.
Item
>
</
Col
>
imageType
:
'categoriesImageName'
,
extends
:
extend
,
}
}
defultValue=
{
pictrueExtend
.
pic
}
/>
:
null
}
{
pictrueExtend
.
tab
==
3
?
<>
<
PictureOptions
disabled=
{
facilityDetail
}
defultValue=
{
[]
}
putSubmit=
{
PictureOptionsRef
}
data=
{
{
userToken
:
token
,
imageType
:
'categoriesImageName'
,
extends
:
extend
,
}
}
/>
</>
:
null
}
</
Col
>
</>
:
null
</>
:
null
}
}
</
Row
>
</
Row
>
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
{
{
extend
!=
null
?
extend
!=
null
?
<>
<
Col
>
设施详情
</
Col
>
<
Col
>
设施详情
</
Col
>
:
null
<
Col
>
}
<
Form
.
Item
name=
"categoriesDetailsImageName"
>
{
/* 未完成 */
}
<
PictureOptionsRow
disabled=
{
facilityDetail
}
<
Col
>
data=
{
{
{
userToken
:
token
,
pictrueExtend
.
pics
!=
null
imageType
:
'categoriesDetailsImageName'
,
?
extends
:
extend
,
<
PictureOptionsRow
disabled=
{
facilityDetail
}
putSubmit=
{
PictureOptionsRowRef
}
data=
{
{
}
}
/></
Form
.
Item
></
Col
>
userToken
:
token
,
imageType
:
'categoriesDetailsImageName'
,
extends
:
extend
,
}
}
defultValue=
{
pictrueExtend
.
pics
}
/>
:
null
}
{
pictrueExtend
.
tab
==
3
?
<>
{
extend
!=
null
?
<
PictureOptionsRow
disabled=
{
facilityDetail
}
putSubmit=
{
PictureOptionsRowRef
}
data=
{
{
userToken
:
token
,
imageType
:
'categoriesDetailsImageName'
,
extends
:
extend
,
}
}
/>
:
null
}
</>
</>
:
null
:
null
}
}
</
Col
>
</
Row
>
</
Row
>
<
Line
/>
<
Line
/>
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
<
Row
gutter=
{
32
}
style=
{
{
marginTop
:
28
}
}
>
...
...
src/pages/ContractManagement/ContractContent.tsx
View file @
c568b1a4
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./ContractContent.less'
;
import
styles
from
'./ContractContent.less'
;
import
{
Input
,
Form
,
Table
,
Space
,
Pagination
,
Tooltip
,
message
}
from
'antd'
;
import
{
Input
,
Form
,
Table
,
Space
,
Pagination
,
Tooltip
,
message
}
from
'antd'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
DatePicker
}
from
'antd'
;
import
{
DatePicker
}
from
'antd'
;
import
{
Upload
,
Button
}
from
'antd'
;
import
{
Upload
,
Button
}
from
'antd'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
LINE
from
'../../components/Line/Line'
;
import
LINE
from
'../../components/Line/Line'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
...
@@ -62,13 +62,13 @@ const ContractContent = (props: any) => {
...
@@ -62,13 +62,13 @@ const ContractContent = (props: any) => {
if
(
editFlag
)
{
if
(
editFlag
)
{
setExtend
(
DataSaveDetail
.
communityName
)
setExtend
(
DataSaveDetail
.
communityName
)
var
result
=
new
Array
()
var
result
=
new
Array
()
if
(
DataSaveDetail
.
fileUrls
!=
null
)
{
//
if (DataSaveDetail.fileUrls != null) {
DataSaveDetail
.
fileUrls
.
map
((
item
:
any
,
index
:
any
)
=>
{
// DataSaveDetail.contractFileName
.map((item:any, index:any) => {
result
.
push
({
uid
:
index
,
name
:
item
})
//
result.push({ uid: index,name:item })
})
//
})
}
//
}
setFileList
(
result
)
setFileList
(
[{
uid
:
1
,
name
:
DataSaveDetail
.
contractFileName
}]
)
formRef
.
current
.
setFieldsValue
({
formRef
.
current
.
setFieldsValue
({
contractFileName
:
"cleanFiles"
,
contractFileName
:
"cleanFiles"
,
...
@@ -180,7 +180,7 @@ const ContractContent = (props: any) => {
...
@@ -180,7 +180,7 @@ const ContractContent = (props: any) => {
)
:
(
)
:
(
<
div
className=
{
styles
.
box7
}
>
<
div
className=
{
styles
.
box7
}
>
<
div
className=
{
styles
.
box7item1
}
>
Contract
</
div
>
<
div
className=
{
styles
.
box7item1
}
>
Contract
</
div
>
<
div
className=
{
styles
.
box7item2
}
>
.PDF
</
div
>
<
div
className=
{
styles
.
box7item2
}
>
{
DataSaveDetail
!=
null
?
DataSaveDetail
.
contractFileName
:
null
}
</
div
>
<
div
className=
{
styles
.
box7item3
}
><
a
href=
{
DataSaveDetail
!=
null
?
DataSaveDetail
.
fileUrls
:
null
}
>
Preview
</
a
></
div
>
<
div
className=
{
styles
.
box7item3
}
><
a
href=
{
DataSaveDetail
!=
null
?
DataSaveDetail
.
fileUrls
:
null
}
>
Preview
</
a
></
div
>
</
div
>
</
div
>
)
)
...
...
src/pages/runTest/Template.tsx
View file @
c568b1a4
...
@@ -32,10 +32,8 @@ const Guard = (props:any) => {
...
@@ -32,10 +32,8 @@ const Guard = (props:any) => {
);
);
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
TitleGet
title=
{
"Version 1.0.7"
}
/>
<
TitleGet
title=
{
"Version 1.0.6"
}
/>
<
p
>
<
p
>
token:
{
page
.
token
}
token:
{
page
.
token
}
</
p
>
</
p
>
...
...
src/services/tos.ts
View file @
c568b1a4
...
@@ -90,7 +90,9 @@ const requestList = [
...
@@ -90,7 +90,9 @@ const requestList = [
[
"/tos/tosCommunity/get"
,
"24 获取小区列表"
],
[
"/tos/tosCommunity/get"
,
"24 获取小区列表"
],
[
"/tos/tosCommunityNotic/get"
,
"25 获取小区公告列表"
],
[
"/tos/tosCommunityNotic/get"
,
"25 获取小区公告列表"
],
[
"/tos/tosVisitorRecord/get"
,
"26 获取访客记录列表"
],
[
"/tos/tosVisitorRecord/get"
,
"26 获取访客记录列表"
],
[
"/tos/contract/add"
,
"27 合同新增和编辑"
],
[
"/tos/contract/add"
,
"27 合同新增和编辑"
],
[
"/tos/tosCommunityNotic/add"
,
"28 新增小区公告接口"
],
[
"/tos/tosManageCommunity/save"
,
"29 新建一个小区"
]
]
]
const
params
=
[
const
params
=
[
...
@@ -113,3 +115,40 @@ export function RA(playload: any) {
...
@@ -113,3 +115,40 @@ export function RA(playload: any) {
// console.log(playload)
// console.log(playload)
// console.log(playload.index)
// console.log(playload.index)
// console.log(requestList[playload.index])
// console.log(requestList[playload.index])
// http://47.74.233.180:8651/tos/tosCommunityNotic/add
// {
// "noticTitle":"Garden公告",
// "communityNum":"珠江丽景小区",
// "noticText":"今晚晚上停水4小时",
// "noticScope":"1",
// "noticStartTime":"2020-07-01 12:30:00",
// "noticEndTime":"2020-08-01 9:30:00",
// "file":["A.jpg"]
// }
//新增小区公告接口文件上传 http://47.74.233.180:8651/tos/image/upload imageType 参数值为 tosNotice
// 48、新建一个小区
// http://47.74.233.180:8651/tos/tosManageCommunity/save
// {
// "residentialName":"A8",
// "residentialAddress":"TianHe Road No.28",
// "residentialHotline":"hotline",
// "residentialPhone":"200-8888888",
// "residentialEmail":"sales@huahuico.com",
// "residentialManagerUserName":"Mr Chen",
// "residentialHotlineName":"200-22122221",
// "balouscheduleFile":["A.pdf"],
// "serviceGuideFile":["B.pdf"],
// "lifeServiceFile":["C.pdf"]
// }
// 49、新建一个小区-上传楼巴办事指南
// http://localhost:8651/tos/image/upload
// imageType 值为 tosCreateCommunity
// extends 值为 对应小区名 如 A9
src/utils/method.ts
View file @
c568b1a4
...
@@ -14,6 +14,7 @@ export const checkParam = (values: any) => {
...
@@ -14,6 +14,7 @@ export const checkParam = (values: any) => {
return
flag
return
flag
}
}
// onBlur={checkInput} maxLength={33}
// onBlur={checkInput} maxLength={33}
export
const
checkInput
=
(
e
:
any
)
=>
{
export
const
checkInput
=
(
e
:
any
)
=>
{
// console.log(e)
// console.log(e)
...
@@ -55,14 +56,32 @@ export const setCookie=(key:string,value: string)=>{
...
@@ -55,14 +56,32 @@ export const setCookie=(key:string,value: string)=>{
export
const
RA
=
(
index
:
any
,
values
:
any
,
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
export
const
RA
=
(
index
:
any
,
values
:
any
,
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
const
Fromate
=
(
values
:
any
,
valuesForm
)
=>
{
// const reg = [["url", "categoriesImageUrl"], ["name", "categoriesName"]]
// const values = [{ categoriesImageUrl: "http://url", categoriesName: "A9" },{ categoriesImageUrl: "http://url...", categoriesName: "A8" }]
export
const
Fromate
=
(
values
:
any
,
reg
:
any
)
=>
{
var
result
=
new
Array
()
var
result
=
new
Array
()
if
(
values
!=
null
)
{
if
(
values
!=
null
)
{
values
.
map
((
item
:
any
,
index
:
any
)
=>
{
values
.
map
((
item
:
any
,
index
:
any
)
=>
{
result
.
push
({
uid
:
index
,
name
:
item
.
categoriesName
})
var
obj
=
{}
for
(
var
i
=
0
;
i
<
reg
.
length
;
i
++
){
if
(
reg
[
i
][
1
]
==
null
)
{
obj
[
reg
[
i
][
0
]]
=
item
}
else
{
obj
[
reg
[
i
][
0
]]
=
item
[
reg
[
i
][
1
]]
}
}
result
.
push
(
obj
)
})
})
}
}
console
.
log
(
result
)
return
result
}
// const reg2 = "name"
// const values2 = [{name:"kat",url:"longtime"},{name:"jack",url:"longtime2"}]
export
const
Fromate2
=
(
values
:
any
,
reg
:
string
)
=>
{
var
result
=
new
Array
()
values
.
map
((
item
:
any
,
index
:
number
)
=>
{
result
.
push
(
item
[
reg
]);
})
return
result
return
result
}
}
\ No newline at end of file
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