1
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
Mail Template
|
||||
</el-button> -->
|
||||
</div>
|
||||
<p v-if="tableData.length==0" style="color: #6f6f6f;font-size: 18px;margin-top: 30px;text-align: center;">No task</p>
|
||||
<p v-if="tableData.length==0" style="color: #6f6f6f;font-size: 18px;margin-top: 30px;text-align: center;">No
|
||||
task</p>
|
||||
<div v-for="item in tableData" class="taskList" :style="stateChange(item.range,item.is_end)">
|
||||
<div style="text-align: right;padding-right: 60px;">
|
||||
<el-button type="primary" size="mini" icon="el-icon-view" @click="handleSend(item)">
|
||||
@@ -54,10 +55,10 @@
|
||||
</font>
|
||||
{{decjuSendata(item.library)}}
|
||||
<p v-if="item.category=='major'" style="display: inline-block;">
|
||||
({{item.major_str}})
|
||||
({{decjuCountry(item.china_type)}} , {{item.major_str}})
|
||||
</p>
|
||||
<p v-if="item.category=='keyword'" style="display: inline-block;">
|
||||
({{item.keyword}})
|
||||
({{decjuCountry(item.china_type)}} , {{item.keyword}})
|
||||
</p>
|
||||
</div>
|
||||
<div class="taskRow">
|
||||
@@ -80,7 +81,7 @@
|
||||
Sent personnel :
|
||||
</font>
|
||||
<b style="color: #006699">{{item.user_count}}</b> in total,
|
||||
<b style="color: #006699">{{item.user_send}}</b> people have been sent,
|
||||
<b style="color: #006699">{{item.pushed_num}}</b> people have been sent,
|
||||
send <b style="color: #006699">{{item.pagesize}}</b> people each time.
|
||||
<!-- <div style="margin: 10px 0 0 120px;">
|
||||
<p v-for="item in numbeoList" class="sentPeale">
|
||||
@@ -104,7 +105,7 @@
|
||||
|
||||
<!-- 预览弹出框 -->
|
||||
<el-dialog title="Preview mail messages" :visible.sync="sendVisible" :close-on-click-modal="false"
|
||||
width="850px">
|
||||
width="880px">
|
||||
<el-form ref="send_Form" :model="sendForm" :rules="rules" label-width="160px">
|
||||
<!-- <el-form-item label="Target personnel :" prop="senProce">
|
||||
<el-checkbox-group v-model="sendForm.senProce" @change="chanProce">
|
||||
@@ -123,23 +124,27 @@
|
||||
<div>
|
||||
{{decjuSendata(sendForm.library)}}
|
||||
<p v-if="sendForm.category=='major'" style="display: inline-block;">
|
||||
({{sendForm.major_str}})
|
||||
({{decjuCountry(sendForm.china_type)}} , {{sendForm.major_str}})
|
||||
</p>
|
||||
<p v-if="sendForm.category=='keyword'" style="display: inline-block;">
|
||||
({{sendForm.keyword}})
|
||||
({{decjuCountry(sendForm.china_type)}} , {{sendForm.keyword}})
|
||||
</p>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="Subject :">
|
||||
<div>{{sendForm.email_title}}</div>
|
||||
<el-form-item label="Mail Template :" prop="email_title">
|
||||
<div>
|
||||
{{sendForm.email_title}}
|
||||
</div>
|
||||
<!-- <el-input v-model="sendForm.email_title"></el-input> -->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="Mail Template :">
|
||||
<div>Customize</div>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="Content :">
|
||||
<el-form-item label="Content :" prop="substance">
|
||||
<div class="senderKuan">
|
||||
<img src="../../assets/img/mailPT.png" style="margin-bottom: -10px;" v-if="sendForm.has_hb==1">
|
||||
<div v-html="sendForm.template" style="padding: 20px;word-wrap: break-word;word-break: normal;">
|
||||
<div style="background-color: #fff;">
|
||||
<div v-html="sendForm.template" style="padding: 20px;word-wrap: break-word;word-break: normal;">
|
||||
</div>
|
||||
<!-- <quill-editor ref="myTextEditor" v-model="sendForm.template" :options="editorOption">
|
||||
</quill-editor> -->
|
||||
</div>
|
||||
<img src="../../assets/img/mailPB.png" v-if="sendForm.has_hb==1">
|
||||
</div>
|
||||
@@ -150,7 +155,7 @@
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="sendVisible = false;">Cancel</el-button>
|
||||
<!-- <el-button type="primary" @click="saveSend(sendForm)">Send mail</el-button> -->
|
||||
<!-- <el-button type="primary" @click="saveSend(sendForm)">Save mail</el-button> -->
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
@@ -200,6 +205,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'quill/dist/quill.core.css';
|
||||
import 'quill/dist/quill.snow.css';
|
||||
import 'quill/dist/quill.bubble.css';
|
||||
import {
|
||||
quillEditor
|
||||
} from 'vue-quill-editor';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -208,18 +220,15 @@
|
||||
sendForm: {},
|
||||
sendVisible: false,
|
||||
testEForm: {
|
||||
email: '376837995@qq.com'
|
||||
email: ''
|
||||
},
|
||||
testEBox: false,
|
||||
rangeList: [{
|
||||
title: 'Appointment',
|
||||
title: 'Promotion',
|
||||
id: 1
|
||||
}, {
|
||||
title: 'Article Recommendation',
|
||||
id: 2
|
||||
}, {
|
||||
title: 'Promotion',
|
||||
id: 3
|
||||
}],
|
||||
numbeoList: [{
|
||||
title: '1-100',
|
||||
@@ -247,7 +256,57 @@
|
||||
message: 'Please enter a email',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
email_title: [{
|
||||
required: true,
|
||||
message: 'Please enter email title',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
substance: [{
|
||||
required: true,
|
||||
message: 'Please enter email substance',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
},
|
||||
editorOption: {
|
||||
placeholder: 'Please enter...',
|
||||
modules: {
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
[{
|
||||
'header': 1
|
||||
}, {
|
||||
'header': 2
|
||||
}],
|
||||
[{
|
||||
'list': 'ordered'
|
||||
}, {
|
||||
'list': 'bullet'
|
||||
}],
|
||||
[{
|
||||
'script': 'sub'
|
||||
}, {
|
||||
'script': 'super'
|
||||
}],
|
||||
[{
|
||||
'size': ['small', false, 'large', 'huge']
|
||||
}],
|
||||
[{
|
||||
'header': [1, 2, 3, 4, 5, 6, false]
|
||||
}],
|
||||
[{
|
||||
'color': []
|
||||
}, {
|
||||
'background': []
|
||||
}],
|
||||
[{
|
||||
'align': []
|
||||
}],
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created: function() {
|
||||
@@ -268,12 +327,6 @@
|
||||
this.tableData = res.data.list
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
this.tableData[i].journal_title = this.tableData[i].journal.title
|
||||
if (this.tableData[i].pushed == '') {
|
||||
this.tableData[i].user_send = 0
|
||||
} else {
|
||||
this.tableData[i].user_send = this.tableData[i].pagesize * this.tableData[i].pushed
|
||||
.length
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.error('res.msg');
|
||||
@@ -328,7 +381,6 @@
|
||||
this.$message.error(err);
|
||||
});
|
||||
} else {
|
||||
|
||||
this.$message.error('Please complete the information!');
|
||||
}
|
||||
});
|
||||
@@ -413,14 +465,11 @@
|
||||
let phrase = '';
|
||||
switch (e) {
|
||||
case 1:
|
||||
phrase = 'Appointment';
|
||||
phrase = 'Promotion';
|
||||
break;
|
||||
case 2:
|
||||
phrase = 'Article Recommendation';
|
||||
break;
|
||||
case 3:
|
||||
phrase = 'Promotion';
|
||||
break;
|
||||
}
|
||||
return phrase;
|
||||
},
|
||||
@@ -441,6 +490,23 @@
|
||||
}
|
||||
return phrase;
|
||||
},
|
||||
|
||||
// 人员国家
|
||||
decjuCountry(e){
|
||||
let country = '';
|
||||
switch (e) {
|
||||
case 0:
|
||||
country = 'All countries';
|
||||
break;
|
||||
case 1:
|
||||
country = 'Only China';
|
||||
break;
|
||||
case 2:
|
||||
country = 'Without China';
|
||||
break;
|
||||
}
|
||||
return country;
|
||||
},
|
||||
|
||||
// 发送时间
|
||||
timefreSDel(e) {
|
||||
@@ -483,6 +549,15 @@
|
||||
}
|
||||
return 'background-color:' + str + ';border-color:' + sgr + ';box-shadow:' + skr;
|
||||
},
|
||||
|
||||
// 富文本编辑器
|
||||
onEditorChange({
|
||||
editor,
|
||||
html,
|
||||
text
|
||||
}) {
|
||||
this.sendForm.substance = html;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -553,10 +628,10 @@
|
||||
|
||||
|
||||
.senderKuan {
|
||||
margin: 5px 0 0 0;
|
||||
padding: 5px;
|
||||
border: 1px solid #00669933;
|
||||
background: #fff;
|
||||
border: 2px dashed #ccc;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 2px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.senderKuan img {
|
||||
|
||||
Reference in New Issue
Block a user