Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
3b7d13c5
提交
3b7d13c5
authored
4月 27, 2024
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
ec365403
478c7ad8
流水线
#9237
已通过 于阶段
in 1 分 2 秒
变更
9
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
213 行增加
和
44 行删除
+213
-44
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
customManageType.ts
src/api/interface/customManageType.ts
+1
-0
systemManageType.ts
src/api/interface/systemManageType.ts
+1
-0
index.tsx
...resourceManage/storeDecorate/comp/StoreDescView/index.tsx
+140
-0
index.tsx
...urceManage/storeDecorate/comp/storeBusinessCase/index.tsx
+4
-4
index.tsx
...resourceManage/storeDecorate/comp/storeFormView/index.tsx
+16
-16
index.tsx
...urceManage/storeDecorate/comp/storeSolutionView/index.tsx
+4
-4
index.scss
src/pages/resourceManage/storeDecorate/index.scss
+1
-1
index.tsx
src/pages/resourceManage/storeDecorate/index.tsx
+45
-18
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
3b7d13c5
...
...
@@ -14,4 +14,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
375c14c25c086f65428c8e7063cad6c58f532ee9
newTag
:
d77b380544538a92c5eb4cdcffc1ff23c96eb5a5
src/api/interface/customManageType.ts
浏览文件 @
3b7d13c5
...
...
@@ -219,6 +219,7 @@ export type editUserApplyTag = InterFunction<
score
?:
number
;
attachmentList
?:
any
;
profileUrl
?:
string
;
profileText
?:
string
;
companyInfoId
?:
number
;
},
NonNullable
<
unknown
>
...
...
src/api/interface/systemManageType.ts
浏览文件 @
3b7d13c5
...
...
@@ -212,6 +212,7 @@ export type getCompanyInfoByIdType = InterFunction<
brandLogo
:
string
;
content
:
string
;
profileUrl
:
string
;
profileText
:
string
;
backUserId
:
number
;
cooperationTagId
:
number
;
}
...
...
src/pages/resourceManage/storeDecorate/comp/StoreDescView/index.tsx
0 → 100644
浏览文件 @
3b7d13c5
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
{
InterDataType
,
InterReqType
}
from
'~/api/interface'
;
import
{
Button
,
Form
,
Modal
,
message
}
from
'antd'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
editUserApplyTag
}
from
'~/api/interface/customManageType'
;
import
{
useNavigate
}
from
'react-router-dom'
;
import
{
CustomManageAPI
}
from
'~/api'
;
import
RichText
from
'~/components/richText'
;
// 店铺类型
type
StoreType
=
InterDataType
<
getCompanyInfoByIdType
>
;
// 请求的表单类型
type
ReqType
=
InterReqType
<
editUserApplyTag
>
;
const
StoreDescView
:
React
.
FC
<
{
detail
:
StoreType
;
onRefresh
?:
()
=>
void
;
}
>
=
({
detail
,
onRefresh
})
=>
{
// 导航钩子
const
navigate
=
useNavigate
();
// 表单数据
const
[
form
]
=
Form
.
useForm
<
ReqType
>
();
// 店铺视频列表
const
[
videoList
,
setVideoList
]
=
useState
<
any
>
([]);
// 店铺视频列表上传
const
videoListChange
=
(
value
:
any
)
=>
{
setVideoList
(
value
);
};
// 返回上一级
const
handleBack
=
()
=>
{
Modal
.
confirm
({
title
:
'提示'
,
content
:
'未保存的内容将丢失,是否确认返回?'
,
onOk
:
()
=>
{
navigate
(
-
1
);
},
});
};
// 表单验证
const
handleOk
=
()
=>
{
form
.
validateFields
()
.
then
(
async
(
values
)
=>
{
await
handleSubmit
(
values
);
})
.
catch
((
err
)
=>
{
message
.
warning
({
content
:
err
.
errorFields
[
0
].
errors
[
0
],
})
.
then
();
});
};
// 提交数据
const
handleSubmit
=
async
(
values
:
ReqType
)
=>
{
const
profileUrl
=
[
...(
videoList
?.
map
((
i
:
{
url
:
string
})
=>
({
url
:
i
.
url
,
type
:
2
}))
||
[]),
];
const
res
=
await
CustomManageAPI
.
editUserApplyTag
({
companyInfoId
:
detail
?.
id
,
...
detail
,
...
values
,
profileUrl
:
JSON
.
stringify
(
profileUrl
||
[]),
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'操作成功'
);
onRefresh
?.();
}
};
// 获取图片视频回显
const
getImageVideo
=
()
=>
{
try
{
const
profileUrl
=
JSON
.
parse
(
detail
?.
profileUrl
||
`[]`
);
setVideoList
(
profileUrl
?.
filter
((
i
:
{
type
:
number
})
=>
i
.
type
===
2
)
?.
map
((
i
:
{
url
:
string
})
=>
({
url
:
i
?.
url
,
})),
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
};
// componentDidMount
useEffect
(()
=>
{
if
(
!
detail
?.
id
)
return
;
form
.
setFieldsValue
({
...
detail
,
content
:
detail
?.
content
,
address
:
detail
?.
address
,
name
:
detail
?.
companyName
,
attachmentList
:
detail
?.
attachmentList
,
});
getImageVideo
();
},
[]);
return
(
<
div
style=
{
{
width
:
'880px'
,
paddingTop
:
'20px'
}
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
2
}
}
>
<
Form
.
Item
label=
'企业宣传片'
name=
'videoList'
>
<
Uploader
fileUpload
listType=
'picture-card'
defaultFileList=
{
videoList
}
onChange=
{
videoListChange
}
fileLength=
{
1
}
fileType=
{
[
'video/mp4'
,
'video/avi'
,
'video/wmv'
,
'video/rmvb'
,
'video/mov'
]
}
fileSize=
{
100
}
>
<
UploadOutlined
/>
</
Uploader
>
</
Form
.
Item
>
<
Form
.
Item
label=
'企业介绍'
name=
'profileText'
rules=
{
[{
required
:
false
,
message
:
'请输入企业介绍'
}]
}
>
<
RichText
richTextContent=
{
form
.
getFieldValue
(
'profileText'
)
}
onChange=
{
(
e
)
=>
form
.
setFieldValue
(
'profileText'
,
e
)
}
height=
{
250
}
/>
</
Form
.
Item
>
</
Form
>
<
div
className=
{
'store-title flex-center'
}
>
{
/*<div className='title'>店铺页面</div>*/
}
<
div
className=
'action flex-between'
style=
{
{
width
:
'120px'
}
}
>
<
Button
type=
{
'primary'
}
onClick=
{
handleOk
}
>
保存
</
Button
>
<
Button
onClick=
{
handleBack
}
>
返回
</
Button
>
</
div
>
</
div
>
</
div
>
);
};
export
default
StoreDescView
;
src/pages/resourceManage/storeDecorate/comp/storeBusinessCase/index.tsx
浏览文件 @
3b7d13c5
...
...
@@ -98,9 +98,9 @@ const StoreBusinessCase: React.FC<{
},
];
return
(
<>
<
div
className=
{
'store-title flex-
between'
}
>
<
div
className=
'title'
>
企业业务案例
</
div
>
<
div
style=
{
{
width
:
'880px'
,
paddingTop
:
'10px'
}
}
>
<
div
className=
{
'store-title flex-
start'
}
style=
{
{
marginBottom
:
'15px'
}
}
>
{
/*<div className='title'>企业业务案例</div>*/
}
<
div
className=
'action'
>
<
Button
icon=
{
<
PlusOutlined
/>
}
type=
{
'primary'
}
onClick=
{
()
=>
setIsAddSolution
(
true
)
}
>
添加企业案例
...
...
@@ -125,7 +125,7 @@ const StoreBusinessCase: React.FC<{
getSolutionList
().
then
();
}
}
/>
</>
</
div
>
);
};
...
...
src/pages/resourceManage/storeDecorate/comp/storeFormView/index.tsx
浏览文件 @
3b7d13c5
...
...
@@ -115,7 +115,7 @@ const StoreFormView: React.FC<{
if
(
!
detail
?.
id
)
return
;
form
.
setFieldsValue
({
...
detail
,
content
:
detail
?.
content
||
'航拍航测'
,
content
:
detail
?.
content
,
address
:
detail
?.
address
,
name
:
detail
?.
companyName
,
attachmentList
:
detail
?.
attachmentList
,
...
...
@@ -131,16 +131,7 @@ const StoreFormView: React.FC<{
getImageVideo
();
},
[]);
return
(
<>
<
div
className=
{
'store-title flex-between'
}
>
<
div
className=
'title'
>
店铺页面
</
div
>
<
div
className=
'action flex-between'
>
<
Button
type=
{
'primary'
}
onClick=
{
handleOk
}
>
保存
</
Button
>
<
Button
onClick=
{
handleBack
}
>
返回
</
Button
>
</
div
>
</
div
>
<
div
style=
{
{
width
:
'580px'
,
paddingTop
:
'20px'
}
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
3
}
}
>
<
Form
.
Item
label=
'企业名称'
...
...
@@ -204,7 +195,7 @@ const StoreFormView: React.FC<{
showCount
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'企业宣传片'
name=
'videoList'
>
<
Form
.
Item
label=
'企业宣传片'
name=
'videoList'
style=
{
{
visibility
:
'hidden'
}
}
>
<
Uploader
fileUpload
listType=
'picture-card'
...
...
@@ -220,9 +211,9 @@ const StoreFormView: React.FC<{
{
/*<Form.Item label='营业执照'>*/
}
{
/* <Image src={detail?.licenseImg} width={45} height={45} />*/
}
{
/*</Form.Item>*/
}
<
Form
.
Item
label=
'备注'
name=
'remark'
>
<
Input
.
TextArea
placeholder=
'请输入备注'
maxLength=
{
70
}
showCount
rows=
{
4
}
/>
</
Form
.
Item
>
{
/*<Form.Item label='备注' name='remark'>*/
}
{
/* <Input.TextArea placeholder='请输入备注' maxLength={70} showCount rows={4} />*/
}
{
/*</Form.Item>*/
}
</
Form
>
<
SelectMapModal
title=
'选择位置'
...
...
@@ -236,7 +227,16 @@ const StoreFormView: React.FC<{
setOpenAddress
(
false
);
}
}
/>
</>
<
div
className=
{
'store-title flex-center'
}
>
{
/*<div className='title'>店铺页面</div>*/
}
<
div
className=
'action flex-between'
style=
{
{
width
:
'120px'
}
}
>
<
Button
type=
{
'primary'
}
onClick=
{
handleOk
}
>
保存
</
Button
>
<
Button
onClick=
{
handleBack
}
>
返回
</
Button
>
</
div
>
</
div
>
</
div
>
);
};
...
...
src/pages/resourceManage/storeDecorate/comp/storeSolutionView/index.tsx
浏览文件 @
3b7d13c5
...
...
@@ -107,9 +107,9 @@ const StoreSolutionView: React.FC<{
},
];
return
(
<>
<
div
className=
{
'store-title flex-
between'
}
>
<
div
className=
'title'
>
行业解决方案
</
div
>
<
div
style=
{
{
width
:
'880px'
,
paddingTop
:
'10px'
}
}
>
<
div
className=
{
'store-title flex-
start'
}
style=
{
{
marginBottom
:
'15px'
}
}
>
{
/*<div className='title'>行业解决方案</div>*/
}
<
div
className=
'action'
>
<
Button
icon=
{
<
PlusOutlined
/>
}
type=
{
'primary'
}
onClick=
{
()
=>
setIsAddSolution
(
true
)
}
>
添加解决方案
...
...
@@ -134,7 +134,7 @@ const StoreSolutionView: React.FC<{
getSolutionList
().
then
();
}
}
/>
</>
</
div
>
);
};
...
...
src/pages/resourceManage/storeDecorate/index.scss
浏览文件 @
3b7d13c5
...
...
@@ -22,7 +22,7 @@
}
.action
{
width
:
11
0px
;
width
:
20
0px
;
}
}
}
...
...
src/pages/resourceManage/storeDecorate/index.tsx
浏览文件 @
3b7d13c5
...
...
@@ -5,8 +5,10 @@ import { SystemManageAPI } from '~/api';
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
'./index.scss'
;
import
StoreFormView
from
'~/pages/resourceManage/storeDecorate/comp/storeFormView'
;
import
StoreBusinessCase
from
'~/pages/resourceManage/storeDecorate/comp/storeBusinessCase
'
;
import
{
Tabs
,
TabsProps
}
from
'antd
'
;
import
StoreSolutionView
from
'~/pages/resourceManage/storeDecorate/comp/storeSolutionView'
;
import
StoreBusinessCase
from
'~/pages/resourceManage/storeDecorate/comp/storeBusinessCase'
;
import
StoreDescView
from
'~/pages/resourceManage/storeDecorate/comp/StoreDescView'
;
// 店铺类型
type
StoreType
=
InterDataType
<
getCompanyInfoByIdType
>
;
...
...
@@ -23,29 +25,54 @@ const StoreDecoratePage: React.FC = () => {
// console.log('获取店铺数据 --->', res.result);
}
};
// 获取tab栏数据
const
getTabList
=
():
TabsProps
[
'items'
]
=>
{
if
(
!
storeDetail
?.
id
)
return
;
let
list
=
[
{
label
:
'基本信息'
,
key
:
'1'
,
children
:
<
StoreFormView
detail=
{
storeDetail
}
onRefresh=
{
getStoreApplyDetail
}
/>,
},
{
label
:
'企业介绍'
,
key
:
'4'
,
children
:
<
StoreDescView
detail=
{
storeDetail
}
onRefresh=
{
getStoreApplyDetail
}
/>,
},
];
// 飞手团队特有
if
(
storeDetail
?.
cooperationTagId
===
5
)
{
list
=
[
...
list
,
{
label
:
'解决方案'
,
key
:
'2'
,
children
:
<
StoreSolutionView
detail=
{
storeDetail
}
/>,
},
];
}
// 产品商城特有
if
(
storeDetail
?.
cooperationTagId
===
1
)
{
list
=
[
...
list
,
{
label
:
'业务案例'
,
key
:
'3'
,
children
:
<
StoreBusinessCase
detail=
{
storeDetail
}
/>,
},
];
}
// 排序
return
list
?.
sort
((
a
,
b
)
=>
Number
(
a
.
key
)
-
Number
(
b
.
key
));
};
// 页面挂载
useEffect
(()
=>
{
if
(
store
.
getState
().
UserInfo
?.
userInfo
?.
companyInfoVO
?.
id
)
getStoreApplyDetail
().
then
();
// console.log('页面挂载 --->', store.getState().UserInfo?.userInfo);
},
[]);
return
(
<
div
className=
{
'store-decorate-wrap flex-start'
}
>
{
!!
storeDetail
?.
id
&&
(
<>
<
div
className=
{
'store-form'
}
>
<
StoreFormView
detail=
{
storeDetail
}
onRefresh=
{
getStoreApplyDetail
}
/>
</
div
>
{
storeDetail
?.
cooperationTagId
===
5
?
(
<
div
className=
{
'store-solution'
}
>
<
StoreSolutionView
detail=
{
storeDetail
}
/>
</
div
>
)
:
(
<
div
className=
{
'store-solution'
}
>
<
StoreBusinessCase
detail=
{
storeDetail
}
/>
</
div
>
)
}
</>
)
}
<
div
className=
{
'store-decorate-wrap'
}
>
{
!!
storeDetail
?.
id
&&
<
Tabs
items=
{
getTabList
()
}
/>
}
</
div
>
);
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论