kefu/static/templates/default/setting_robot.html

102 lines
7.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{template "header" }}
<div id="app" style="width:100%">
<template>
<el-tabs v-model="tabActive" type="border-card" @tab-click="handleTabClick">
<el-tab-pane label="基础设置" name="basicTab">
<el-form label-width="230px">
<el-form-item label="机器人昵称:">
<el-input v-model="robotInfo.name" maxlength="50" show-word-limit placeholder="例如:客服小智"></el-input>
</el-form-item>
<el-form-item label="机器人头像:">
<el-avatar :size="50" :src="robotInfo.avator"></el-avatar>
<el-upload
class="avatar-uploader"
:action="uploadAvatorUrl"
:show-file-list="false"
name="imgfile"
:on-success="handleRobotAvatarSuccess"
:before-upload="beforeAvatarUpload">
<i class="el-icon-plus avatar-uploader-icon"></i>上传
</el-upload>
<p style="color: #666666">支持jpg、gif、 png类型</p>
</el-form-item>
<el-form-item label="机器人接入:">
<el-radio v-model="robotInfo.status" label="3">人工回复(慎点,纯人工回复,无任何自动回复)</el-radio>
<el-radio v-model="robotInfo.status" label="2">机器人回复(慎点这是给单纯QA问答用的)</el-radio>
<el-radio v-model="robotInfo.status" label="1">机器人和人工一起回复</el-radio>
</el-form-item>
<el-form-item label="机器人无法回答时提示语:">
<el-input v-model="robotInfo.noAnswer" maxlength="100" show-word-limit placeholder="例如:暂时无法回答,请输入“人工”,转接到人工服务!"></el-input>
</el-form-item>
<el-form-item label="转接人工客服关键词:">
<el-input v-model="robotInfo.transferKefu" maxlength="50" show-word-limit placeholder="多个关键词逗号分割,例如:人工,转人工"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="setRobotInfo()">保存</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
{{/* <el-tab-pane label="ChatGPT对接openAI">*/}}
{{/* <el-form style="font-size: 14px;width: 600px">*/}}
{{/* <el-form-item label="OpenAI接口地址(因为官方网址被封请提供代理网址例如https://api.openai.com)">*/}}
{{/* <el-input v-model="chatGPT.url" @change="setEntConfigItem('chatGPT OpenAI接口地址','chatGPTUrl',chatGPT.url)"></el-input>*/}}
{{/* </el-form-item>*/}}
{{/* <el-form-item label="OpenAI接口密钥">*/}}
{{/* <el-input v-model="chatGPT.secret" @change="setEntConfigItem('chatGPT OpenAI接口密钥','chatGPTSecret',chatGPT.secret)"></el-input>*/}}
{{/* </el-form-item>*/}}
{{/* <el-form-item label="OpenAI系统词system">*/}}
{{/* <el-input type="textarea" rows="3" v-model="chatGPT.system" @change="setEntConfigItem('chatGPT OpenAI系统词system','chatGPTSystem',chatGPT.system)"></el-input>*/}}
{{/* </el-form-item>*/}}
{{/* <el-form-item label="OpenAI提示词prompt">*/}}
{{/* <el-input type="textarea" rows="8" v-model="chatGPT.prompt" @change="setEntConfigItem('chatGPT OpenAI提示词','chatGPTPrompt',chatGPT.prompt)"></el-input>*/}}
{{/* </el-form-item>*/}}
{{/* </el-form>*/}}
{{/* </el-tab-pane>*/}}
<el-tab-pane label="固定话术流程">
<div class="formWarning">
<p>此设置可以实现,不管用户发什么,都固定按照顺序回复,每行一条</p>
<p>也可以实现问答选择题形式获取线索,#分割问题和答案,|竖线分割多个答案选项: 问题#答案2|答案3|答案4</p>
<p>举例:"你多大了?#18|20" 换行 "你是小白?#对|错"</p>
</div>
<el-input type="textarea" rows="20" v-model="marketing" @change="setEntConfigItem('固定话术流程','Marketing',marketing)"></el-input>
</el-tab-pane>
<el-tab-pane label="富文本内容设置" name="robotCard">
<el-form label-width="230px">
<div v-show="robotCard==''" id="welcomeEditor" style="border:1px solid #dcdfe6;margin: 10px 0px;"></div>
<div ></div>
<el-input
v-show="robotCard!=''"
v-model="robotCard"
@blur="editor.txt.html(robotCard)"
style="margin: 10px 0px"
type="textarea"
:rows="6"
>
</el-input>
<el-button @click="setRobotCardSource">源代码</el-button>
<el-button type="primary" @click="setRobotCard()">保存</el-button>
</el-form>
</el-tab-pane>
<el-tab-pane label="钉钉机器人配置">
<el-form style="font-size: 14px;width: 600px">
<el-form-item label="机器人消息接收地址">
<span style="color: #333;font-size: 13px;"><{host}>/ding/robotMessage/<{entId}></span>
<el-button type="primary" size="mini" v-on:click="copyText(host+'/ding/robotMessage/'+entId)"><{flyLang.copy}></el-button>
</el-form-item>
<el-form-item label="机器人AppKey">
<el-input v-model="ding.appKey" @change="setEntConfigItem('钉钉机器人机器人AppKey','DingAppKey',ding.appKey)"></el-input>
</el-form-item>
<el-form-item label="机器人AppSecret">
<el-input v-model="ding.appSecret" @change="setEntConfigItem('钉钉机器人机器人AppSecret','DingAppSecret',ding.appSecret)"></el-input>
</el-form-item>
<el-form-item label="机器人RobotCode">
<el-input v-model="ding.robotCode" @change="setEntConfigItem('钉钉机器人机器人RobotCode','DingRobotCode',ding.robotCode)"></el-input>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
</template>
</div>
</body>
<script src="/static/js/wangEditor.min.js"></script>
{{template "setting_bottom" .}}