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
1 year ago
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 = {
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
)
{
return
request
({
...
...
@@ -289,6 +316,16 @@ export const HttpReq = {
return
res
})
},
// 内容管理-首页管理批量删除
batchDelete
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/homePage/batchDelete
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
xxx
:
null
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/homePage/add.vue
View file @
700e23b0
...
...
@@ -190,13 +190,26 @@
</el-form-item>
<el-form-item
label=
"合作伙伴LOGO:"
class=
"form-cell"
prop=
"partnerLogo"
>
<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
ref=
"uploadCom"
action=
"/api/bsw/product/uploadProductPic"
name=
"productPic"
list-type=
"picture-card"
:headers=
"uploadHeaders"
:limit=
"
1
"
:limit=
"
5
"
:on-exceed=
"handleExceed"
:on-success=
"handleImported"
:on-preview=
"handlePictureCardPreview"
...
...
@@ -208,6 +221,7 @@
<img
width=
"100%"
:src=
"dialogImageUrl"
>
</el-dialog>
</div>
<div
style=
"display: block;clear: both"
>
{{
formData
.
partnerLogo
}}
</div>
</el-form-item>
<el-form-item
label=
"链接:"
class=
"form-cell"
prop=
"url"
>
<div
class=
"cell-box"
>
...
...
@@ -261,8 +275,12 @@ export default {
return
{
uploadHeaders
:
{
'
Authorization
'
:
getToken
()
},
imgSrcStart
:
process
.
env
.
VUE_APP_BASE_API
,
editor
:
false
,
// 富文本对象
dialogImageUrl
:
''
,
dialogImageVisible
:
false
,
imgList
:
[],
dialogImgUrl
:
''
,
dialogImgVisible
:
false
,
visible
:
false
,
title
:
'
添加首页内容
'
,
formData
:
{
...
...
@@ -406,6 +424,12 @@ export default {
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
)
{
HttpReq
.
backstageApi
.
deleteProductPic
({
productPic
:
file
.
response
.
productPic
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/homePage/index.vue
View file @
700e23b0
...
...
@@ -124,7 +124,16 @@ export default {
this
.
$refs
.
addPage
.
loadData
(
item
.
homePageId
)
},
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
()
{
this
.
page
=
1
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/productTabulate/edit.vue
View file @
700e23b0
...
...
@@ -10,17 +10,18 @@
</div>
</el-form-item>
<el-form-item
label=
"产品ID:"
class=
"form-cell"
prop=
"xxx"
>
<div
v-for=
"(item, index) in formData.
dataList"
:key=
"index"
class=
"cell-bo
x"
>
<el-input
v-model=
"item.
i
d"
placeholder=
"产品id"
class=
"cell-input"
style=
"width: 150px"
/>
<div
v-for=
"(item, index) in formData.
productList"
:key=
"index"
class=
"cell-box"
style=
"margin-bottom: 2p
x"
>
<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-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>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
@
click=
"cancelView"
>
关闭
</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>
</el-dialog>
</
template
>
...
...
@@ -36,14 +37,8 @@ export default {
title
:
'
内容管理供应商设置
'
,
formData
:
{
productType
:
''
,
dataList
:
[
{
id
:
'
123
'
,
index
:
'
1
'
},
{
id
:
'
222
'
,
index
:
'
2
'
},
{
id
:
'
333
'
,
index
:
'
3
'
},
{
id
:
'
444
'
,
index
:
'
4
'
},
{
id
:
''
,
index
:
''
}
],
id
:
null
productList
:
[],
productListPageId
:
null
},
rules
:
{}
}
...
...
@@ -51,8 +46,13 @@ export default {
mounted
()
{
},
methods
:
{
delDataRow
(
index
)
{
if
(
this
.
formData
.
productList
.
length
>
1
)
{
this
.
formData
.
productList
.
splice
(
index
,
1
)
}
},
addDataRow
()
{
this
.
formData
.
dataList
.
push
({
id
:
''
,
index
:
''
})
this
.
formData
.
productList
.
push
({
index
:
''
,
productId
:
''
})
},
showView
()
{
this
.
visible
=
true
...
...
@@ -60,48 +60,67 @@ export default {
hideView
()
{
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
visible
=
false
this
.
formData
=
{
productType
:
''
,
productList
:
[],
productListPageId
:
null
}
},
cancelView
()
{
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
)
=>
{
if
(
valid
)
{
// HttpReq.backstageApi.updateCustomerDetail(this.formData).then((res) => {
// this.$notify({
// title: res.msg,
// type: 'success',
// duration: 2500
// })
// if (res.code === 200) {
// this.cancelView()
// this.$parent.loadData()
// }
// })
// } else {
// this.$message({
// message: '表单信息有误,请核对无误后提交!',
// type: 'error'
// })
HttpReq
.
backstageApi
.
updateProductListPage
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
duration
:
2500
})
if
(
res
.
code
===
200
)
{
if
(
isRelease
)
{
this
.
release
()
}
else
{
this
.
cancelView
()
this
.
$parent
.
loadData
()
}
}
})
}
else
{
this
.
$message
({
message
:
'
表单信息有误,请核对无误后提交!
'
,
type
:
'
error
'
})
}
})
},
loadData
(
productListPageId
)
{
// if (productListPageId) {
// HttpReq.backstageApi.querySupplierListPageById({ productListPageId }).then((res) => {
// if (res.code === 200) {
// this.formData = Object.assign(this.formData, res.data)
// if (this.formData.productIdList) {
// const arr = this.formData.productIdList.split(';')
// }
// } else {
// this.$message({
// message: res.msg,
// type: 'error'
// })
// }
// })
// }
if
(
productListPageId
)
{
HttpReq
.
backstageApi
.
queryProductListPageById
({
productListPageId
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
formData
=
Object
.
assign
(
this
.
formData
,
res
.
data
)
}
else
{
this
.
$message
({
message
:
res
.
msg
,
type
:
'
error
'
})
}
})
}
this
.
showView
()
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/supplierTabulate/index.vue
View file @
700e23b0
...
...
@@ -39,7 +39,7 @@
<el-table-column
prop=
"updateTime"
label=
"最后维护日期"
align=
"center"
width=
"200"
/>
<el-table-column
label=
"操作"
align=
"right"
width=
"240"
>
<
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>
</
template
>
</el-table-column>
...
...
This diff is collapsed.
Click to expand it.
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