Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
d722263f
提交
d722263f
authored
4月 26, 2024
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
2ac71be7
454ac7b9
流水线
#9163
已通过 于阶段
in 1 分 2 秒
变更
9
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
287 行增加
和
16 行删除
+287
-16
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
customManageType.ts
src/api/interface/customManageType.ts
+27
-0
systemManageType.ts
src/api/interface/systemManageType.ts
+1
-0
customManage.ts
src/api/modules/customManage.ts
+12
-0
index.tsx
src/components/video/index.tsx
+6
-6
index.tsx
...sourceManage/storeDecorate/comp/addBusinessCase/index.tsx
+94
-0
index.tsx
...urceManage/storeDecorate/comp/storeBusinessCase/index.tsx
+130
-0
index.tsx
...resourceManage/storeDecorate/comp/storeFormView/index.tsx
+5
-5
index.tsx
src/pages/resourceManage/storeDecorate/index.tsx
+11
-4
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
d722263f
...
@@ -14,4 +14,4 @@ patches:
...
@@ -14,4 +14,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
d54831ad8784ba42a859502b4dc0a5b03800b217
newTag
:
73fda43c262811f127160c9a79ca9810c4b9bad9
src/api/interface/customManageType.ts
浏览文件 @
d722263f
...
@@ -340,3 +340,30 @@ export type deleteSuggestionType = InterFunction<
...
@@ -340,3 +340,30 @@ export type deleteSuggestionType = InterFunction<
},
},
NonNullable
<
unknown
>
NonNullable
<
unknown
>
>
;
>
;
// 后台--添加(修改)后台企业案例
export
type
updateBusinessCaseType
=
InterFunction
<
{
id
?:
number
;
businessDescription
?:
string
;
businessVideo
?:
string
;
},
NonNullable
<
unknown
>
>
;
// 后台--获取后台企业案例
export
type
getBusinessCaseType
=
InterFunction
<
{
backUserId
:
number
;
},
{
id
?:
number
;
businessDescription
?:
string
;
businessVideo
:
string
;
}[]
>
;
// 后台--删除后台企业案例
export
type
deleteBusinessCaseType
=
InterFunction
<
{
id
?:
number
;
},
NonNullable
<
unknown
>
>
;
src/api/interface/systemManageType.ts
浏览文件 @
d722263f
...
@@ -213,6 +213,7 @@ export type getCompanyInfoByIdType = InterFunction<
...
@@ -213,6 +213,7 @@ export type getCompanyInfoByIdType = InterFunction<
content
:
string
;
content
:
string
;
profileUrl
:
string
;
profileUrl
:
string
;
backUserId
:
number
;
backUserId
:
number
;
cooperationTagId
:
number
;
}
}
>
;
>
;
//单位-成员列表
//单位-成员列表
...
...
src/api/modules/customManage.ts
浏览文件 @
d722263f
...
@@ -9,9 +9,11 @@ import {
...
@@ -9,9 +9,11 @@ import {
CompanyListTag
,
CompanyListTag
,
cooperationListTag
,
cooperationListTag
,
deleteApplyTag
,
deleteApplyTag
,
deleteBusinessCaseType
,
deleteSuggestionType
,
deleteSuggestionType
,
editUserApplyTag
,
editUserApplyTag
,
editUserApplyTagDetails
,
editUserApplyTagDetails
,
getBusinessCaseType
,
getListPartnerType
,
getListPartnerType
,
getSuggestionType
,
getSuggestionType
,
listAppUserCountType
,
listAppUserCountType
,
...
@@ -19,6 +21,7 @@ import {
...
@@ -19,6 +21,7 @@ import {
listAuthPageType
,
listAuthPageType
,
listUserApplyTag
,
listUserApplyTag
,
listUserRcdType
,
listUserRcdType
,
updateBusinessCaseType
,
updateSuggestionType
,
updateSuggestionType
,
userAccountUpdateType
,
userAccountUpdateType
,
}
from
'~/api/interface/customManageType'
;
}
from
'~/api/interface/customManageType'
;
...
@@ -89,4 +92,13 @@ export class CustomManageAPI {
...
@@ -89,4 +92,13 @@ export class CustomManageAPI {
// 后台--删除后台用户建议
// 后台--删除后台用户建议
static
deleteSuggestion
:
deleteSuggestionType
=
(
params
)
=>
static
deleteSuggestion
:
deleteSuggestionType
=
(
params
)
=>
axios
.
get
(
'/userapp/back-user/deleteSuggestion'
,
{
params
});
axios
.
get
(
'/userapp/back-user/deleteSuggestion'
,
{
params
});
// 后台--获取企业解决方案列表
static
getBusinessCase
:
getBusinessCaseType
=
(
params
)
=>
axios
.
get
(
'/userapp/back-user/getBusinessCase'
,
{
params
});
// 后台--修改企业解决方案列表
static
updateBusinessCase
:
updateBusinessCaseType
=
(
params
)
=>
axios
.
post
(
'/userapp/back-user/insertBusinessCase'
,
params
);
// 后台--删除企业解决方案列表
static
deleteBusinessCase
:
deleteBusinessCaseType
=
(
params
)
=>
axios
.
get
(
'/userapp/back-user/deleteBusinessCase'
,
{
params
});
}
}
src/components/video/index.tsx
浏览文件 @
d722263f
...
@@ -12,19 +12,19 @@ interface propsType {
...
@@ -12,19 +12,19 @@ interface propsType {
controls
?:
boolean
;
controls
?:
boolean
;
}
}
const
Video
:
React
.
FC
<
propsType
>
=
(
props
)
=>
{
const
Video
:
React
.
FC
<
propsType
>
=
(
// 组件的默认值
props
=
{
Video
.
defaultProps
=
{
src
:
'https://file.iuav.com/file/sharefly-logo-2024.png'
,
src
:
'http://share-fly.oss-cn-hangzhou.aliyuncs.com/file/3505c402-cbf9-41a5-9d6f-bdb350625bea.jpg'
,
width
:
40
,
width
:
40
,
height
:
40
,
height
:
40
,
};
},
)
=>
{
// 视频是否预览
// 视频是否预览
const
[
isPreview
,
setIsPreview
]
=
React
.
useState
<
boolean
>
(
false
);
const
[
isPreview
,
setIsPreview
]
=
React
.
useState
<
boolean
>
(
false
);
return
(
return
(
<>
<>
<
Image
<
Image
src=
{
`${props?.src}?x-oss-process=video/snapshot,t_
3618&x-oss-process=image/quality,q_25
`
}
src=
{
`${props?.src}?x-oss-process=video/snapshot,t_
1000,f_jpg
`
}
width=
{
props
?.
width
}
width=
{
props
?.
width
}
height=
{
props
?.
height
}
height=
{
props
?.
height
}
preview=
{
false
}
preview=
{
false
}
...
...
src/pages/resourceManage/storeDecorate/comp/addBusinessCase/index.tsx
0 → 100644
浏览文件 @
d722263f
import
React
,
{
useEffect
}
from
'react'
;
import
{
Form
,
Input
,
message
,
Modal
,
ModalProps
}
from
'antd'
;
import
{
InterDataType
,
InterReqType
}
from
'~/api/interface'
;
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
getBusinessCaseType
,
updateBusinessCaseType
}
from
'~/api/interface/customManageType'
;
import
{
CustomManageAPI
}
from
'~/api'
;
// 店铺类型
type
DetailType
=
InterDataType
<
getCompanyInfoByIdType
>
;
// 请求类型
type
ReqType
=
InterReqType
<
updateBusinessCaseType
>
;
// 列表类型
type
DataType
=
InterDataType
<
getBusinessCaseType
>
[
0
];
const
AddSolutionModal
:
React
.
FC
<
ModalProps
&
{
detail
:
DetailType
;
onCancel
?:
()
=>
void
;
data
?:
DataType
}
>
=
({
open
,
title
,
onCancel
,
data
})
=>
{
// 表单数据
const
[
form
]
=
Form
.
useForm
<
ReqType
&
{
businessVideo
:
{
url
:
string
}[]
}
>
();
// 取消事件
const
handleCancel
=
()
=>
{
form
.
resetFields
();
onCancel
?.();
};
// 确定事件
const
handleOk
=
()
=>
{
form
.
validateFields
()
.
then
(
async
(
values
)
=>
{
await
handleSubmit
(
values
);
})
.
catch
((
err
)
=>
{
// console.log('确定事件 --->', err);
message
.
warning
({
content
:
err
.
errorFields
[
0
].
errors
[
0
],
})
.
then
();
});
};
// 提交事件
const
handleSubmit
=
async
(
values
:
ReqType
&
{
businessVideo
:
{
url
:
string
}[]
})
=>
{
const
res
=
await
CustomManageAPI
.
updateBusinessCase
({
businessDescription
:
values
?.
businessDescription
,
businessVideo
:
values
?.
businessVideo
?.[
0
]?.
url
,
id
:
data
?.
id
,
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
({
content
:
'操作成功'
});
handleCancel
();
// console.log('提交事件 --->', values);
}
};
// 组件挂载
useEffect
(()
=>
{
if
(
!
data
?.
id
)
return
;
form
.
setFieldsValue
({
...
data
,
businessVideo
:
[{
url
:
data
?.
businessVideo
}],
});
},
[
data
]);
return
(
<
Modal
open=
{
open
}
title=
{
title
}
width=
{
450
}
onCancel=
{
handleCancel
}
onOk=
{
handleOk
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
16
}
}
>
<
Form
.
Item
label=
'案例说明'
name=
'businessDescription'
rules=
{
[{
required
:
true
,
message
:
'请输入案例说明'
}]
}
>
<
Input
.
TextArea
placeholder=
{
'请输入案例说明'
}
maxLength=
{
100
}
allowClear
showCount
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'案例视频'
name=
'businessVideo'
rules=
{
[{
required
:
true
,
message
:
'请输入案例视频'
}]
}
>
<
Uploader
fileUpload
listType=
'picture-card'
fileLength=
{
1
}
fileType=
{
[
'video/mp4'
,
'video/avi'
,
'video/wmv'
,
'video/rmvb'
]
}
fileSize=
{
100
}
>
<
UploadOutlined
/>
</
Uploader
>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AddSolutionModal
;
src/pages/resourceManage/storeDecorate/comp/storeBusinessCase/index.tsx
0 → 100644
浏览文件 @
d722263f
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
InterDataType
}
from
'~/api/interface'
;
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
{
CustomManageAPI
}
from
'~/api'
;
import
{
Button
,
Table
,
Modal
,
message
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
getBusinessCaseType
}
from
'~/api/interface/customManageType'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
AddBusinessCase
from
'~/pages/resourceManage/storeDecorate/comp/addBusinessCase'
;
import
Video
from
'~/components/video'
;
// 店铺类型
type
DetailType
=
InterDataType
<
getCompanyInfoByIdType
>
;
// 列表类型
type
ListType
=
InterDataType
<
getBusinessCaseType
>
;
const
StoreBusinessCase
:
React
.
FC
<
{
detail
:
DetailType
;
}
>
=
({
detail
})
=>
{
// 添加解决方案是否显示
const
[
isAddSolution
,
setIsAddSolution
]
=
useState
<
boolean
>
(
false
);
// 当前编辑的数据
const
[
editData
,
setEditData
]
=
useState
<
ListType
[
0
]
>
();
// 解决方案列表
const
[
businessList
,
setBusinessList
]
=
useState
<
ListType
>
([]);
// 获取解决方案列表
const
getSolutionList
=
async
()
=>
{
const
res
=
await
CustomManageAPI
.
getBusinessCase
({
backUserId
:
detail
?.
backUserId
,
});
if
(
res
&&
res
.
code
===
'200'
)
{
setBusinessList
(
res
.
result
);
// console.log('获取解决方案列表 --->', res.result);
}
};
// 删除事件
const
handleDelete
=
(
record
:
ListType
[
0
])
=>
{
Modal
.
confirm
({
title
:
'提示'
,
content
:
'删除后将无法恢复,是否确认删除?'
,
onOk
:
async
()
=>
{
const
res
=
await
CustomManageAPI
.
deleteBusinessCase
({
id
:
record
?.
id
,
});
if
(
res
&&
res
.
code
===
'200'
)
{
await
getSolutionList
();
message
.
success
(
'删除成功'
);
}
},
});
};
// 组件挂载
useEffect
(()
=>
{
if
(
detail
?.
backUserId
)
getSolutionList
().
then
();
// console.log('storeSolutionView --->', detail);
},
[]);
const
columns
:
ColumnsType
<
ListType
[
0
]
>
=
[
{
title
:
'序号'
,
dataIndex
:
'accountNo'
,
align
:
'center'
,
width
:
'50px'
,
render
:
(
_text
,
_record
,
index
)
=>
index
+
1
,
},
{
title
:
'案例说明'
,
dataIndex
:
'businessDescription'
,
align
:
'center'
,
},
{
title
:
'案例视频'
,
dataIndex
:
'businessVideo'
,
align
:
'center'
,
render
:
(
text
)
=>
<
Video
src=
{
text
}
width=
{
40
}
height=
{
40
}
/>,
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
align
:
'center'
,
render
:
(
_text
,
record
)
=>
(
<>
<
Button
type=
{
'link'
}
onClick=
{
()
=>
{
setEditData
(
record
);
setIsAddSolution
(
true
);
}
}
>
编辑
</
Button
>
<
Button
type=
{
'link'
}
onClick=
{
()
=>
handleDelete
(
record
)
}
danger
>
删除
</
Button
>
</>
),
},
];
return
(
<>
<
div
className=
{
'store-title flex-between'
}
>
<
div
className=
'title'
>
企业业务案例
</
div
>
<
div
className=
'action'
>
<
Button
icon=
{
<
PlusOutlined
/>
}
type=
{
'primary'
}
onClick=
{
()
=>
setIsAddSolution
(
true
)
}
>
添加企业案例
</
Button
>
</
div
>
</
div
>
<
Table
dataSource=
{
businessList
}
rowKey=
{
'id'
}
columns=
{
columns
}
size=
{
'small'
}
bordered=
{
true
}
></
Table
>
<
AddBusinessCase
open=
{
isAddSolution
}
detail=
{
detail
}
data=
{
editData
}
title=
{
editData
?.
id
?
'编辑企业案例'
:
'添加企业案例'
}
onCancel=
{
()
=>
{
setIsAddSolution
(
false
);
setEditData
(
undefined
);
getSolutionList
().
then
();
}
}
/>
</>
);
};
export
default
StoreBusinessCase
;
src/pages/resourceManage/storeDecorate/comp/storeFormView/index.tsx
浏览文件 @
d722263f
...
@@ -150,9 +150,9 @@ const StoreFormView: React.FC<{
...
@@ -150,9 +150,9 @@ const StoreFormView: React.FC<{
<
Input
placeholder=
{
'请输入企业名称'
}
maxLength=
{
25
}
allowClear
/>
<
Input
placeholder=
{
'请输入企业名称'
}
maxLength=
{
25
}
allowClear
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
'
网点
地址'
label=
'
公司
地址'
name=
'address'
name=
'address'
rules=
{
[{
required
:
true
,
message
:
'请选择
网点
地址'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请选择
公司
地址'
}]
}
>
>
<
Input
<
Input
value=
{
detail
?.
address
}
value=
{
detail
?.
address
}
...
@@ -182,7 +182,7 @@ const StoreFormView: React.FC<{
...
@@ -182,7 +182,7 @@ const StoreFormView: React.FC<{
<
UploadOutlined
/>
<
UploadOutlined
/>
</
Uploader
>
</
Uploader
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
'
店铺视频
'
name=
'videoList'
>
<
Form
.
Item
label=
'
公司宣传片
'
name=
'videoList'
>
<
Uploader
<
Uploader
fileUpload
fileUpload
listType=
'picture-card'
listType=
'picture-card'
...
@@ -196,9 +196,9 @@ const StoreFormView: React.FC<{
...
@@ -196,9 +196,9 @@ const StoreFormView: React.FC<{
</
Uploader
>
</
Uploader
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
label=
'
服务资质
'
label=
'
公司简介
'
name=
'content'
name=
'content'
rules=
{
[{
required
:
true
,
message
:
'请输入
服务资质
'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请输入
公司简介
'
}]
}
>
>
<
Input
.
TextArea
<
Input
.
TextArea
placeholder=
{
'请输入服务资质(“;”号换行)'
}
placeholder=
{
'请输入服务资质(“;”号换行)'
}
...
...
src/pages/resourceManage/storeDecorate/index.tsx
浏览文件 @
d722263f
...
@@ -5,6 +5,7 @@ import { SystemManageAPI } from '~/api';
...
@@ -5,6 +5,7 @@ import { SystemManageAPI } from '~/api';
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
{
getCompanyInfoByIdType
}
from
'~/api/interface/systemManageType'
;
import
'./index.scss'
;
import
'./index.scss'
;
import
StoreFormView
from
'~/pages/resourceManage/storeDecorate/comp/storeFormView'
;
import
StoreFormView
from
'~/pages/resourceManage/storeDecorate/comp/storeFormView'
;
import
StoreBusinessCase
from
'~/pages/resourceManage/storeDecorate/comp/storeBusinessCase'
;
import
StoreSolutionView
from
'~/pages/resourceManage/storeDecorate/comp/storeSolutionView'
;
import
StoreSolutionView
from
'~/pages/resourceManage/storeDecorate/comp/storeSolutionView'
;
// 店铺类型
// 店铺类型
...
@@ -19,7 +20,7 @@ const StoreDecoratePage: React.FC = () => {
...
@@ -19,7 +20,7 @@ const StoreDecoratePage: React.FC = () => {
});
});
if
(
res
&&
res
.
code
===
'200'
)
{
if
(
res
&&
res
.
code
===
'200'
)
{
setStoreDetail
(
res
.
result
);
setStoreDetail
(
res
.
result
);
console
.
log
(
'获取店铺数据 --->'
,
res
.
result
);
//
console.log('获取店铺数据 --->', res.result);
}
}
};
};
// 页面挂载
// 页面挂载
...
@@ -34,9 +35,15 @@ const StoreDecoratePage: React.FC = () => {
...
@@ -34,9 +35,15 @@ const StoreDecoratePage: React.FC = () => {
<
div
className=
{
'store-form'
}
>
<
div
className=
{
'store-form'
}
>
<
StoreFormView
detail=
{
storeDetail
}
onRefresh=
{
getStoreApplyDetail
}
/>
<
StoreFormView
detail=
{
storeDetail
}
onRefresh=
{
getStoreApplyDetail
}
/>
</
div
>
</
div
>
<
div
className=
{
'store-solution'
}
>
{
storeDetail
?.
cooperationTagId
===
5
?
(
<
StoreSolutionView
detail=
{
storeDetail
}
/>
<
div
className=
{
'store-solution'
}
>
</
div
>
<
StoreSolutionView
detail=
{
storeDetail
}
/>
</
div
>
)
:
(
<
div
className=
{
'store-solution'
}
>
<
StoreBusinessCase
detail=
{
storeDetail
}
/>
</
div
>
)
}
</>
</>
)
}
)
}
</
div
>
</
div
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论