Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
shenshaokai
jinfa-platform
Commits
2dfd6932
Commit
2dfd6932
authored
Jul 12, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改会员bug
parent
ca0419ba
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
311 additions
and
210 deletions
+311
-210
index.ts
config/routes/index.ts
+1
-1
FileListRender.tsx
src/components/UploadFiles/FileListRender.tsx
+26
-0
UploadFiles.tsx
src/components/UploadFiles/UploadFiles.tsx
+7
-1
add.tsx
src/pages/member/complaintsAndSuggests/add.tsx
+0
-1
useGetDetailCommon.tsx
...complaintsAndSuggests/common/hooks/useGetDetailCommon.tsx
+5
-20
add.tsx
src/pages/member/complaintsAndSuggests/common/schema/add.tsx
+11
-5
handle.tsx
...ges/member/complaintsAndSuggests/common/schema/handle.tsx
+8
-1
detail.tsx
src/pages/member/complaintsAndSuggests/detail.tsx
+0
-1
index.tsx
src/pages/member/components/TableModal/index.tsx
+10
-4
add.tsx
src/pages/member/memberEvaluate/createEvaluate/add.tsx
+2
-1
useFetchInfo.tsx
src/pages/member/memberEvaluate/hooks/useFetchInfo.tsx
+0
-65
useGetDetailCommon.tsx
src/pages/member/memberEvaluate/hooks/useGetDetailCommon.tsx
+6
-4
add.tsx
src/pages/member/memberEvaluate/schema/add.tsx
+9
-4
detail.tsx
src/pages/member/memberEvaluate/tobeInformed/detail.tsx
+0
-1
schema.tsx
src/pages/member/memberEvaluate/tobeSubmitSummary/schema.tsx
+28
-2
add.tsx
src/pages/member/memberInspection/common/schema/add.tsx
+12
-2
useGetDetailCommon.tsx
...r/memberQuery/suggest/common/hooks/useGetDetailCommon.tsx
+24
-21
add.tsx
src/pages/member/memberQuery/suggest/common/schema/add.tsx
+10
-6
useGetDetailCommon.tsx
...r/memberRectification/common/hooks/useGetDetailCommon.tsx
+4
-19
add.tsx
src/pages/member/memberRectification/common/schema/add.tsx
+5
-2
schema.tsx
...r/memberRectification/tobeConfirmRectification/schema.tsx
+35
-0
index.less
...mberWarning/dashboard/components/CustomizeCard/index.less
+20
-9
index.tsx
...emberWarning/dashboard/components/CustomizeCard/index.tsx
+11
-9
OverView.tsx
.../memberWarning/dashboard/components/OverVIew/OverView.tsx
+45
-14
OverViewCard.tsx
...berWarning/dashboard/components/OverVIew/OverViewCard.tsx
+3
-2
recordList.tsx
.../memberWarning/dashboard/components/Record/recordList.tsx
+7
-2
index.less
...memberWarning/dashboard/components/WarningArea/index.less
+6
-1
index.tsx
.../memberWarning/dashboard/components/WarningArea/index.tsx
+3
-3
mapChart.tsx
...mberWarning/dashboard/components/WarningArea/mapChart.tsx
+7
-2
index.tsx
src/pages/member/memberWarning/dashboard/index.tsx
+6
-7
No files found.
config/routes/index.ts
View file @
2dfd6932
...
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2021-04-21 16:53:13
*/
// import CommodityRoute from './commodityRoute' // 商品能力路由
//
import MemberRoute from './memberRoute' // 会员能力路由
import
MemberRoute
from
'./memberRoute'
// 会员能力路由
// import ShopRoute from './shopRoute' // 店铺能力路由
// import ChannelRoute from './channelRoute' // 渠道能力路由
// import TranactionRoute from './tranactionRoute' // 交易能力路由
...
...
src/components/UploadFiles/FileListRender.tsx
0 → 100644
View file @
2dfd6932
import
React
from
'react'
;
interface
Iprops
{
files
:
{
name
:
string
,
url
:
string
}[]
}
const
FileListRender
=
(
props
:
Iprops
)
=>
{
const
{
files
}
=
props
;
const
length
=
files
?.
length
||
0
return
(
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
'100%'
}
}
>
{
files
?.
map
((
_row
,
index
)
=>
{
return
(
<
a
style=
{
index
+
1
===
length
?
{}
:
{
marginBottom
:
'4px'
}
}
key=
{
_row
.
url
}
href=
{
_row
.
url
}
>
{
_row
.
name
}
</
a
>
)
})
}
</
div
>
)
}
export
default
FileListRender
;
src/components/UploadFiles/UploadFiles.tsx
View file @
2dfd6932
...
...
@@ -192,7 +192,13 @@ UploadFiles.defaultProps = {
uploadOrder
:
2
,
action
:
'/api/file/file/upload'
,
headers
:
{},
beforeUpload
:
(
file
,
fileList
)
=>
true
,
beforeUpload
:
(
file
:
UploadFile
)
=>
{
if
(
file
.
size
>
20
*
1024
*
1024
)
{
message
.
error
(
"上传文件不能大于20m"
)
return
false
}
return
true
},
onChange
:
(
file
:
UploadChangeParam
)
=>
{
},
customizeItemRender
:
null
,
onRemove
:
null
,
...
...
src/pages/member/complaintsAndSuggests/add.tsx
View file @
2dfd6932
...
...
@@ -149,7 +149,6 @@ const SuggestAdd = () => {
}
const
handleFetchUserData
=
useCallback
(
async
(
params
:
GetMemberInspectUsersRequest
)
=>
{
console
.
log
(
params
);
const
{
data
,
code
}
=
await
PublicApi
.
getMemberInspectUsers
(
params
);
if
(
code
===
1000
)
{
return
data
;
...
...
src/pages/member/complaintsAndSuggests/common/hooks/useGetDetailCommon.tsx
View file @
2dfd6932
import
React
from
'react'
;
import
{
useMemo
}
from
"react"
;
import
FileListRender
from
'@/components/UploadFiles/FileListRender'
;
function
useGetDetailCommon
({
initialValue
})
{
...
...
@@ -26,17 +27,9 @@ function useGetDetailCommon({ initialValue }) {
value
:
initialValue
?.
name
},
{
title
:
"附件"
,
title
:
"
事件
附件"
,
value
:
(
<
div
>
{
initialValue
?.
attachments
?.
map
((
_row
)
=>
{
return
(
<
a
key=
{
_row
.
url
}
href=
{
_row
.
href
}
>
{
_row
.
name
}
</
a
>
)
})
}
</
div
>
<
FileListRender
files=
{
initialValue
?.
attachments
}
/>
)
},
{
...
...
@@ -71,17 +64,9 @@ function useGetDetailCommon({ initialValue }) {
value
:
initialValue
?.
handleUserName
},
{
title
:
"附件"
,
title
:
"
处理
附件"
,
value
:
(
<
div
>
{
initialValue
?.
handleAttachments
.
map
((
_row
)
=>
{
return
(
<
a
key=
{
_row
.
url
}
href=
{
_row
.
href
}
>
{
_row
.
name
}
</
a
>
)
})
}
</
div
>
<
FileListRender
files=
{
initialValue
?.
handleAttachments
}
/>
)
},
{
...
...
src/pages/member/complaintsAndSuggests/common/schema/add.tsx
View file @
2dfd6932
...
...
@@ -84,7 +84,7 @@ export const complaintAddSchema: ISchema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
4
0
}
],
'x-component-props'
:
{
...
...
@@ -163,12 +163,14 @@ export const complaintAddSchema: ISchema = {
"x-component-props"
:
{
style
:
{
width
:
'100%'
}
},
placeholder
:
'最长120个字符,60个汉字'
},
'x-rules'
:
[
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
12
0
}
]
},
...
...
@@ -191,13 +193,17 @@ export const complaintAddSchema: ISchema = {
'x-rules'
:
[
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
12
0
},
{
required
:
true
,
message
:
"请填写事件描述"
}
]
],
"x-component-props"
:
{
placeholder
:
'最长120个字符,60个汉字'
},
},
attachments
:
{
title
:
'事件附件'
,
...
...
src/pages/member/complaintsAndSuggests/common/schema/handle.tsx
View file @
2dfd6932
...
...
@@ -23,8 +23,15 @@ export const handleFormSchema: ISchema = {
{
required
:
true
,
message
:
'请填写处理结果'
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
60
}
],
"x-component-props"
:
{
placeholder
:
"最长60个字符,30个汉字"
}
},
handleTime
:
{
title
:
"处理时间"
,
...
...
@@ -76,7 +83,7 @@ export const handleFormSchema: ISchema = {
// ]
},
handleAttachments
:
{
title
:
'附件'
,
title
:
'
处理
附件'
,
type
:
'object'
,
'x-component'
:
'FormilyUploadFiles'
,
}
...
...
src/pages/member/complaintsAndSuggests/detail.tsx
View file @
2dfd6932
...
...
@@ -4,7 +4,6 @@ import AnchorPage from '@/layouts/AnchorPage';
import
CustomizeColumn
from
'@/components/CustomizeColumn'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
theme
from
'../../../../config/lingxi.theme.config'
;
import
useFetchInfo
from
'../memberEvaluate/hooks/useFetchInfo'
;
import
useGetAnchorHeader
from
'./common/hooks/useGetAnchorHeader'
;
import
useGetDetailCommon
from
'./common/hooks/useGetDetailCommon'
;
import
useModal
from
'../memberEvaluate/hooks/useModal'
;
...
...
src/pages/member/components/TableModal/index.tsx
View file @
2dfd6932
...
...
@@ -91,14 +91,20 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
if
(
!
visible
)
{
return
;
}
const
keys
=
value
.
map
(
let
list
=
value
;
const
currentMode
=
customizeRadio
||
mode
===
'radio'
;
if
(
currentMode
)
{
list
=
list
.
slice
(
-
1
);
}
const
keys
=
list
.
map
(
(
_row
)
=>
{
// console.log(typeof tableProps.rowKey === 'string' && tableProps.rowKey(_row))
return
typeof
tableProps
.
rowKey
===
'string'
?
_row
[
tableProps
.
rowKey
as
string
]
:
tableProps
.
rowKey
(
_row
)
});
setSelectRow
(
keys
)
setSelectRowRecord
(
value
);
},
[
visible
,
value
])
},
[
visible
,
value
,
mode
,
customizeRadio
])
const
handleEffects
=
(
$
:
any
,
actions
:
any
)
=>
{
effects
?.(
$
,
actions
);
...
...
@@ -127,12 +133,12 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
const
keys
=
recordRows
.
map
((
_item
)
=>
typeof
tableProps
.
rowKey
===
'string'
?
_item
[
tableProps
.
rowKey
as
string
]
:
tableProps
.
rowKey
(
_item
));
// if (selected) {
const
returnValue
=
await
beforeChecked
(
record
,
selected
,
selecte
dRows
);
const
returnValue
=
await
beforeChecked
(
record
,
selected
,
recor
dRows
);
if
(
returnValue
===
false
)
{
return
;
}
// }
setSelectRowRecord
(
selecte
dRows
)
setSelectRowRecord
(
recor
dRows
)
setSelectRow
(
keys
)
};
...
...
src/pages/member/memberEvaluate/createEvaluate/add.tsx
View file @
2dfd6932
...
...
@@ -191,7 +191,8 @@ const EvaluateAdd = (props) => {
memberName
:
{
userId
:
0
,
name
:
"系统"
}
},
sendAppraisal
:
true
,
}))
||
[]
// const withProjectId = new Set(tempData.map((_item) => _item.id));
const
dataSource
=
formActions
.
getFieldValue
(
'tabs.tab-2.items'
)
||
[];
...
...
src/pages/member/memberEvaluate/hooks/useFetchInfo.tsx
deleted
100644 → 0
View file @
ca0419ba
import
React
,
{
useEffect
,
useState
}
from
'react'
;
/**
* 获取详情
*/
type
ParamsType
=
{
id
:
number
,
}
type
HeadersType
=
{
[
key
:
string
]:
any
,
}
type
Ires
=
{
code
:
number
,
data
:
{
[
key
:
string
]:
any
},
message
:
string
}
function
useFetchInfo
<
T
extends
Ires
>
(
api
:
(
data
:
any
)
=>
Promise
<
T
>
,
params
:
ParamsType
,
headers
?:
HeadersType
)
{
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
initialValue
,
setInitialValue
]
=
useState
<
null
|
Ires
[
"data"
]
>
(
null
);
useEffect
(()
=>
{
async
function
init
()
{
setLoading
(
true
)
return
new
Promise
<
void
>
((
resolve
)
=>
{
setTimeout
(()
=>
{
setLoading
(
false
);
setInitialValue
({
theme
:
'hellow'
,
files
:
[
{
name
:
'百度12312'
,
url
:
"http://www.baidu.com"
}
],
scoringList
:
[
{
id
:
1
,
projectName
:
"123"
,
memberName
:
{
"id"
:
2
,
"name"
:
"456"
},
baogao
:
[
{
name
:
'123'
,
url
:
'http://www.baidu.com/zzz.png'
,
}
]
}
]
})
resolve
()
},
1500
)
})
}
init
()
},
[])
return
{
loading
,
initialValue
}
}
export
default
useFetchInfo
src/pages/member/memberEvaluate/hooks/useGetDetailCommon.tsx
View file @
2dfd6932
...
...
@@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react';
import
{
Progress
}
from
'antd'
;
import
{
GetMemberAppraisalResultGetResponse
,
GetMemberAppraisalSummaryGetResponse
}
from
'@/services/MemberV2Api'
;
import
{
findLastIndexFlowState
}
from
'@/utils'
;
import
FileListRender
from
'@/components/UploadFiles/FileListRender'
/**
* 获取考评详情页的公共部分
...
...
@@ -64,13 +65,14 @@ function useGetDetailCommon(options: Options) {
title
:
'附件'
,
value
:
(
<
div
>
{
{
/* {
initialValue?.attachments?.map((_row) => {
return (
<a key={_row.url} href={_row.url}>{_row.name}</a>
)
})
}
} */
}
<
FileListRender
files=
{
initialValue
?.
attachments
}
/>
</
div
>
)
},
...
...
@@ -79,7 +81,7 @@ function useGetDetailCommon(options: Options) {
value
:
initialValue
?.
subject
,
},
{
title
:
'考
察
范围'
,
title
:
'考
评
范围'
,
span
:
2
,
value
:
(
<
div
>
...
...
@@ -110,7 +112,7 @@ function useGetDetailCommon(options: Options) {
)
},
{
title
:
'考
察
结果'
,
title
:
'考
评
结果'
,
value
:
initialValue
?.
result
},
{
...
...
src/pages/member/memberEvaluate/schema/add.tsx
View file @
2dfd6932
...
...
@@ -38,11 +38,11 @@ export const evaluateAddSchema: ISchema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
4
0
}
],
'x-component-props'
:
{
placeholder
:
'最长
60个字符,3
0个汉字'
placeholder
:
'最长
40个字符,2
0个汉字'
}
},
name
:
{
...
...
@@ -70,7 +70,7 @@ export const evaluateAddSchema: ISchema = {
display
:
false
,
},
'[appraisalDayStart, appraisalDayEnd]'
:
{
title
:
<
div
>
考评
时间
<
span
style=
{
{
color
:
'#ff4d4f'
,
fontSize
:
'16px'
,
marginLeft
:
'4px'
}
}
>
*
</
span
></
div
>,
title
:
<
div
>
考评
范围
<
span
style=
{
{
color
:
'#ff4d4f'
,
fontSize
:
'16px'
,
marginLeft
:
'4px'
}
}
>
*
</
span
></
div
>,
type
:
'object'
,
"x-component"
:
'FormilyRangeTime'
,
"x-component-props"
:
{
...
...
@@ -128,6 +128,9 @@ export const evaluateAddSchema: ISchema = {
operations
:
{
title
:
'操作'
},
scroll
:
{
x
:
'1100px'
}
},
"x-rules"
:
[
{
...
...
@@ -150,6 +153,7 @@ export const evaluateAddSchema: ISchema = {
},
"x-props"
:
{
width
:
65
,
fixed
:
'left'
,
},
"x-component-props"
:
{
}
...
...
@@ -160,6 +164,7 @@ export const evaluateAddSchema: ISchema = {
"x-component-props"
:
{},
"x-props"
:
{
width
:
160
,
fixed
:
'left'
,
},
'x-rules'
:
[
{
...
...
@@ -207,7 +212,7 @@ export const evaluateAddSchema: ISchema = {
'x-linkages'
:
[
{
type
:
'value:state'
,
target
:
'..[].*(memberName)'
,
target
:
'..[].*(memberName
,name,content
)'
,
// true 的时候不能填
state
:
{
editable
:
'{{$value && $value.userId !== 0}}'
...
...
src/pages/member/memberEvaluate/tobeInformed/detail.tsx
View file @
2dfd6932
...
...
@@ -7,7 +7,6 @@ import AuditProcess from '@/components/AuditProcess';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
projectColumns
,
recordColumn
}
from
'../columns/detail'
;
import
useGetDetailCommon
from
'../hooks/useGetDetailCommon'
;
import
useFetchInfo
from
'../hooks/useFetchInfo'
;
import
useModal
from
'../hooks/useModal'
;
import
theme
from
'../../../../../config/lingxi.theme.config'
;
import
ExamVerify
,
{
SubmitDataTypes
}
from
'@/components/ExamVerify'
;
...
...
src/pages/member/memberEvaluate/tobeSubmitSummary/schema.tsx
View file @
2dfd6932
...
...
@@ -43,10 +43,22 @@ export const modifyEvaluateScore: ISchema = {
scoreWeight
:
{
title
:
'权重'
,
type
:
'string'
,
'x-rules'
:
[
{
pattern
:
/^
((\d
+
))
$/
,
message
:
'请填写整数'
}
],
},
grade
:
{
title
:
'考评计分'
,
type
:
'string'
,
'x-rules'
:
[
{
pattern
:
/^
((\d
+
)(\.\d{1,2})?)
$/
,
message
:
'请填写数字,可以保留2位小数'
}
],
},
templates
:
{
title
:
'考评模板'
,
...
...
@@ -93,8 +105,15 @@ export const evaluateScoreRes: ISchema = {
{
required
:
true
,
message
:
"请填写考评最终分"
,
},
{
pattern
:
/^
((\d
+
)(\.\d{1,2})?)
$/
,
message
:
'请填写数字,可以保留2位小数'
}
]
],
'x-component-props'
:
{
placeholder
:
'请填写数字,可以保留2位小数'
}
},
result
:
{
title
:
'考评结果'
,
...
...
@@ -103,8 +122,15 @@ export const evaluateScoreRes: ISchema = {
{
required
:
true
,
message
:
"请填写考评结果"
,
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
120
}
]
],
'x-component-props'
:
{
placeholder
:
'最长120个字符,60个汉字'
}
},
notifyMember
:
{
title
:
"{{ text('通知考评结果',help('通知会员查收考评结果')) }}"
,
...
...
src/pages/member/memberInspection/common/schema/add.tsx
View file @
2dfd6932
...
...
@@ -38,11 +38,11 @@ export const InspectionAddSchema: ISchema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
4
0
}
],
'x-component-props'
:
{
placeholder
:
'最长
60个字符,3
0个汉字'
placeholder
:
'最长
40个字符,2
0个汉字'
}
},
name
:
{
...
...
@@ -111,6 +111,9 @@ export const InspectionAddSchema: ISchema = {
reason
:
{
title
:
'考察原因'
,
type
:
'textarea'
,
'x-component-props'
:
{
placeholder
:
'最长120个字符,60个汉字'
}
},
attachments
:
{
title
:
'考察要求附件'
,
...
...
@@ -158,8 +161,15 @@ export const InspectionAddSchema: ISchema = {
{
required
:
true
,
message
:
'请输入考察结果'
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
60
}
],
'x-component-props'
:
{
placeholder
:
'最长60个字符,30个汉字'
}
},
reports
:
{
title
:
"考察报告"
,
...
...
src/pages/member/memberQuery/suggest/common/hooks/useGetDetailCommon.tsx
View file @
2dfd6932
import
React
from
'react'
;
import
{
useMemo
}
from
"react"
;
import
FileListRender
from
'@/components/UploadFiles/FileListRender'
;
function
useGetDetailCommon
({
initialValue
})
{
const
basicInfo
=
useMemo
(()
=>
{
...
...
@@ -27,17 +27,18 @@ function useGetDetailCommon({ initialValue }) {
value
:
isUpperMember
?
initialValue
?.
upperName
:
initialValue
?.
name
},
{
title
:
"附件"
,
title
:
"
事件
附件"
,
value
:
(
<
div
>
{
initialValue
?.
attachments
?.
map
((
_row
)
=>
{
return
(
<
a
key=
{
_row
.
url
}
href=
{
_row
.
href
}
>
{
_row
.
name
}
</
a
>
)
})
}
</
div
>
// <div>
// {
// initialValue?.attachments?.map((_row) => {
// return (
// <a key={_row.url} href={_row.href}>{_row.name}</a>
// )
// })
// }
// </div>
<
FileListRender
files=
{
initialValue
?.
attachments
}
/>
)
},
{
...
...
@@ -72,17 +73,19 @@ function useGetDetailCommon({ initialValue }) {
value
:
initialValue
?.
handleUserName
},
{
title
:
"附件"
,
title
:
"
处理
附件"
,
value
:
(
<
div
>
{
initialValue
?.
handleAttachments
.
map
((
_row
)
=>
{
return
(
<
a
key=
{
_row
.
url
}
href=
{
_row
.
href
}
>
{
_row
.
name
}
</
a
>
)
})
}
</
div
>
// <div>
// {
// initialValue?.handleAttachments.map((_row) => {
// return (
// <a key={_row.url} href={_row.href}>{_row.name}</a>
// )
// })
// }
// </div>
<
FileListRender
files=
{
initialValue
?.
handleAttachments
}
/>
)
},
{
...
...
src/pages/member/memberQuery/suggest/common/schema/add.tsx
View file @
2dfd6932
...
...
@@ -68,11 +68,11 @@ export const complaintAddSchema: ISchema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
4
0
}
],
'x-component-props'
:
{
placeholder
:
'最长
60个字符,3
0个汉字'
placeholder
:
'最长
40个字符,2
0个汉字'
}
},
memberName
:
{
...
...
@@ -146,18 +146,22 @@ export const complaintAddSchema: ISchema = {
"x-component-props"
:
{
style
:
{
width
:
'100%'
}
},
placeholder
:
'最长120个字符,60个汉字'
},
'x-rules'
:
[
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
12
0
}
]
]
,
},
eventDesc
:
{
title
:
'事件描述'
,
type
:
'textarea'
,
"x-component-props"
:
{
placeholder
:
'最长120个字符,60个汉字'
},
'x-rules'
:
[
{
required
:
true
,
...
...
@@ -165,7 +169,7 @@ export const complaintAddSchema: ISchema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
6
0
maxByte
:
12
0
}
]
},
...
...
src/pages/member/memberRectification/common/hooks/useGetDetailCommon.tsx
View file @
2dfd6932
import
{
GetMemberRectifyWaitAddGetResponse
}
from
'@/services/MemberV2Api'
;
import
React
from
'react'
;
import
{
useMemo
}
from
"react"
;
import
FileListRender
from
'@/components/UploadFiles/FileListRender'
;
type
Info
=
{
reportDigest
?:
string
,
...
...
@@ -42,15 +43,7 @@ function useGetDetailCommon({ initialValue }: { initialValue: GetMemberRectifyWa
{
title
:
"整改文件"
,
value
:
(
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
}
}
>
{
initialValue
?.
attachments
?.
map
((
_item
)
=>
{
return
(
<
a
key=
{
_item
.
url
}
href=
{
_item
.
url
}
>
{
_item
.
name
}
</
a
>
)
})
}
</
div
>
<
FileListRender
files=
{
initialValue
?.
attachments
}
/>
)
},
{
...
...
@@ -79,15 +72,7 @@ function useGetDetailCommon({ initialValue }: { initialValue: GetMemberRectifyWa
{
title
:
'整改报告文件'
,
value
:
(
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
}
}
>
{
initialValue
?.
reportAttachments
?.
map
((
_item
)
=>
{
return
(
<
a
key=
{
_item
.
url
}
href=
{
_item
.
url
}
>
{
_item
.
name
}
</
a
>
)
})
}
</
div
>
<
FileListRender
files=
{
initialValue
?.
reportAttachments
}
/>
)
}
]
...
...
@@ -96,7 +81,7 @@ function useGetDetailCommon({ initialValue }: { initialValue: GetMemberRectifyWa
const
resultInfo
=
useMemo
(()
=>
{
return
[
{
title
:
'
修
改结果'
,
title
:
'
整
改结果'
,
value
:
initialValue
?.
agreeResult
?
'整改通过'
:
'整改不通过'
},
{
...
...
src/pages/member/memberRectification/common/schema/add.tsx
View file @
2dfd6932
...
...
@@ -82,7 +82,8 @@ export const rectificationAddSchema: ISchema = {
"x-component-props"
:
{
style
:
{
width
:
'100%'
}
},
placeholder
:
'最长120个字符,60个汉字'
},
'x-rules'
:
[
{
...
...
@@ -101,7 +102,9 @@ export const rectificationAddSchema: ISchema = {
"x-component-props"
:
{
style
:
{
width
:
'100%'
}
},
placeholder
:
'最长120个字符,60个汉字'
},
'x-rules'
:
[
{
...
...
src/pages/member/memberRectification/tobeConfirmRectification/schema.tsx
View file @
2dfd6932
...
...
@@ -25,11 +25,46 @@ const confirmEditResultSchema: ISchema = {
required
:
true
,
message
:
'请填写整改结果'
}
],
'x-linkages'
:
[
{
type
:
'value:schema'
,
// 考评人打分没勾选, 这几项都为必填
target
:
'reason'
,
condition
:
`{{ $value === 0 }}`
,
schema
:
{
"x-rules"
:
[
{
required
:
true
,
}
]
},
otherwise
:
{
"x-rules"
:
[
{
required
:
false
,
}
]
}
}
]
},
reason
:
{
title
:
'结果原因'
,
type
:
'textarea'
,
"x-rules"
:
[
{
required
:
true
,
message
:
'请填写结果原因'
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
120
}
],
'x-component-props'
:
{
placeholder
:
'最长120个字符,60个汉字'
}
}
}
}
...
...
src/pages/member/memberWarning/dashboard/components/CustomizeCard/index.less
View file @
2dfd6932
.card {
:global {
.ant-card-head {
.ant-card-head-title {
font-size: 16px;
font-weight: 600;
line-height: 16px;
color: #252d37;
}
}
height: 100%;
display: flex;
flex-direction: column;
background-color: #fff;
border-radius: 8px;
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 16px;
font-size: 14px;
line-height: 16px;
color: #252D37;
font-weight: 600;
}
.body {
padding: 16px;
}
}
src/pages/member/memberWarning/dashboard/components/CustomizeCard/index.tsx
View file @
2dfd6932
...
...
@@ -5,19 +5,21 @@ import styles from './index.less';
type
PropsNew
=
React
.
ComponentProps
<
typeof
Card
>
const
CustomizeCard
:
React
.
FC
<
PropsNew
>
=
(
props
:
PropsNew
)
=>
{
const
{
title
,
loading
,
extra
,
children
,
...
rest
}
=
props
;
const
{
title
,
loading
,
extra
,
children
,
bodyStyle
,
...
rest
}
=
props
;
if
(
loading
)
{
return
<
Card
loading=
{
loading
}
></
Card
>
}
return
(
<
div
className=
{
styles
.
card
}
>
<
Card
bordered=
{
false
}
title=
{
title
}
loading=
{
loading
}
extra=
{
extra
}
{
...
rest
}
>
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
title
}
>
{
title
}
</
div
>
<
div
className=
{
styles
.
extra
}
>
{
extra
}
</
div
>
</
div
>
<
div
className=
{
styles
.
body
}
style=
{
bodyStyle
}
>
{
children
}
</
Card
>
</
div
>
</
div
>
)
}
...
...
src/pages/member/memberWarning/dashboard/components/OverVIew/OverView.tsx
View file @
2dfd6932
...
...
@@ -3,23 +3,54 @@ import { Row, Col } from 'antd';
import
OverViewCard
from
'./OverViewCard'
;
const
OverView
=
()
=>
{
const
list
=
[
{
title
:
'今日预警'
,
type
:
'warn'
,
first
:
3
,
second
:
4
,
third
:
5
,
total
:
12
},
{
title
:
'今日待处理'
,
type
:
'primary'
,
first
:
3
,
second
:
4
,
third
:
5
,
total
:
12
},
{
title
:
'今日已处理'
,
type
:
'success'
,
first
:
3
,
second
:
4
,
third
:
5
,
total
:
12
},
{
title
:
'历史总预警'
,
type
:
'default'
,
first
:
3
,
second
:
4
,
third
:
5
,
total
:
12
}
];
return
(
// <Row gutter={[16, 16]} justify="space-between">
<>
<
Col
span=
{
6
}
>
<
OverViewCard
type=
"warn"
title=
{
"今日预警"
}
total=
{
12
}
first=
{
4
}
second=
{
3
}
third=
{
5
}
/>
</
Col
>
<
Col
span=
{
6
}
>
<
OverViewCard
type=
"primary"
title=
{
"今日预警"
}
total=
{
12
}
first=
{
4
}
second=
{
3
}
third=
{
5
}
/>
</
Col
>
<
Col
span=
{
6
}
>
<
OverViewCard
type=
"success"
title=
{
"今日预警"
}
total=
{
12
}
first=
{
4
}
second=
{
3
}
third=
{
5
}
/>
</
Col
>
<
Col
span=
{
6
}
>
<
OverViewCard
type=
"default"
title=
{
"今日预警"
}
total=
{
12
}
first=
{
4
}
second=
{
3
}
third=
{
5
}
/>
</
Col
>
{
list
.
map
((
_item
)
=>
{
return
(
<
Col
lg=
{
6
}
xxl=
{
6
}
md=
{
12
}
sm=
{
24
}
key=
{
_item
.
type
}
>
<
OverViewCard
{
...
_item
}
type=
{
_item
.
type
as
"primary"
}
/>
</
Col
>
)
})
}
</>
// </Row>
)
}
...
...
src/pages/member/memberWarning/dashboard/components/OverVIew/OverViewCard.tsx
View file @
2dfd6932
...
...
@@ -2,6 +2,7 @@ import React from 'react';
import
{
Card
}
from
'antd'
;
import
styles
from
'./index.less'
;
import
cx
from
'classnames'
;
import
CustomizeCard
from
'../CustomizeCard'
;
interface
Iprops
{
icon
?:
any
,
...
...
@@ -18,7 +19,7 @@ interface Iprops {
const
OverViewCard
:
React
.
FC
<
Iprops
>
=
(
props
:
Iprops
)
=>
{
const
{
loading
,
title
,
total
,
first
,
second
,
third
,
type
}
=
props
;
return
(
<
C
ard
title=
{
title
}
loading=
{
loading
}
>
<
C
ustomizeCard
title=
{
title
}
loading=
{
loading
}
bodyStyle=
{
{
paddingTop
:
'8px'
}
}
>
<
div
className=
{
styles
.
section
}
>
<
div
className=
{
cx
(
styles
.
icon
,
styles
[
type
])
}
></
div
>
<
span
className=
{
styles
.
total
}
>
{
total
}
</
span
>
...
...
@@ -28,7 +29,7 @@ const OverViewCard: React.FC<Iprops> = (props: Iprops) => {
<
div
className=
{
cx
(
styles
.
second
,
styles
.
progressItem
)
}
style=
{
{
flex
:
second
}
}
>
{
second
}
</
div
>
<
div
className=
{
cx
(
styles
.
third
,
styles
.
progressItem
)
}
style=
{
{
flex
:
third
}
}
>
{
third
}
</
div
>
</
div
>
</
Card
>
</
C
ustomizeC
ard
>
)
}
...
...
src/pages/member/memberWarning/dashboard/components/Record/recordList.tsx
View file @
2dfd6932
import
React
from
'react'
;
import
RecordItem
from
'./recordItem'
;
const
RecordList
=
()
=>
{
interface
Iprops
{
height
:
number
,
}
const
RecordList
=
(
props
:
Iprops
)
=>
{
const
{
height
}
=
props
;
return
(
<
div
>
<
div
style=
{
{
height
:
`${height}px`
,
overflowY
:
'scroll'
,
margin
:
'8px 0 16px 16px'
}
}
>
{
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
].
map
((
_item
)
=>
{
return
(
...
...
src/pages/member/memberWarning/dashboard/components/WarningArea/index.less
View file @
2dfd6932
...
...
@@ -16,6 +16,7 @@
.title {
font-size: 16px;
color: #252D37;
line-height: 14px;
line-height: 16px;
}
}
...
...
@@ -45,11 +46,15 @@
}
.section {
padding: @padding-md;
padding: @padding-md
@padding-md 0 0
;
// margin: 0 -8px;
margin-right: -16px;
flex: 1;
.radioContainer {
padding-left: @padding-md;
}
.recordList {
margin-top: 8px;
height: 384px;
...
...
src/pages/member/memberWarning/dashboard/components/WarningArea/index.tsx
View file @
2dfd6932
...
...
@@ -72,10 +72,10 @@ const WarningArea = () => {
</
div
>
</
div
>
<
div
className=
{
styles
.
section
}
>
<
CustomizeRadio
options=
{
warningOptions
}
/>
<
div
className=
{
styles
.
recordList
}
>
<
RecordList
/>
<
div
className=
{
styles
.
radioContainer
}
>
<
CustomizeRadio
options=
{
warningOptions
}
/>
</
div
>
<
RecordList
height=
{
384
}
/>
</
div
>
</
div
>
</
Card
>
...
...
src/pages/member/memberWarning/dashboard/components/WarningArea/mapChart.tsx
View file @
2dfd6932
...
...
@@ -114,7 +114,7 @@ const MapChart: React.FC<Iprops> = (props: Iprops) => {
data=
{
bgView
?
bgView
.
rows
:
bgView
}
autoFit
placeholder=
{
<
div
>
Loading
</
div
>
}
padding=
{
[
0
,
0
]
}
padding=
{
[
20
,
0
,
0
,
0
]
}
onAfterRender=
{
(
e
,
c
)
=>
{
keepMapRatio
(
mapData
,
c
,
"rerender"
)
}
}
...
...
@@ -124,7 +124,12 @@ const MapChart: React.FC<Iprops> = (props: Iprops) => {
<
Geom
type=
"polygon"
position=
"x*y"
style=
{
{
fill
:
'#EDEEEF'
,
stroke
:
'#fff'
,
lineWidth
:
1
,
fillOpacity
:
0.85
,
}
}
color=
{
[
'centroidY'
,
'#777090-#493398'
]
}
tooltip=
{
[
'name*properties'
,
...
...
src/pages/member/memberWarning/dashboard/index.tsx
View file @
2dfd6932
...
...
@@ -22,17 +22,15 @@ const Dashboard = () => {
>
<
Row
gutter=
{
[
16
,
16
]
}
>
<
OverView
/>
<
Col
span=
{
6
}
>
<
CustomizeCard
title=
"今日预警记录"
bodyStyle=
{
{
padding
:
'0'
}
}
>
<
div
style=
{
{
height
:
'384px'
,
overflowY
:
'scroll'
,
margin
:
'8px 0 16px 16px'
}
}
>
<
RecordList
/>
</
div
>
<
Col
xxl=
{
6
}
lg=
{
6
}
md=
{
6
}
sm=
{
24
}
>
<
CustomizeCard
title=
"今日预警记录"
bodyStyle=
{
{
padding
:
'0'
,
height
:
'408px'
}
}
>
<
RecordList
height=
{
384
}
/>
</
CustomizeCard
>
</
Col
>
<
Col
span=
{
12
}
>
<
Col
xxl=
{
12
}
lg=
{
18
}
md=
{
18
}
sm=
{
24
}
>
<
WarningArea
/>
</
Col
>
<
Col
span=
{
6
}
>
<
Col
xxl=
{
6
}
lg=
{
6
}
md=
{
6
}
sm=
{
24
}
>
<
CustomizeCard
title=
"预警项目"
headStyle=
{
{
color
:
'red'
}
}
bodyStyle=
{
{
height
:
'408px'
}
}
>
<
Row
gutter=
{
[
16
,
16
]
}
>
<
Col
span=
{
12
}
>
...
...
@@ -86,4 +84,5 @@ const Dashboard = () => {
)
}
export
default
Dashboard
;
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