Commit 0029911e authored by 黄奎's avatar 黄奎

页面修改

parent 535fa58e
......@@ -189,8 +189,8 @@
</template>
</h3>
<div class="group-tool">
<el-button type="primary" size="small" @click="showDialog(item),GetChange()">編輯</el-button>
<el-button type="danger" size="small" @click="deletePlug(index),GetChange()">刪除</el-button>
<el-button type="primary" size="small" @click="showDialog(item)">編輯</el-button>
<el-button type="danger" size="small" @click="deletePlug(index)">刪除</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>
......@@ -218,12 +218,14 @@
<sectiondialog v-if="currentEditItem.Id=='white_label_paragraph_title'" :plugData="currentEditItemData">
</sectiondialog>
<!-- 段落链接 -->
<paragraphLinkdialog v-if="currentEditItem.Id=='white_label_link_paragraph'" :plugData="currentEditItemData"></paragraphLinkdialog>
<paragraphLinkdialog v-if="currentEditItem.Id=='white_label_link_paragraph'" :plugData="currentEditItemData">
</paragraphLinkdialog>
<!-- 图片链接 -->
<imglinkdialog v-if="currentEditItem.Id=='white_label_link_picture'" :plugData="currentEditItemData"></imglinkdialog>
<imglinkdialog v-if="currentEditItem.Id=='white_label_link_picture'" :plugData="currentEditItemData">
</imglinkdialog>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowDialog = false,GetChange()" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="setSubPlugData(),GetChange()">确 定</el-button>
<el-button @click="isShowDialog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="setSubPlugData()">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -327,22 +329,21 @@
);
},
//数据改变
GetChange() {
this.$emit("getNewTemplateData", JSON.parse(JSON.stringify(this.dataList)));
initData(tempData) {
this.dataList = tempData;
}
},
mounted() {
this.getTemplate();
},
watch: {
templateData: {
dataList: {
handler: function (val, oldVal) {
if (val !== oldVal) {
this.dataList = JSON.parse(JSON.stringify(val));
}
this.$emit("getNewTemplateData", JSON.parse(JSON.stringify(this.dataList)));
},
deep: true
},
}
};
</script>
\ No newline at end of file
</script>
......@@ -17,7 +17,8 @@
<el-button type="primary" size="small" @click="saveData()">保存</el-button>
</div>
<div>
<WebSiteEdit v-show="isShow" :templateData="postMsg.HomeDataList" v-on:getNewTemplateData="getNewTemplateData">
<WebSiteEdit ref="WebSiteEdit" :templateData="postMsg.HomeDataList"
v-on:getNewTemplateData="getNewTemplateData">
</WebSiteEdit>
</div>
</div>
......@@ -27,7 +28,6 @@
export default {
data() {
return {
isShow: false,
postMsg: {
Id: 0,
HomeDataList: [],
......@@ -43,12 +43,9 @@
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) {
......@@ -59,6 +56,7 @@
this.postMsg.HomeDataList = tempData.HomeDataList;
}
}
this.$refs.WebSiteEdit.initData(this.postMsg.HomeDataList);
console.log("this.postMsg", this.postMsg);
} else {
this.Error(res.data.message);
......
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