Commit 5bc88473 authored by 黄奎's avatar 黄奎

页面修改

parent c8b70cea
......@@ -73,9 +73,6 @@
</template>
</el-table-column>
</el-table>
<div class="noData" v-if="dataList.length==0">
{{$t('system.content_noData')}}
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total="total">
</el-pagination>
......@@ -109,11 +106,11 @@
</el-input>
</el-form-item>
<el-form-item label="活动开始时间">
<el-date-picker v-model="addMsg.AdStartTime" type="date" value-format="yyyy-MM-dd" placeholder="活动开始时间">
<el-date-picker v-model="addMsg.AdStartTime" type="date" value-format="yyyy-MM-dd" placeholder="活动开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动结束时间">
<el-date-picker v-model="addMsg.AdEndTime" type="date" value-format="yyyy-MM-dd" placeholder="活动结束时间">
<el-date-picker v-model="addMsg.AdEndTime" type="date" value-format="yyyy-MM-dd" placeholder="活动结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="设定页面显示位置">
......@@ -125,11 +122,9 @@
<el-radio v-model="addMsg.IsNewOpen" :label="1"></el-radio>
</el-form-item>
<el-form-item label="显示页面">
<el-checkbox-group v-model="checkedVal">
<el-checkbox>首页</el-checkbox>
<el-checkbox>首页</el-checkbox>
<el-checkbox>首页</el-checkbox>
<el-checkbox>首页</el-checkbox>
<el-checkbox-group v-model="addMsg.CheckList">
<el-checkbox v-for="subItem in PageList" :label="subItem.Id" :key="subItem.Id">{{subItem.NavTitle}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
......@@ -152,13 +147,14 @@
pageSize: 15,
pageIndex: 1,
},
checkedVal: [],
total: 0,
currentPage: 1,
//弹窗
outerVisible: false,
dataList: [],
addMsg: {
Id: 0, //编号
AdName: '', //广告名称
AdImg: '', //上传图片
AdLink: '', //目标链接网址
......@@ -166,12 +162,14 @@
AdEndTime: '', //活动结束时间
AdPosition: 1, //设定页面显示位置
IsNewOpen: 1, //点选广告后是否开新视窗
xianshi: '1' //显示页面
CheckList: [], //选中的显示页面
},
PageList: [], //页面列表
}
},
mounted() {
this.getData();
this.getPageList();
},
methods: {
//获取配置
......@@ -183,7 +181,6 @@
this.msg,
res => {
this.loading = false;
console.log("res.data", res.data)
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count
......@@ -227,12 +224,19 @@
this.apipost(
"ws_get_GetAdmanage", {
Id: item.Id,
},
res => {
console.log("HKHK", res.data.data);
if (res.data.resultCode == 1) {
var tempData = res.data.data;
this.addMsg.Id = tempData.Id;
this.addMsg.AdName = tempData.AdName;
this.addMsg.AdImg = tempData.AdImg;
this.addMsg.AdLink = tempData.AdLink;
this.addMsg.AdStartTime = tempData.AdStartTime;
this.addMsg.AdEndTime = tempData.AdEndTime;
this.addMsg.AdPosition = tempData.AdPosition;
this.addMsg.IsNewOpen = tempData.IsNewOpen;
this.addMsg.CheckList = tempData.CheckList;
} else {
this.Error(res.data.message);
}
......@@ -262,7 +266,15 @@
},
//清空数据
clearMsg() {
this.addMsg.Id = 0;
this.addMsg.AdName = "";
this.addMsg.AdImg = "";
this.addMsg.AdLink = "";
this.addMsg.AdStartTime = "";
this.addMsg.AdEndTime = "";
this.addMsg.AdPosition = 1;
this.addMsg.IsNewOpen = 1;
this.addMsg.CheckList = [];
},
//新增、修改广告
submitForm(addMsg) {
......@@ -271,6 +283,25 @@
res => {
if (res.data.resultCode == 1) {
this.getData();
this.clearMsg();
this.Success(res.data.message);
this.outerVisible = false;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
//获取页面列表
getPageList() {
this.apipost(
"ws_get_GetNavConfigList", {
Type: 4
},
res => {
if (res.data.resultCode == 1) {
this.PageList = res.data.data;
} 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