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
32dd96d7
Commit
32dd96d7
authored
Feb 25, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑详情加ID
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
fa28ac36
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
126 additions
and
110 deletions
+126
-110
config.ts
config/config.ts
+3
-3
Facilitys.tsx
src/components/Facilitys/Facilitys.tsx
+0
-1
PdfUpload.tsx
src/components/Form/PdfUpload.tsx
+2
-3
TitleSearch.tsx
src/components/TitleSearch/TitleSearch.tsx
+37
-4
CellList.ts
src/models/CommunityManagement/CellList.ts
+1
-0
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+3
-3
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+5
-11
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+53
-61
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+1
-6
Details.tsx
src/pages/CommunityManagement/CellList/Details.tsx
+8
-10
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+6
-6
tip.ts
src/utils/tip.ts
+7
-2
No files found.
config/config.ts
View file @
32dd96d7
/*
* @Author: your name
* @Date: 2020-12-01 18:40:06
* @LastEditTime: 2021-02-2
3 09:51:0
6
* @LastEditTime: 2021-02-2
5 11:57:2
6
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\config\config.ts
...
...
@@ -278,8 +278,8 @@ export default defineConfig({
routes
:
[
{
path
:
'./'
,
component
:
'./CommunityManagement/CellList/CellList'
},
{
path
:
'./Add'
,
component
:
'./CommunityManagement/CellList/Adds'
},
{
path
:
'./Edit'
,
component
:
'./CommunityManagement/CellList/Adds'
},
{
path
:
'./Detail'
,
component
:
'./CommunityManagement/CellList/Details'
},
{
path
:
'./Edit
/:id
'
,
component
:
'./CommunityManagement/CellList/Adds'
},
{
path
:
'./Detail
/:id
'
,
component
:
'./CommunityManagement/CellList/Details'
},
{
path
:
'*'
,
component
:
'@/pages/404'
},
],
},
...
...
src/components/Facilitys/Facilitys.tsx
View file @
32dd96d7
...
...
@@ -186,7 +186,6 @@ const Facilitys = (props: any) => {
>
<
Input
placeholder=
"Facility Name"
disabled=
{
disabled
}
id=
{
index
}
onChange=
{
(
e
:
any
)
=>
monitor
(
e
,
index
)
}
value=
{
FacilitysList
[
index
].
name
}
...
...
src/components/Form/PdfUpload.tsx
View file @
32dd96d7
/*
* @Author: your name
* @Date: 2021-02-01 14:54:48
* @LastEditTime: 2021-02-2
4 16:25:27
* @LastEditTime: 2021-02-2
5 14:28:02
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\PdfUpload.tsx
...
...
@@ -312,7 +312,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({
placeholder=
"Basic usage"
className=
"pdf-input"
onChange=
{
inpChange
}
id=
{
index
}
// id=
{
Math
.
floor
(
Math
.
random
()
*
100)
as
any
}
value=
{
item
.
name
}
disabled=
{
disabled
}
maxLength=
{
30
}
...
...
@@ -337,7 +337,6 @@ const PdfUpload: React.FC<PriceInputProps> = ({
beforeUpload=
{
beforeUpload
}
//上传前检测
onRemove=
{
onRemove
}
// id=
{
index
}
iconRender=
{
icons
}
// 上传成功后的图标
disabled=
{
disabled
}
>
...
...
src/components/TitleSearch/TitleSearch.tsx
View file @
32dd96d7
...
...
@@ -10,6 +10,8 @@ import { SA } from '@/utils/method';
const
{
Option
}
=
Select
;
import
moment
from
'moment'
;
const
TitleSearch
=
(
props
:
any
)
=>
{
const
{
dispatch
,
...
...
@@ -67,6 +69,25 @@ const TitleSearch = (props: any) => {
}
},
[
CommunityList
]);
// 监听 status
useEffect
(()
=>
{
if
(
status
)
{
form
.
setFieldsValue
({
status
:
status
[
0
].
default
,
});
}
},
[
status
]);
// 监听 time
useEffect
(()
=>
{
if
(
time
)
{
// console.log(time);
form
.
setFieldsValue
({
subscribeDate
:
time
[
2
],
});
}
},
[
time
]);
const
onFinish
=
(
values
:
any
)
=>
{
// console.log(values);
if
(
datePicker
)
{
...
...
@@ -80,7 +101,9 @@ const TitleSearch = (props: any) => {
const
onFinishFailed
=
()
=>
{};
// 选择时间
const
onChange
=
(
date
:
any
,
dateString
:
string
)
=>
{
console
.
log
(
dateString
);
setDate
(
dateString
);
};
...
...
@@ -106,9 +129,10 @@ const TitleSearch = (props: any) => {
// 清除操作之前的数据
const
emptys
=
(
data
:
any
,
url
:
any
)
=>
{
dispatch
({
type
:
'CellList/urlRemove'
});
// 清掉图片信息
SA
(
data
,
'CellList'
,
dispatch
);
dispatch
({
type
:
'CellList/ResultClear'
});
// 清空之前保存成功的结果
let
module
=
'CellList'
;
dispatch
({
type
:
module
+
'/urlRemove'
});
// 清掉图片信息
dispatch
({
type
:
module
+
'/delRemove'
});
// 清掉之前的详情
dispatch
({
type
:
module
+
'/ResultClear'
});
// 清空之前保存成功的结果
history
.
push
(
url
);
};
...
...
@@ -148,6 +172,7 @@ const TitleSearch = (props: any) => {
</
Col
>
)
:
null
}
{
/* 设施预约状态 */
}
{
status
!=
null
?
status
.
map
((
item
:
{
name
:
string
;
data
:
Array
<
''
>
;
default
:
any
},
index
:
number
)
=>
{
return
(
...
...
@@ -172,12 +197,20 @@ const TitleSearch = (props: any) => {
);
})
:
null
}
{
/* 时间 */
}
{
time
!=
null
?
(
<
Col
key=
"datePicker_"
>
{
' '
}
<
DatePicker
placeholder=
{
time
[
1
]
}
onChange=
{
onChange
}
/>
<
DatePicker
placeholder=
{
time
[
1
]
}
defaultValue=
{
time
[
2
]
?
moment
(
time
[
2
],
'YYYY/MM/DD'
)
:
null
}
onChange=
{
onChange
}
/>
</
Col
>
)
:
null
}
{
/* 搜索btn */
}
{
community
==
null
?
(
<
Col
>
<
Form
.
Item
>
...
...
src/models/CommunityManagement/CellList.ts
View file @
32dd96d7
...
...
@@ -147,6 +147,7 @@ export default {
},
*
delRemove
({
playload
},
{
call
,
put
})
{
console
.
log
(
'触发'
);
var
detailData
=
null
;
yield
put
({
type
:
'returnDataSaveDetail'
,
detailData
});
},
...
...
src/models/CommunityManagement/FacilityBookings.ts
View file @
32dd96d7
...
...
@@ -19,7 +19,7 @@ export default {
//表格1搜索条件
search
:
{
communityNameList
:
null
,
// 小区
status
:
0
,
//状态
status
:
null
,
//状态
subscribeDate
:
null
,
// 时间
pageNum
:
1
,
// 页码
globalMark
:
'yes'
,
// 状态
...
...
@@ -81,7 +81,7 @@ export default {
// 表格
returnTab
(
state
,
{
tabs
})
{
let
tab
=
tabs
;
console
.
log
({
...
state
,
tab
});
//
console.log({ ...state, tab });
return
{
...
state
,
tab
};
},
// 表格1 搜索条件
...
...
@@ -256,7 +256,7 @@ export default {
// 当前表格
*
TB
({
playload
},
{
call
,
put
})
{
console
.
log
(
playload
);
//
console.log(playload);
var
tabs
=
playload
;
yield
put
({
type
:
'returnTab'
,
tabs
});
},
...
...
src/pages/AccountManagement/account/Account.tsx
View file @
32dd96d7
...
...
@@ -153,17 +153,11 @@ const Account = (props: any) => {
// 表头单搜索
const
onFinishContract
=
(
value
:
any
)
=>
{
if
(
value
.
tosAccountName
||
value
.
creatorName
)
{
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
||
'[]'
);
value
.
creatorId
=
userInfo
.
userModel
.
id
;
value
.
creatorId
=
user
.
id
;
let
t
=
{
...
term
,
...
value
};
delete
t
.
pageNum
;
// 搜索的时候 删除页码
setTerm
(
t
);
RA
(
51
,
t
);
}
else
{
message
.
error
(
'Enter At Least One Entry!'
);
}
};
// 页码切换
...
...
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
32dd96d7
...
...
@@ -20,7 +20,7 @@ const { RangePicker } = TimePicker;
const
Adds
=
(
props
:
any
)
=>
{
const
module
=
'CellList'
;
const
{
Data
,
detailData
,
dispatch
,
loading
,
imgUrl
,
Result
}
=
props
;
const
{
detailData
,
dispatch
,
loading
,
imgUrl
,
Result
,
match
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -33,27 +33,22 @@ const Adds = (props: any) => {
const
[
codeStrat
,
setcodeStrat
]
=
useState
(
true
);
// 是否开放上传 默认没填写不允许
const
[
info
,
setInfo
]
=
useState
(
false
);
// 是否允许更改小区邮编地址名称 默认可以
const
[
banners
,
setBanners
]
=
useState
(
null
as
any
);
// bannner
// 赋值
// match 是路由属性
useEffect
(()
=>
{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if
(
Data
)
{
//发起请求
RA
(
64
,
{
id
:
Data
.
id
},
module
,
dispatch
);
}
else
{
console
.
log
(
'新建'
);
if
(
match
.
params
.
id
)
{
RA
(
64
,
{
id
:
match
.
params
.
id
},
module
,
dispatch
);
}
},
[
Data
]);
},
[
match
]);
// 详情
useEffect
(()
=>
{
if
(
Data
&&
detailData
)
{
if
(
detailData
&&
detailData
!=
{}
)
{
let
{
communityData
}
=
detailData
;
// 赋值
// 要判断是不是拿取到了
if
(
communityData
)
{
form
.
setFieldsValue
({
//
communityData,
communityData
,
des
:
{
residentialZipCode
:
communityData
.
residentialZipCode
.
substring
(
communityData
.
residentialZipCode
.
length
-
6
,
...
...
@@ -88,20 +83,21 @@ const Adds = (props: any) => {
setForms
(
true
);
}
}
}
},
[
detailData
]);
// 提交成功与否
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
// 如果不是编辑的话就更新本地小区
if
(
!
Data
)
{
if
(
!
match
.
params
.
id
)
{
dispatch
({
type
:
'Init/addCommunityget'
,
playload
:
{
Result
:
new
Array
(
Result
.
data
)
}
});
}
// 提示跳转
// message.success(`Information saved successfully!`);
history
.
push
(
'/CommunityManagement/CellList'
);
}
},
[
Result
,
Data
]);
},
[
Result
,
match
]);
// 监听表单的值
...
...
@@ -222,11 +218,10 @@ const Adds = (props: any) => {
delete
values
.
help
;
delete
values
.
workingHours
;
if
(
Data
)
{
values
.
id
=
Data
.
id
;
if
(
match
.
params
.
id
)
{
values
.
id
=
match
.
params
.
id
;
}
console
.
log
(
values
);
// 上传
RA
(
63
,
values
,
module
,
dispatch
);
}
...
...
@@ -316,7 +311,7 @@ const Adds = (props: any) => {
<
div
className=
"form"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
{
Data
?
'edit'
:
'Create New'
}
community
{
match
&&
match
.
params
?
'edit'
:
'Create New'
}
community
<
div
className=
"back"
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
...
...
@@ -348,9 +343,7 @@ const Adds = (props: any) => {
LoseFocus
(
v
);
}
}
defaultvalue=
{
Data
&&
detailData
&&
Data
&&
detailData
.
communityData
?
detailData
.
communityData
:
null
detailData
&&
detailData
.
communityData
?
detailData
.
communityData
:
null
}
/>
</
Form
.
Item
>
...
...
@@ -414,7 +407,7 @@ const Adds = (props: any) => {
}
}
limitNums=
{
1
}
over=
{
codeStrat
}
CommunityValue=
{
Data
&&
detailData
&&
detailData
.
banner
?
detailData
.
banner
:
null
}
CommunityValue=
{
detailData
&&
detailData
.
banner
?
detailData
.
banner
:
null
}
// imgs={ImageSrc}
// disabled={codeStrat}
/>
...
...
@@ -437,7 +430,7 @@ const Adds = (props: any) => {
}
}
disabled=
{
codeStrat
}
detailvalue=
{
Data
&&
detailData
&&
detailData
.
communityMainPdfList
detailData
&&
detailData
.
communityMainPdfList
?
detailData
.
communityMainPdfList
:
null
}
...
...
@@ -468,7 +461,7 @@ const Adds = (props: any) => {
}
}
disabled=
{
codeStrat
}
detailvalue=
{
Data
&&
detailData
&&
detailData
.
communityEssentialPdfList
detailData
&&
detailData
.
communityEssentialPdfList
?
detailData
.
communityEssentialPdfList
:
null
}
...
...
@@ -501,7 +494,7 @@ const Adds = (props: any) => {
}
}
disabled=
{
codeStrat
}
detailvalue=
{
Data
&&
detailData
&&
detailData
.
communityFormsPdfList
detailData
&&
detailData
.
communityFormsPdfList
?
detailData
.
communityFormsPdfList
:
null
}
...
...
@@ -551,9 +544,8 @@ const Adds = (props: any) => {
// export default Adds;
function
map
(
state
:
any
)
{
// console.log(state);
const
Data
=
state
.
CellList
.
DataSave
;
const
{
imgUrl
,
Result
,
detailData
}
=
state
.
CellList
;
const
loading
=
state
.
loading
.
models
.
CellList
?
state
.
loading
.
models
.
CellList
:
false
;
return
{
Data
,
loading
,
Result
,
imgUrl
,
detailData
};
return
{
loading
,
Result
,
imgUrl
,
detailData
};
}
export
default
connect
(
map
)(
Adds
);
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
32dd96d7
...
...
@@ -90,7 +90,7 @@ const CellLists = (props: any) => {
dispatch
({
type
:
module
+
'/delRemove'
});
// 清掉之前的详情
dispatch
({
type
:
module
+
'/ResultClear'
});
// 清空之前保存成功的结果
SA
(
data
,
module
,
dispatch
);
history
.
push
(
url
);
history
.
push
(
url
+
'/'
+
data
.
id
);
};
// 点击搜索
...
...
@@ -119,11 +119,6 @@ const CellLists = (props: any) => {
RA
(
48
,
t
,
module
,
dispatch
);
};
// 刷新
const
resetHandler
=
()
=>
{
RA
(
48
,
term
,
module
,
dispatch
);
};
return
(
<
div
>
{
village
!=
null
?
(
...
...
src/pages/CommunityManagement/CellList/Details.tsx
View file @
32dd96d7
...
...
@@ -21,7 +21,9 @@ import fileDownload from 'js-file-download';
const
Detail
=
(
props
:
any
)
=>
{
const
module
=
'CellList'
;
const
{
detailData
,
DataSave
,
dispatch
,
loading
,
overCom
,
user
,
CommunityList
}
=
props
;
const
{
detailData
,
DataSave
,
dispatch
,
loading
,
overCom
,
user
,
CommunityList
,
match
}
=
props
;
// console.log(match);
// 关闭提示框
const
[
ModelFee
,
setModelFee
]
=
useState
(
false
);
...
...
@@ -29,20 +31,16 @@ const Detail = (props: any) => {
const
[
ModelExcel
,
setModelExcel
]
=
useState
(
false
);
const
[
ModelResult
,
setModelResult
]
=
useState
(
null
as
any
);
// match 是路由属性
useEffect
(()
=>
{
console
.
log
(
DataSave
);
if
(
DataSave
)
{
// 32 老的接口 64 新的接口
RA
(
64
,
{
id
:
DataSave
.
id
},
module
,
dispatch
);
}
else
{
// 返回列表
history
.
push
(
'/CommunityManagement/CellList'
);
if
(
match
)
{
RA
(
64
,
{
id
:
match
.
params
.
id
},
module
,
dispatch
);
}
},
[
1
]);
},
[
match
]);
useEffect
(()
=>
{
if
(
detailData
)
{
console
.
log
(
detailData
);
//
console.log(detailData);
}
},
[
detailData
]);
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
32dd96d7
...
...
@@ -211,8 +211,8 @@ const FacilityBookings = (props: any) => {
// let tmp = JSON.parse(JSON.stringify(search));
let
obj
=
{
communityNameList
:
search
.
communityNameList
?
search
.
communityNameList
:
CommunityList
,
subscribeDate
:
search
.
subscribeDate
?
search
.
subscribeDate
:
null
,
// 时间
status
:
search
.
status
?
search
.
status
:
null
,
// 状态
subscribeDate
:
search
.
subscribeDate
!==
null
?
search
.
subscribeDate
:
null
,
// 时间
status
:
search
.
status
!==
null
?
search
.
status
:
null
,
// 状态
pageNum
:
search
.
pageNum
?
search
.
pageNum
:
1
,
// 实际搜索页码
globalMark
:
search
.
globalMark
?
search
.
globalMark
:
'no'
,
// 搜索全部内容
};
...
...
@@ -243,7 +243,7 @@ const FacilityBookings = (props: any) => {
let
obj
=
{
communityNameList
:
comment
.
communityName
?
comment
.
communityName
:
null
,
// 所选小区
subscribeDate
:
comment
.
key
?
comment
.
key
:
null
,
// 时间
status
:
comment
.
status
?
comment
.
status
:
null
,
// 状态
status
:
comment
.
status
!==
null
?
comment
.
status
:
null
,
// 状态
pageNum
:
1
,
// 实际搜索页码
globalMark
:
'no'
,
// 搜索全部内容
};
...
...
@@ -323,8 +323,8 @@ const FacilityBookings = (props: any) => {
communityNameList
:
v
.
communityNameList
?
v
.
communityNameList
:
null
,
userToken
:
token
,
pageNum
:
v
.
pageNum
?
v
.
pageNum
:
'1'
,
subscribeDate
:
v
.
subscribeDate
?
v
.
subscribeDate
:
null
,
status
:
v
.
status
?
v
.
status
:
null
,
subscribeDate
:
v
.
subscribeDate
!==
null
?
v
.
subscribeDate
:
null
,
status
:
v
.
status
!==
null
?
v
.
status
:
null
,
globalMark
:
v
.
globalMark
?
v
.
globalMark
:
'yes'
,
};
QA
({
...
obj
});
...
...
@@ -369,7 +369,7 @@ const FacilityBookings = (props: any) => {
default
:
search
.
status
,
},
]
}
time=
{
[
'key'
,
'Booking time '
]
}
time=
{
[
'key'
,
'Booking time '
,
search
.
subscribeDate
]
}
community=
{
'communityName'
}
checklist=
{
search
.
communityNameList
?
search
.
communityNameList
:
[]
}
onSubmit=
{
CallBackTitleSearch
}
...
...
src/utils/tip.ts
View file @
32dd96d7
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-02-
06 13:53:48
* @LastEditTime: 2021-02-
25 09:46:30
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
...
...
@@ -115,5 +115,10 @@ export const BookingsTip = [
export
const
AccountTip
=
[
[{
...
reqMes
(
'Please enter email address !'
),
type
:
'email'
}],
[
reqMes
(
'Please enter the name !'
)],
[
reqMes
(
'Please enter the correct telephone !'
)],
[
{
...
reqMes
(
'PPlease input (8 or 11 digits) !'
),
validator
:
inputNumberTel
,
},
],
];
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