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
facdac8c
Commit
facdac8c
authored
Mar 04, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报告删除,以及其样式修改
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
2453bef3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
126 additions
and
26 deletions
+126
-26
TitleBack.tsx
src/components/TitleBack/TitleBack.tsx
+47
-2
ServicePro.ts
src/models/CommunityManagement/ServicePro.ts
+30
-3
service.less
src/pages/AccountManagement/Service/service.less
+4
-0
service.tsx
src/pages/AccountManagement/Service/service.tsx
+2
-2
serviceDetail.tsx
src/pages/AccountManagement/Service/serviceDetail.tsx
+32
-8
AccountAdds.tsx
src/pages/AccountManagement/account/AccountAdds.tsx
+3
-0
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+4
-8
params.ts
src/utils/params.ts
+2
-1
power.js
src/utils/power.js
+2
-2
No files found.
src/components/TitleBack/TitleBack.tsx
View file @
facdac8c
import
React
from
'react'
;
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-03-04 10:22:29
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\TitleBack\TitleBack.tsx
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Button
,
Modal
}
from
'antd'
;
import
BackButton
from
'../BackButton/BackButton'
;
import
TitleGet
from
'../TitleGet/TitleGet'
;
const
TitleBack
=
(
props
:
any
)
=>
{
// <TitleBack sublist={['Handle Status : '+CurDataDetail.status,'Create Time : '+CurDataDetail.time]} title={headTitle} />
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
const
backData
=
(
values
:
any
)
=>
{
props
.
titleBack
(
values
);
};
useEffect
(()
=>
{
if
(
props
.
Result
)
{
setIsModalVisible
(
false
);
}
},
[
props
.
Result
]);
const
showModal
=
()
=>
{
setIsModalVisible
(
true
);
};
const
handleOk
=
()
=>
{
// setIsModalVisible(false);
props
.
handleOk
();
};
const
handleCancel
=
()
=>
{
setIsModalVisible
(
false
);
};
return
(
<>
<
div
className=
{
styles
.
item0
}
>
...
...
@@ -26,9 +56,24 @@ const TitleBack = (props: any) => {
<></>
)
}
<
div
className=
{
styles
.
item2
}
>
{
props
.
del
?
(
<
Button
danger
style=
{
{
marginRight
:
15
}
}
onClick=
{
showModal
}
>
{
props
.
del
}
</
Button
>
)
:
null
}
<
BackButton
backFunction=
{
backData
}
url=
{
props
.
url
}
/>
</
div
>
<
div
className=
{
styles
.
clear0
}
></
div
>
<
Modal
title=
"Tips"
visible=
{
isModalVisible
}
onOk=
{
handleOk
}
confirmLoading=
{
props
.
loading
}
onCancel=
{
handleCancel
}
>
<
p
>
Are you sure you want to delete this entry?
</
p
>
</
Modal
>
</>
);
};
...
...
src/models/CommunityManagement/ServicePro.ts
View file @
facdac8c
/*
* @Author: your name
* @Date: 2021-01-14 09:23:51
* @LastEditTime: 2021-03-0
3 15:44
:51
* @LastEditTime: 2021-03-0
4 10:27
:51
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts
...
...
@@ -17,6 +17,7 @@ export default {
state
:
{
Data
:
null
,
DataSave
:
null
,
Result
:
null
,
},
reducers
:
{
...
...
@@ -30,6 +31,9 @@ export default {
let
DataSave
=
{
...
state
.
DataSave
,
...
Community
};
return
{
...
state
,
DataSave
};
},
returnResult
(
state
,
{
Result
})
{
return
{
...
state
,
Result
};
},
},
effects
:
{
...
...
@@ -40,6 +44,12 @@ export default {
if
(
resp
.
error_code
!=
'0000'
)
{
printf
(
playload
,
resp
);
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
}
else
if
(
resp
.
error_code
==
'0002'
)
{
// 不存在
let
Data
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
message
.
error
(
`The information does not exist!`
);
history
.
push
(
'/AccountManagement/service'
);
}
else
{
console
.
log
(
playload
);
switch
(
playload
.
index
)
{
...
...
@@ -70,15 +80,32 @@ export default {
history
.
push
(
'/AccountManagement/service'
);
}
break
;
case
73
:
// 删除报告
{
let
Result
=
{
msg
:
'Successfully deleted'
,
state
:
'0000'
,
};
yield
put
({
type
:
'returnResult'
,
Result
});
// let Community = resp.data;
// Community.communityName = playload.body.communityName;
// yield put({ type: 'returnDataSaveCommunity', Community });
}
break
;
}
}
},
*
SA
({
DataSave
},
{
call
,
put
})
{
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
*
SA
({
playload
},
{
call
,
put
})
{
let
Data
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
},
*
ResultDataSave
({
playload
},
{
call
,
put
})
{
let
DataSave
=
null
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
*
Result
({
playload
},
{
call
,
put
})
{
let
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
};
src/pages/AccountManagement/Service/service.less
View file @
facdac8c
...
...
@@ -22,3 +22,7 @@ hr {
background: #eee;
margin-bottom: 24px;
}
.diys {
display: inline-block;
margin-left: 10%;
}
src/pages/AccountManagement/Service/service.tsx
View file @
facdac8c
...
...
@@ -59,7 +59,7 @@ const service = (props: any) => {
emptys
(
record
,
'/AccountManagement/service/detail'
);
}
}
>
De
lete
De
tail
</
a
>
</
Space
>
),
...
...
@@ -86,7 +86,7 @@ const service = (props: any) => {
// 清除操作之前的数据
const
emptys
=
(
data
:
any
,
url
:
any
)
=>
{
// dispatch({ type: module + '/urlRemove' }); // 清掉图片信息
// dispatch({ type: module + '/delRemove' }); // 清掉之前的详情
dispatch
({
type
:
module
+
'/Result'
});
// 清掉之前的删除结果
dispatch
({
type
:
module
+
'/ResultDataSave'
});
// 清空详情缓存
// SA(data, module, dispatch);
history
.
push
(
url
+
'/'
+
data
.
id
);
...
...
src/pages/AccountManagement/Service/serviceDetail.tsx
View file @
facdac8c
/*
* @Author: your name
* @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-03-0
3 16:23:36
* @LastEditTime: 2021-03-0
4 10:48:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Spin
,
Form
,
Input
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
const
{
TextArea
}
=
Input
;
import
{
RA
,
SA
}
from
'@/utils/method'
;
...
...
@@ -19,7 +19,7 @@ import TitleBack from '@/components/TitleBack/TitleBack';
import
PictureOptionsRow
from
'@/components/PictureOptions/PictureOptionsRow'
;
const
service
=
(
props
:
any
)
=>
{
const
{
DataSave
,
dispatch
,
loading
,
match
,
user
}
=
props
;
const
{
DataSave
,
dispatch
,
loading
,
match
,
user
,
Result
}
=
props
;
const
[
term
,
setTerm
]
=
useState
(
null
as
any
);
// 默认小区
const
[
ImageSrc
,
setImageSrc
]
=
useState
([]
as
any
);
// 图片地址
...
...
@@ -54,6 +54,15 @@ const service = (props: any) => {
}
},
[
DataSave
]);
// 删除结果
useEffect
(()
=>
{
if
(
Result
)
{
setTimeout
(()
=>
{
dispatch
({
type
:
module
+
'/SA'
});
// 清空详情缓存
history
.
push
(
'/AccountManagement/service'
);
},
300
);
}
},
[
Result
]);
//onFinish 提交
const
onFinish
=
(
values
:
any
)
=>
{
values
.
reportId
=
match
.
params
.
id
;
...
...
@@ -63,11 +72,23 @@ const service = (props: any) => {
RA
(
71
,
values
,
module
,
dispatch
);
};
// 确认删除
const
handleOk
=
()
=>
{
console
.
log
(
'触发'
);
RA
(
73
,
{
ids
:
match
.
params
.
id
},
module
,
dispatch
);
};
return
(
<
Spin
spinning=
{
loading
}
>
<
div
className=
"edit"
>
{
/* 标题 */
}
<
TitleBack
title=
{
'Report details'
}
/>
<
TitleBack
title=
{
'Report details'
}
del=
{
'Report delete'
}
handleOk=
{
handleOk
}
loading=
{
loading
}
Result=
{
Result
}
/>
{
/* 信息 */
}
<
div
className=
"form_s"
>
<
Form
...
...
@@ -131,7 +152,10 @@ const service = (props: any) => {
<
div
key=
{
idx
}
>
{
/* 回复人 */
}
<
Form
.
Item
label=
"Contact Details"
>
<
span
>
{
`${v.replyName} - ${v.replyPhone}`
}
</
span
>
<
div
>
<
span
>
{
v
.
replyName
}
</
span
>
<
span
className=
"diys"
>
Telephone :
</
span
>
{
' '
}
<
span
>
{
v
.
replyPhone
}
</
span
>
</
div
>
</
Form
.
Item
>
{
/* 回复内容 */
}
<
Form
.
Item
label=
"Overview"
>
...
...
@@ -192,10 +216,10 @@ const service = (props: any) => {
};
function
map
(
state
:
any
)
{
console
.
log
(
state
);
//
console.log(state);
const
loading
=
state
.
loading
.
models
.
ServicePro
;
const
{
Init
,
user
}
=
state
;
const
{
DataSave
,
curString
,
village
}
=
state
[
module
];
return
{
DataSave
,
loading
,
curString
,
village
,
Init
,
user
};
const
{
DataSave
,
Result
}
=
state
[
module
];
return
{
DataSave
,
loading
,
Result
,
Init
,
user
};
}
export
default
connect
(
map
)(
service
);
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
facdac8c
...
...
@@ -209,6 +209,9 @@ const Account = (props: any) => {
permissionArray
:
newData
,
};
// 是否是报告员
value
.
isReporter
=
newData
.
find
((
i
)
=>
i
==
71
)
?
1
:
0
;
// console.log(value);
// console.log(obj);
RA
(
38
,
value
,
module
,
dispatch
);
// 信息上传
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
facdac8c
...
...
@@ -231,14 +231,10 @@ const Account = (props: any) => {
permissionArray
:
newData
,
subPermissionArray
,
};
// Promise.all([RA(38, value, module, dispatch), RA(42, obj, module, dispatch)]).then(
// (v: any) => {
// console.log(v);
// },
// (e: any) => {
// console.log(e);
// },
// );
// 是否是报告员
value
.
isReporter
=
newData
.
find
((
i
)
=>
i
==
71
)
?
1
:
0
;
RA
(
38
,
value
,
module
,
dispatch
);
// 信息上传
RA
(
42
,
obj
,
module
,
dispatch
);
// 权限上传
setLoading
(
true
);
...
...
src/utils/params.ts
View file @
facdac8c
/*
* @Author: your name
* @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-03-03 1
5:51:17
* @LastEditTime: 2021-03-03 1
8:02:42
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts
...
...
@@ -105,4 +105,5 @@ export const requestList = [
[
'/tos/report/edit'
,
'70 web端报告编辑'
,
{}],
[
'/tos/report/reply'
,
'71 web端报告员回复'
,
{}],
[
'/tos/community/get/address'
,
'72 根据小区名搜索小区地址'
,
{}],
[
'/tos/report/delete'
,
'73 删除报告'
,
{}],
];
src/utils/power.js
View file @
facdac8c
...
...
@@ -332,10 +332,10 @@ export const enUsFaci = [
children
:
[{
title
:
'View Visitor Record'
,
key
:
'61'
,
disableCheckbox
:
true
}],
},
{
title
:
'Building Condit'
,
title
:
'Building Condit
ion Report
'
,
key
:
'71'
,
disabled
:
true
,
children
:
[{
title
:
'Building Condit'
,
key
:
'72'
,
disableCheckbox
:
true
}],
children
:
[{
title
:
'Building Condit
ion Report
'
,
key
:
'72'
,
disableCheckbox
:
true
}],
},
{
title
:
'Account Management'
,
...
...
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