Compare commits
61 Commits
clay-patch
...
zhangkaihu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
391d477f82 | ||
|
|
96680bfd6e | ||
|
|
89d24216e5 | ||
|
|
9b79836cb4 | ||
|
|
92408fb1a0 | ||
|
|
194768a232 | ||
| 35b8e263b6 | |||
| 00ff24a771 | |||
| cadf653193 | |||
| 2f4986a29e | |||
| 8037c31df7 | |||
| 760de05fc9 | |||
| 2f598104d8 | |||
| 5f460fcbdf | |||
| 6a8f5b4850 | |||
| 62125eb3b2 | |||
| 63c770775b | |||
| 560e56a67d | |||
| 786e51a38e | |||
| 25ba502545 | |||
| 979f24b68b | |||
| f4acb4b648 | |||
| 8269a47d2d | |||
|
|
95ffd79e33 | ||
|
|
f17f19466c | ||
|
|
d34e32314c | ||
|
|
666fd543b9 | ||
|
|
6f02c47da2 | ||
|
|
82a5cebf3b | ||
| 24f8fbf8ce | |||
| da5e062c88 | |||
| 9a514cf897 | |||
| 5aa3446d32 | |||
| f5303a281f | |||
| 18e3c4337e | |||
| f01efcc20e | |||
| b200df9d98 | |||
| dd31dd627e | |||
| c2abb10bb1 | |||
| c6b4145784 | |||
| a070573d42 | |||
| 4a6ce61091 | |||
| 02b1cc03f7 | |||
|
|
fca6d319dd | ||
| 80272fe80b | |||
| 4c86af02dc | |||
| 88b1052f14 | |||
| 0aff2a5fab | |||
| 0ddfde74a9 | |||
| 768ae544d3 | |||
| d127df718d | |||
| b1ee9508ae | |||
| 949915bb66 | |||
| 97522c6f1b | |||
| 225b382e8d | |||
| a1cb22ca55 | |||
| aa56640dae | |||
| 79ef8bc022 | |||
|
|
a3b3d68f60 | ||
|
|
7b53540e17 | ||
| 935cc9dd2b |
@@ -12,5 +12,5 @@ docker rmi smartopsweb:latest
|
||||
echo '----build image start----'
|
||||
docker build -t smartopsweb:latest .
|
||||
echo '----build image success----'
|
||||
docker run --name smartopsweb --link smartopsserver --restart=always -d -p 28081:80 smartopsweb:latest
|
||||
docker run --name smartopsweb --link smartopsserver --restart=always -d -p 8080:80 smartopsweb:latest
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>智能语音服务系统</title>
|
||||
<title>运维智能语音服务系统</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
// 获取参数配置表详情
|
||||
export const getConfigDetails = (configId,extraConfigType) => {
|
||||
export const getConfigDetails = (configId) => {
|
||||
return request({
|
||||
url: `/extra/config/${configId}/${extraConfigType}`,
|
||||
url: `/extra/config/${configId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -27,9 +27,9 @@ export const editConfig = (data) => {
|
||||
}
|
||||
|
||||
// 删除参数配置表
|
||||
export const delConfig =(configIdList,extraConfigType) => {
|
||||
export const delConfig =(configIdList) => {
|
||||
return request({
|
||||
url: `/extra/config/${configIdList}/${extraConfigType}`,
|
||||
url: `/extra/config/${configIdList}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import request from '@/utils/request.js'
|
||||
import { method } from 'lodash'
|
||||
|
||||
//获取历史通话文本记录
|
||||
|
||||
export const getHistoryCallContent=(params)=>{
|
||||
return request({
|
||||
url:`/text/history/list/${params}`,
|
||||
method:'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
//获取工作台当前线路记录
|
||||
export const getCurrentContent=(line)=>{
|
||||
return request({
|
||||
url:`/text/records/${line}`,
|
||||
method:'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
background-color: #418DFF;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-size: 26px;
|
||||
font-size: 18px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@@ -64,7 +64,7 @@ const getHistoryDetail=(newVal)=>{
|
||||
})
|
||||
recordLeftObj.value = res.data
|
||||
if (res.data && res.data.length > 0) {
|
||||
leftHeadData.value.username = res.data[0].callIdNumber || '--';
|
||||
leftHeadData.value.username = res.data[0].name || '--';
|
||||
leftHeadData.value.phone = res.data[0].callPhone || '--';
|
||||
leftHeadData.value.orderName = res.data[0].orderName || '--';
|
||||
}
|
||||
|
||||
@@ -18,16 +18,18 @@
|
||||
<!-- 我的 -->
|
||||
<div v-if="recordItem.speaker==0" class="word-my">
|
||||
<div class="info">
|
||||
<p class="name">{{ recordItem.speaker == 0 ? recordItem.callIdNumber : 'AI助手' }} </p>
|
||||
<p class="name">{{ recordItem.speaker == 0 ? recordItem.name
|
||||
: '运维助手' }} </p>
|
||||
<div class="info-content">{{ recordItem.message }}</div>
|
||||
</div>
|
||||
<el-avatar text="我"/>
|
||||
<el-avatar>{{ recordItem.speaker==0?recordItem.name:'运维助手' }}</el-avatar>
|
||||
</div>
|
||||
<!-- 对方 -->
|
||||
<div v-else class="word">
|
||||
<el-avatar text="对方"/>
|
||||
<el-avatar>{{ recordItem.speaker==0?recordItem.name:'运维助手' }}</el-avatar>
|
||||
<div class="info">
|
||||
<p class="name">{{ recordItem.speaker == 0 ? recordItem.callIdNumber : 'AI助手' }} </p>
|
||||
<p class="name">{{ recordItem.speaker == 0 ? recordItem.name
|
||||
: '运维助手' }} </p>
|
||||
<div class="info-content">{{ recordItem.message }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
<div class="live-call">
|
||||
<div class="header">
|
||||
<div>
|
||||
<span style="margin-right: 20px">姓名:{{ recordObj.name ||'--'}}</span>
|
||||
<span style="margin-right: 20px">{{ recordObj.name }}</span>
|
||||
<span>电话号码:{{ recordObj.phone ||'--'}}</span>
|
||||
</div>
|
||||
<div><span>工单名称:{{ recordObj.orderName||'--' }}</span></div>
|
||||
<!-- <div><span>{{ recordObj.type=='1'?'线路一':recordObj.type=='2'?'线路二':'' }}</span></div>-->
|
||||
<div><span>{{ lineName }}</span></div>
|
||||
<div v-if="recordObj.type"><el-tag>{{ recordObj.type=='1'?'线路一':recordObj.type=='2'?'线路二':'' }}</el-tag></div>
|
||||
<div v-else><el-tag>{{ lineName }}</el-tag></div>
|
||||
</div>
|
||||
<el-scrollbar ref="scrollbarRef" class="scrollbar">
|
||||
<div class="chat-content" ref="innerRef">
|
||||
<el-empty v-if="recordObj.content?.length==0" description="暂无通话" />
|
||||
<div class="chat-content" ref="innerRef" v-else>
|
||||
<div v-for="(item,index) in recordObj.content" :key="index">
|
||||
<el-divider border-style="dotted" v-if="item.isLine">{{item.lineMsg}}</el-divider>
|
||||
<div v-else>
|
||||
@@ -18,18 +19,18 @@
|
||||
<!-- 我的 -->
|
||||
<div v-if="item.speaker==0" class="word-my">
|
||||
<div class="info">
|
||||
<!-- <p class="name">{{ item.speaker==0?recordObj.name:'AI助手' }} </p>-->
|
||||
<p class="name">{{ item.speaker==0?item.callIdNumber:'AI助手' }} </p>
|
||||
<!-- <p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>-->
|
||||
<p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>
|
||||
<div class="info-content">{{ item.message }}</div>
|
||||
</div>
|
||||
<el-avatar text="我"/>
|
||||
<el-avatar>{{ item.speaker==0?recordObj.name:'运维助手' }}</el-avatar>
|
||||
</div>
|
||||
|
||||
<!-- 对方 -->
|
||||
<div v-else class="word">
|
||||
<el-avatar text="对方"/>
|
||||
<el-avatar > {{ item.speaker==0?recordObj.name:'运维助手' }} </el-avatar>
|
||||
<div class="info">
|
||||
<p class="name">{{ item.speaker==0?item.callIdNumber:'AI助手' }} </p>
|
||||
<p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>
|
||||
<div class="info-content">{{ item.message }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {getToken} from '@/utils/auth'
|
||||
import {usePermisstionStroe} from '@/stores/permisstion'
|
||||
import {getCurrentContent} from "@/api/workbench";
|
||||
|
||||
const permisstionStore = usePermisstionStroe()
|
||||
const authStore = useAuthStore()
|
||||
@@ -37,6 +38,32 @@ let token = getToken();
|
||||
let send = {
|
||||
type: "ping",
|
||||
};
|
||||
// if(localStorage.getItem('recordLeftObj')){
|
||||
// recordLeftObj.value=JSON.parse(localStorage.getItem('recordLeftObj'))
|
||||
// }
|
||||
// if(localStorage.getItem('recordRightObj')){
|
||||
// recordRightObj.value=JSON.parse(localStorage.getItem('recordRightObj'))
|
||||
// }
|
||||
const getCurrentMsg=(line)=>{
|
||||
getCurrentContent(line).then(res=>{
|
||||
// console.info("🚀 ~method:res -----", res)
|
||||
if(line==1){
|
||||
recordLeftObj.value.name=res.data.name
|
||||
recordLeftObj.value.phone=res.data.callPhone
|
||||
recordLeftObj.value.orderName=res.data.orderName
|
||||
recordLeftObj.value.type=res.data.type
|
||||
recordLeftObj.value.content=res.data.textVoList||[]
|
||||
}else if(line==2){
|
||||
recordRightObj.value.name=res.data.name
|
||||
recordRightObj.value.phone=res.data.callPhone
|
||||
recordRightObj.value.orderName=res.data.orderName
|
||||
recordRightObj.value.type=res.data.type
|
||||
recordRightObj.value.content=res.data.textVoList||[]
|
||||
}
|
||||
})
|
||||
}
|
||||
getCurrentMsg(1)
|
||||
getCurrentMsg(2)
|
||||
//滚动面板自动滑动到底部
|
||||
const scrollToBottom = (scrollbarRef) => {
|
||||
if (scrollbarRef) {
|
||||
@@ -48,7 +75,7 @@ const scrollToBottom = (scrollbarRef) => {
|
||||
|
||||
|
||||
const setWsUrl = (url) => {
|
||||
return (window.location.protocol === 'http:' ? "ws://" : "wss://") + window.location.host + import.meta.env.VITE_BASE_WSURL + url;
|
||||
return (window.location.protocol === 'http:' ? "ws://" : "wss://") + window.location.host + import.meta.env.VITE_BASE_URL + url;
|
||||
}
|
||||
const handleLogout = () => {
|
||||
authStore.userLogout()
|
||||
@@ -66,7 +93,8 @@ const initWebSocket = () => {
|
||||
try {
|
||||
// const wsUrl=setWsUrl(`/ws/text/${token}`)
|
||||
// const wsUrl = `ws://frp.feashow.cn:31800/ws/text/${token}`
|
||||
const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}`
|
||||
// const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}`
|
||||
const wsUrl = `ws://192.168.1.71:88/ws/text/${token}`
|
||||
socket = new WebSocket(wsUrl)
|
||||
// 2. ws.send()给服务器发送信息
|
||||
//连接发生错误的回调方法
|
||||
@@ -104,16 +132,13 @@ const initWebSocket = () => {
|
||||
console.info("🚀 ~method:flag -----", flag)
|
||||
if(flag){
|
||||
recordLeftObj.value.content.push({
|
||||
// callIdNumber: "17282197782048",
|
||||
// conversationId:0,
|
||||
// conversationTimestamp: "",
|
||||
// createTime: "2024-10-08",
|
||||
isLine:true,
|
||||
lineMsg: "一轮通话结束~~",
|
||||
speaker: data.content.speaker
|
||||
})
|
||||
}
|
||||
recordLeftObj.value.content.push(data.content)
|
||||
localStorage.setItem('recordLeftObj',JSON.stringify(recordLeftObj.value))
|
||||
// console.info("🚀 ~method:onmessage -----", recordLeftObj.value)
|
||||
nextTick(() => {
|
||||
scrollToBottom(recordLeftRef.value)
|
||||
@@ -127,10 +152,6 @@ const initWebSocket = () => {
|
||||
console.info("🚀 ~method:flag -----", flag)
|
||||
if(flag){
|
||||
recordRightObj.value.content.push({
|
||||
// callIdNumber: "17282197782048",
|
||||
// conversationId:0,
|
||||
// conversationTimestamp: "",
|
||||
// createTime: "2024-10-08",
|
||||
isLine:true,
|
||||
lineMsg: "一轮通话结束~~",
|
||||
speaker: data.content.speaker
|
||||
@@ -138,6 +159,7 @@ const initWebSocket = () => {
|
||||
}
|
||||
recordRightObj.value.content.push(data.content)
|
||||
// console.info("🚀 ~method:onmessage -----", recordRightObj.value)
|
||||
localStorage.setItem('recordRightObj',JSON.stringify(recordRightObj.value))
|
||||
nextTick(() => {
|
||||
scrollToBottom(recordRightRef.value);
|
||||
})
|
||||
|
||||
@@ -125,6 +125,11 @@ const props = defineProps({
|
||||
isSettingCol: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//表格是否刷新
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
@@ -217,7 +222,7 @@ const getList = async () => {
|
||||
const { api, params } = props.tableConfig
|
||||
const queryParmas = {...localData.query, ...params}
|
||||
if(api) {
|
||||
localData.loading = true
|
||||
localData.loading = props.isLoading
|
||||
try {
|
||||
const {code, data, msg} = await requestList(api, queryParmas).then(res=>{
|
||||
// console.log(res)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="logo" ref="logo">
|
||||
<span v-if="!siderbarStore.isCollapse">智能语音服务</span>
|
||||
<span v-if="!siderbarStore.isCollapse">运维智能语音服务系统</span>
|
||||
</div>
|
||||
<el-scrollbar :height="`calc(100vh - ${logoHeight}px)`" style="background-color: #ffffff">
|
||||
<el-menu
|
||||
|
||||
@@ -76,7 +76,7 @@ init()
|
||||
.link-box {
|
||||
position: relative;
|
||||
padding: 12px 0;
|
||||
line-height: 30px;
|
||||
line-height: 34px;
|
||||
|
||||
.tag {
|
||||
padding: 6px;
|
||||
|
||||
@@ -22,4 +22,4 @@ export const setAuthInfo = (info) => {
|
||||
|
||||
export const removeAuthInfo = () => {
|
||||
return Cookies.remove('authinfo')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { getToken, removeToken } from "./auth";
|
||||
axios.defaults.headers['Content-Type']='application/json'
|
||||
console.log(import.meta.env.VITE_BASE_URL);
|
||||
|
||||
|
||||
const serveice = axios.create({
|
||||
baseURL: import.meta.env.VITE_BASE_URL,
|
||||
timeout: 6000
|
||||
@@ -50,8 +51,9 @@ serveice.interceptors.response.use(response=>{
|
||||
}).then(()=>{
|
||||
removeToken()
|
||||
window.location = '/login'
|
||||
return Promise.reject('会话已过期,请重新登录')
|
||||
})
|
||||
return Promise.reject('会话已过期,请重新登录')
|
||||
break;
|
||||
case 402:
|
||||
break;
|
||||
case 403:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="call-history">
|
||||
<h3>历史通话记录</h3>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig"></fvTable>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :isLoading="isLoading"></fvTable>
|
||||
<voice ref="voiceRef" title="语音详情" :rowUrl="rowUrl" />
|
||||
<infoLiveCall ref="infoLiveCallRef" v-model:value="orderNumber" />
|
||||
</div>
|
||||
@@ -20,10 +20,11 @@ import InfoLiveCall from '@/components/infoLiveCall/index.vue'
|
||||
const orderNumber = ref('')
|
||||
const rowUrl = ref()
|
||||
const infoLiveCallRef = ref()
|
||||
const isLoading = ref(false)
|
||||
const voiceRef = ref()
|
||||
const tableIns = ref()
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
record: ['order:dialogue:list'],
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
@@ -51,21 +52,24 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'operationUser',
|
||||
// prop: 'destinationName',
|
||||
label: '处理人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'knotter',
|
||||
// prop: 'destinationName',
|
||||
label: '关单人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'destinationName',
|
||||
// prop: 'workOrderNumber',
|
||||
label: '用户名',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'destinationNumber',
|
||||
label: '电话号码',
|
||||
align: 'center'
|
||||
},
|
||||
@@ -73,6 +77,7 @@ const tableConfig = reactive({
|
||||
prop: 'callState',
|
||||
label: '电话拨打状态',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
if (row.callState !== null) {
|
||||
@@ -83,7 +88,8 @@ const tableConfig = reactive({
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'createdTime',
|
||||
// prop: 'workOrderTime',
|
||||
label: '拨打时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
@@ -97,21 +103,26 @@ const tableConfig = reactive({
|
||||
currentRender: ({ row, index }) => {
|
||||
// console.log(row);
|
||||
let btn = []
|
||||
btn.push({ label: '播放语音', prem: auths.detail, func: () => handleVoice(row), type: 'primary' })
|
||||
btn.push({ label: '通话记录', prem: auths.detail, func: () => handleInfo(row), type: 'primary' })
|
||||
btn.push({ label: '播放语音', func: () => handleVoice(row), type: 'primary' })
|
||||
btn.push({ label: '通话记录', prem: auths.record, func: () => handleInfo(row), type: 'primary' })
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<>
|
||||
item.prem?
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link>
|
||||
{item.label}
|
||||
</el-button>
|
||||
</>
|
||||
: <el-button
|
||||
type={item.type}
|
||||
onClick={() => item.func()}
|
||||
link>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div >
|
||||
@@ -136,13 +147,18 @@ const handleVoice = (row) => {
|
||||
|
||||
}
|
||||
const handleInfo = (row) => {
|
||||
console.log('fefe',row.orderNumber);
|
||||
orderNumber.value = row.orderNumber
|
||||
infoLiveCallRef.value.open()
|
||||
}
|
||||
window.setInterval(() => {
|
||||
setTimeout(tableIns.value.refresh(), 0)
|
||||
}, 2000)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table--fit){
|
||||
min-height: 180px;
|
||||
}
|
||||
.home {
|
||||
.real-time-call {
|
||||
width: 100%;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
:rules="rules"
|
||||
label-width="70px"
|
||||
>
|
||||
<h3>智能语音服务系统</h3>
|
||||
<h3>运维智能语音服务系统</h3>
|
||||
<el-form-item prop="username" label="账号">
|
||||
<el-input v-model="loginForm.username" :prefix-icon="User" ></el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {addContact, editContact, getContactDetail, deleteContact} from "@/api/address-book";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {reactive} from "vue";
|
||||
|
||||
const router = useRouter()
|
||||
const tableIns = ref()
|
||||
@@ -152,6 +153,11 @@ const searchConfig = reactive([
|
||||
component: 'el-input',
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['order:contacts:add'],
|
||||
edit: ['order:contacts:edit'],
|
||||
delete: ['order:contacts:del'],
|
||||
})
|
||||
const addressBookTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -207,15 +213,15 @@ const addressBookTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete,func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -231,8 +237,8 @@ const addressBookTableConfig = reactive({
|
||||
api: '/contact/list',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add', type: 'primary'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add', type: 'primary' , auth: auths.add},
|
||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const searchAddressBook = (val) => {
|
||||
@@ -277,13 +283,13 @@ const handleEdit = (row) => {
|
||||
const getDetail = (row) => {
|
||||
getContactDetail(row.contactsId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||
// 清空校验
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
})
|
||||
} else {
|
||||
ElMessage.success(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import {reactive, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addConfig, delConfig, editConfig, getConfigDetails} from "@/api/phone-traffic-config";
|
||||
@@ -131,12 +131,17 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['extra:config:add'],
|
||||
edit: ['extra:config:edit'],
|
||||
delete: ['extra:config:del'],
|
||||
})
|
||||
const phoneTrafficTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
// {
|
||||
// type: 'selection',
|
||||
// prop: 'selection'
|
||||
// },
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
@@ -191,15 +196,15 @@ const phoneTrafficTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete, func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -217,8 +222,8 @@ const phoneTrafficTableConfig = reactive({
|
||||
extraConfigType:extraConfigType.value
|
||||
},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary', auth: auths.add},
|
||||
// {name: '删除', key: 'delete', type: 'danger'},
|
||||
]
|
||||
})
|
||||
const searchPhoneTraffic = (val) => {
|
||||
@@ -261,9 +266,8 @@ const handleEdit = (row) => {
|
||||
dialogType.value = "edit";
|
||||
}
|
||||
const getDetail = (row) => {
|
||||
getConfigDetails(row.configId,extraConfigType.value).then(res => {
|
||||
getConfigDetails(row.configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
res.data.configType=''+res.data.configType
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||
@@ -271,6 +275,7 @@ const getDetail = (row) => {
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
})
|
||||
} else {
|
||||
ElMessage.success(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -283,7 +288,7 @@ const selectionChange = (selection) => {
|
||||
}
|
||||
}
|
||||
const deleteContactMethod = (configId) => {
|
||||
delConfig(configId,extraConfigType.value).then(res => {
|
||||
delConfig(configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tableIns.value.refresh()
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
</el-form>
|
||||
<div class="query-btn">
|
||||
<el-button type="primary" v-perm="['admin:config:add']" @click="handleAdd" :icon="Plus" plain>新增</el-button>
|
||||
<el-button type="danger" v-perm="['admin:config:del']" @click="handleMoreDelete(configIds,configNameList)"
|
||||
:icon="Delete" plain
|
||||
:disabled="disabled">删除
|
||||
</el-button>
|
||||
<!-- <el-button type="danger" v-perm="['admin:config:del']" @click="handleMoreDelete(configIds,configNameList)"-->
|
||||
<!-- :icon="Delete" plain-->
|
||||
<!-- :disabled="disabled">删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button type="warning" v-perm="['admin:config:export']" @click="handleExport" :icon="Download" plain>导出-->
|
||||
<!-- </el-button>-->
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@
|
||||
@select="handleSelect"
|
||||
v-tabh
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
<el-table-column label="序号" type="index" width="60"/>
|
||||
<el-table-column prop="configName" label="参数名称" align="center"/>
|
||||
<el-table-column prop="configKey" label="参数键名" align="center"/>
|
||||
@@ -247,6 +247,9 @@ const handleSubmit = async (instance) => {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if(form.value.configType==1){
|
||||
delete form.value.extraConfigType
|
||||
}
|
||||
editConfig(form.value).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
@@ -274,6 +277,7 @@ const handleEdit = async (configId) => {
|
||||
restFrom()
|
||||
getConfigDetails(configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
res.data.configType= res.data.configType+''
|
||||
form.value = res.data
|
||||
title.value = "编辑参数配置表"
|
||||
isVisited.value = true
|
||||
|
||||
@@ -71,7 +71,7 @@ const tableConfig = reactive({
|
||||
api: '/user',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add', type: 'primary'},
|
||||
// {name: '新增', key: 'add', type: 'primary'},
|
||||
]
|
||||
})
|
||||
const formRules = reactive({
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search">
|
||||
</fvSearchForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||
<WorkDialog ref="workDialogRef" :rowData="rowData" />
|
||||
</template>
|
||||
@@ -30,7 +29,9 @@ const mockData = ref([
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
detail: ['order:order:detail'],
|
||||
close: ['order:order:close'],
|
||||
delete: ['order:order:del'],
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -224,15 +225,15 @@ const tableConfig = reactive({
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'danger'})
|
||||
btn.push({ label: '关单', prem: auths.close, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
@@ -31,7 +31,9 @@ const mockData = ref([
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
detail: ['order:order:detail'],
|
||||
close: ['order:order:close'],
|
||||
delete: ['order:order:del'],
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -207,16 +209,16 @@ const tableConfig = reactive({
|
||||
// console.log(row);
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'danger' })
|
||||
btn.push({ label: '详情',prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.close, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger' })
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
@@ -31,7 +31,9 @@ const mockData = ref([
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
detail: ['order:order:detail'],
|
||||
close: ['order:order:close'],
|
||||
delete: ['order:order:del'],
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -208,15 +210,15 @@ const tableConfig = reactive({
|
||||
|
||||
let btn = []
|
||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
||||
btn.push({ label: '关单', prem: auths.detail, func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'danger' })
|
||||
btn.push({ label: '关单', prem: auths.close,func: () => handleClose(row), type: 'primary' })
|
||||
btn.push({ label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger' })
|
||||
return (
|
||||
<div style={{ width: '100%' }}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import {reactive, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addSensitive, deleteSensitive, editSensitive,getSensitiveDetail} from "@/api/sensitive-words";
|
||||
@@ -103,6 +103,11 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
},
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['order:sensitive:add'],
|
||||
edit: ['order:sensitive:edit'],
|
||||
delete: ['order:sensitive:del'],
|
||||
})
|
||||
const sensitiveTableConfig= reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -153,15 +158,15 @@ const sensitiveTableConfig= reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete,func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -178,8 +183,8 @@ const sensitiveTableConfig= reactive({
|
||||
api: '/sensitive/list',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus', auth: auths.add},
|
||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const searchSensitive = (val) => {
|
||||
@@ -224,13 +229,13 @@ const handleEdit = (row) => {
|
||||
const getDetail = (row) => {
|
||||
getSensitiveDetail(row.sensitiveId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||
// 清空校验
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
})
|
||||
} else {
|
||||
ElMessage.success(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addVerbal, editVerbal,deleteVerbal, getVerbalDetail} from "@/api/verbal-trick";
|
||||
import {reactive} from "vue";
|
||||
const router = useRouter()
|
||||
const dialogTitle = ref("");
|
||||
const dialogType = ref("");
|
||||
@@ -18,47 +19,53 @@ const formDialogRef = ref()
|
||||
const tableIns = ref()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'verbalName',
|
||||
label: '话术问题',
|
||||
prop: 'query',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
placeholder: '请输入话术问题查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
{
|
||||
label: '类型',
|
||||
prop: 'verbalType',
|
||||
label: '话术答案',
|
||||
prop: 'answer',
|
||||
props: {
|
||||
placeholder: '请输入类型查询',
|
||||
placeholder: '请输入话术答案查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
{
|
||||
label: '内容',
|
||||
prop: 'verbalContent',
|
||||
props: {
|
||||
placeholder: '请输入内容查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
props: {
|
||||
placeholder: '请选择状态查询',
|
||||
cacheKey: 'verbal_trick_state',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
},
|
||||
component: shallowRef(fvSelect),
|
||||
},
|
||||
// {
|
||||
// label: '是否挂断电话',
|
||||
// prop: 'callOff',
|
||||
// props: {
|
||||
// placeholder: '请选择是否挂断电话查询',
|
||||
// cacheKey: 'call_off',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// },
|
||||
// component: shallowRef(fvSelect),
|
||||
// },
|
||||
// {
|
||||
// label: '上下文类型',
|
||||
// prop: 'type',
|
||||
// props: {
|
||||
// placeholder: '请选择上下文类型查询',
|
||||
// cacheKey: 'context_type',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// },
|
||||
// component: shallowRef(fvSelect),
|
||||
// },
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['order:verbal:add'],
|
||||
edit: ['order:verbal:edit'],
|
||||
delete: ['order:verbal:del'],
|
||||
})
|
||||
const verbalTrickTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -73,38 +80,57 @@ const verbalTrickTableConfig = reactive({
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
prop: 'verbalName',
|
||||
label: '名称',
|
||||
prop: 'query',
|
||||
label: '话术问题',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'verbalType',
|
||||
label: '类型',
|
||||
prop: 'answer',
|
||||
label: '话术答案',
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'verbalContent',
|
||||
// label: '内容',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'verbalContent',
|
||||
label: '内容',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
prop: 'callOff',
|
||||
label: '是否挂断电话',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'verbal_trick_state'} value={row.state} />)
|
||||
if (row.callOff !== null) {
|
||||
return (<Tag dictType={'call_off'} value={row.callOff} />)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: '上下文类型',
|
||||
align: 'center',
|
||||
currentRender: ({ row, index }) => {
|
||||
if (row.type !== null) {
|
||||
return (<Tag dictType={'context_type'} value={row.type} />)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// prop: 'state',
|
||||
// label: '状态',
|
||||
// align: 'center',
|
||||
// showOverflowTooltip: false,
|
||||
// currentRender: ({ row, index }) => {
|
||||
// if (row.state !== null) {
|
||||
// return (<Tag dictType={'verbal_trick_state'} value={row.state} />)
|
||||
// } else {
|
||||
// return '--'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
@@ -114,15 +140,15 @@ const verbalTrickTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete, func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -138,72 +164,78 @@ const verbalTrickTableConfig = reactive({
|
||||
api: '/verbal/list',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus', auth: auths.add},
|
||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const formRules = reactive({
|
||||
verbalName: [
|
||||
{required: true, message: "请输入名称", trigger: ["change", "blur"]}
|
||||
query: [
|
||||
{required: true, message: "请输入话术问题", trigger: ["change", "blur"]}
|
||||
],
|
||||
verbalType: [
|
||||
{required: true, message: "请输入类型", trigger: ["change", "blur"]}
|
||||
],
|
||||
verbalContent: [
|
||||
{required: true, message: "请输入内容", trigger: ["change", "blur"]}
|
||||
],
|
||||
state: [
|
||||
{required: true, message: "请选择状态", trigger: ["change", "blur"]}
|
||||
// answer: [
|
||||
// {required: true, message: "请输入话术答案", trigger: ["change", "blur"]}
|
||||
// ],
|
||||
callOff: [
|
||||
{required: true, message: "请选择是否挂断电话", trigger: ["change", "blur"]}
|
||||
],
|
||||
// state: [
|
||||
// {required: true, message: "请选择状态", trigger: ["change", "blur"]}
|
||||
// ],
|
||||
});
|
||||
const formSchema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'verbalName',
|
||||
label: '话术问题',
|
||||
prop: 'query',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入名称',
|
||||
placeholder: '请输入话术问题',
|
||||
clearable: true,
|
||||
type:'textarea',
|
||||
rows:3
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '类型',
|
||||
prop: 'verbalType',
|
||||
label: '话术答案',
|
||||
prop: 'answer',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入类型',
|
||||
placeholder: '请输入话术答案',
|
||||
clearable: true,
|
||||
type:'textarea',
|
||||
rows:3
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '内容',
|
||||
prop: 'verbalContent',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入内容',
|
||||
clearable: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
label: '是否挂断电话',
|
||||
prop: 'callOff',
|
||||
component: shallowRef(fvSelect),
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
cacheKey: 'verbal_trick_state',
|
||||
placeholder: '请选择是否挂断电话',
|
||||
cacheKey: 'call_off',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '上下文类型',
|
||||
prop: 'type',
|
||||
component: shallowRef(fvSelect),
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请选择上下文类型',
|
||||
cacheKey: 'context_type',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
}
|
||||
@@ -249,22 +281,23 @@ const handleEdit = (row) => {
|
||||
dialogType.value = "edit";
|
||||
}
|
||||
const getDetail = (row) => {
|
||||
getVerbalDetail(row.verbalId).then(res => {
|
||||
getVerbalDetail(row.templateId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
res.data.callOff=res.data.callOff+''
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||
// 清空校验
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
})
|
||||
} else {
|
||||
ElMessage.warning(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const selectionChange = (selection) => {
|
||||
if (selection.length !== 0) {
|
||||
verbalIds.value = selection.map(item => item.verbalId).join()
|
||||
verbalIds.value = selection.map(item => item.templateId).join()
|
||||
} else {
|
||||
verbalIds.value=''
|
||||
}
|
||||
@@ -293,12 +326,12 @@ const handleMoreDelete = () => {
|
||||
}
|
||||
}
|
||||
const handleSingleDelete = (row) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.verbalName}的话术吗?`, '系统提示', {
|
||||
ElMessageBox.confirm(`确认删除问题为${row.query}的话术吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteContactMethod(row.verbalId)
|
||||
deleteContactMethod(row.templateId)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { shallowRef } from 'vue';
|
||||
import {reactive, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {addConfig, delConfig, editConfig, getConfigDetails} from "@/api/phone-traffic-config";
|
||||
@@ -131,12 +131,17 @@ const searchConfig = reactive([
|
||||
component: shallowRef(fvSelect),
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['extra:config:add'],
|
||||
edit: ['extra:config:edit'],
|
||||
delete: ['extra:config:del'],
|
||||
})
|
||||
const phoneTrafficTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
// {
|
||||
// type: 'selection',
|
||||
// prop: 'selection'
|
||||
// },
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
@@ -191,15 +196,15 @@ const phoneTrafficTableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleSingleDelete(row), type: 'danger'})
|
||||
btn.push({label: '编辑',prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', prem: auths.delete,func: () => handleSingleDelete(row), type: 'danger'})
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.prem}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -217,8 +222,8 @@ const phoneTrafficTableConfig = reactive({
|
||||
extraConfigType:extraConfigType.value
|
||||
},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary'},
|
||||
{name: '删除', key: 'delete', type: 'danger'},
|
||||
{name: '新增', key: 'add',type:'primary',auth: auths.add},
|
||||
// {name: '删除', key: 'delete', type: 'danger'},
|
||||
]
|
||||
})
|
||||
const searchPhoneTraffic = (val) => {
|
||||
@@ -261,9 +266,8 @@ const handleEdit = (row) => {
|
||||
dialogType.value = "edit";
|
||||
}
|
||||
const getDetail = (row) => {
|
||||
getConfigDetails(row.configId,extraConfigType.value).then(res => {
|
||||
getConfigDetails(row.configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
res.data.configType=''+res.data.configType
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||
@@ -271,6 +275,7 @@ const getDetail = (row) => {
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
})
|
||||
} else {
|
||||
ElMessage.success(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -283,7 +288,7 @@ const selectionChange = (selection) => {
|
||||
}
|
||||
}
|
||||
const deleteContactMethod = (configId) => {
|
||||
delConfig(configId,extraConfigType.value).then(res => {
|
||||
delConfig(configId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tableIns.value.refresh()
|
||||
|
||||
Reference in New Issue
Block a user