|
|
|
|
@ -442,7 +442,7 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="类型" prop="isCustom">
|
|
|
|
|
<el-select v-model="scriptForm.isCustom">
|
|
|
|
|
<el-select v-model="scriptForm.isCustom" @change="clearScript">
|
|
|
|
|
<el-option label="话术模板发送" :value="0" :key="0"></el-option>
|
|
|
|
|
<el-option label="自定义发送" :value="1" :key="1"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
@ -451,12 +451,14 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 话术模板发送 -->
|
|
|
|
|
<el-row v-if="scriptForm.isCustom == 0">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="话术二级标题选择" prop="scriptTemplateId">
|
|
|
|
|
<el-input v-model="scriptForm.scriptTemplateId" placeholder="请输入话术标题"/>
|
|
|
|
|
<el-col :span="40">
|
|
|
|
|
<el-form-item label="话术二级标题选择" prop="scriptTemplateId" label-width="90px">
|
|
|
|
|
<treeselect v-model="scriptForm.scriptTemplateId" :options="scriptOptions" :show-count="true"
|
|
|
|
|
@select="selectTree"
|
|
|
|
|
placeholder="请选择话术" :disable-branch-nodes="true"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-col :span="40">
|
|
|
|
|
<el-form-item label="话术通知内容" prop="scriptContent">
|
|
|
|
|
<el-input v-model="scriptForm.scriptContent"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -476,7 +478,7 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="小程序标签" prop="tagIdArray" label-width="90px">
|
|
|
|
|
<treeselect v-model="form.tagIdArray" :options="chatTagOptions" :multiple="true" :show-count="true"
|
|
|
|
|
<treeselect v-model="tagIdArray" :options="chatTagOptions" :multiple="true" :show-count="true"
|
|
|
|
|
placeholder="请选择小程序标签" :disable-branch-nodes="true"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
@ -530,7 +532,7 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitBatchOperate">确 定</el-button>
|
|
|
|
|
<el-button @click="cancelscriptDialog">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
@ -560,6 +562,7 @@ import {
|
|
|
|
|
batchAddRemark,
|
|
|
|
|
allAddRemark,
|
|
|
|
|
getMiniProgramTagsTree,
|
|
|
|
|
scriptTreeSelect,
|
|
|
|
|
} from "@/api/system/member";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import {tagTreeSelect} from "@/api/system/wechatTab";
|
|
|
|
|
@ -613,6 +616,7 @@ export default {
|
|
|
|
|
// 批量操作:小程序标签
|
|
|
|
|
batchMiniProgramVisible: false,
|
|
|
|
|
chatTagOptions: [],
|
|
|
|
|
scriptOptions: [],
|
|
|
|
|
tagIdArray: [],
|
|
|
|
|
// 批量操作:积分
|
|
|
|
|
batchIntegralVisible: false,
|
|
|
|
|
@ -630,6 +634,7 @@ export default {
|
|
|
|
|
// 批量操作:发送话术
|
|
|
|
|
batchRemarkVisible: null,
|
|
|
|
|
scriptForm: {
|
|
|
|
|
userIdList: null,
|
|
|
|
|
isCustom: null,
|
|
|
|
|
scriptTemplateId: null,
|
|
|
|
|
scriptName: null,
|
|
|
|
|
@ -643,8 +648,8 @@ export default {
|
|
|
|
|
redirectUrl: null,
|
|
|
|
|
videoNo: null,
|
|
|
|
|
feedId: null,
|
|
|
|
|
tagNames: null,
|
|
|
|
|
tagIds: null,
|
|
|
|
|
tagNames: [],
|
|
|
|
|
tagIds: [],
|
|
|
|
|
// 当类型为模板发送时,选择了二级话术标题后,显示内容用,不传后端保存
|
|
|
|
|
scriptContent: null,
|
|
|
|
|
},
|
|
|
|
|
@ -705,6 +710,7 @@ export default {
|
|
|
|
|
this.getProvinceList();
|
|
|
|
|
// 获取标签树
|
|
|
|
|
this.getDeptTree();
|
|
|
|
|
this.getScriptTree();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询用户列表 */
|
|
|
|
|
@ -789,7 +795,24 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
cancelscriptDialog(isclose) {
|
|
|
|
|
this.scriptForm = null;
|
|
|
|
|
this.scriptForm.isCustom = null,
|
|
|
|
|
this.scriptForm.scriptName = null;
|
|
|
|
|
this.scriptForm.titile = null;
|
|
|
|
|
this.scriptForm.content = null;
|
|
|
|
|
this.scriptForm.tagType = null;
|
|
|
|
|
this.scriptForm.type = null;
|
|
|
|
|
this.scriptForm.link = null;
|
|
|
|
|
this.scriptForm.linkParams = null;
|
|
|
|
|
this.scriptForm.redirectAppid = null;
|
|
|
|
|
this.scriptForm.redirectUrl = null;
|
|
|
|
|
this.scriptForm.videoNo = null;
|
|
|
|
|
this.scriptForm.feedId = null;
|
|
|
|
|
this.scriptForm.tagNames = null;
|
|
|
|
|
this.scriptForm.tagIds = null;
|
|
|
|
|
this.scriptForm.scriptContent = null;
|
|
|
|
|
this.tagIdArray = [];
|
|
|
|
|
this.scriptForm.scriptTemplateId = null;
|
|
|
|
|
this.scriptForm.scriptContent = null;
|
|
|
|
|
if (isclose) {
|
|
|
|
|
this.batchScriptVisible = false;
|
|
|
|
|
}
|
|
|
|
|
@ -800,6 +823,40 @@ export default {
|
|
|
|
|
this.chatTagOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 查询话术下拉树结构 */
|
|
|
|
|
getScriptTree() {
|
|
|
|
|
scriptTreeSelect().then(response => {
|
|
|
|
|
this.scriptOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
clearScript() {
|
|
|
|
|
// 话术模板
|
|
|
|
|
if (this.scriptForm.isCustom == 0) {
|
|
|
|
|
this.scriptForm.scriptName = null;
|
|
|
|
|
this.scriptForm.titile = null;
|
|
|
|
|
this.scriptForm.content = null;
|
|
|
|
|
this.scriptForm.tagType = null;
|
|
|
|
|
this.scriptForm.type = null;
|
|
|
|
|
this.scriptForm.link = null;
|
|
|
|
|
this.scriptForm.linkParams = null;
|
|
|
|
|
this.scriptForm.redirectAppid = null;
|
|
|
|
|
this.scriptForm.redirectUrl = null;
|
|
|
|
|
this.scriptForm.videoNo = null;
|
|
|
|
|
this.scriptForm.feedId = null;
|
|
|
|
|
this.scriptForm.tagNames = null;
|
|
|
|
|
this.scriptForm.tagIds = null;
|
|
|
|
|
this.scriptForm.scriptContent = null;
|
|
|
|
|
this.tagIdArray = [];
|
|
|
|
|
}
|
|
|
|
|
// 自定义发送
|
|
|
|
|
if (this.scriptForm.isCustom == 1) {
|
|
|
|
|
this.scriptForm.scriptTemplateId = null;
|
|
|
|
|
this.scriptForm.scriptContent = null;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectTree(raw, instanceId) {
|
|
|
|
|
this.scriptForm.scriptContent = raw.content;
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
@ -1068,14 +1125,19 @@ export default {
|
|
|
|
|
|
|
|
|
|
/* 批量操作:发送话术 */
|
|
|
|
|
if (this.batchOperateValue == 7) {
|
|
|
|
|
alert("批量发送话术");
|
|
|
|
|
alert(this.scriptForm.isCustom);
|
|
|
|
|
alert(this.ids);
|
|
|
|
|
this.scriptForm.userIdList = this.ids;
|
|
|
|
|
this.scriptForm.tagIds = this.tagIdArray;
|
|
|
|
|
batchSendScript(this.scriptForm).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("批量发送话术成功");
|
|
|
|
|
this.cancelscriptDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (this.batchOperateValue == 8) {
|
|
|
|
|
alert("全量发送话术");
|
|
|
|
|
alert(this.scriptForm.isCustom);
|
|
|
|
|
alert(this.queryParams.nickname);
|
|
|
|
|
this.scriptForm.tagIds = this.tagIdArray;
|
|
|
|
|
allSendScript(this.scriptForm, this.queryParams).then(Response => {
|
|
|
|
|
this.$modal.msgSuccess("全量发送话术成功");
|
|
|
|
|
this.cancelscriptDialog(true);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 批量操作备注
|
|
|
|
|
|