Commit 4a824fa6 authored by 黄奎's avatar 黄奎

页面修改

parent 556bfbd6
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
justify-content: center; justify-content: center;
} }
.WebSite_item { .WebSite_item {
display: flex; display: flex;
border-bottom: 1px solid #f6f6f6; border-bottom: 1px solid #f6f6f6;
background-color: #fff; background-color: #fff;
...@@ -183,14 +183,14 @@ ...@@ -183,14 +183,14 @@
<h2 class="temp-title">{{item.plugData.Title}}</h2> <h2 class="temp-title">{{item.plugData.Title}}</h2>
<h3 class="temp-subtitle"> <h3 class="temp-subtitle">
<template v-if="item.Id=='white_label_video'"> <template v-if="item.Id=='white_label_video'">
{{item.plugData.Describe}} {{item.plugData.Describe}}
</template> </template>
</h3> </h3>
<div class="group-tool"> <div class="group-tool">
<el-button type="primary" size="small" @click="isShowDialog=true">編輯</el-button> <el-button type="primary" size="small" @click="showDialog(item)">編輯</el-button>
<el-button type="danger" size="small">刪除</el-button> <el-button type="danger" size="small" @click="deletePlug(index)">刪除</el-button>
<span class="Movie_sj">上架</span> <span class="Movie_sj">上架</span>
<el-switch v-model="item.plugData.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>
</div> </div>
</div> </div>
...@@ -201,17 +201,20 @@ ...@@ -201,17 +201,20 @@
</div> </div>
</div> </div>
<el-dialog title="版面區塊設定" :visible.sync="isShowDialog" width="900px"> <el-dialog title="版面區塊設定" :visible.sync="isShowDialog" width="900px">
<plugvideodialog :plugData="dialogData" ref="plugvideodialog"></plugvideodialog> <!--视频-->
<plugvideodialog v-if="currentEditItem.Id=='white_label_video'" :plugData="currentEditItemData"></plugvideodialog>
<!--轮播图-->
<sliderdialog v-if="currentEditItem.Id=='white_label_slider'" :plugData="currentEditItemData"></sliderdialog>
<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" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="setVideoInfo()">确 定</el-button> <el-button type="danger" size="small" @click="setSubPlugData()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import plugvideodialog from "../WebSet/plug-in/video_dialog.vue" import plugvideodialog from "../WebSet/plug-in/video_dialog.vue"
import sliderdialog from "../WebSet/plug-in/slider_dialog.vue"
export default { export default {
data() { data() {
return { return {
...@@ -223,27 +226,44 @@ ...@@ -223,27 +226,44 @@
dataList: [], dataList: [],
//模板详情列表 //模板详情列表
detailsList: [], detailsList: [],
isShowDialog:false, isShowDialog: false,
dialogData:{} //当前编辑项插件数据
currentEditItemData: {},
//当前编号的插件
currentEditItem: {},
}; };
}, },
created() {}, created() {},
components: { components: {
plugvideodialog plugvideodialog,
sliderdialog,
}, },
methods: { methods: {
//显示弹窗
showDialog(item) {
this.isShowDialog = true;
this.currentEditItem = item;
this.currentEditItemData = JSON.parse(JSON.stringify(item.plugData));
},
//获取数据 //获取数据
getsubplugdata(index, obj) { setSubPlugData() {
this.dataList[index].plugData = obj; this.isShowDialog = false;
this.currentEditItem.plugData = JSON.parse(JSON.stringify(this.currentEditItemData));
},
//删除插件
deletePlug(index) {
var that = this;
this.Confirm('是否要删除此数据?', function () {
that.dataList.splice(index, 1);
})
}, },
//添加数据到组件列表 //添加数据到组件列表
AddData(item) { AddData(item) {
var obj = { var obj = {
Id: item.TemplateKey, Id: item.TemplateKey,
plugData: item.TemplateData, plugData: item.TemplateData,
isShelves:1 isShelves: 0
}; };
console.log(item);
this.dataList.push(obj); this.dataList.push(obj);
}, },
//获取下拉框 //获取下拉框
......
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