Commit 2d520df5 authored by 黄奎's avatar 黄奎

页面修改

parent 0d654a64
......@@ -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>
\ No newline at end of file
<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);
}
},
saveData(){
err => {}
);
},
//保存数据
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;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment