Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
2d520df5
Commit
2d520df5
authored
Jun 18, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0d654a64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
19 deletions
+80
-19
WebSiteEdit.vue
src/components/WebSet/WebSiteEdit.vue
+28
-11
WebSiteIndex.vue
src/components/WebSet/WebSiteIndex.vue
+52
-8
No files found.
src/components/WebSet/WebSiteEdit.vue
View file @
2d520df5
...
...
@@ -92,7 +92,7 @@
display
:
flex
;
border-bottom
:
1px
solid
#f6f6f6
;
background-color
:
#fff
;
padding-bottom
:
5px
;
padding-bottom
:
5px
;
}
.diy-component-preview
.WebSite_item
.temp-img
{
...
...
@@ -167,7 +167,8 @@
<div
class=
"temp-list-wrap"
>
<div
v-for=
"(subItem,subIndex) in detailsList"
class=
"temp-list-item"
:key=
"subIndex"
@
click=
"AddData(subItem)"
>
<img
v-if=
"subItem.TemplateData&&subItem.TemplateData.CoverImg"
:src=
"subItem.TemplateData.CoverImg"
:alt=
"subItem.SubTemplateName"
/>
<img
v-if=
"subItem.TemplateData&&subItem.TemplateData.CoverImg"
:src=
"subItem.TemplateData.CoverImg"
:alt=
"subItem.SubTemplateName"
/>
<div
class=
"temp-font"
>
{{
subItem
.
SubTemplateName
}}
</div>
</div>
</div>
...
...
@@ -188,8 +189,8 @@
</
template
>
</h3>
<div
class=
"group-tool"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"showDialog(item)"
>
編輯
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"deletePlug(index)"
>
刪除
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"showDialog(item)
,GetChange()
"
>
編輯
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"deletePlug(index)
,GetChange()
"
>
刪除
</el-button>
<span
class=
"Movie_sj"
>
上架
</span>
<el-switch
v-model=
"item.isShelves"
:active-value=
"1"
:inactive-value=
"0"
active-color=
"#13ce66"
inactive-color=
"#dcdfe6"
></el-switch>
...
...
@@ -211,12 +212,14 @@
<!-- 二维码 -->
<qrcodedialog
v-if=
"currentEditItem.Id=='white_label_qrcode'"
:plugData=
"currentEditItemData"
></qrcodedialog>
<!-- 背景图 -->
<backgrounddialog
v-if=
"currentEditItem.Id=='white_label_background_article'"
:plugData=
"currentEditItemData"
></backgrounddialog>
<backgrounddialog
v-if=
"currentEditItem.Id=='white_label_background_article'"
:plugData=
"currentEditItemData"
>
</backgrounddialog>
<!-- 段落标题 -->
<sectiondialog
v-if=
"currentEditItem.Id=='white_label_paragraph_title'"
:plugData=
"currentEditItemData"
></sectiondialog>
<sectiondialog
v-if=
"currentEditItem.Id=='white_label_paragraph_title'"
:plugData=
"currentEditItemData"
>
</sectiondialog>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"isShowDialog = false"
size=
"small"
>
取 消
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"setSubPlugData()"
>
确 定
</el-button>
<el-button
@
click=
"isShowDialog = false
,GetChange()
"
size=
"small"
>
取 消
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"setSubPlugData()
,GetChange()
"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -229,8 +232,10 @@
import
backgrounddialog
from
"../WebSet/plug-in/background_dialog.vue"
import
sectiondialog
from
"../WebSet/plug-in/sectionTitle_dialog.vue"
export
default
{
props
:
[
"templateData"
],
data
()
{
return
{
//模板列表
templateList
:
[],
//模板编号
...
...
@@ -312,12 +317,24 @@
},
err
=>
{}
);
},
//数据改变
GetChange
()
{
this
.
$emit
(
"getNewTemplateData"
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
dataList
)));
}
},
mounted
()
{
this
.
getTemplate
();
},
watch
:
{
templateData
:
{
handler
:
function
(
val
,
oldVal
)
{
if
(
val
!==
oldVal
)
{
this
.
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
}
},
deep
:
true
},
}
};
</
script
>
</
script
>
\ No newline at end of file
src/components/WebSet/WebSiteIndex.vue
View file @
2d520df5
<
style
>
.WebSiteTopdiv
{
.WebSiteTopdiv
{
/* text-align: right; */
margin
:
10px
0
;
width
:
1080px
;
margin
:
10px
0
;
width
:
1080px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
</
style
>
<
template
>
<!--首頁(首页)-->
...
...
@@ -16,7 +17,8 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"saveData()"
>
保存
</el-button>
</div>
<div>
<WebSiteEdit></WebSiteEdit>
<WebSiteEdit
v-show=
"isShow"
:templateData=
"postMsg.HomeDataList"
v-on:getNewTemplateData=
"getNewTemplateData"
>
</WebSiteEdit>
</div>
</div>
</
template
>
...
...
@@ -25,7 +27,11 @@
export
default
{
data
()
{
return
{
obj
:
{}
isShow
:
false
,
postMsg
:
{
Id
:
0
,
HomeDataList
:
[],
}
};
},
mounted
()
{
...
...
@@ -37,10 +43,48 @@
methods
:
{
//获取配置
getData
()
{
//获取现有线路列表
this
.
isShow
=
false
;
this
.
apipost
(
"ws_get_GetHomeAboutTrip"
,
{},
res
=>
{
this
.
isShow
=
true
;
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
.
data
;
if
(
tempData
)
{
if
(
tempData
.
Id
)
{
this
.
postMsg
.
Id
=
tempData
.
Id
;
}
if
(
tempData
.
HomeDataList
&&
tempData
.
HomeDataList
.
length
>
0
)
{
this
.
postMsg
.
HomeDataList
=
tempData
.
HomeDataList
;
}
}
console
.
log
(
"this.postMsg"
,
this
.
postMsg
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
saveData
(){
//保存数据
saveData
()
{
this
.
apipost
(
"ws_post_SetHomeData"
,
this
.
postMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getData
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//获取模板数据
getNewTemplateData
(
templateDataList
)
{
this
.
postMsg
.
HomeDataList
=
templateDataList
;
}
}
}
...
...
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