Commit de4dde4b by 杨明

fixed

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