提交 eac8cacc 编写于 作者: X xinla

修改已知bug

上级 7d1340e2
...@@ -113,6 +113,9 @@ export default { ...@@ -113,6 +113,9 @@ export default {
this.$emit('update:fileName', res.data.fileName) this.$emit('update:fileName', res.data.fileName)
this.$emit('update:file', file) this.$emit('update:file', file)
// this.fileUrl = URL.createObjectURL(file.raw) // this.fileUrl = URL.createObjectURL(file.raw)
} else {
this.loading = false
this.$message.error(res.msg)
} }
}, },
onError(err, file, fileList) { onError(err, file, fileList) {
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="tableData" border style="width: 100%"> <el-table :data="tableData">
<el-table-column prop="taskName" label="群裂变名称"> </el-table-column> <el-table-column prop="taskName" label="群裂变名称"> </el-table-column>
<el-table-column prop="fissNum" label="裂变客户数量"> </el-table-column> <el-table-column prop="fissNum" label="裂变客户数量"> </el-table-column>
<el-table-column prop="fissStatus" label="活动状态"> <el-table-column prop="fissStatus" label="活动状态">
......
...@@ -8,7 +8,11 @@ export default { ...@@ -8,7 +8,11 @@ export default {
components: { PhoneDialog, SelectMaterial, SelectCustomerGroup }, components: { PhoneDialog, SelectMaterial, SelectCustomerGroup },
data() { data() {
const checkContent = (rule, value, callback) => { const checkContent = (rule, value, callback) => {
if (!this.form.content && this.form.picList.length === 0 && this.form.materialIdList.length === 0) { if (
!this.form.content &&
this.form.picList.length === 0 &&
this.form.materialIdList.length === 0
) {
callback(new Error('该项为必填项')) callback(new Error('该项为必填项'))
} else { } else {
callback() callback()
...@@ -36,7 +40,10 @@ export default { ...@@ -36,7 +40,10 @@ export default {
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
// return time.getTime() < Date.now() // return time.getTime() < Date.now()
return time.getTime() < new Date(new Date(new Date().toLocaleDateString()).getTime()) return (
time.getTime() <
new Date(new Date(new Date().toLocaleDateString()).getTime())
)
} }
}, },
uploadImageUrl: '', uploadImageUrl: '',
...@@ -46,9 +53,7 @@ export default { ...@@ -46,9 +53,7 @@ export default {
ruleName: [ ruleName: [
{ required: true, message: '该项为必填项', trigger: 'blur' } { required: true, message: '该项为必填项', trigger: 'blur' }
], ],
title: [ title: [{ required: true, message: '该项为必填项', trigger: 'blur' }],
{ required: true, message: '该项为必填项', trigger: 'blur' }
],
chatIdList: [ chatIdList: [
{ required: true, message: '该项为必填项', trigger: 'change' } { required: true, message: '该项为必填项', trigger: 'change' }
], ],
...@@ -58,8 +63,8 @@ export default { ...@@ -58,8 +63,8 @@ export default {
content: [ content: [
// { required: true, message: '该项为必填项', trigger: 'change' }, // { required: true, message: '该项为必填项', trigger: 'change' },
{ validator: checkContent, trigger: 'change' } { validator: checkContent, trigger: 'change' }
], ]
}), })
} }
}, },
watch: { watch: {
...@@ -69,7 +74,7 @@ export default { ...@@ -69,7 +74,7 @@ export default {
this.form.startExeTime = '' this.form.startExeTime = ''
this.form.stopExeTime = '' this.form.stopExeTime = ''
} else { } else {
[ this.form.startExeTime, this.form.stopExeTime ] = dateRange ;[this.form.startExeTime, this.form.stopExeTime] = dateRange
} }
}, },
customerGroups(groups) { customerGroups(groups) {
...@@ -83,11 +88,11 @@ export default { ...@@ -83,11 +88,11 @@ export default {
}, },
computed: { computed: {
imageMaterialUrls() { imageMaterialUrls() {
const urls = this.imageMaterialList.map(m => m.materialUrl) const urls = this.imageMaterialList.map((m) => m.materialUrl)
return urls return urls
}, },
messageList() { messageList() {
const texts = this.textMaterialList.map(t => t.content) const texts = this.textMaterialList.map((t) => t.content)
return texts return texts
}, },
imageList() { imageList() {
...@@ -103,8 +108,7 @@ export default { ...@@ -103,8 +108,7 @@ export default {
/** 获取详情 */ /** 获取详情 */
getDetail(id) { getDetail(id) {
this.loading = true this.loading = true
getDetail(id) getDetail(id).then(({ data }) => {
.then(({ data }) => {
this.dateRange = [data.startExeTime || '', data.stopExeTime || ''] this.dateRange = [data.startExeTime || '', data.stopExeTime || '']
this.customerGroups = data.groupList || [] this.customerGroups = data.groupList || []
...@@ -132,8 +136,16 @@ export default { ...@@ -132,8 +136,16 @@ export default {
}, },
// 选择素材确认按钮 // 选择素材确认按钮
submitSelectMaterial(text, image, file) { submitSelectMaterial(text, image, file) {
text && text.id && !this.form.materialIdList.includes(text.id) && this.form.materialIdList.push(text.id) && this.textMaterialList.push(text) text &&
image && image.id && !this.form.materialIdList.includes(image.id) && this.form.materialIdList.push(image.id) && this.imageMaterialList.push(image) text.id &&
!this.form.materialIdList.includes(text.id) &&
this.form.materialIdList.push(text.id) &&
this.textMaterialList.push(text)
image &&
image.id &&
!this.form.materialIdList.includes(image.id) &&
this.form.materialIdList.push(image.id) &&
this.imageMaterialList.push(image)
this.$refs.form.validateField('content') this.$refs.form.validateField('content')
}, },
// 选择客户群聊确认 // 选择客户群聊确认
...@@ -169,22 +181,25 @@ export default { ...@@ -169,22 +181,25 @@ export default {
}) })
}, },
goRoute() { goRoute() {
const pathName = this.activeName === '0' ? 'Text' : 'Image' let contentType = ['text', 'image', 'file']
window.open('#/customerMaintain/material/' + contentType[this.activeName])
this.$router.push({
name: pathName,
})
}, },
removeImage(url) { removeImage(url) {
this.form.picList.splice(this.form.picList.indexOf(url), 1) this.form.picList.splice(this.form.picList.indexOf(url), 1)
}, },
removeImageMaterial(image) { removeImageMaterial(image) {
this.imageMaterialList.splice(this.imageMaterialList.indexOf(image), 1) this.imageMaterialList.splice(this.imageMaterialList.indexOf(image), 1)
this.form.materialIdList.splice(this.form.materialIdList.indexOf(image.id), 1) this.form.materialIdList.splice(
this.form.materialIdList.indexOf(image.id),
1
)
}, },
removeTextMaterial(text) { removeTextMaterial(text) {
this.textMaterialList.splice(this.textMaterialList.indexOf(text), 1) this.textMaterialList.splice(this.textMaterialList.indexOf(text), 1)
this.form.materialIdList.splice(this.form.materialIdList.indexOf(text.id), 1) this.form.materialIdList.splice(
this.form.materialIdList.indexOf(text.id),
1
)
} }
} }
} }
...@@ -192,12 +207,7 @@ export default { ...@@ -192,12 +207,7 @@ export default {
<template> <template>
<div class="wrap" v-loading="loading"> <div class="wrap" v-loading="loading">
<el-form <el-form :model="form" ref="form" :rules="rules" label-width="100px">
:model="form"
ref="form"
:rules="rules"
label-width="100px"
>
<el-form-item label="规则名称" prop="ruleName"> <el-form-item label="规则名称" prop="ruleName">
<el-input <el-input
v-model="form.ruleName" v-model="form.ruleName"
...@@ -234,10 +244,7 @@ export default { ...@@ -234,10 +244,7 @@ export default {
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="执行时间" prop="startExeTime">
label="执行时间"
prop="startExeTime"
>
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -295,11 +302,7 @@ export default { ...@@ -295,11 +302,7 @@ export default {
@click="removeImageMaterial(image)" @click="removeImageMaterial(image)"
></el-button> ></el-button>
</div> </div>
<div <div v-for="url in form.picList" :key="url" class="image-wrapper">
v-for="url in form.picList"
:key="url"
class="image-wrapper"
>
<el-image :src="url" fit="fit"></el-image> <el-image :src="url" fit="fit"></el-image>
<el-button <el-button
icon="el-icon-close" icon="el-icon-close"
...@@ -309,10 +312,7 @@ export default { ...@@ -309,10 +312,7 @@ export default {
></el-button> ></el-button>
</div> </div>
<upload <upload :fileUrl.sync="uploadImageUrl" class="image-uploader">
:fileUrl.sync="uploadImageUrl"
class="image-uploader"
>
<i class="el-icon-plus uploader-icon"></i> <i class="el-icon-plus uploader-icon"></i>
</upload> </upload>
</el-tab-pane> </el-tab-pane>
...@@ -445,7 +445,8 @@ export default { ...@@ -445,7 +445,8 @@ export default {
top: 5px; top: 5px;
} }
} }
.text-wrapper, .image-wrapper { .text-wrapper,
.image-wrapper {
margin: 5px; margin: 5px;
.remove-btn { .remove-btn {
......
...@@ -49,11 +49,7 @@ export default { ...@@ -49,11 +49,7 @@ export default {
<template> <template>
<div class="page"> <div class="page">
<el-steps <el-steps :active="active" finish-status="success" align-center>
:active="active"
finish-status="success"
align-center
>
<el-step title="基本信息" description="设置群活码基本信息"></el-step> <el-step title="基本信息" description="设置群活码基本信息"></el-step>
<el-step title="实际群码" description="添加并管理微信实际群码"></el-step> <el-step title="实际群码" description="添加并管理微信实际群码"></el-step>
<el-step title="群活码" description="设置完成后生成群活码"></el-step> <el-step title="群活码" description="设置完成后生成群活码"></el-step>
...@@ -61,17 +57,25 @@ export default { ...@@ -61,17 +57,25 @@ export default {
<div class="page-content"> <div class="page-content">
<div v-if="active === 0"> <div v-if="active === 0">
<BaseInfo ref="baseInfo" :groupCodeId="groupCodeId" @next="next"></BaseInfo> <BaseInfo
ref="baseInfo"
:groupCodeId="groupCodeId"
@next="next"
></BaseInfo>
</div> </div>
<div v-if="active === 1"> <div v-if="active === 1">
<RealCode ref="realCode" :groupCodeId="groupCodeId" @next="next"></RealCode> <RealCode
ref="realCode"
:groupCodeId="groupCodeId"
@next="next"
></RealCode>
</div> </div>
<div v-if="active === 2"> <div v-if="active === 2">
<GroupCode :groupCodeId="groupCodeId"></GroupCode> <GroupCode :groupCodeId="groupCodeId"></GroupCode>
</div> </div>
</div> </div>
<div class="fr"> <div class="ac">
<template v-if="active === 0"> <template v-if="active === 0">
<el-button @click="$router.back()"> 取消 </el-button> <el-button @click="$router.back()"> 取消 </el-button>
<el-button type="primary" @click="handleGroupCode"> 下一步 </el-button> <el-button type="primary" @click="handleGroupCode"> 下一步 </el-button>
......
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
// 新建素材按钮 // 新建素材按钮
goRoute() { goRoute() {
let contentType = ['text', 'image', 'file'] let contentType = ['text', 'image', 'file']
window.open('#/material/' + contentType[this.activeName]) window.open('#/customerMaintain/material/' + contentType[this.activeName])
}, },
// 选择素材确认按钮 // 选择素材确认按钮
submitSelectMaterial(text, image, file) { submitSelectMaterial(text, image, file) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册