Commit de4dde4b by 杨明

fixed

1 parent 6e29f66b
......@@ -5,8 +5,7 @@
基本信息
</div>
<div class="container">
<glsx-combi-form :isInline="false" class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px"
defaultWidth="432px" :formObj="formObj" :formData="formData" :formRules="myRule">
<glsx-combi-form :isInline="false" class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px" defaultWidth="432px" :formObj="formObj" :formData="formData" :formRules="myRule">
<div slot="welcomeWordMaterial">
<GLEditor ref="welcome" :form="'customer'" style="line-height: 12px;" :btnList="btnList"></GLEditor>
<div v-if="!haveActivity" class="is_error">请选择活动</div>
......@@ -15,7 +14,7 @@
</div>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
</GLFooter>
</div>
......@@ -23,10 +22,10 @@
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import {addWelcomeGroup} from '@/api/modules/clientGroupManage'
import { addWelcomeGroup } from '@/api/modules/clientGroupManage'
export default {
name: "addMaterial",
name: 'addMaterial',
components: {
glsxCombiForm
},
......@@ -35,9 +34,11 @@ export default {
haveActivity: true,
formObj: {
attachName: '',
notify: 0
},
myRule: {
attachName: [{required: true, message: '请输入资料名称', trigger: 'change'}],
attachName: [{ required: true, message: '请输入资料名称', trigger: 'change' }],
notify: [{ required: true, message: '消息通知', trigger: 'change' }]
// attachmentList: [{ required: true, message: '请选择视频', trigger: 'change' }],
},
formData: [
......@@ -53,6 +54,21 @@ export default {
label: '群聊欢迎语素材',
name: 'attachmentList',
addHtml: 'welcomeWordMaterial'
},
{
label: '消息通知',
name: 'notify',
type: 'radio',
optionList: [
{
optionId: 0,
optionLabel: '不通知'
},
{
optionId: 1,
optionLabel: '通知'
}
]
}
],
btnList: [
......@@ -103,7 +119,7 @@ export default {
validType: 'valid',
status: 2
}
},
}
// {
// itemName: '秒杀活动',
// itemValue: 5,
......@@ -140,7 +156,7 @@ export default {
// }
// }
]
},
}
// {
// name: '素材',
// type: 'material',
......@@ -164,12 +180,12 @@ export default {
// merchant: this.$globalState.session.merchantId
// }
// }
],
]
}
},
methods: {
handleCancel(){
this.$emit('changeTab',1)
handleCancel() {
this.$emit('changeTab', 1)
},
handleSave() {
this.$refs.baseInfoRef.$refs.formRef.validate(valid => {
......@@ -179,7 +195,7 @@ export default {
// 校验是否有填活动
this.haveActivity = previewList.find(item => item.attType == 7)
if (!this.haveActivity) return;
if (!this.haveActivity) return
const attachmentList = previewList.map(item => {
if (item && item.attType == 7) {
......@@ -195,11 +211,10 @@ export default {
} else {
this.$message.error(res.message || '新增素材失败')
}
})
}
})
},
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!