莳松crm管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ss-crm-manage-web/src/views/Clue/Pool/Comp/DialogFollow.vue

262 lines
7.4 KiB

1 year ago
<template>
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="1000px">
<div class="flex">
<Form
style="flex: 1"
ref="formRef"
v-loading="formLoading"
isCol
:rules="rules"
:schema="allSchemas.formSchema"
/>
<div class="ml-20px" style="width: 300px">
<el-input
v-model="keyword"
placeholder="请输入关键字查询关键话术"
clearable
@keyup.enter="filterList"
/>
<el-collapse v-model="activeQues" :accordion="false">
<el-collapse-item
v-for="item in showList"
:key="item.skillId"
:title="item.question"
:name="item.skillId"
>
<div v-dompurify-html="item.content"></div>
</el-collapse-item>
</el-collapse>
</div>
</div>
</el-dialog>
</template>
<script setup>
import { allSchemas, rules } from './follow.data'
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formRef = ref() // 表单 Ref
const open = async (type, info) => {
dialogVisible.value = true
dialogTitle.value = type == 'create' ? '新增跟进记录' : '修改跟进记录'
formType.value = type
// 修改时,设置数据
if (info) {
formLoading.value = true
try {
const data = { ...info }
formRef.value.setValues(data)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const resultList = [
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 1,
deptId: 167,
question: '暂时先看题的',
skillKey: '先看科目一',
keyList: ['先看科目一'],
content:
'<p>科目一的题目不难的,等会可以加个微信给您发一些做题技巧,我们驾校离你也很近,后面您计划找驾校报名了可以接您来我们驾校实地看看的</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 2,
deptId: 167,
question: '你们怎么练车的',
skillKey: '练车人数',
keyList: ['练车人数'],
content:
'<p>我们驾校这边练车是自己提前在微信上跟教练约时间来练车的,科二练车的时候到你练车了是你一个人一辆车,教练一对一教学的,也可以一对二,不用排队等的</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 3,
deptId: 167,
question: '教练怎么样 凶嘛',
skillKey: '教练凶',
keyList: ['教练凶'],
content:
'<p>我们驾校教练都是驾校本部教练,也都是经过正规培训上岗的,脾气比较温和幽默的,不存在凶学员的情况,学车氛围也比较好;学员也不需要给教练送礼的</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 4,
deptId: 167,
question: '驾校通过率咋样',
skillKey: '通过率',
keyList: ['通过率'],
content:
'<p>我们驾校在合肥也是老牌驾校的了,在合肥干了十几年了,并且拥有自家考场,科二科三考试都在我们自家考场考试,所以通过率一直非常高</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 5,
deptId: 167,
question: '可以晚上练车吗?',
skillKey: '晚上练车',
keyList: ['晚上练车'],
content:
'<p>我们驾校练车时间是根据学员的时间来安排的,但是晚上练车视线不太好,因为考试的时候也是白天嘛,建议最好是白天过来练车,然后等熟练了后期可以让教练加加班晚上</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 6,
deptId: 167,
question: '大学生有优惠嘛',
skillKey: '学生优惠',
keyList: ['学生优惠'],
content: '<p>学生我们驾校是有优惠的,而且我们驾校有专设学生班,练车不用排队,随到随练的</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 7,
deptId: 167,
question: '拿证时间多久',
skillKey: '拿证时间',
keyList: ['拿证时间'],
content: '<p>C1手动挡正常拿证时间45天左右拿证,C2自动挡正常35天左右拿证</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 8,
deptId: 167,
question: '驾校有熟人',
skillKey: '熟人',
keyList: ['熟人'],
content:
'<p>你朋友认识的人是教练还是驾校里面工作人员呢,驾校场地在哪呢 学车肯定是要对比的 要个近的合适的,我们驾校离你很近,而且学费目前也在做活动比较优惠,您可以对比一下的,找驾校也是可以自己来现场看过后再决定的</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 9,
deptId: 167,
question: '考试地点在哪',
skillKey: '考试地点',
keyList: ['考试地点'],
content:
'<p>科一和科四是统一要去滨湖车管所考试的,科二科三合肥市总共六个考场,科二和科三考试是就近安排考场考试的,这样考试也方便些</p>',
status: 2
},
{
searchValue: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
params: {},
orderName: null,
orderType: null,
skillId: 10,
deptId: 167,
question: '没时间练车',
skillKey: '没时间学车',
keyList: ['没时间学车'],
content:
'<p>我们驾校练车时间根据学员时间来安排,并且也不用每天都来的,一周抽时间来练个三四次就可以的,每次来一个小时这样,科二来个十来次 科三来个十来次就行,耽误不了你太多时间的</p>',
status: 2
}
]
const showList = ref(resultList)
const keyword = ref('')
const activeQues = ref('')
function filterList() {
showList.value = resultList.filter((it) => it.question.includes(keyword.value))
}
</script>
<style lang="scss" scoped></style>