Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
youjj
cloud-platform-ui
Commits
2a58ef00
Commit
2a58ef00
authored
Aug 29, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
0c9e89d3
9597a786
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
861 additions
and
46 deletions
+861
-46
news.js
src/api/officialWebsite/news.js
+84
-0
index.js
src/router/index.js
+1
-1
index.vue
src/views/vehicle/vehicleInfo/index.vue
+1
-1
activityList.vue
src/views/xxOfficialWebsite/activityList.vue
+2
-1
campsiteModal.vue
src/views/xxOfficialWebsite/modal/campsiteModal.vue
+14
-5
oneCampsiteModal.vue
src/views/xxOfficialWebsite/modal/oneCampsiteModal.vue
+20
-38
popup.vue
src/views/xxOfficialWebsite/modal/popup.vue
+347
-0
newsList.vue
src/views/xxOfficialWebsite/newsList.vue
+392
-0
No files found.
src/api/officialWebsite/news.js
0 → 100644
View file @
2a58ef00
import
fetch
from
'utils/fetch'
;
/**
* 获取列表
* @param query
*/
export
function
page
(
query
)
{
return
fetch
({
url
:
'/api/uccn/article/all'
,
method
:
'post'
,
data
:
query
});
}
/**
* 添加
* @param query
*/
export
function
add
(
query
)
{
return
fetch
({
url
:
'/api/uccn/article/add'
,
method
:
'post'
,
data
:
query
});
}
/**
* 删除
* @param query
*/
export
function
update
(
query
)
{
return
fetch
({
url
:
'/api/uccn/article/update'
,
method
:
'put'
,
data
:
query
});
}
/**
* 上架
* @param id
*/
export
function
putaway
(
id
)
{
return
fetch
({
url
:
'/api/uccn/article/putaway/'
+
id
,
method
:
'put'
});
}
/**
* 下架
* @param query
*/
export
function
soldOut
(
id
)
{
return
fetch
({
url
:
'/api/uccn/article/soldOut/'
+
id
,
method
:
'put'
,
});
}
/**
* 删除
* @param id
*/
export
function
remove
(
id
)
{
return
fetch
({
url
:
'/api/uccn/article/remove/'
+
id
,
method
:
'put'
});
}
/**
* 查询一条
* @param query
*/
export
function
getOne
(
query
)
{
return
fetch
({
url
:
'/api/uccn/article/app/unauth/one'
,
method
:
'get'
,
params
:
query
});
}
src/router/index.js
View file @
2a58ef00
...
...
@@ -565,7 +565,7 @@ export const asyncRouterMap = [{
{
path
:
'/xxOfficialWebsite'
,
component
:
Layout
,
name
:
'
新欣
房车官网管理'
,
name
:
'
欣新
房车官网管理'
,
icon
:
'setting'
,
authority
:
'xxOfficialWebsite'
,
children
:
[
...
...
src/views/vehicle/vehicleInfo/index.vue
View file @
2a58ef00
...
...
@@ -1369,7 +1369,7 @@
* 获取全部车型
* */
getAllVehicleType
()
{
getAllVehicle
Model
List
().
then
(
response
=>
{
getAllVehicleList
().
then
(
response
=>
{
let
listRs
=
undefined
;
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
))
{
listRs
=
response
.
data
;
...
...
src/views/xxOfficialWebsite/activityList.vue
View file @
2a58ef00
...
...
@@ -138,7 +138,8 @@
import
{
getActivityList
,
isShowStatus
,
isPublishStatus
isPublishStatus
,
deleteActivityTag
}
from
'../../api/officialWebsit/activity'
;
import
Element1
from
"../admin/menu/components/element"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
...
...
src/views/xxOfficialWebsite/modal/campsiteModal.vue
View file @
2a58ef00
...
...
@@ -11,7 +11,7 @@
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"城市"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.addrCity"
placeholder=
"请选择城市"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.addrCity"
placeholder=
"请选择城市"
@
change=
'getCityValue'
>
<el-option
v-for=
"item in cityRegions4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -19,7 +19,7 @@
<el-col
:span=
"8"
>
<el-form-item
label=
"城镇"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.addrTown"
placeholder=
"请选择城市"
>
<el-option
v-for=
"item in city
Regions
4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in city
Town
4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -87,7 +87,7 @@
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
v-if=
"form.showTitle == '
途径
地编辑'"
type=
"danger"
@
click=
"deleteHandler()"
>
删除
</el-button>
<el-button
v-if=
"form.showTitle == '
目的
地编辑'"
type=
"danger"
@
click=
"deleteHandler()"
>
删除
</el-button>
<el-button
type=
"primary"
@
click=
"okHandler('form')"
>
确 定
</el-button>
</div>
</el-dialog>
...
...
@@ -258,6 +258,12 @@
}
return
getSonRegionByCodes
(
this
.
listQuery
.
addrProvince
);
},
cityTown4Query
()
{
if
(
!
this
.
$utils
.
isInteger
(
this
.
listQuery
.
addrCity
))
{
return
null
;
}
return
getSonRegionByCodes
(
this
.
listQuery
.
addrCity
);
},
},
methods
:
{
/**
...
...
@@ -303,6 +309,9 @@
getValue
(
e
){
this
.
listQuery
.
addrCity
=
undefined
;
},
getCityValue
(
e
){
this
.
listQuery
.
addrTown
=
undefined
},
/**
* 确定
* */
...
...
@@ -337,7 +346,7 @@
}
this
.
form
.
province
=
this
.
listQuery
.
addrProvince
;
this
.
form
.
city
=
this
.
listQuery
.
addrCity
;
this
.
form
.
town
=
this
.
listQuery
.
addrTown
this
.
form
.
town
Code
=
this
.
listQuery
.
addrTown
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$emit
(
this
.
form
.
eventName
,
this
.
form
);
...
...
@@ -418,7 +427,7 @@
//地址描述(string)=
// console.log(rs.address); //这里打印可以看到里面的详细地址信息,可以根据需求选择想要的
// console.log(rs.addressComponents);//结构化的地址描述(object)
console
.
log
(
rs
.
addressComponents
.
province
);
//省
console
.
log
(
rs
.
addressComponents
);
//省
console
.
log
(
rs
.
addressComponents
.
city
);
//城市
console
.
log
(
rs
.
addressComponents
.
district
);
//区县
console
.
log
(
rs
.
addressComponents
.
street
);
//街道
...
...
src/views/xxOfficialWebsite/modal/oneCampsiteModal.vue
View file @
2a58ef00
...
...
@@ -215,7 +215,7 @@
crtTime
:
undefined
,
actDesc
:
undefined
,
willNum
:
undefined
,
location
:
undefined
,
location
:
0
,
rank
:
undefined
,
type
:
undefined
,
banner
:
undefined
,
...
...
@@ -251,7 +251,7 @@
addressStr
:{
type
:
'string'
,
required
:
true
,
message
:
'请输入
营地
地址'
,
message
:
'请输入
活动
地址'
,
}
},
checkList
:[],
//已选中的标签
...
...
@@ -303,6 +303,7 @@
},
isExistCampsiteShop
(
type
,
datas
){
console
.
log
(
datas
)
if
(
type
==
"update"
){
//编辑
this
.
toUpdate
(
datas
);
}
...
...
@@ -334,16 +335,16 @@ create(formName){
startTime
:
this
.
form
.
startTime
,
//客服电话
endTime
:
this
.
form
.
endTime
,
//联系电话
regCloseTime
:
this
.
form
.
regCloseTime
,
//省份
provinceCode
:
this
.
form
.
provinceCod
e
,
//省份名称
province
:
this
.
form
.
provinc
e
,
//市编号
cityName
:
this
.
form
.
cityName
,
//市名称
cityCode
:
this
.
form
.
cityCode
,
//详细地址
city
:
this
.
form
.
city
,
townCode
:
this
.
form
.
townCode
,
town
:
this
.
form
.
town
,
address
:
this
.
form
.
address
,
latitude
:
this
.
form
.
latitude
,
longitude
:
this
.
form
.
longitude
,
provinceCode
:
this
.
campsiteObj
.
provinc
e
,
//省份名称
province
:
this
.
campsiteObj
.
provinceNam
e
,
//市编号
cityName
:
this
.
campsiteObj
.
cityName
,
//市名称
cityCode
:
this
.
campsiteObj
.
city
,
//详细地址
city
:
this
.
campsiteObj
.
cityName
,
townCode
:
this
.
campsiteObj
.
townCode
,
town
:
this
.
campsiteObj
.
town
,
address
:
this
.
campsiteObj
.
address
,
latitude
:
this
.
campsiteObj
.
latitude
,
longitude
:
this
.
campsiteObj
.
longitude
,
limitNum
:
this
.
form
.
limitNum
,
isShow
:
this
.
form
.
isShow
,
isOpenReg
:
this
.
form
.
isOpenReg
,
...
...
@@ -480,11 +481,15 @@ create(formName){
this
.
showCampsiteVisible
=
false
;
if
(
obj
){
this
.
campsiteObj
=
obj
;
console
.
log
(
obj
)
let
provinceObj
=
getRegionByCodes
([
obj
.
province
]);
let
cityObj
=
getRegionByCodes
([
obj
.
city
]);
let
townObj
=
getRegionByCodes
([
obj
.
townCode
])
this
.
campsiteObj
.
provinceName
=
provinceObj
[
0
].
name
;
this
.
campsiteObj
.
cityName
=
cityObj
[
0
].
name
;
this
.
form
.
addressStr
=
this
.
campsiteObj
.
provinceName
+
this
.
campsiteObj
.
cityName
+
this
.
campsiteObj
.
address
;
this
.
campsiteObj
.
town
=
townObj
[
0
].
name
this
.
campsiteObj
.
townCode
=
obj
.
townCode
this
.
form
.
addressStr
=
this
.
campsiteObj
.
provinceName
+
this
.
campsiteObj
.
cityName
+
this
.
campsiteObj
.
town
+
this
.
campsiteObj
.
address
;
console
.
log
(
this
.
campsiteObj
);
}
},
...
...
@@ -493,33 +498,12 @@ create(formName){
* */
selectDestination
(){
let
that
=
this
;
this
.
campsiteObj
.
showTitle
=
"营地地址编辑"
;
console
.
log
(
this
.
campsiteObj
)
this
.
campsiteObj
.
showTitle
=
"活动地址编辑"
;
this
.
campsiteObj
.
eventName
=
'campsiteEvent'
;
this
.
campsiteObj
.
keyword
=
this
.
campsiteObj
.
address
;
this
.
showCampsiteVisible
=
true
;
},
/**
* 关闭营地标签弹框
* */
tourLabelEvent
(
obj
){
let
that
=
this
;
this
.
editLableVisible
=
false
;
let
arr
=
[];
let
ckeckList
=
[];
if
(
obj
){
this
.
allLabelList
.
map
(
function
(
item
){
obj
.
map
(
function
(
b
){
if
(
item
.
name
==
b
){
arr
.
push
(
item
);
ckeckList
.
push
(
b
);
}
});
});
this
.
form
.
campsiteTagListVos
=
arr
;
this
.
checkList
=
ckeckList
;
console
.
log
(
obj
);
}
},
/**
* 获取一条营地
* */
...
...
@@ -533,8 +517,6 @@ create(formName){
provinceName
:
response
.
data
.
province
,
city
:
response
.
data
.
cityCode
,
cityName
:
response
.
data
.
city
,
townCode
:
response
.
data
.
townCode
,
town
:
response
.
data
.
town
,
latitude
:
response
.
data
.
latitude
,
longitude
:
response
.
data
.
longitude
,
townCode
:
response
.
data
.
townCode
,
...
...
src/views/xxOfficialWebsite/modal/popup.vue
0 → 100644
View file @
2a58ef00
<
template
>
<!-- 车型:创建、编辑 -->
<div>
<h4>
{{
popupTitle
}}
</h4>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"文章标题"
prop=
"title"
>
<el-input
v-model=
"form.title"
type=
"text"
placeholder=
"请输入文章标题"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"文章摘要"
prop=
"epitome"
>
<el-input
v-model=
"form.epitome"
type=
"text"
placeholder=
"请输入文章摘要"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"作者"
prop=
"author"
>
<el-input
v-model=
"form.author"
type=
"text"
placeholder=
"请输入文章作者"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"发布人"
prop=
"publisher"
>
<el-input
v-model=
"form.publisher"
type=
"text"
placeholder=
"请输入发布人"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"是否上架"
>
<el-radio
class=
"radio"
v-model=
"form.status"
label=
"1"
>
是
</el-radio>
<el-radio
class=
"radio"
v-model=
"form.status"
label=
"0"
>
否
</el-radio>
</el-form-item>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"发布网站"
>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"0"
>
所有网站
</el-radio>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"1"
>
新欣房车官网
</el-radio>
<el-radio
class=
"radio"
v-model=
"form.type"
label=
"2"
>
滴房车官网
</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"封面图"
>
<el-upload
class=
"upload-demo"
:headers=
"getHeaderWithToken"
:action=
"BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:on-progress=
"uploadProcess"
list-type=
"picture"
>
<el-progress
v-show=
"imgFlag == true"
type=
"circle"
:percentage=
"percent"
style=
"margin-top: 20px"
></el-progress>
<img
v-if=
"$utils.isString(form.coverImage) && !$utils.isEmpty(form.coverImage) && !imgFlag"
:src=
"form.coverImage"
style=
"width:300px;max-height:300px;"
>
<i
v-else-if=
"!imgFlag"
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"
></i>
</el-upload>
</el-form-item>
<el-row>
<el-tabs
v-model=
"activeName"
type=
"card"
>
<el-tab-pane
label=
"文章内容"
name=
"first"
>
<div
class=
"editor-container"
v-if=
"activeName=='first'"
>
<UE
:editorId=
"activeName"
:defaultMsg=
"form.text"
:config=
config
ref=
"ue"
@
ready=
"editorReadyEvent"
></UE>
</div>
</el-tab-pane>
</el-tabs>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
v-if=
"popupTitle=='创建'"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"popupTitle=='编辑'"
@
click=
"update('form')"
>
确 定
</el-button>
</div>
</div>
</
template
>
<
style
>
textarea
{
display
:
none
;
}
.el-upload-list
{
display
:
flex
;
width
:
100px
;
}
.el-upload-list
li
{
margin-left
:
10px
;
}
</
style
>
<
script
>
import
UE
from
'../../modal/Ueditor'
;
//百度ue富文本
import
{
add
,
update
,
getOne
}
from
'src/api/officialWebsite/news'
;
import
{
getToken
}
from
'../../../utils/auth'
;
import
{
mapGetters
}
from
'vuex'
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElFormItem
from
"../../../../node_modules/element-ui/packages/form/src/form-item.vue"
;
import
ElRadio
from
"../../../../node_modules/element-ui/packages/radio/src/radio.vue"
;
export
default
{
props
:
[
"oneRow"
,
"popupTitle"
],
//
name
:
'popup'
,
components
:
{
ElRadio
,
ElFormItem
,
ElCol
,
ElRow
,
UE
},
data
()
{
return
{
imgPosterFlag
:
false
,
percent_poster
:
0
,
BASE_API
:
process
.
env
.
BASE_API
,
percent
:
0
,
//上传进度
imgFlag
:
false
,
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
350
},
fileList2
:
[],
activeName
:
''
,
form
:
{
title
:
undefined
,
status
:
'0'
,
type
:
'0'
,
epitome
:
undefined
,
text
:
""
,
author
:
undefined
,
publisher
:
undefined
},
rules
:
{
title
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
},
epitome
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入文章摘要'
,
trigger
:
'blur'
},
},
}
},
created
()
{
},
mounted
()
{
this
.
getAllTag
();
// this.cleanForm();
},
computed
:
{
...
mapGetters
([
'elements'
,
'vehicleWarningMsgType'
]),
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()};
}
},
methods
:
{
getAllTag
()
{
this
.
activeName
=
'first'
;
if
(
this
.
popupTitle
==
"编辑"
){
let
row
=
this
.
oneRow
;
this
.
getOne
(
row
.
id
);
}
},
/**
* 封面图上传进度
* */
uploadProcess
(
event
,
file
,
fileList
)
{
this
.
imgFlag
=
true
;
console
.
log
(
event
.
percent
);
this
.
percent
=
Math
.
floor
(
event
.
percent
);
},
/**
* 封面图上传
* **/
handleAvatarSuccess
(
res
,
file
)
{
console
.
log
(
res
)
this
.
percent
=
0
;
this
.
imgFlag
=
false
;
this
.
form
.
coverImage
=
res
.
data
;
},
/**
* 创建
* */
create
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
add
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'创建成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
$emit
(
"oneDialogEvent"
,
true
);
}
else
{
this
.
$notify
({
title
:
'创建失败'
,
message
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
}
else
{
return
;
}
});
},
/**
* 编辑
* */
update
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
update
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'编辑成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
$emit
(
"oneDialogEvent"
,
true
);
}
else
{
this
.
$notify
({
title
:
'编辑失败'
,
message
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
}
else
{
return
;
}
});
},
/**
* 获取一条车型数据
* */
getOne
(
id
)
{
let
query
=
{
id
:
id
,
urlType
:
2
}
getOne
(
query
).
then
(
response
=>
{
if
(
this
.
$utils
.
isInteger
(
response
.
data
.
status
))
{
response
.
data
.
status
=
response
.
data
.
status
.
toString
()
response
.
data
.
type
=
response
.
data
.
type
.
toString
()
}
response
.
data
.
text
=
response
.
data
.
text
?
response
.
data
.
text
:
''
this
.
form
=
response
.
data
})
},
/**
* 深拷贝
*/
objDeepCopy
(
source
)
{
var
sourceCopy
=
source
instanceof
Array
?
[]
:
{};
for
(
var
item
in
source
)
{
sourceCopy
[
item
]
=
typeof
source
[
item
]
===
'object'
?
objDeepCopy
(
source
[
item
])
:
source
[
item
];
}
return
sourceCopy
;
},
/**
* 富文本内容
* @param step
*/
editorReadyEvent
(
instance
)
{
let
t
=
this
;
instance
.
addListener
(
'contentChange'
,
()
=>
{
t
.
form
.
text
=
instance
.
getContent
();
});
},
/**
* 关闭编辑
*/
cancel
(){
this
.
cleanForm
();
this
.
$emit
(
"oneDialogEvent"
,
false
);
},
/**
* 弹框数据
*/
cleanForm
()
{
this
.
activeName
=
''
;
this
.
form
=
{
title
:
undefined
,
status
:
'0'
,
type
:
'0'
,
epitome
:
undefined
,
text
:
""
,
author
:
undefined
,
publisher
:
undefined
}
}
}
}
</
script
>
<
style
>
.flex-aic
{
display
:
flex
;
align-items
:
center
;
}
.left-item
{
width
:
300px
;
border-left
:
1px
solid
#999
;
border-right
:
1px
solid
#999
;
border-bottom
:
1px
solid
#999
;
padding
:
3px
;
}
.right-item
{
width
:
400px
;
border-right
:
1px
solid
#999
;
border-bottom
:
1px
solid
#999
;
padding
:
3px
;
}
</
style
>
src/views/xxOfficialWebsite/newsList.vue
View file @
2a58ef00
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