Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
enterprise-platform
Commits
fe93a214
Commit
fe93a214
authored
Sep 28, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改js文件
parent
85f331e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
28 deletions
+22
-28
enterprise-manager-ui/admin/src/views/product/drawershow.vue
enterprise-manager-ui/admin/src/views/product/drawershow.vue
+7
-27
enterprise-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
...com/mortals/xhx/module/product/web/ProductController.java
+15
-1
No files found.
enterprise-manager-ui/admin/src/views/product/drawershow.vue
View file @
fe93a214
...
...
@@ -9,7 +9,6 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<Field
label=
"产品名称"
prop=
"productName"
v-model=
"form.productName"
placeholder=
"请输入产品名称,名称唯一"
/>
<Field
label=
"产品编码"
prop=
"productCode"
v-model=
"form.productCode"
type=
"textarea"
placeholder=
"请输入产品编码"
/>
<Field
label=
"产品slogan"
prop=
"productSlogan"
v-model=
"form.productSlogan"
placeholder=
"请输入产品slogan"
/>
<Field
label=
"产品分类"
prop=
"categoryId"
v-model=
"form.categoryId"
:multiple=
"true"
type=
"select"
:enumData=
"dict.categoryId"
placeholder=
"请选择产品分类"
/>
...
...
@@ -17,11 +16,11 @@
<Field
label=
"产品图标"
><imageUpload
v-model=
"form.productLogoPath"
prePath=
"/file/preview"
/></Field>
<Field
label=
"产品封面图片"
prop=
"productFacePath"
v-model=
"form.productFacePath"
placeholder=
"请输入产品封面图片"
/>
<Field
label=
"产品视频"
><fileUpload
v-model=
"form.productVideoPath"
prePath=
"/file/fileupload"
/></Field>
<Field
label=
"产品封面图片"
prop=
"productFacePath"
><imageUpload
v-model=
"form.productFacePath"
prePath=
"/file/preview"
/>
</Field>
<Field
label=
"产品宣传图片"
><imageUpload
v-model=
"form.productPicPath"
prePath=
"/file/preview"
/></Field>
<Field
label=
"产品视频"
><fileUpload
v-model=
"form.productVideoPath"
prePath=
"/file/fileupload"
/></Field>
<Field
label=
"产品介绍"
prop=
"productIntroduction"
v-model=
"form.productIntroduction"
type=
"textarea"
placeholder=
"请输入产品介绍"
/>
<Field
label=
"产品详情"
prop=
"productDetail"
v-model=
"form.productDetail"
type=
"textarea"
placeholder=
"请输入产品详情"
/
>
<Field
label=
"产品详情"
prop=
"productDetail"
placeholder=
"请输入产品详情"
><editor
v-model=
"form.productDetail"
:min-height=
"256"
/></Field
>
<Field
label=
"发布时间"
prop=
"publishTime"
v-model=
"form.publishTime"
type=
"date"
/>
<Field
label=
"热门"
prop=
"hot"
v-model=
"form.hot"
type=
"radio"
:enumData=
"dict.hot"
placeholder=
"请选择是否热门"
/>
<Field
label=
"备注"
prop=
"productRemark"
v-model=
"form.productRemark"
type=
"textarea"
placeholder=
"请输入备注"
/>
...
...
@@ -29,7 +28,7 @@
</el-row>
<el-divider
content-position=
"center"
>
产品常见问题信息
</el-divider>
<br/>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
style=
"margin-left: 10px"
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAddProductQuestion"
>
添加
</el-button>
</el-col>
...
...
@@ -41,11 +40,6 @@
<el-table
:data=
"productQuestionList"
:row-class-name=
"rowProductQuestionIndex"
@
selection-change=
"handleProductQuestionSelectionChange"
ref=
"productQuestion"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"index"
width=
"50"
/>
<el-table-column
label=
"产品名称"
prop=
"productName"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.productName"
placeholder=
"请输入产品名称"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"问题"
prop=
"question"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.question"
placeholder=
"请输入问题"
/>
...
...
@@ -56,21 +50,7 @@
<el-input
v-model=
"scope.row.answer"
placeholder=
"请输入常见问题回答"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.createTime"
placeholder=
"请输入创建时间"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建用户"
prop=
"createUserId"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.createUserId"
placeholder=
"请输入创建用户"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"修改时间"
prop=
"updateTime"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.updateTime"
placeholder=
"请输入修改时间"
/>
</
template
>
</el-table-column>
</el-table>
<form-buttons
@
submit=
'submitForm'
v-if=
"pageInfo.type!='view'"
noCancelBtn
/>
...
...
enterprise-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
View file @
fe93a214
package
com.mortals.xhx.module.product.web
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.category.model.CategoryQuery
;
import
com.mortals.xhx.module.category.service.CategoryService
;
import
com.mortals.xhx.module.company.model.CompanyProductQuery
;
import
com.mortals.xhx.module.company.model.CompanyQuery
;
import
com.mortals.xhx.module.company.service.CompanyProductService
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.product.model.ProductCategoryQuery
;
import
com.mortals.xhx.module.product.service.ProductCategoryService
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -57,6 +61,9 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
@Autowired
private
CompanyService
companyService
;
@Autowired
private
CompanyProductService
companyProductService
;
public
ProductController
()
{
super
.
setModuleDesc
(
"产品"
);
}
...
...
@@ -69,5 +76,12 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
super
.
init
(
model
,
context
);
}
@Override
protected
int
editAfter
(
Long
id
,
Map
<
String
,
Object
>
model
,
ProductEntity
entity
,
Context
context
)
throws
AppException
{
String
categoryIds
=
productCategoryService
.
find
(
new
ProductCategoryQuery
().
productId
(
entity
.
getId
())).
stream
().
map
(
i
->
i
.
getCategoryId
().
toString
()).
collect
(
Collectors
.
joining
(
","
));
String
companyIds
=
companyProductService
.
find
(
new
CompanyProductQuery
().
productId
(
entity
.
getId
())).
stream
().
map
(
i
->
i
.
getProductId
().
toString
()).
collect
(
Collectors
.
joining
(
","
));
entity
.
setCompanyId
(
companyIds
);
entity
.
setCategoryId
(
categoryIds
);
return
super
.
editAfter
(
id
,
model
,
entity
,
context
);
}
}
\ No newline at end of file
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