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
Jul 20, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯
parent
187ca533
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 = {
...
@@ -359,6 +359,36 @@ export const HttpReq = {
return
res
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
xxx
:
null
}
}
}
}
...
...
src/views/backstage/contentMgt/homePage/view.vue
View file @
fad1579b
...
@@ -203,7 +203,6 @@
...
@@ -203,7 +203,6 @@
<label
class=
"el-upload-list__item-status-label"
><i
class=
"el-icon-upload-success el-icon-check"
/></label>
<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-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-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>
</span>
</li>
</li>
</ul>
</ul>
...
...
src/views/backstage/contentMgt/informationTabulate/add.vue
View file @
fad1579b
...
@@ -11,14 +11,14 @@
...
@@ -11,14 +11,14 @@
</el-form-item>
</el-form-item>
</div>
</div>
</el-form-item>
</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"
>
<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>
</div>
</el-form-item>
</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"
>
<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>
</div>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"formData.type"
label=
"照片:"
class=
"form-cell"
prop=
"productPic"
>
<el-form-item
v-show=
"formData.type"
label=
"照片:"
class=
"form-cell"
prop=
"productPic"
>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
ref=
"uploadCom"
ref=
"uploadCom"
action=
"/api/bsw/common/uploadPicture"
action=
"/api/bsw/common/uploadPicture"
name=
"multipartFile"
name=
"multipartFile"
:data=
"
{mark:'
logo
'}"
:data=
"
{mark:'
news
'}"
list-type="picture-card"
list-type="picture-card"
:headers="uploadHeaders"
:headers="uploadHeaders"
:limit="1"
:limit="1"
...
@@ -57,22 +57,24 @@
...
@@ -57,22 +57,24 @@
<img
width=
"100%"
:src=
"dialogImageUrl"
>
<img
width=
"100%"
:src=
"dialogImageUrl"
>
</el-dialog>
</el-dialog>
</div>
</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>
<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"
>
<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>
</div>
</el-form-item>
</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
class=
"cell-box"
>
<div
ref=
"editor"
class=
"editor"
/>
<div
ref=
"editor"
class=
"editor"
/>
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
type=
"text"
@
click=
"cancelView"
>
取消
</el-button>
<el-button
@
click=
"cancelView"
>
关闭
</el-button>
<!--
<el-button
type=
"danger"
@
click=
"submitForm()"
>
预览
</el-button>
-->
<el-button
type=
"primary"
@
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>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
@@ -98,34 +100,13 @@ export default {
...
@@ -98,34 +100,13 @@ export default {
visible
:
false
,
visible
:
false
,
title
:
'
资讯信息内容设置
'
,
title
:
'
资讯信息内容设置
'
,
formData
:
{
formData
:
{
productId
:
null
,
newsPageId
:
null
,
customerId
:
null
,
// 供应商id
title
:
''
,
// 标题
enterpriseName
:
''
,
// 供应商名称
type
:
''
,
// 类型
productName
:
''
,
// 产品名称
source
:
''
,
// 来源
productType
:
'
1
'
,
// 产品大类
content
:
''
,
// 内容
productSubType
:
null
,
// 产品小类
picture
:
''
,
// 图片
minPrice
:
null
,
// 价格区间-小
url
:
''
// 链接
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
'
// 产品品级
},
},
rules
:
{}
rules
:
{}
}
}
...
@@ -146,7 +127,7 @@ export default {
...
@@ -146,7 +127,7 @@ export default {
})
})
},
},
handlePushClick
(
event
)
{
handlePushClick
(
event
)
{
if
(
this
.
formData
.
p
artnerLogo
!==
''
)
{
if
(
this
.
formData
.
p
icture
!==
''
)
{
event
.
stopPropagation
()
event
.
stopPropagation
()
this
.
$message
({
this
.
$message
({
message
:
'
超出最大上传数量限制
'
,
message
:
'
超出最大上传数量限制
'
,
...
@@ -154,9 +135,15 @@ export default {
...
@@ -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
)
{
handleRemove
(
file
,
fileList
)
{
HttpReq
.
backstageApi
.
deleteP
roductPic
({
HttpReq
.
backstageApi
.
deleteP
icture
({
productPic
:
file
.
response
.
productPic
multipartFile
:
file
.
response
.
pictures
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
res
.
msg
,
title
:
res
.
msg
,
...
@@ -165,9 +152,9 @@ export default {
...
@@ -165,9 +152,9 @@ export default {
})
})
const
arr
=
[]
const
arr
=
[]
fileList
.
forEach
(
item
=>
{
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
)
{
handlePictureCardPreview
(
file
)
{
...
@@ -176,9 +163,9 @@ export default {
...
@@ -176,9 +163,9 @@ export default {
},
},
handleImported
(
response
,
file
,
fileList
)
{
handleImported
(
response
,
file
,
fileList
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
arr
=
this
.
formData
.
p
roductPic
?
this
.
formData
.
productPic
.
split
(
'
;
'
)
:
[]
const
arr
=
this
.
formData
.
p
icture
?
this
.
formData
.
picture
.
split
(
'
;
'
)
:
[]
arr
.
push
(
response
.
p
roductPic
)
arr
.
push
(
response
.
p
ictures
)
this
.
formData
.
p
roductPic
=
arr
.
join
(
'
;
'
)
this
.
formData
.
p
icture
=
arr
.
join
(
'
;
'
)
this
.
$notify
({
this
.
$notify
({
title
:
'
上传成功!
'
,
title
:
'
上传成功!
'
,
type
:
'
success
'
,
type
:
'
success
'
,
...
@@ -198,12 +185,22 @@ export default {
...
@@ -198,12 +185,22 @@ export default {
}
}
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
visible
=
false
this
.
visible
=
false
this
.
imgList
=
[]
this
.
formData
=
{
newsPageId
:
null
,
title
:
''
,
// 标题
type
:
''
,
// 类型
source
:
''
,
// 来源
content
:
''
,
// 内容
picture
:
''
,
// 图片
url
:
''
// 链接
}
},
},
cancelView
()
{
cancelView
()
{
this
.
hideView
()
this
.
hideView
()
},
},
release
()
{
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
({
this
.
$notify
({
title
:
res
.
msg
,
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
,
...
@@ -218,8 +215,8 @@ export default {
...
@@ -218,8 +215,8 @@ export default {
submitForm
(
isRelease
)
{
submitForm
(
isRelease
)
{
this
.
$refs
.
formViewRef
.
validate
((
valid
,
obj
)
=>
{
this
.
$refs
.
formViewRef
.
validate
((
valid
,
obj
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
formData
.
home
PageId
)
{
if
(
this
.
formData
.
news
PageId
)
{
HttpReq
.
backstageApi
.
update
Home
Page
(
this
.
formData
).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
update
News
Page
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
res
.
msg
,
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
...
@@ -234,7 +231,7 @@ export default {
...
@@ -234,7 +231,7 @@ export default {
}
}
})
})
}
else
{
}
else
{
HttpReq
.
backstageApi
.
add
Home
Page
(
this
.
formData
).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
add
News
Page
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
res
.
msg
,
title
:
res
.
msg
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
...
@@ -259,6 +256,7 @@ export default {
...
@@ -259,6 +256,7 @@ export default {
},
},
loadData
(
newsPageId
)
{
loadData
(
newsPageId
)
{
this
.
showView
()
this
.
showView
()
this
.
$nextTick
(()
=>
{
if
(
!
this
.
editor
)
{
if
(
!
this
.
editor
)
{
const
_this
=
this
const
_this
=
this
const
editor
=
new
E
(
this
.
$refs
.
editor
)
const
editor
=
new
E
(
this
.
$refs
.
editor
)
...
@@ -273,18 +271,19 @@ export default {
...
@@ -273,18 +271,19 @@ export default {
})
})
}
}
editor
.
config
.
onchange
=
(
html
)
=>
{
editor
.
config
.
onchange
=
(
html
)
=>
{
this
.
formData
.
productDescribe
=
html
this
.
formData
.
content
=
html
}
}
editor
.
create
()
editor
.
create
()
this
.
editor
=
editor
this
.
editor
=
editor
}
}
if
(
newsPageId
)
{
if
(
newsPageId
)
{
HttpReq
.
backstageApi
.
queryHome
PageById
({
newsPageId
}).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
queryNews
PageById
({
newsPageId
}).
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
.
partnerLogo
)
{
if
(
this
.
formData
.
picture
)
{
this
.
imgList
=
this
.
formData
.
partnerLogo
.
split
(
'
;
'
)
this
.
imgList
=
this
.
formData
.
picture
.
split
(
'
;
'
)
}
}
this
.
editor
.
txt
.
html
(
this
.
formData
.
content
)
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
msg
,
message
:
res
.
msg
,
...
@@ -293,6 +292,7 @@ export default {
...
@@ -293,6 +292,7 @@ export default {
}
}
})
})
}
}
})
}
}
}
}
}
}
...
...
src/views/backstage/contentMgt/informationTabulate/index.vue
View file @
fad1579b
...
@@ -47,15 +47,17 @@
...
@@ -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"
/>
<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>
</div>
<add-page
ref=
"addPage"
/>
<add-page
ref=
"addPage"
/>
<view-page
ref=
"viewPage"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
import
{
HttpReq
}
from
'
@/api/common
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
addPage
from
'
./add
'
import
addPage
from
'
./add
'
import
viewPage
from
'
./view
'
export
default
{
export
default
{
components
:
{
DateRangePicker
,
addPage
},
components
:
{
DateRangePicker
,
addPage
,
viewPage
},
dicts
:
[
'
issue_status
'
,
'
information_type
'
],
dicts
:
[
'
issue_status
'
,
'
information_type
'
],
data
()
{
data
()
{
return
{
return
{
...
@@ -121,10 +123,10 @@ export default {
...
@@ -121,10 +123,10 @@ export default {
this
.
$refs
.
addPage
.
loadData
(
item
.
newsPageId
)
this
.
$refs
.
addPage
.
loadData
(
item
.
newsPageId
)
},
},
toView
(
item
)
{
toView
(
item
)
{
// this.$refs.viewPage.loadData(item.home
PageId)
this
.
$refs
.
viewPage
.
loadData
(
item
.
news
PageId
)
},
},
toDelete
(
item
)
{
toDelete
(
item
)
{
HttpReq
.
backstageApi
.
hp
BatchDelete
({
HttpReq
.
backstageApi
.
news
BatchDelete
({
ids
:
[
item
.
newsPageId
]
ids
:
[
item
.
newsPageId
]
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
$notify
({
this
.
$notify
({
...
...
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