Commit 6e881d59 by caoyanzhi

update: 弹窗调整

parent e7a177ba
......@@ -155,7 +155,7 @@
<i class="iconfont icon-jia"></i>
<p>还可添加{{ surplus }}个弹窗</p>
</div>
<el-button @click="submit">确认新建</el-button>
<el-button @click="submit">{{ group.id ? '保持' : '确认新建' }}</el-button>
</el-form>
</div>
</section>
......@@ -197,12 +197,12 @@ const defaultPop = {
],
// 投放的会员分组
popupMemberGroupList: [
{
// 会员分组id
memberTagGroupId: '',
// 会员分组名称
groupName: ''
}
// {
// // 会员分组id
// memberTagGroupId: '',
// // 会员分组名称
// groupName: ''
// }
],
linkToolsVisible: false,
// 投放详情 - 图片
......@@ -285,7 +285,6 @@ export default {
dateTime: [], // 计划时间
popupList: [] // 弹窗列表
},
defaultPop: Object.assign({}, defaultPop),
rules: {
name: [{ required: true, message: '请输入计划名称', trigger: 'change' }],
dateTime: [{ required: true, validator: validateDateLessYear, trigger: 'change' }]
......@@ -496,9 +495,9 @@ export default {
// let sortNum = 0;
for (const key in this.popSort) {
if (!this.popSort[key]) {
// this.defaultPop.sortNum = key;
const pop = JSON.parse(JSON.stringify(defaultPop));
this.popSort[`${key}`] = true;
this.group.popupList.push(Object.assign({}, defaultPop, { sortNum: key, fileList: [] }));
this.group.popupList.push(Object.assign({}, pop, { sortNum: key, fileList: [] }));
return;
}
}
......
......@@ -61,12 +61,12 @@
<el-table-column label="操作" align="left" width="170">
<template slot-scope="scope">
<el-button v-if="scope.row.activeStatus === 2 || scope.row.activeStatus === 3" type="text" @click="goForm(group, 'edit')">查看</el-button>
<dm-delete v-if="scope.row.activeStatus === 2" @confirm="delData(scope.row)" tips="是否停止该条数据?">
<dm-delete v-if="scope.row.activeStatus === 2" @confirm="stopPop(scope.row)" tips="是否停止该条数据?">
<el-button type="text">停止</el-button>
</dm-delete>
<el-button v-if="scope.row.activeStatus === 1" type="text" @click="goForm(group, 'edit')">编辑</el-button>
<dm-delete v-if="scope.row.activeStatus === 1 || scope.row.activeStatus === 3" @confirm="delData(scope.row)" tips="是否删除该条数据?">
<el-button type="text" @click="removePop(scope.row.popupId)">删除</el-button>
<dm-delete v-if="scope.row.activeStatus === 1 || scope.row.activeStatus === 3" @confirm="removePop(scope.row)" tips="是否删除该条数据?">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
</el-table-column>
......@@ -173,13 +173,17 @@ export default {
this.$router.push(`/pop/edit?id=${group.id}`);
}
},
async removePop(popupId) {
const res = await removePopup({ popupId });
console.log(res);
removePop(pop) {
removePopup({ popupId: pop.id }).then(res => {
this.$message.success('删除成功');
this.getTableList();
});
},
async stopPop(popupId) {
const res = await stopPopup({ popupId });
console.log(res);
stopPop(pop) {
stopPopup({ popupId: pop.id }).then(res => {
this.$message.success('弹窗计划已停止');
this.getTableList();
});
}
}
};
......
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