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

页面修改

parent 0d654a64
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
display: flex; display: flex;
border-bottom: 1px solid #f6f6f6; border-bottom: 1px solid #f6f6f6;
background-color: #fff; background-color: #fff;
padding-bottom:5px; padding-bottom: 5px;
} }
.diy-component-preview .WebSite_item .temp-img { .diy-component-preview .WebSite_item .temp-img {
...@@ -167,7 +167,8 @@ ...@@ -167,7 +167,8 @@
<div class="temp-list-wrap"> <div class="temp-list-wrap">
<div v-for="(subItem,subIndex) in detailsList" class="temp-list-item" :key="subIndex" <div v-for="(subItem,subIndex) in detailsList" class="temp-list-item" :key="subIndex"
@click="AddData(subItem)"> @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 class="temp-font">{{subItem.SubTemplateName}}</div>
</div> </div>
</div> </div>
...@@ -188,8 +189,8 @@ ...@@ -188,8 +189,8 @@
</template> </template>
</h3> </h3>
<div class="group-tool"> <div class="group-tool">
<el-button type="primary" size="small" @click="showDialog(item)">編輯</el-button> <el-button type="primary" size="small" @click="showDialog(item),GetChange()">編輯</el-button>
<el-button type="danger" size="small" @click="deletePlug(index)">刪除</el-button> <el-button type="danger" size="small" @click="deletePlug(index),GetChange()">刪除</el-button>
<span class="Movie_sj">上架</span> <span class="Movie_sj">上架</span>
<el-switch v-model="item.isShelves" :active-value="1" :inactive-value="0" active-color="#13ce66" <el-switch v-model="item.isShelves" :active-value="1" :inactive-value="0" active-color="#13ce66"
inactive-color="#dcdfe6"></el-switch> inactive-color="#dcdfe6"></el-switch>
...@@ -211,12 +212,14 @@ ...@@ -211,12 +212,14 @@
<!-- 二维码 --> <!-- 二维码 -->
<qrcodedialog v-if="currentEditItem.Id=='white_label_qrcode'" :plugData="currentEditItemData"></qrcodedialog> <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"> <span slot="footer" class="dialog-footer">
<el-button @click="isShowDialog = false" size="small">取 消</el-button> <el-button @click="isShowDialog = false,GetChange()" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="setSubPlugData()">确 定</el-button> <el-button type="danger" size="small" @click="setSubPlugData(),GetChange()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -229,8 +232,10 @@ ...@@ -229,8 +232,10 @@
import backgrounddialog from "../WebSet/plug-in/background_dialog.vue" import backgrounddialog from "../WebSet/plug-in/background_dialog.vue"
import sectiondialog from "../WebSet/plug-in/sectionTitle_dialog.vue" import sectiondialog from "../WebSet/plug-in/sectionTitle_dialog.vue"
export default { export default {
props: ["templateData"],
data() { data() {
return { return {
//模板列表 //模板列表
templateList: [], templateList: [],
//模板编号 //模板编号
...@@ -312,12 +317,24 @@ ...@@ -312,12 +317,24 @@
}, },
err => {} err => {}
); );
},
//数据改变
GetChange() {
this.$emit("getNewTemplateData", JSON.parse(JSON.stringify(this.dataList)));
} }
}, },
mounted() { mounted() {
this.getTemplate(); 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
<style> <style>
.WebSiteTopdiv{ .WebSiteTopdiv {
/* text-align: right; */ /* text-align: right; */
margin:10px 0; margin: 10px 0;
width:1080px; width: 1080px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>
<template> <template>
<!--首頁(首页)--> <!--首頁(首页)-->
...@@ -16,7 +17,8 @@ ...@@ -16,7 +17,8 @@
<el-button type="primary" size="small" @click="saveData()">保存</el-button> <el-button type="primary" size="small" @click="saveData()">保存</el-button>
</div> </div>
<div> <div>
<WebSiteEdit></WebSiteEdit> <WebSiteEdit v-show="isShow" :templateData="postMsg.HomeDataList" v-on:getNewTemplateData="getNewTemplateData">
</WebSiteEdit>
</div> </div>
</div> </div>
</template> </template>
...@@ -25,7 +27,11 @@ ...@@ -25,7 +27,11 @@
export default { export default {
data() { data() {
return { return {
obj: {} isShow: false,
postMsg: {
Id: 0,
HomeDataList: [],
}
}; };
}, },
mounted() { mounted() {
...@@ -37,10 +43,48 @@ ...@@ -37,10 +43,48 @@
methods: { methods: {
//获取配置 //获取配置
getData() { 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;
} }
} }
} }
......
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