Commit 26c8e49d by 杨北旺

内容管理

1 parent 1fb3b917
......@@ -75,7 +75,7 @@ export default {
type: "",
scene: "",
showChannel: "",
showMerchant: "",
merchantId: "",
status: ""
},
showFormData: [
......@@ -115,7 +115,7 @@ export default {
},
{
label: "可见门店",
name: "showMerchant",
name: "merchantId",
type: "select",
optionList: [],
optionId: "merchantNo",
......@@ -144,7 +144,7 @@ export default {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
mutiSelectUniqueKey: "id",
mutiSelectName: "title",
mutiSelectName: "contentIndex",
tableOption: {
width: "170"
},
......@@ -233,6 +233,8 @@ export default {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" }
getMerchantList(params).then((res) => {
this.getBaseData(res.list)
}).catch(()=>{
this.getBaseData([])
})
},
......@@ -257,7 +259,7 @@ export default {
this.baseData[item.optionsName]
)
}
if (item.type === "select" && item.name === "showMerchant") {
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
......@@ -294,6 +296,21 @@ export default {
})
},
mutiStartOrStop(type) {
let selectedData = []
console.log(this.$refs.contentTable.mutiSelectArr);
if (this.$refs.contentTable.mutiSelectArr.contentIndex) {
selectedData = this.$refs.contentTable.mutiSelectArr.contentIndex
}
let status = selectedData.map(v => { return v.status }) || []
if (status.includes(0) || !selectedData.length) { // 包含0草稿 未选择
this.$message({
message: `请选择${type==2?'已停用':'已开启'}的内容`,
type: 'warning',
showClose: true
})
return false
}
const title =
type == 2
? "停用内容,对应的渠道和门店将无法查看该内容"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!