Commit 3016b9dd by 前端

commit

1 parent edea1047
<template> <template>
<div class="add-wrap"> <div class="add-wrap" v-loading="loading">
<div class="container"> <div class="container">
<div class="title">营销配置</div> <div class="title">营销配置</div>
<div style="display:flex"> <div style="display: flex">
<div class="gl-form-page"> <div class="gl-form-page">
<el-form ref="configForm" label-width="154px" :model="addForm" :rules="addRules"> <el-form ref="configForm" label-width="154px" :model="addForm" :rules="addRules">
<el-form-item label="营销名称:" prop="imName"> <el-form-item label="营销名称:" prop="imName">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-date-picker type="date" :picker-options="pickerOptions" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" v-model="addForm.date1" style="width: 100%"></el-date-picker> <el-date-picker type="date" :picker-options="pickerOptions" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" v-model="addForm.date1" style="width: 100%"></el-date-picker>
</el-col> </el-col>
<!-- <el-col class="line" :span="1">-</el-col> --> <!-- <el-col class="line" :span="1">-</el-col> -->
<el-col :span="11" style="margin-left:12px;"> <el-col :span="11" style="margin-left: 12px">
<el-time-picker placeholder="选择时间" value-format="HH:mm" format="HH:mm" v-model="addForm.date2" style="width: 100%"></el-time-picker> <el-time-picker placeholder="选择时间" value-format="HH:mm" format="HH:mm" v-model="addForm.date2" style="width: 100%"></el-time-picker>
</el-col> </el-col>
<div class="el-form-item__error" v-if="isTime">请选择营销时间</div> <div class="el-form-item__error" v-if="isTime">请选择营销时间</div>
...@@ -130,6 +130,7 @@ export default { ...@@ -130,6 +130,7 @@ export default {
}, },
textValue: '', textValue: '',
importName: '', importName: '',
loading: false,
isTime: false, isTime: false,
isUplaod: false, isUplaod: false,
isLink: false, isLink: false,
...@@ -191,7 +192,7 @@ export default { ...@@ -191,7 +192,7 @@ export default {
this.$refs.file.value = '' this.$refs.file.value = ''
}, },
handleSave() { handleSave() {
console.log(this.addForm.messageContext) this.loading = true
this.isUplaod = false this.isUplaod = false
this.isTime = false this.isTime = false
this.isLink = false this.isLink = false
...@@ -209,7 +210,7 @@ export default { ...@@ -209,7 +210,7 @@ export default {
this.isLink = true this.isLink = true
return return
} else { } else {
let array = this.addForm.messageContext.match(/#短链#/g)&&this.addForm.messageContext.match(/#短链#/g).length let array = this.addForm.messageContext.match(/#短链#/g) && this.addForm.messageContext.match(/#短链#/g).length
this.count = array ? array.length : 0 this.count = array ? array.length : 0
} }
if (this.count > 1) { if (this.count > 1) {
...@@ -219,26 +220,27 @@ export default { ...@@ -219,26 +220,27 @@ export default {
this.$message.error('导入客户有效数为0,请重新上传') this.$message.error('导入客户有效数为0,请重新上传')
return return
} }
// this.$refs.configForm.validate(valid => { this.$refs.configForm.validate(valid => {
// if (valid) { if (valid) {
// let params = { let params = {
// imName: this.addForm.imName, imName: this.addForm.imName,
// messageContext: this.addForm.messageContext, messageContext: this.addForm.messageContext,
// exportUrl: this.addForm.exportUrl, exportUrl: this.addForm.exportUrl,
// sendTime: this.addForm.date1 + ' ' + this.addForm.date2, sendTime: this.addForm.date1 + ' ' + this.addForm.date2,
// exportName: this.importName exportName: this.importName
// } }
// this.$apis.marketing.createMessageInfo(params).then(res => { this.$apis.marketing.createMessageInfo(params).then(res => {
// this.$message({ this.loading = false
// message: res.code == '0' ? '创建成功' : res.message, this.$message({
// type: res.code == '0' ? 'success' : 'error' message: res.code == '0' ? '创建成功' : res.message,
// }) type: res.code == '0' ? 'success' : 'error'
// if (res.code == 0) { })
// this.$router.go(-1) if (res.code == 0) {
// } this.$router.go(-1)
// }) }
// } })
// }) }
})
}, },
handleSure() { handleSure() {
this.$router.push('/marketing/index') this.$router.push('/marketing/index')
...@@ -295,7 +297,6 @@ export default { ...@@ -295,7 +297,6 @@ export default {
const ws = wb.Sheets[wsname] const ws = wb.Sheets[wsname]
if (!ws['!ref']) { if (!ws['!ref']) {
this.$message.error('格式错误') this.$message.error('格式错误')
this.loading = false
return return
} }
const data = this.getHeaderRow(ws) const data = this.getHeaderRow(ws)
...@@ -324,7 +325,6 @@ export default { ...@@ -324,7 +325,6 @@ export default {
return headers return headers
}, },
handleSaveImport() { handleSaveImport() {
this.loading = true
let params = { let params = {
exportUrl: this.addForm.exportUrl exportUrl: this.addForm.exportUrl
} }
...@@ -358,7 +358,7 @@ export default { ...@@ -358,7 +358,7 @@ export default {
.container { .container {
background: #ffffff; background: #ffffff;
margin-bottom: 16px; margin-bottom: 16px;
padding:0; padding: 0;
.title { .title {
height: 56px; height: 56px;
line-height: 56px; line-height: 56px;
...@@ -441,7 +441,7 @@ export default { ...@@ -441,7 +441,7 @@ export default {
.upload-result { .upload-result {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top:6px; margin-top: 6px;
&-input { &-input {
width: 320px; width: 320px;
height: 26px; height: 26px;
...@@ -507,7 +507,7 @@ export default { ...@@ -507,7 +507,7 @@ export default {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
line-height: 20px; line-height: 20px;
margin-top:4px; margin-top: 4px;
white-space: nowrap; white-space: nowrap;
} }
} }
...@@ -556,7 +556,7 @@ export default { ...@@ -556,7 +556,7 @@ export default {
color: #2cca74; color: #2cca74;
font-size: 26px; font-size: 26px;
font-weight: 600; font-weight: 600;
margin-bottom:4px; margin-bottom: 4px;
} }
} }
.fail { .fail {
...@@ -566,7 +566,7 @@ export default { ...@@ -566,7 +566,7 @@ export default {
color: #eb4e4e; color: #eb4e4e;
font-size: 26px; font-size: 26px;
font-weight: 600; font-weight: 600;
margin-bottom:4px; margin-bottom: 4px;
} }
} }
} }
......
...@@ -239,7 +239,6 @@ export default { ...@@ -239,7 +239,6 @@ export default {
} }
}, },
handleInput(target) { handleInput(target) {
console.log(target)
// 即时更新数据 // 即时更新数据
this.updateData(target.innerHTML) this.updateData(target.innerHTML)
let htm = target.innerHTML let htm = target.innerHTML
...@@ -292,7 +291,6 @@ export default { ...@@ -292,7 +291,6 @@ export default {
value(val) { value(val) {
// 非锁定状态下,实时更新innerHTML // 非锁定状态下,实时更新innerHTML
if (!this.isLocked) { if (!this.isLocked) {
console.log(222222)
this.$refs.wTextareaContent.innerHTML = val this.$refs.wTextareaContent.innerHTML = val
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!