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
fad1579b
Commit
fad1579b
authored
1 year ago
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯
parent
187ca533
master
No related merge requests found
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
246 additions
and
499 deletions
+246
-499
common.js
src/api/common.js
+30
-0
view.vue
src/views/backstage/contentMgt/homePage/view.vue
+0
-1
add.vue
src/views/backstage/contentMgt/informationTabulate/add.vue
+85
-85
index.vue
src/views/backstage/contentMgt/informationTabulate/index.vue
+5
-3
view.vue
src/views/backstage/contentMgt/informationTabulate/view.vue
+126
-410
No files found.
src/api/common.js
View file @
fad1579b
...
...
@@ -359,6 +359,36 @@ export const HttpReq = {
return
res
})
},
// 内容管理-修改资讯
updateNewsPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/newsPage/updateNewsPage
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-新增资讯
addNewsPage
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/newsPage/addNewsPage
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 内容管理-删除资讯
newsBatchDelete
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/newsPage/batchDelete
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
xxx
:
null
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/homePage/view.vue
View file @
fad1579b
...
...
@@ -203,7 +203,6 @@
<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>
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/informationTabulate/add.vue
View file @
fad1579b
...
...
@@ -11,14 +11,14 @@
</el-form-item>
</div>
</el-form-item>
<el-form-item
label=
"标题:"
class=
"form-cell"
prop=
"
productNam
e"
>
<el-form-item
label=
"标题:"
class=
"form-cell"
prop=
"
titl
e"
>
<div
class=
"cell-box"
>
<el-input
v-model=
"formData.
productNam
e"
placeholder=
"单行输入"
class=
"cell-input"
/>
<el-input
v-model=
"formData.
titl
e"
placeholder=
"单行输入"
class=
"cell-input"
/>
</div>
</el-form-item>
<el-form-item
v-show=
"formData.type>=4"
label=
"链接:"
class=
"form-cell"
prop=
"
productName
"
>
<el-form-item
v-show=
"formData.type>=4"
label=
"链接:"
class=
"form-cell"
prop=
"
url
"
>
<div
class=
"cell-box"
>
<el-input
v-model=
"formData.
productName
"
placeholder=
"单行输入"
class=
"cell-input"
/>
<el-input
v-model=
"formData.
url
"
placeholder=
"单行输入"
class=
"cell-input"
/>
</div>
</el-form-item>
<el-form-item
v-show=
"formData.type"
label=
"照片:"
class=
"form-cell"
prop=
"productPic"
>
...
...
@@ -40,7 +40,7 @@
ref=
"uploadCom"
action=
"/api/bsw/common/uploadPicture"
name=
"multipartFile"
:data=
"
{mark:'
logo
'}"
:data=
"
{mark:'
news
'}"
list-type="picture-card"
:headers="uploadHeaders"
:limit="1"
...
...
@@ -57,22 +57,24 @@
<img
width=
"100%"
:src=
"dialogImageUrl"
>
</el-dialog>
</div>
<div
style=
"display: block;clear: both"
>
{{
formData
.
p
artnerLogo
}}
</div>
<div
style=
"display: block;clear: both"
>
{{
formData
.
p
icture
}}
</div>
</el-form-item>
<el-form-item
v-show=
"formData.type
<4
"
label=
"来源:"
class=
"form-cell"
prop=
"
productNam
e"
>
<el-form-item
v-show=
"formData.type
<4
"
label=
"来源:"
class=
"form-cell"
prop=
"
sourc
e"
>
<div
class=
"cell-box"
>
<el-input
v-model=
"formData.
productNam
e"
placeholder=
"单行输入"
class=
"cell-input"
/>
<el-input
v-model=
"formData.
sourc
e"
placeholder=
"单行输入"
class=
"cell-input"
/>
</div>
</el-form-item>
<el-form-item
v-show=
"formData.type
<4
"
label=
"内容:"
class=
"form-cell"
prop=
"
productDescribe
"
>
<el-form-item
v-show=
"formData.type
<4
"
label=
"内容:"
class=
"form-cell"
prop=
"
content
"
>
<div
class=
"cell-box"
>
<div
ref=
"editor"
class=
"editor"
/>
</div>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"cancelView"
>
取消
</el-button>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
@
click=
"cancelView"
>
关闭
</el-button>
<!--
<el-button
type=
"danger"
@
click=
"submitForm()"
>
预览
</el-button>
-->
<el-button
type=
"primary"
@
click=
"submitForm()"
>
保存
</el-button>
<el-button
v-if=
"formData.newsPageId"
type=
"success"
@
click=
"submitForm(true)"
>
发布
</el-button>
</div>
</el-dialog>
</
template
>
...
...
@@ -98,34 +100,13 @@ export default {
visible
:
false
,
title
:
'
资讯信息内容设置
'
,
formData
:
{
productId
:
null
,
customerId
:
null
,
// 供应商id
enterpriseName
:
''
,
// 供应商名称
productName
:
''
,
// 产品名称
productType
:
'
1
'
,
// 产品大类
productSubType
:
null
,
// 产品小类
minPrice
:
null
,
// 价格区间-小
maxPrice
:
null
,
// 价格区间-大
productFeature
:
null
,
// 产品特点
productPic
:
''
,
// 产品图片
productDescribe
:
''
,
// 产品描述(富文本)
notes
:
null
,
// 其他说明
letterOfCommitment
:
false
,
// 交易保障承诺
attributeBrand
:
''
,
// 属性-品牌
attributeConsumptionCurrent
:
''
,
// 属性-消耗电流
attributeProductName
:
''
,
// 属性-产品名称
attributeRatedPower
:
''
,
// 属性-额定功率
attributeModel
:
''
,
// 属性-型号
attributeReactionTime
:
''
,
// 属性-反应时间
attributeWorkingVoltage
:
''
,
// 属性-工作电压
attributeEncapsulation
:
''
,
// 属性-封装
attributeQualityAssurance
:
''
,
// 属性-质量保证
attributeProducingArea
:
''
,
// 属性-产地
attributeNumber
:
''
,
// 属性-数量
attributeColor
:
''
,
// 属性-颜色
attributeApplicableScenarios
:
''
,
// 属性-品牌
attributeBatchNumber
:
''
,
// 属性-批号
rank
:
'
1
'
// 产品品级
newsPageId
:
null
,
title
:
''
,
// 标题
type
:
''
,
// 类型
source
:
''
,
// 来源
content
:
''
,
// 内容
picture
:
''
,
// 图片
url
:
''
// 链接
},
rules
:
{}
}
...
...
@@ -146,7 +127,7 @@ export default {
})
},
handlePushClick
(
event
)
{
if
(
this
.
formData
.
p
artnerLogo
!==
''
)
{
if
(
this
.
formData
.
p
icture
!==
''
)
{
event
.
stopPropagation
()
this
.
$message
({
message
:
'
超出最大上传数量限制
'
,
...
...
@@ -154,9 +135,15 @@ export default {
})
}
},
handleRemoveImg
(
item
)
{
this
.
imgList
.
splice
(
this
.
imgList
.
indexOf
(
item
),
1
)
const
arr
=
this
.
formData
.
picture
.
split
(
'
;
'
)
arr
.
splice
(
arr
.
indexOf
(
item
),
1
)
this
.
formData
.
picture
=
arr
.
join
(
'
;
'
)
},
handleRemove
(
file
,
fileList
)
{
HttpReq
.
backstageApi
.
deleteP
roductPic
({
productPic
:
file
.
response
.
productPic
HttpReq
.
backstageApi
.
deleteP
icture
({
multipartFile
:
file
.
response
.
pictures
}).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
...
...
@@ -165,9 +152,9 @@ export default {
})
const
arr
=
[]
fileList
.
forEach
(
item
=>
{
arr
.
push
(
item
.
response
.
p
roductPic
)
arr
.
push
(
item
.
response
.
p
ictures
)
})
this
.
formData
.
p
roductPic
=
arr
.
join
(
'
;
'
)
this
.
formData
.
p
icture
=
arr
.
join
(
'
;
'
)
})
},
handlePictureCardPreview
(
file
)
{
...
...
@@ -176,9 +163,9 @@ export default {
},
handleImported
(
response
,
file
,
fileList
)
{
this
.
$nextTick
(()
=>
{
const
arr
=
this
.
formData
.
p
roductPic
?
this
.
formData
.
productPic
.
split
(
'
;
'
)
:
[]
arr
.
push
(
response
.
p
roductPic
)
this
.
formData
.
p
roductPic
=
arr
.
join
(
'
;
'
)
const
arr
=
this
.
formData
.
p
icture
?
this
.
formData
.
picture
.
split
(
'
;
'
)
:
[]
arr
.
push
(
response
.
p
ictures
)
this
.
formData
.
p
icture
=
arr
.
join
(
'
;
'
)
this
.
$notify
({
title
:
'
上传成功!
'
,
type
:
'
success
'
,
...
...
@@ -198,12 +185,22 @@ export default {
}
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
visible
=
false
this
.
imgList
=
[]
this
.
formData
=
{
newsPageId
:
null
,
title
:
''
,
// 标题
type
:
''
,
// 类型
source
:
''
,
// 来源
content
:
''
,
// 内容
picture
:
''
,
// 图片
url
:
''
// 链接
}
},
cancelView
()
{
this
.
hideView
()
},
release
()
{
HttpReq
.
backstageApi
.
release
HomePage
({
ids
:
[
this
.
formData
.
home
PageId
]
}).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
release
NewsPage
({
ids
:
[
this
.
formData
.
news
PageId
]
}).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
...
...
@@ -218,8 +215,8 @@ export default {
submitForm
(
isRelease
)
{
this
.
$refs
.
formViewRef
.
validate
((
valid
,
obj
)
=>
{
if
(
valid
)
{
if
(
this
.
formData
.
home
PageId
)
{
HttpReq
.
backstageApi
.
update
Home
Page
(
this
.
formData
).
then
((
res
)
=>
{
if
(
this
.
formData
.
news
PageId
)
{
HttpReq
.
backstageApi
.
update
News
Page
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
...
...
@@ -234,7 +231,7 @@ export default {
}
})
}
else
{
HttpReq
.
backstageApi
.
add
Home
Page
(
this
.
formData
).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
add
News
Page
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
...
...
@@ -259,6 +256,7 @@ export default {
},
loadData
(
newsPageId
)
{
this
.
showView
()
this
.
$nextTick
(()
=>
{
if
(
!
this
.
editor
)
{
const
_this
=
this
const
editor
=
new
E
(
this
.
$refs
.
editor
)
...
...
@@ -273,18 +271,19 @@ export default {
})
}
editor
.
config
.
onchange
=
(
html
)
=>
{
this
.
formData
.
productDescribe
=
html
this
.
formData
.
content
=
html
}
editor
.
create
()
this
.
editor
=
editor
}
if
(
newsPageId
)
{
HttpReq
.
backstageApi
.
queryHome
PageById
({
newsPageId
}).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
queryNews
PageById
({
newsPageId
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
formData
=
Object
.
assign
(
this
.
formData
,
res
.
data
)
if
(
this
.
formData
.
partnerLogo
)
{
this
.
imgList
=
this
.
formData
.
partnerLogo
.
split
(
'
;
'
)
if
(
this
.
formData
.
picture
)
{
this
.
imgList
=
this
.
formData
.
picture
.
split
(
'
;
'
)
}
this
.
editor
.
txt
.
html
(
this
.
formData
.
content
)
}
else
{
this
.
$message
({
message
:
res
.
msg
,
...
...
@@ -293,6 +292,7 @@ export default {
}
})
}
})
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/informationTabulate/index.vue
View file @
fad1579b
...
...
@@ -47,15 +47,17 @@
<el-pagination
:total=
"total"
:current-page=
"page"
:page-size=
"pageSize"
style=
"margin-top: 8px;"
layout=
"total, prev, pager, next, sizes"
@
size-change=
"sizeChange"
@
current-change=
"pageChange"
/>
</div>
<add-page
ref=
"addPage"
/>
<view-page
ref=
"viewPage"
/>
</div>
</template>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
addPage
from
'
./add
'
import
viewPage
from
'
./view
'
export
default
{
components
:
{
DateRangePicker
,
addPage
},
components
:
{
DateRangePicker
,
addPage
,
viewPage
},
dicts
:
[
'
issue_status
'
,
'
information_type
'
],
data
()
{
return
{
...
...
@@ -121,10 +123,10 @@ export default {
this
.
$refs
.
addPage
.
loadData
(
item
.
newsPageId
)
},
toView
(
item
)
{
// this.$refs.viewPage.loadData(item.home
PageId)
this
.
$refs
.
viewPage
.
loadData
(
item
.
news
PageId
)
},
toDelete
(
item
)
{
HttpReq
.
backstageApi
.
hp
BatchDelete
({
HttpReq
.
backstageApi
.
news
BatchDelete
({
ids
:
[
item
.
newsPageId
]
}).
then
((
res
)
=>
{
this
.
$notify
({
...
...
This diff is collapsed.
Click to expand it.
src/views/backstage/contentMgt/informationTabulate/view.vue
View file @
fad1579b
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