|
|
|
|
@ -34,7 +34,7 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
v-hasPermi="['system:scriptTemplate:add']"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
>添加一级话术</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
@ -73,6 +73,13 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button v-if="scope.row.parentId == 0"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
@click="handleAdd(scope.row)"
|
|
|
|
|
v-hasPermi="['system:scriptTemplate:add']"
|
|
|
|
|
>添加二级话术</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@ -80,13 +87,6 @@
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['system:scriptTemplate:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
@click="handleAdd(scope.row)"
|
|
|
|
|
v-hasPermi="['system:scriptTemplate:add']"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@ -104,7 +104,7 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24" v-if="form.parentId !== 0 && !topAdd">
|
|
|
|
|
<el-form-item label="上级话术" prop="parentId">
|
|
|
|
|
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级话术" />
|
|
|
|
|
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级话术" disabled="disabled"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
@ -116,12 +116,12 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="!topAdd">
|
|
|
|
|
<el-form-item label="话术标题" prop="titile">
|
|
|
|
|
<el-input v-model="form.titile" placeholder="请输入话术标题" />
|
|
|
|
|
<el-input v-model="form.titile" placeholder="请输入话术标题" maxlength="50" show-word-limit/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="!topAdd">
|
|
|
|
|
<el-form-item label="话术内容" prop="content">
|
|
|
|
|
<el-input v-model="form.content" type="textarea" placeholder="请输入话术内容" />
|
|
|
|
|
<el-input v-model="form.content" type="textarea" placeholder="请输入话术内容" maxlength="500" show-word-limit/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="!topAdd">
|
|
|
|
|
@ -154,37 +154,37 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="form.type == 1">
|
|
|
|
|
<el-col :span="24" v-if="form.parentId != 0 && form.type == 1">
|
|
|
|
|
<el-form-item label="内部链接" prop="link">
|
|
|
|
|
<el-input v-model="form.link" placeholder="请输入内部链接" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="form.type == 1">
|
|
|
|
|
<el-col :span="24" v-if="form.parentId != 0 && form.type == 1">
|
|
|
|
|
<el-form-item label="跳转参数" prop="linkParams">
|
|
|
|
|
<el-input v-model="form.linkParams" placeholder="请输入跳转参数" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="form.type == 3">
|
|
|
|
|
<el-col :span="24" v-if="form.parentId != 0 && form.type == 3">
|
|
|
|
|
<el-form-item label="外部链接" prop="link">
|
|
|
|
|
<el-input v-model="form.link" placeholder="请输入外部链接" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="form.type == 4">
|
|
|
|
|
<el-col :span="24" v-if="form.parentId != 0 && form.type == 4">
|
|
|
|
|
<el-form-item label="APPID" prop="redirectAppid">
|
|
|
|
|
<el-input v-model="form.redirectAppid" placeholder="请输入小程序APPID" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="form.type == 4" label-width="90px">
|
|
|
|
|
<el-col :span="24" v-if="form.parentId != 0 && form.type == 4" label-width="90px">
|
|
|
|
|
<el-form-item label="页面链接" prop="redirectUrl">
|
|
|
|
|
<el-input v-model="form.redirectUrl" placeholder="请输入页面链接" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="form.type == 5 || form.type == 6">
|
|
|
|
|
<el-col :span="24" v-if="form.parentId != 0 && form.type == 5 || form.type == 6">
|
|
|
|
|
<el-form-item label="视频号ID" prop="videoNo">
|
|
|
|
|
<el-input v-model="form.videoNo" placeholder="请输入视频号ID" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" v-if="form.type == 5" label-width="90px">
|
|
|
|
|
<el-col :span="24" v-if="form.parentId != 0 && form.type == 5" label-width="90px">
|
|
|
|
|
<el-form-item label="feedId" prop="feedId">
|
|
|
|
|
<el-input v-model="form.feedId" placeholder="请输入视频号feedId" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -206,6 +206,7 @@ import { tagTreeSelect } from "@/api/system/wechatTab";
|
|
|
|
|
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
import {left, right} from "core-js/internals/array-reduce";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Dept",
|
|
|
|
|
@ -295,6 +296,8 @@ export default {
|
|
|
|
|
this.getDeptTree();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
right,
|
|
|
|
|
left,
|
|
|
|
|
/** 查询标签列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
@ -330,7 +333,7 @@ export default {
|
|
|
|
|
leader: undefined,
|
|
|
|
|
phone: undefined,
|
|
|
|
|
email: undefined,
|
|
|
|
|
status: "0"
|
|
|
|
|
status: "0",
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
@ -350,13 +353,16 @@ export default {
|
|
|
|
|
this.form.parentId = row.id;
|
|
|
|
|
if (row.id) {
|
|
|
|
|
this.topAdd = false;
|
|
|
|
|
this.title = "添加二级话术";
|
|
|
|
|
this.form.type = 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.topAdd = true;
|
|
|
|
|
this.title = "添加一级话术";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加标签";
|
|
|
|
|
|
|
|
|
|
listTemplate().then(response => {
|
|
|
|
|
this.deptOptions = this.handleTree(response.data, "id");
|
|
|
|
|
});
|
|
|
|
|
@ -371,7 +377,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.topAdd = false;
|
|
|
|
|
if(row.parentId == 0) {
|
|
|
|
|
this.topAdd = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.topAdd = false;
|
|
|
|
|
}
|
|
|
|
|
this.reset();
|
|
|
|
|
getTemplate(row.id).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
@ -380,7 +390,7 @@ export default {
|
|
|
|
|
console.log('结果是==>',this.form.tagIdArray)
|
|
|
|
|
}
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改标签";
|
|
|
|
|
this.title = "修改话术";
|
|
|
|
|
});
|
|
|
|
|
// listDeptExcludeChild(row.id).then(response => {
|
|
|
|
|
// this.deptOptions = this.handleTree(response.data, "id");
|
|
|
|
|
|