Commit 6c9571e5 by test

入群欢迎语模板类型次数限制

1 parent edcc4c88
...@@ -119,13 +119,13 @@ ...@@ -119,13 +119,13 @@
<!-- <el-dropdown-item :command="4"> <!-- <el-dropdown-item :command="4">
<el-button type="text">文字</el-button> <el-button type="text">文字</el-button>
</el-dropdown-item> --> </el-dropdown-item> -->
<el-dropdown-item :command="'0'"> <el-dropdown-item :command="'0'" v-if="showType('0')">
<el-button type="text">图片</el-button> <el-button type="text">图片</el-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="'7'"> <el-dropdown-item :command="'7'" v-if="showType('7')">
<el-button type="text">图文</el-button> <el-button type="text">图文</el-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="'8'"> <el-dropdown-item :command="'8'" v-if="showType('8')">
<el-button type="text">小程序</el-button> <el-button type="text">小程序</el-button>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
...@@ -223,6 +223,10 @@ ...@@ -223,6 +223,10 @@
}, },
currentActive: { currentActive: {
type: Number type: Number
},
isSingle: {
type: Boolean,
default: false
} }
}, },
watch: { watch: {
...@@ -262,6 +266,26 @@ ...@@ -262,6 +266,26 @@
} }
}, },
methods: { methods: {
showType (type) {
let exit = true
if (this.isSingle) {
this.form.materialMsgList.forEach(dd => {
if (dd.msgType === type) {
exit = false
}
})
}
return exit
},
showMore () {
let exit = true
if (this.isSingle) {
if (this.form.materialMsgList.length === 3) {
exit = false
}
}
return exit
},
onSelectUser () { onSelectUser () {
this.selectedUserList = [] this.selectedUserList = []
let arr = [] let arr = []
......
<template> <template>
<div> <div>
<welcome-content v-if="show" :showTemplate="false" :showMember="form.welcomeMsgTplType === '2'" :showMorMaterial="true" :baseData="materialData" @submit="getWelData"></welcome-content> <welcome-content v-if="show" :isSingle="form.welcomeMsgTplType === '3'" :showTemplate="false" :showMember="form.welcomeMsgTplType === '2'" :showMorMaterial="true" :baseData="materialData" @submit="getWelData"></welcome-content>
</div> </div>
</template> </template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!