Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhanglw
sensorConsult
Commits
700e23b0
Commit
700e23b0
authored
Jul 18, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页管理
parent
82e8cb59
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
137 additions
and
48 deletions
+137
-48
common.js
src/api/common.js
+37
-0
add.vue
src/views/backstage/contentMgt/homePage/add.vue
+25
-1
index.vue
src/views/backstage/contentMgt/homePage/index.vue
+10
-1
edit.vue
src/views/backstage/contentMgt/productTabulate/edit.vue
+64
-45
index.vue
src/views/backstage/contentMgt/supplierTabulate/index.vue
+1
-1
No files found.
src/api/common.js
View file @
700e23b0
...
@@ -245,6 +245,33 @@ export const HttpReq = {
...
@@ -245,6 +245,33 @@ export const HttpReq = {
method
:
'
get
'
method
:
'
get
'
})
})
},
},
// 内容管理-查询单个产品列表页
queryProductListPageById
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/productListPage/queryProductListPageById?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 内容管理-修改产品列表
updateProductListPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/productListPage/updateProductListPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-产品列表批量发布
releaseProductListPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/productListPage/releaseProductListPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-查询首页内容列表页
// 内容管理-查询首页内容列表页
queryHomePage
:
function
(
params
)
{
queryHomePage
:
function
(
params
)
{
return
request
({
return
request
({
...
@@ -289,6 +316,16 @@ export const HttpReq = {
...
@@ -289,6 +316,16 @@ export const HttpReq = {
return
res
return
res
})
})
},
},
// 内容管理-首页管理批量删除
batchDelete
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/homePage/batchDelete
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
xxx
:
null
xxx
:
null
}
}
}
}
...
...
src/views/backstage/contentMgt/homePage/add.vue
View file @
700e23b0
...
@@ -190,13 +190,26 @@
...
@@ -190,13 +190,26 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"合作伙伴LOGO:"
class=
"form-cell"
prop=
"partnerLogo"
>
<el-form-item
label=
"合作伙伴LOGO:"
class=
"form-cell"
prop=
"partnerLogo"
>
<div
class=
"cell-box"
>
<div
class=
"cell-box"
>
<ul
class=
"el-upload-list el-upload-list--picture-card"
style=
"float: left"
>
<li
v-for=
"(item, index) in imgList"
:key=
"index"
tabindex=
"0"
class=
"el-upload-list__item is-success"
>
<img
:src=
"imgSrcStart+'/productPic/'+item"
class=
"el-upload-list__item-thumbnail"
>
<label
class=
"el-upload-list__item-status-label"
><i
class=
"el-icon-upload-success el-icon-check"
/></label>
<span
class=
"el-upload-list__item-actions"
>
<span
class=
"el-upload-list__item-preview"
@
click=
"dialogImgUrl=item;dialogImgVisible=true"
><i
class=
"el-icon-zoom-in"
/></span>
<span
class=
"el-upload-list__item-delete"
@
click=
"handleRemoveImg(item)"
><i
class=
"el-icon-delete"
/></span>
</span>
</li>
</ul>
<el-dialog
append-to-body
:visible.sync=
"dialogImgVisible"
>
<img
width=
"100%"
:src=
"imgSrcStart+'/productPic/'+dialogImgUrl"
>
</el-dialog>
<el-upload
<el-upload
ref=
"uploadCom"
ref=
"uploadCom"
action=
"/api/bsw/product/uploadProductPic"
action=
"/api/bsw/product/uploadProductPic"
name=
"productPic"
name=
"productPic"
list-type=
"picture-card"
list-type=
"picture-card"
:headers=
"uploadHeaders"
:headers=
"uploadHeaders"
:limit=
"
1
"
:limit=
"
5
"
:on-exceed=
"handleExceed"
:on-exceed=
"handleExceed"
:on-success=
"handleImported"
:on-success=
"handleImported"
:on-preview=
"handlePictureCardPreview"
:on-preview=
"handlePictureCardPreview"
...
@@ -208,6 +221,7 @@
...
@@ -208,6 +221,7 @@
<img
width=
"100%"
:src=
"dialogImageUrl"
>
<img
width=
"100%"
:src=
"dialogImageUrl"
>
</el-dialog>
</el-dialog>
</div>
</div>
<div
style=
"display: block;clear: both"
>
{{
formData
.
partnerLogo
}}
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"链接:"
class=
"form-cell"
prop=
"url"
>
<el-form-item
label=
"链接:"
class=
"form-cell"
prop=
"url"
>
<div
class=
"cell-box"
>
<div
class=
"cell-box"
>
...
@@ -261,8 +275,12 @@ export default {
...
@@ -261,8 +275,12 @@ export default {
return
{
return
{
uploadHeaders
:
{
'
Authorization
'
:
getToken
()
},
uploadHeaders
:
{
'
Authorization
'
:
getToken
()
},
imgSrcStart
:
process
.
env
.
VUE_APP_BASE_API
,
imgSrcStart
:
process
.
env
.
VUE_APP_BASE_API
,
editor
:
false
,
// 富文本对象
dialogImageUrl
:
''
,
dialogImageUrl
:
''
,
dialogImageVisible
:
false
,
dialogImageVisible
:
false
,
imgList
:
[],
dialogImgUrl
:
''
,
dialogImgVisible
:
false
,
visible
:
false
,
visible
:
false
,
title
:
'
添加首页内容
'
,
title
:
'
添加首页内容
'
,
formData
:
{
formData
:
{
...
@@ -406,6 +424,12 @@ export default {
...
@@ -406,6 +424,12 @@ export default {
type
:
'
info
'
type
:
'
info
'
})
})
},
},
handleRemoveImg
(
item
)
{
this
.
imgList
.
splice
(
this
.
imgList
.
indexOf
(
item
),
1
)
const
arr
=
this
.
formData
.
productPic
.
split
(
'
;
'
)
arr
.
splice
(
arr
.
indexOf
(
item
),
1
)
this
.
formData
.
productPic
=
arr
.
join
(
'
;
'
)
},
handleRemove
(
file
,
fileList
)
{
handleRemove
(
file
,
fileList
)
{
HttpReq
.
backstageApi
.
deleteProductPic
({
HttpReq
.
backstageApi
.
deleteProductPic
({
productPic
:
file
.
response
.
productPic
productPic
:
file
.
response
.
productPic
...
...
src/views/backstage/contentMgt/homePage/index.vue
View file @
700e23b0
...
@@ -124,7 +124,16 @@ export default {
...
@@ -124,7 +124,16 @@ export default {
this
.
$refs
.
addPage
.
loadData
(
item
.
homePageId
)
this
.
$refs
.
addPage
.
loadData
(
item
.
homePageId
)
},
},
toDelete
(
item
)
{
toDelete
(
item
)
{
HttpReq
.
backstageApi
.
batchDelete
({
ids
:
[
item
.
homePageId
]
}).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
duration
:
2500
})
this
.
loadData
()
})
},
},
toSearch
()
{
toSearch
()
{
this
.
page
=
1
this
.
page
=
1
...
...
src/views/backstage/contentMgt/productTabulate/edit.vue
View file @
700e23b0
...
@@ -10,17 +10,18 @@
...
@@ -10,17 +10,18 @@
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"产品ID:"
class=
"form-cell"
prop=
"xxx"
>
<el-form-item
label=
"产品ID:"
class=
"form-cell"
prop=
"xxx"
>
<div
v-for=
"(item, index) in formData.
dataList"
:key=
"index"
class=
"cell-bo
x"
>
<div
v-for=
"(item, index) in formData.
productList"
:key=
"index"
class=
"cell-box"
style=
"margin-bottom: 2p
x"
>
<el-input
v-model=
"item.
i
d"
placeholder=
"产品id"
class=
"cell-input"
style=
"width: 150px"
/>
<el-input
v-model=
"item.
productI
d"
placeholder=
"产品id"
class=
"cell-input"
style=
"width: 150px"
/>
<el-input
v-model.number=
"item.index"
type=
"number"
placeholder=
"顺序"
class=
"cell-input"
style=
"width: 150px"
/>
<el-input
v-model.number=
"item.index"
type=
"number"
placeholder=
"顺序"
class=
"cell-input"
style=
"width: 150px"
/>
<el-button
v-if=
"index+1>=formData.dataList.length"
icon=
"el-icon-plus"
@
click=
"addDataRow"
>
添加行
</el-button>
<el-button
circle
icon=
"el-icon-delete"
@
click=
"delDataRow(index)"
/>
<el-button
v-if=
"index+1>=formData.productList.length"
icon=
"el-icon-plus"
@
click=
"addDataRow"
>
添加行
</el-button>
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
@
click=
"cancelView"
>
关闭
</el-button>
<el-button
@
click=
"cancelView"
>
关闭
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
保存
</el-button>
<el-button
type=
"success"
@
click=
"submitForm()"
>
发布
</el-button>
<el-button
type=
"success"
@
click=
"submitForm(
true
)"
>
发布
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
@@ -36,14 +37,8 @@ export default {
...
@@ -36,14 +37,8 @@ export default {
title
:
'
内容管理供应商设置
'
,
title
:
'
内容管理供应商设置
'
,
formData
:
{
formData
:
{
productType
:
''
,
productType
:
''
,
dataList
:
[
productList
:
[],
{
id
:
'
123
'
,
index
:
'
1
'
},
productListPageId
:
null
{
id
:
'
222
'
,
index
:
'
2
'
},
{
id
:
'
333
'
,
index
:
'
3
'
},
{
id
:
'
444
'
,
index
:
'
4
'
},
{
id
:
''
,
index
:
''
}
],
id
:
null
},
},
rules
:
{}
rules
:
{}
}
}
...
@@ -51,8 +46,13 @@ export default {
...
@@ -51,8 +46,13 @@ export default {
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
delDataRow
(
index
)
{
if
(
this
.
formData
.
productList
.
length
>
1
)
{
this
.
formData
.
productList
.
splice
(
index
,
1
)
}
},
addDataRow
()
{
addDataRow
()
{
this
.
formData
.
dataList
.
push
({
id
:
''
,
index
:
''
})
this
.
formData
.
productList
.
push
({
index
:
''
,
productId
:
''
})
},
},
showView
()
{
showView
()
{
this
.
visible
=
true
this
.
visible
=
true
...
@@ -60,48 +60,67 @@ export default {
...
@@ -60,48 +60,67 @@ export default {
hideView
()
{
hideView
()
{
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
visible
=
false
this
.
visible
=
false
this
.
formData
=
{
productType
:
''
,
productList
:
[],
productListPageId
:
null
}
},
},
cancelView
()
{
cancelView
()
{
this
.
hideView
()
this
.
hideView
()
},
},
submitForm
()
{
release
()
{
HttpReq
.
backstageApi
.
releaseProductListPage
({
ids
:
[
this
.
formData
.
productListPageId
]
}).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
duration
:
2500
})
if
(
res
.
code
===
200
)
{
this
.
cancelView
()
this
.
$parent
.
loadData
()
}
})
},
submitForm
(
isRelease
)
{
this
.
$refs
.
formViewRef
.
validate
((
valid
,
obj
)
=>
{
this
.
$refs
.
formViewRef
.
validate
((
valid
,
obj
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// HttpReq.backstageApi.updateCustomerDetail(this.formData).then((res) => {
HttpReq
.
backstageApi
.
updateProductListPage
(
this
.
formData
).
then
((
res
)
=>
{
// this.$notify({
this
.
$notify
({
// title: res.msg,
title
:
res
.
msg
,
// type: 'success',
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
// duration: 2500
duration
:
2500
// })
})
// if (res.code === 200) {
if
(
res
.
code
===
200
)
{
// this.cancelView()
if
(
isRelease
)
{
// this.$parent.loadData()
this
.
release
()
// }
}
else
{
// })
this
.
cancelView
()
// } else {
this
.
$parent
.
loadData
()
// this.$message({
}
// message: '表单信息有误,请核对无误后提交!',
}
// type: 'error'
})
// })
}
else
{
this
.
$message
({
message
:
'
表单信息有误,请核对无误后提交!
'
,
type
:
'
error
'
})
}
}
})
})
},
},
loadData
(
productListPageId
)
{
loadData
(
productListPageId
)
{
// if (productListPageId) {
if
(
productListPageId
)
{
// HttpReq.backstageApi.querySupplierListPageById({ productListPageId }).then((res) => {
HttpReq
.
backstageApi
.
queryProductListPageById
({
productListPageId
}).
then
((
res
)
=>
{
// if (res.code === 200) {
if
(
res
.
code
===
200
)
{
// this.formData = Object.assign(this.formData, res.data)
this
.
formData
=
Object
.
assign
(
this
.
formData
,
res
.
data
)
// if (this.formData.productIdList) {
}
else
{
// const arr = this.formData.productIdList.split(';')
this
.
$message
({
// }
message
:
res
.
msg
,
// } else {
type
:
'
error
'
// this.$message({
})
// message: res.msg,
}
// type: 'error'
})
// })
}
// }
// })
// }
this
.
showView
()
this
.
showView
()
}
}
}
}
...
...
src/views/backstage/contentMgt/supplierTabulate/index.vue
View file @
700e23b0
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<el-table-column
prop=
"updateTime"
label=
"最后维护日期"
align=
"center"
width=
"200"
/>
<el-table-column
prop=
"updateTime"
label=
"最后维护日期"
align=
"center"
width=
"200"
/>
<el-table-column
label=
"操作"
align=
"right"
width=
"240"
>
<el-table-column
label=
"操作"
align=
"right"
width=
"240"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
v-if=
"scope.row.status==='1'"
content=
"发布"
><el-button
round
plain
type=
"success"
icon=
"el-icon-finished"
@
click=
"batchOperate(1, scope.row)"
/></el-tooltip>
<el-tooltip
v-if=
"scope.row.status==='1'"
content=
"发布"
><el-button
round
plain
type=
"success"
icon=
"el-icon-finished"
@
click=
"batchOperate(1, scope.row)"
/></el-tooltip>
<el-tooltip
content=
"设置"
><el-button
round
plain
icon=
"el-icon-s-tools"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
content=
"设置"
><el-button
round
plain
icon=
"el-icon-s-tools"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
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