Compare commits
165 Commits
clay-patch
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ba9aa5d1d | ||
|
|
68895dd1fd | ||
|
|
85f49e0e1a | ||
|
|
1b7374c300 | ||
|
|
fc51fe7cdf | ||
|
|
77c8885d6d | ||
| 3ddcc6aa68 | |||
| c7b76b7f53 | |||
| 3a38208744 | |||
| ef1e7103fe | |||
| efd1b44a14 | |||
| b2f02e2c5d | |||
| 3366fa6005 | |||
|
|
30d9543729 | ||
| 314effd9a4 | |||
| e74e9d0a86 | |||
| 12889e6bec | |||
| 340b0dcce5 | |||
| c6b5599f47 | |||
| b3a0171e8c | |||
| 9efa733c64 | |||
| 67c48f9313 | |||
| 93f454e7d8 | |||
| f9ced77070 | |||
| ff6ba7fb39 | |||
| f4b0199ef8 | |||
| 1f2e1e27d8 | |||
| d501a7d40c | |||
| b0009057db | |||
| 3ac4b27632 | |||
| 0da8f5f6da | |||
| a8b992b918 | |||
| 94b761f71f | |||
| 6d20fea4a8 | |||
| 00fb1e261a | |||
| 2ad6a67844 | |||
| 6ea543ac17 | |||
| da08543d9b | |||
| f391d21270 | |||
| 2b99d094f4 | |||
| f8e2500e97 | |||
| 39d8d0d2ac | |||
| 839e6fcb0c | |||
| 584ef56419 | |||
| a3ee331462 | |||
| 984edd6a4c | |||
| 97384e7ede | |||
| b6ece4eae2 | |||
| 4eef491157 | |||
| a88b93e235 | |||
| 85040afbb9 | |||
| 530bcff229 | |||
| 67917e9bb5 | |||
| 1c05bd5d20 | |||
| 8c0a0c4287 | |||
| 6aa954ed10 | |||
| 2328d2c643 | |||
| 40620d6666 | |||
| a200a0a5af | |||
| bc3e9b81a5 | |||
| cadc1579b8 | |||
| ebfe82e9bb | |||
| 04c9ae8eb5 | |||
| ad6088e1c4 | |||
| cafd5398ae | |||
| 48340a413f | |||
| 051a6e07e7 | |||
| a3216ce72a | |||
| 2403191ca9 | |||
| fadb62c016 | |||
| c7d711d844 | |||
| 8ef5ba7c02 | |||
| 4b2bbfdb4c | |||
| d1e9f634cf | |||
| 1cf4da1a5f | |||
| 7f1e5faf57 | |||
| 1e4433c2a9 | |||
| b56a191d08 | |||
| 1c530ad640 | |||
| 88203505ad | |||
| b52d2932d2 | |||
| 2641369a2e | |||
| 21917a3de7 | |||
| dfc2273f3d | |||
| f68f8396d4 | |||
| 729261b6f7 | |||
| 0b1dff2940 | |||
| bdf5c6db6c | |||
| 34c52f94ff | |||
| 704797fec4 | |||
| 226ff55ddf | |||
| c5aedcb565 | |||
| 5e6a5ed9b3 | |||
| 2856ce09dd | |||
| daccb0f2e0 | |||
| 965de0f7e5 | |||
| 450afc66b0 | |||
|
|
e7f3f18294 | ||
| 2a9a630e13 | |||
| 1954719d4d | |||
| d1f43efa59 | |||
|
|
e47e69d660 | ||
|
|
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 | ||
|
|
52af20bec8 | ||
|
|
6121fcd25e | ||
| 935cc9dd2b |
1
auto-imports.d.ts
vendored
1
auto-imports.d.ts
vendored
@@ -5,6 +5,7 @@
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
|
||||
24
components.d.ts
vendored
24
components.d.ts
vendored
@@ -11,26 +11,22 @@ declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
ElAside: typeof import('element-plus/es')['ElAside']
|
||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
@@ -41,26 +37,25 @@ declare module '@vue/runtime-core' {
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRate: typeof import('element-plus/es')['ElRate']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElText: typeof import('element-plus/es')['ElText']
|
||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTree: typeof import('element-plus/es')['ElTree']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
FvCheckbox: typeof import('./src/fvcomponents/fvCheckbox/index.vue')['default']
|
||||
FvForm: typeof import('./src/fvcomponents/fvForm/index.vue')['default']
|
||||
FvFormDialog: typeof import('./src/fvcomponents/fvFormDialog/index.vue')['default']
|
||||
FvPagination: typeof import('./src/fvcomponents/fvPagination/index.vue')['default']
|
||||
FvRadio: typeof import('./src/fvcomponents/fvRadio/index.vue')['default']
|
||||
FvSearchForm: typeof import('./src/fvcomponents/fvSearchForm/index.vue')['default']
|
||||
@@ -74,18 +69,21 @@ declare module '@vue/runtime-core' {
|
||||
IconSelect: typeof import('./src/components/iconSelect/index.vue')['default']
|
||||
IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
|
||||
IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
|
||||
JavaCodeEdit: typeof import('./src/components/codeEdit/JavaCodeEdit.vue')['default']
|
||||
JsCodeEdit: typeof import('./src/components/codeEdit/JsCodeEdit.vue')['default']
|
||||
ImportExcel: typeof import('./src/components/ImportExcel.vue')['default']
|
||||
InfoLiveCall: typeof import('./src/components/infoLiveCall/index.vue')['default']
|
||||
LiveCall: typeof import('./src/components/liveCall/index.vue')['default']
|
||||
LiveCallItem: typeof import('./src/components/liveCall/LiveCallItem.vue')['default']
|
||||
LiveCallItemHome: typeof import('./src/components/liveCall/LiveCallItemHome.vue')['default']
|
||||
Pagination: typeof import('./src/components/pagination/index.vue')['default']
|
||||
ParentView: typeof import('./src/components/ParentView.vue')['default']
|
||||
PointTag: typeof import('./src/components/PointTag.vue')['default']
|
||||
PopoverDelete: typeof import('./src/components/PopoverDelete.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SqlCodeEdit: typeof import('./src/components/codeEdit/SqlCodeEdit.vue')['default']
|
||||
SvgIcon: typeof import('./src/components/svgIcon/index.vue')['default']
|
||||
Tag: typeof import('./src/components/Tag.vue')['default']
|
||||
TheWelcome: typeof import('./src/components/TheWelcome.vue')['default']
|
||||
Voice: typeof import('./src/components/voice/index.vue')['default']
|
||||
WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
|
||||
}
|
||||
export interface ComponentCustomProperties {
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
#!/bin/sh
|
||||
# 定义应用组名
|
||||
group_name='clay'
|
||||
# 定义应用名称
|
||||
app_name=$DRONE_REPO_NAME
|
||||
# 定义应用版本
|
||||
app_version=$DRONE_COMMIT
|
||||
echo ${app_version}
|
||||
# 打包编译docker镜像
|
||||
docker rm -f smartopsweb
|
||||
docker rmi smartopsweb:latest
|
||||
echo '----build image start----'
|
||||
docker build -t smartopsweb:latest .
|
||||
echo '----build image success----'
|
||||
docker run --name smartopsweb --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>
|
||||
|
||||
19
nginx.conf
19
nginx.conf
@@ -23,7 +23,10 @@ http {
|
||||
|
||||
sendfile on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
keepalive_timeout 60s;
|
||||
keepalive_requests 10000;
|
||||
#keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
@@ -48,5 +51,19 @@ http {
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /ollama {
|
||||
proxy_pass http://10.8.105.26:11434;
|
||||
}
|
||||
|
||||
location /dify/dify {
|
||||
proxy_pass http://10.8.105.207:8080;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -1,4 +1,6 @@
|
||||
import request from '@/utils/request.js'
|
||||
import axios from "axios";
|
||||
import {getToken} from "@/utils/auth";
|
||||
|
||||
export const addContact = (data) => {
|
||||
return request({
|
||||
@@ -28,3 +30,23 @@ export const deleteContact = (contactIds) => {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export const importContact = (data) => {
|
||||
return request({
|
||||
url: '/contact/import',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const exportContact = (data) => {
|
||||
return axios.post(
|
||||
`${import.meta.env.VITE_BASE_URL}/contact/export`,data,
|
||||
{
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
Authorization: getToken()
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -11,8 +11,9 @@ export const orderGetList=(params)=>{
|
||||
|
||||
export const orderGetDetails =(params)=>{
|
||||
return request({
|
||||
url:`/order/info/${params}`,
|
||||
method:'get'
|
||||
url:'/order/info',
|
||||
method:'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -31,10 +32,11 @@ export const orderdDetele =(params)=>{
|
||||
})
|
||||
}
|
||||
|
||||
export const orderdClose =(params)=>{
|
||||
export const orderdClose =(data)=>{
|
||||
return request({
|
||||
url:`/order/${params}`,
|
||||
method:'post'
|
||||
url:'/order/close',
|
||||
method:'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,6 +7,13 @@ export const addVerbal = (data) => {
|
||||
data
|
||||
})
|
||||
}
|
||||
export const addEnhanceVerbal = (data) => {
|
||||
return request({
|
||||
url: '/verbal/add/enhance',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export const getVerbalDetail = (verbalId) => {
|
||||
return request({
|
||||
url: `/verbal/${verbalId}`,
|
||||
@@ -22,6 +29,14 @@ export const editVerbal = (data) => {
|
||||
})
|
||||
}
|
||||
|
||||
export const editEnhanceVerbal = (data) => {
|
||||
return request({
|
||||
url: '/verbal/update/enhance',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const deleteVerbal = (verbalIds) => {
|
||||
return request({
|
||||
url: `/verbal/${verbalIds}`,
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import request from '@/utils/request.js'
|
||||
import { method } from 'lodash'
|
||||
|
||||
//获取历史通话文本记录
|
||||
|
||||
export const getHistoryCallContent=(params)=>{
|
||||
return request({
|
||||
url:`/text/history/list/${params}`,
|
||||
url:`/text/history/list`,
|
||||
method:'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
//获取工作台当前线路记录
|
||||
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;
|
||||
|
||||
105
src/components/ImportExcel.vue
Normal file
105
src/components/ImportExcel.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<el-upload :file-list="[]"
|
||||
:limit="maxSize"
|
||||
with-credentials
|
||||
:multiple="multiple"
|
||||
:http-request="httpRequestHandle"
|
||||
:data="uploadParams"
|
||||
:auto-upload="true"
|
||||
:show-file-list="false"
|
||||
:before-upload="beforeUpload"
|
||||
:on-remove="handleRemove"
|
||||
>
|
||||
<el-button type="warning" style="margin-left: 10px; margin-right: 10px;" :loading="loading" v-perm="['order:contacts:import']" :disabled="disabled">导入</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import {getToken} from '@/utils/auth'
|
||||
import axios from "axios";
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
maxSize: {
|
||||
type: Number,
|
||||
default: 30
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const baseURL = import.meta.env.VITE_BASE_URL
|
||||
const uploadFileUrl = ref(baseURL + "/contact/import")
|
||||
const headers = reactive({
|
||||
authorization: getToken()
|
||||
})
|
||||
const uploadParams = ref({})
|
||||
const emit = defineEmits(["input", "getFile", "delete"])
|
||||
|
||||
const handleRemove = (file) => {
|
||||
emit("delete", file.response.data.id)
|
||||
}
|
||||
const beforeUpload = () => {
|
||||
loading.value = true
|
||||
return true
|
||||
}
|
||||
const httpRequestHandle = (param) => {
|
||||
// loading.value=true
|
||||
let file = param.file
|
||||
axios.post(uploadFileUrl.value, {
|
||||
file: file
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
...headers
|
||||
}
|
||||
}).then(res => {
|
||||
loading.value=false
|
||||
handleUploadSuccess(res)
|
||||
}).catch(error => {
|
||||
loading.value=false
|
||||
uploadError(error)
|
||||
})
|
||||
}
|
||||
const handleUploadSuccess = (res) => {
|
||||
let data = res.data
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: data.code === 1000 ? '导入成功' : '导入失败',
|
||||
type: data.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
emit("success")
|
||||
}
|
||||
const uploadError = (error) => {
|
||||
loading.value = false
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: "导入失败,请稍后再试!",
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
handleRemove
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
a {
|
||||
font-size: 14px;
|
||||
color: #2a99ff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -8,8 +8,8 @@ const recordLeftRef = ref(null);
|
||||
const emit = defineEmits(['update:value'])
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type:String,
|
||||
default:''
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -54,7 +54,12 @@ watch(() => props.value, async (newVal) => {
|
||||
})
|
||||
const getHistoryDetail=(newVal)=>{
|
||||
detailLoading.value=true
|
||||
getHistoryCallContent(newVal).then(res => {
|
||||
let param={
|
||||
orderNumber:newVal.orderNumber,
|
||||
alarmObject :newVal.alarmObject,
|
||||
alarmUnit :newVal.alarmUnit,
|
||||
}
|
||||
getHistoryCallContent(param).then(res => {
|
||||
if (res.code === 1000) {
|
||||
detailLoading.value=false
|
||||
res.data?.forEach(item => {
|
||||
@@ -64,11 +69,12 @@ 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 || '--';
|
||||
}
|
||||
} else {
|
||||
detailLoading.value=false
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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,50 +2,67 @@
|
||||
<div class="live-call">
|
||||
<div class="header">
|
||||
<div>
|
||||
<span style="margin-right: 20px">姓名:{{ recordObj.name ||'--'}}</span>
|
||||
<span>电话号码:{{ recordObj.phone ||'--'}}</span>
|
||||
<span style="margin-right: 20px">{{ recordObj.name }}</span>
|
||||
<span>电话号码:{{ recordObj.phone || '--' }}</span>
|
||||
</div>
|
||||
<div><span>工单名称:{{ recordObj.orderName || '--' }}</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><span>工单名称:{{ recordObj.orderName||'--' }}</span></div>
|
||||
<!-- <div><span>{{ recordObj.type=='1'?'线路一':recordObj.type=='2'?'线路二':'' }}</span></div>-->
|
||||
<div><span>{{ lineName }}</span></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>
|
||||
<el-divider border-style="dotted" v-if="item.isLine">{{ item.lineMsg }}</el-divider>
|
||||
<div v-else>
|
||||
<div class="time-grap"><span>{{ item.conversationTimestamp || '6月5日 12:05' }}</span></div>
|
||||
<div class="time-grap"><span>{{ item.conversationTimestamp || '2024-11-24 21:31:55' }}</span></div>
|
||||
<!-- 我的 -->
|
||||
<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>
|
||||
<div class="info-content">{{ item.message }}</div>
|
||||
<!-- <p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>-->
|
||||
<p class="name">{{ item.speaker == 0 ? recordObj.name : '运维助手' }} </p>
|
||||
<el-tooltip
|
||||
effect="customized"
|
||||
content="如果回答不准确,请右键告诉运维助手!"
|
||||
placement="bottom"
|
||||
>
|
||||
<div class="info-content" @contextmenu="showContextMenu($event,item.message)">{{ item.message }}</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-avatar text="我"/>
|
||||
<el-avatar style="flex-shrink: 0;">{{ item.speaker == 0 ? recordObj.name : '运维助手' }}</el-avatar>
|
||||
</div>
|
||||
|
||||
<!-- 对方 -->
|
||||
<div v-else class="word">
|
||||
<el-avatar text="对方"/>
|
||||
<el-avatar style="flex-shrink: 0;"> {{ 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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <el-empty description="暂无通话记录~" v-else/>-->
|
||||
<!-- <el-empty description="暂无通话记录~" v-else/>-->
|
||||
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<fvFormDialog ref="formDialogRef" width="550" :title="dialogTitle"
|
||||
:form-schema="formSchema" :form-rules="formRules"
|
||||
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineProps} from "vue";
|
||||
const scrollbarRef=ref()
|
||||
import {defineProps, reactive} from "vue";
|
||||
import {addEnhanceVerbal} from "@/api/verbal-trick";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const scrollbarRef = ref()
|
||||
const props = defineProps({
|
||||
recordObj: {
|
||||
type: Object,
|
||||
@@ -60,33 +77,111 @@ const props = defineProps({
|
||||
default: ''
|
||||
},
|
||||
})
|
||||
|
||||
const getScrollbarRef=()=>{
|
||||
return scrollbarRef.value
|
||||
const formDialogRef = ref()
|
||||
const dialogTitle = ref("训练知识库");
|
||||
const formRules = reactive({
|
||||
answer: [
|
||||
{required: true, message: "知识校准不能为空", trigger: "blur"},
|
||||
],
|
||||
});
|
||||
const formSchema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '知识内容',
|
||||
prop: 'query',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '知识校准',
|
||||
prop: 'answer',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入知识校准',
|
||||
clearable: true,
|
||||
type: 'textarea',
|
||||
rows: 4,
|
||||
},
|
||||
},
|
||||
]
|
||||
})
|
||||
const handleSubmitAddressBook = async (formInstance) => {
|
||||
if (!formInstance) return;
|
||||
let validate = await formInstance.validate()
|
||||
if (!validate.isValidate) return;
|
||||
let params = {
|
||||
query: formInstance.getValues().query,
|
||||
answer: formInstance.getValues().answer
|
||||
}
|
||||
addEnhanceVerbal(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg);
|
||||
formDialogRef.value.openOrCloseDialog(false)
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
});
|
||||
console.log('params', params)
|
||||
}
|
||||
const handleShowDeadLine=(recordObj)=>{
|
||||
const showContextMenu = (event, message) => {
|
||||
event.preventDefault(); // 阻止默认右键菜单
|
||||
formDialogRef.value.openOrCloseDialog(true)
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues({
|
||||
query: message
|
||||
})
|
||||
})
|
||||
}
|
||||
const getScrollbarRef = () => {
|
||||
return scrollbarRef.value
|
||||
}
|
||||
const handleShowDeadLine = (recordObj) => {
|
||||
console.info("🚀 ~method:'recordObj' -----", recordObj)
|
||||
let flag=false
|
||||
if(recordObj.content&&recordObj.content.length>1){
|
||||
let indices = recordObj.content.reduce(function (r, v, i) {
|
||||
return r.concat(v === 'a' ? i : []);
|
||||
}, []);
|
||||
let flag = false
|
||||
if (recordObj.content && recordObj.content.length > 1) {
|
||||
let indices = recordObj.content.reduce(function (r, v, i) {
|
||||
return r.concat(v === 'a' ? i : []);
|
||||
}, []);
|
||||
|
||||
console.log(indices);
|
||||
|
||||
recordObj.content.forEach((item,index)=>{
|
||||
console.info("🚀 ~method:.callIdNumber -----",recordObj.content.findIndex(item=>item.callIdNumber), item.callIdNumber)
|
||||
flag=recordObj.content[recordObj.content.length-2]?.callIdNumber!=recordObj.content[recordObj.content.length-1].callIdNumber
|
||||
recordObj.content.forEach((item, index) => {
|
||||
console.info("🚀 ~method:.callIdNumber -----", recordObj.content.findIndex(item => item.callIdNumber), item.callIdNumber)
|
||||
flag = recordObj.content[recordObj.content.length - 2]?.callIdNumber != recordObj.content[recordObj.content.length - 1].callIdNumber
|
||||
|
||||
})
|
||||
}
|
||||
return flag;
|
||||
return flag;
|
||||
}
|
||||
defineExpose({
|
||||
getScrollbarRef
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-popper.is-customized {
|
||||
/* Set padding to ensure the height is 32px */
|
||||
padding: 6px 12px;
|
||||
margin-top: -8px;
|
||||
background: rgb(232 232 232) !important;
|
||||
color: rgb(102, 102, 102) !important;
|
||||
|
||||
span {
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.el-popper.is-customized .el-popper__arrow::before {
|
||||
background: transparent !important;
|
||||
display: none;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.live-call {
|
||||
width: 48%;
|
||||
@@ -156,12 +251,14 @@ defineExpose({
|
||||
}
|
||||
|
||||
.info-content {
|
||||
//max-width: 94%;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
background: #f5f5f5;
|
||||
position: relative;
|
||||
margin-top: 8px;
|
||||
border: 1px solid #f5f5f5;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
//小三角形
|
||||
@@ -203,7 +300,7 @@ defineExpose({
|
||||
}
|
||||
|
||||
.info-content {
|
||||
max-width: 70%;
|
||||
max-width: 94%;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
float: right;
|
||||
|
||||
@@ -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,51 @@ 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||[]
|
||||
// recordLeftObj.value.content=[
|
||||
// {
|
||||
// name: '张三',
|
||||
// speaker: '1',
|
||||
// conversationTimestamp:'2024-11-24 21:31:55',
|
||||
// message: '2024年04月033日14:16:13六合变1号装置故障动作',
|
||||
// },{
|
||||
// name: '张三',
|
||||
// speaker: '0',
|
||||
// conversationTimestamp:'2024-11-24 21:31:56',
|
||||
// message: '大概需要多长时间修复',
|
||||
// },{
|
||||
// name: '张三',
|
||||
// speaker: '1',
|
||||
// conversationTimestamp:'2024-11-24 21:31:58',
|
||||
// message: '这个很难确定具体的修复时间呢,因为还不清楚故障的具体情况。但我们希望您能以最快的速度进行处理,尽量减少对业务的影响。',
|
||||
// }
|
||||
//
|
||||
// ]
|
||||
}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 +94,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 +112,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 +151,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 +171,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 +178,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);
|
||||
})
|
||||
|
||||
@@ -101,8 +101,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessage,ElNotification } from 'element-plus';
|
||||
import { requestList } from '../../api/common';
|
||||
import {ElMessage, ElNotification} from 'element-plus';
|
||||
import {requestList} from '@/api/common';
|
||||
// import {exportExcel} from "@/utils/export-excel";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -125,6 +125,16 @@ const props = defineProps({
|
||||
isSettingCol: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//表格是否刷新
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
//总数
|
||||
total: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
@@ -214,12 +224,12 @@ const changeColShow = (val) => {
|
||||
filterColumns()
|
||||
|
||||
const getList = async () => {
|
||||
const { api, params } = props.tableConfig
|
||||
const {api, params} = props.tableConfig
|
||||
const queryParmas = {...localData.query, ...params}
|
||||
if(api) {
|
||||
localData.loading = true
|
||||
if (api) {
|
||||
localData.loading = props.isLoading
|
||||
try {
|
||||
const {code, data, msg} = await requestList(api, queryParmas).then(res=>{
|
||||
const {code, data, msg} = await requestList(api, queryParmas).then(res => {
|
||||
// console.log(res)
|
||||
return res
|
||||
})
|
||||
@@ -242,8 +252,8 @@ const getList = async () => {
|
||||
localData.loading = false
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("error",error)
|
||||
if (!error){
|
||||
console.log("error", error)
|
||||
if (!error) {
|
||||
return
|
||||
}
|
||||
ElNotification({
|
||||
@@ -286,14 +296,26 @@ const handleCurrentChange = (val) => {
|
||||
emits('getBaseQuery', localData.query)
|
||||
getList()
|
||||
}
|
||||
|
||||
watch(() => props.data, (newVal) => {
|
||||
console.log(newVal)
|
||||
localData.list = newVal
|
||||
}, {
|
||||
deep: true
|
||||
})
|
||||
watch(() => props.total, (newVal) => {
|
||||
console.log(newVal)
|
||||
localData.total = newVal
|
||||
}, {
|
||||
deep: true
|
||||
})
|
||||
watchEffect(() => {
|
||||
if (localData.allColShow) {
|
||||
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||
}
|
||||
})
|
||||
|
||||
//刷新
|
||||
const refresh = ({resetPage=false}={}) => {
|
||||
const refresh = ({resetPage = false} = {}) => {
|
||||
resetPage ? localData.query.pageNum = 1 : null
|
||||
getList()
|
||||
}
|
||||
@@ -306,7 +328,7 @@ const getQuery = () => {
|
||||
return localData.query
|
||||
}
|
||||
|
||||
defineExpose({ refresh, updateLoading, getQuery, tableInstance })
|
||||
defineExpose({refresh, updateLoading, getQuery, tableInstance})
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,122 +1,134 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { getRouters } from "@/api/system/menu";
|
||||
import {defineStore} from "pinia";
|
||||
import {ref} from "vue";
|
||||
import {getRouters} from "@/api/system/menu";
|
||||
import Layout from '@/layout/index.vue'
|
||||
import ParentView from '@/components/ParentView.vue'
|
||||
import router from "../router";
|
||||
import {getUserInfo} from "@/api/login";
|
||||
|
||||
const VueComUrl = import.meta.glob('../views/**/*.vue')
|
||||
|
||||
export const usePermisstionStroe = defineStore('permisstion', () => {
|
||||
const asyncRouters = ref([])
|
||||
//定义是否加载路由变量
|
||||
const isLoadRoutes = ref(false)
|
||||
const menuList = ref([{
|
||||
name: 'home',
|
||||
path: '/home',
|
||||
icon: 'home',
|
||||
title: '工作台',
|
||||
meta: {
|
||||
breadcrumb: true
|
||||
}
|
||||
}])
|
||||
|
||||
const setIsLoadRoutes = (status) => {
|
||||
return isLoadRoutes.value = status
|
||||
}
|
||||
const setAsyncRouters = async () => {
|
||||
await getRouters().then(res => {
|
||||
if (res.code === 1000) {
|
||||
const sRouter = JSON.parse(JSON.stringify(res.data))
|
||||
const mData = JSON.parse(JSON.stringify(res.data))
|
||||
asyncRouters.value = formatAsyncRouters(sRouter)
|
||||
// menuList.value = generateMenu(mData)
|
||||
menuList.value = [...menuList.value, ...generateMenu(mData)]
|
||||
addAsyncRouters(asyncRouters.value)
|
||||
isLoadRoutes.value = false
|
||||
} else {
|
||||
isLoadRoutes.value = true
|
||||
setTimeout(() => setAsyncRouters(), 3000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const formatAsyncRouters = (routers) => {
|
||||
return routers.filter(route => {
|
||||
if (route.component) {
|
||||
if (route.component === 'Layout') {
|
||||
route.component = Layout
|
||||
} else if (route.component === 'ParentView') {
|
||||
route.component = ParentView
|
||||
const asyncRouters = ref([])
|
||||
const userinfo = ref()
|
||||
//定义是否加载路由变量
|
||||
const isLoadRoutes = ref(false)
|
||||
const menuList = ref([{
|
||||
name: 'home',
|
||||
path: '/home',
|
||||
icon: 'home',
|
||||
title: '工作台',
|
||||
meta: {
|
||||
breadcrumb: true
|
||||
}
|
||||
else {
|
||||
route.component = loadView(route.component)
|
||||
}])
|
||||
|
||||
const setIsLoadRoutes = (status) => {
|
||||
return isLoadRoutes.value = status
|
||||
}
|
||||
const getUser=async ()=>{
|
||||
let {data}= await getUserInfo()
|
||||
return data.user.roles[0].roleKey == 'voice';
|
||||
}
|
||||
const setAsyncRouters = async () => {
|
||||
await getRouters().then(async res => {
|
||||
if (res.code === 1000) {
|
||||
const sRouter = JSON.parse(JSON.stringify(res.data))
|
||||
const mData = JSON.parse(JSON.stringify(res.data))
|
||||
asyncRouters.value = formatAsyncRouters(sRouter)
|
||||
// let role = await getUser()
|
||||
// if(role){
|
||||
// generateMenu(mData).map(item => {
|
||||
// if (item.path == '/voice/management') {
|
||||
// item.children = item.children.filter(item => item.name !== "Speech")
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
menuList.value = [...menuList.value, ...generateMenu(mData)]
|
||||
addAsyncRouters(asyncRouters.value)
|
||||
isLoadRoutes.value = false
|
||||
} else {
|
||||
isLoadRoutes.value = true
|
||||
setTimeout(() => setAsyncRouters(), 3000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const formatAsyncRouters = (routers) => {
|
||||
return routers.filter(route => {
|
||||
if (route.component) {
|
||||
if (route.component === 'Layout') {
|
||||
route.component = Layout
|
||||
} else if (route.component === 'ParentView') {
|
||||
route.component = ParentView
|
||||
} else {
|
||||
route.component = loadView(route.component)
|
||||
}
|
||||
}
|
||||
if (route.children !== null && route.children && route.children.length !== 0) {
|
||||
route.children = formatAsyncRouters(route.children)
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
const addAsyncRouters = (routers) => {
|
||||
routers.forEach(route => {
|
||||
router.addRoute(route)
|
||||
})
|
||||
}
|
||||
|
||||
const generateMenu = (routes) => {
|
||||
return routes.filter(item => {
|
||||
if (item.children && item.children.length !== 0) {
|
||||
generateMenu(item.children)
|
||||
}
|
||||
if (item.pathParams != null) {
|
||||
item.path = formatPath(item.path, JSON.parse(item.pathParams))
|
||||
}
|
||||
item.title = item.meta.title
|
||||
item.icon = item.meta.icon
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// 拼接地址
|
||||
const formatPath = (path, query) => {
|
||||
const queryArr = []
|
||||
let newPath = path
|
||||
for (const key in query) {
|
||||
queryArr.push({label: key, value: query[key]})
|
||||
}
|
||||
}
|
||||
if (route.children !== null && route.children && route.children.length !== 0) {
|
||||
route.children = formatAsyncRouters(route.children)
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
const addAsyncRouters = (routers) => {
|
||||
routers.forEach(route => {
|
||||
router.addRoute(route)
|
||||
})
|
||||
}
|
||||
|
||||
const generateMenu = (routes) => {
|
||||
return routes.filter(item => {
|
||||
if (item.children && item.children.length !== 0) {
|
||||
generateMenu(item.children)
|
||||
}
|
||||
if (item.pathParams != null) {
|
||||
item.path = formatPath(item.path, JSON.parse(item.pathParams))
|
||||
}
|
||||
item.title = item.meta.title
|
||||
item.icon = item.meta.icon
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// 拼接地址
|
||||
const formatPath = (path, query) => {
|
||||
const queryArr = []
|
||||
let newPath = path
|
||||
for (const key in query) {
|
||||
queryArr.push({label: key, value: query[key]})
|
||||
queryArr.forEach((item, index) => {
|
||||
if (!index) {
|
||||
newPath += `?${item.label}=${item.value}`
|
||||
} else {
|
||||
newPath += `&${item.label}=${item.value}`
|
||||
}
|
||||
})
|
||||
return newPath
|
||||
}
|
||||
queryArr.forEach((item, index)=>{
|
||||
if(!index) {
|
||||
newPath += `?${item.label}=${item.value}`
|
||||
} else {
|
||||
newPath += `&${item.label}=${item.value}`
|
||||
}
|
||||
})
|
||||
return newPath
|
||||
}
|
||||
|
||||
|
||||
const loadView = (view) => {
|
||||
if (import.meta.env.MODE === 'development') {
|
||||
return () => import(/* @vite-ignore */`/src/views/${view}.vue`)
|
||||
} else {
|
||||
return VueComUrl['../views/' + view + '.vue']
|
||||
const loadView = (view) => {
|
||||
if (import.meta.env.MODE === 'development') {
|
||||
return () => import(/* @vite-ignore */`/src/views/${view}.vue`)
|
||||
} else {
|
||||
return VueComUrl['../views/' + view + '.vue']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const removeMenu = () => {
|
||||
menuList.value.length = 0
|
||||
asyncRouters.value.length = 0
|
||||
}
|
||||
const removeMenu = () => {
|
||||
menuList.value.length = 0
|
||||
asyncRouters.value.length = 0
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
asyncRouters,
|
||||
menuList,
|
||||
isLoadRoutes,
|
||||
setAsyncRouters,
|
||||
setIsLoadRoutes,
|
||||
removeMenu
|
||||
}
|
||||
return {
|
||||
asyncRouters,
|
||||
menuList,
|
||||
isLoadRoutes,
|
||||
setAsyncRouters,
|
||||
setIsLoadRoutes,
|
||||
removeMenu
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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:
|
||||
|
||||
369
src/views/enhance-speech/index.vue
Normal file
369
src/views/enhance-speech/index.vue
Normal file
@@ -0,0 +1,369 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="searchVerbalTrick"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="verbalTrickTableConfig" @selectionChange="selectionChange" @headBtnClick="headBtnClick"></fvTable>
|
||||
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
||||
:form-schema="formSchema" :form-rules="formRules"
|
||||
@dialogSubmit="handleSubmitVerbalTrick"></fvFormDialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import { deleteVerbal, getVerbalDetail, addEnhanceVerbal, editEnhanceVerbal} from "@/api/verbal-trick";
|
||||
import {reactive} from "vue";
|
||||
const router = useRouter()
|
||||
const dialogTitle = ref("");
|
||||
const dialogType = ref("");
|
||||
const verbalIds = ref("");
|
||||
const formDialogRef = ref()
|
||||
const tableIns = ref()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '知识内容',
|
||||
prop: 'query',
|
||||
props: {
|
||||
placeholder: '请输入知识内容查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
{
|
||||
label: '知识校准',
|
||||
prop: 'answer',
|
||||
props: {
|
||||
placeholder: '请输入知识校准查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
// {
|
||||
// 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: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
prop: 'query',
|
||||
label: '知识内容',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'answer',
|
||||
label: '知识校准',
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'verbalContent',
|
||||
// label: '内容',
|
||||
// align: 'center'
|
||||
// },
|
||||
// {
|
||||
// prop: 'callOff',
|
||||
// label: '是否挂断电话',
|
||||
// align: 'center',
|
||||
// currentRender: ({ row, index }) => {
|
||||
// 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: '操作',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
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}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/verbal/enhance/list',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增', key: 'add',type:'primary',icon:'Plus', auth: auths.add},
|
||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const formRules = reactive({
|
||||
query: [
|
||||
{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: 'query',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入知识内容',
|
||||
clearable: true,
|
||||
type:'textarea',
|
||||
rows:3
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '知识校准',
|
||||
prop: 'answer',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入知识校准',
|
||||
clearable: true,
|
||||
type:'textarea',
|
||||
rows:3
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '是否挂断电话',
|
||||
// prop: 'callOff',
|
||||
// component: shallowRef(fvSelect),
|
||||
// colProps: {
|
||||
// span: 24
|
||||
// },
|
||||
// props: {
|
||||
// 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,
|
||||
// }
|
||||
// },
|
||||
]
|
||||
})
|
||||
const searchVerbalTrick = (val) => {
|
||||
let obj = {...val}
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
verbalTrickTableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
case 'delete':
|
||||
handleMoreDelete()
|
||||
break;
|
||||
}
|
||||
}
|
||||
const handleAdd = () => {
|
||||
formDialogRef.value.openOrCloseDialog(true)
|
||||
dialogTitle.value = "新增知识";
|
||||
dialogType.value = "add";
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues({})
|
||||
// 清空校验
|
||||
formDialogRef.value.getFormInstance().clearValidate()
|
||||
formDialogRef.value.getFormInstance().resetFields()
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
formDialogRef.value.openOrCloseDialog(true)
|
||||
getDetail(row)
|
||||
dialogTitle.value = "编辑知识";
|
||||
dialogType.value = "edit";
|
||||
}
|
||||
const getDetail = (row) => {
|
||||
getVerbalDetail(row.templateId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
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.templateId).join()
|
||||
} else {
|
||||
verbalIds.value=''
|
||||
}
|
||||
}
|
||||
const deleteContactMethod = (verbalId) => {
|
||||
deleteVerbal(verbalId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tableIns.value.refresh()
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleMoreDelete = () => {
|
||||
if(verbalIds.value){
|
||||
ElMessageBox.confirm(`确认删除选择的知识吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteContactMethod(verbalIds.value)
|
||||
})
|
||||
}else{
|
||||
ElMessage.warning("请选择要删除的知识")
|
||||
}
|
||||
}
|
||||
const handleSingleDelete = (row) => {
|
||||
ElMessageBox.confirm(`确认删除问题为${row.query}的知识吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteContactMethod(row.templateId)
|
||||
})
|
||||
}
|
||||
|
||||
//提交
|
||||
const handleSubmitVerbalTrick = async (formInstance) => {
|
||||
if (!formInstance) return;
|
||||
let validate = await formInstance.validate()
|
||||
if (!validate.isValidate) return;
|
||||
if (dialogType.value === "add") {
|
||||
addEnhanceVerbal(formInstance.getValues()).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg);
|
||||
tableIns.value.refresh()
|
||||
formDialogRef.value.openOrCloseDialog(false)
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
editEnhanceVerbal(formInstance.getValues()).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg);
|
||||
tableIns.value.refresh()
|
||||
formDialogRef.value.openOrCloseDialog(false)
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -6,24 +6,39 @@
|
||||
</div>
|
||||
<div class="call-history">
|
||||
<h3>历史通话记录</h3>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig"></fvTable>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="currentHistoryData" :total="currentHistoryTotal" :isLoading="isLoading" @getBaseQuery="getBaseQuery"></fvTable>
|
||||
<voice ref="voiceRef" title="语音详情" :rowUrl="rowUrl" />
|
||||
<infoLiveCall ref="infoLiveCallRef" v-model:value="orderNumber" />
|
||||
<infoLiveCall ref="infoLiveCallRef" v-model:value="historyData" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {getToken} from '@/utils/auth'
|
||||
import {usePermisstionStroe} from '@/stores/permisstion'
|
||||
import LiveCall from '@/components/liveCall/index.vue'
|
||||
import Voice from '@/components/voice/index.vue'
|
||||
import InfoLiveCall from '@/components/infoLiveCall/index.vue'
|
||||
import {orderGetList} from "@/api/order/order";
|
||||
const permisstionStore = usePermisstionStroe()
|
||||
const authStore = useAuthStore()
|
||||
const currentHistoryData = ref([])
|
||||
const historyData = ref({})
|
||||
const orderNumber = ref('')
|
||||
const currentHistoryTotal = ref('')
|
||||
const rowUrl = ref()
|
||||
const infoLiveCallRef = ref()
|
||||
const isLoading = ref(true)
|
||||
const voiceRef = ref()
|
||||
const tableIns = ref()
|
||||
let socket = reactive("");
|
||||
let token = getToken();
|
||||
let send = {
|
||||
type: "ping",
|
||||
};
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
record: ['order:dialogue:list'],
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
@@ -39,33 +54,37 @@ const tableConfig = reactive({
|
||||
label: '工单号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'orderName',
|
||||
label: '工单名称',
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'orderName',
|
||||
// label: '工单名称',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'orderContent',
|
||||
label: '工单内容',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
prop: 'operationUser',
|
||||
// prop: 'destinationName',
|
||||
label: '处理人',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
},
|
||||
// {
|
||||
// prop: 'knotter',
|
||||
// // prop: 'destinationName',
|
||||
// label: '关单人',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'knotter',
|
||||
label: '关单人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'destinationName',
|
||||
// prop: 'workOrderNumber',
|
||||
label: '用户名',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNumber',
|
||||
prop: 'destinationNumber',
|
||||
label: '电话号码',
|
||||
align: 'center'
|
||||
},
|
||||
@@ -73,6 +92,7 @@ const tableConfig = reactive({
|
||||
prop: 'callState',
|
||||
label: '电话拨打状态',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
if (row.callState !== null) {
|
||||
@@ -83,7 +103,8 @@ const tableConfig = reactive({
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'workOrderTime',
|
||||
prop: 'createdTime',
|
||||
// prop: 'workOrderTime',
|
||||
label: '拨打时间',
|
||||
align: 'center',
|
||||
width: 200
|
||||
@@ -97,21 +118,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 >
|
||||
@@ -119,10 +145,33 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/order/list',
|
||||
// api: '/order/list',
|
||||
params: {
|
||||
}
|
||||
})
|
||||
const getOrder=(pageNum=1,pageSize=10)=>{
|
||||
// isLoading.value=true
|
||||
nextTick(()=>{
|
||||
tableIns.value.updateLoading(true)
|
||||
})
|
||||
orderGetList({
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize
|
||||
}).then(res=>{
|
||||
console.log('res',res)
|
||||
currentHistoryData.value=res.data.rows
|
||||
currentHistoryTotal.value=res.data.total
|
||||
nextTick(()=>{
|
||||
tableIns.value.updateLoading(false)
|
||||
})
|
||||
})
|
||||
}
|
||||
getOrder()
|
||||
const getBaseQuery=(params)=>{
|
||||
console.log('params',params)
|
||||
// tableConfig.params=params
|
||||
getOrder(params.pageNum,params.pageSize)
|
||||
}
|
||||
const handleVoice = (row) => {
|
||||
if (row.recordUrl !== null) {
|
||||
voiceRef.value.open(true)
|
||||
@@ -136,13 +185,77 @@ const handleVoice = (row) => {
|
||||
|
||||
}
|
||||
const handleInfo = (row) => {
|
||||
console.log('fefe',row.orderNumber);
|
||||
historyData.value=row
|
||||
orderNumber.value = row.orderNumber
|
||||
infoLiveCallRef.value.open()
|
||||
}
|
||||
// window.setInterval(() => {
|
||||
// setTimeout(tableIns.value.refresh(), 0)
|
||||
// }, 2000)
|
||||
|
||||
const handleLogout = () => {
|
||||
authStore.userLogout()
|
||||
permisstionStore.removeMenu()
|
||||
router.push('/login')
|
||||
}
|
||||
const initWebSocket = () => {
|
||||
try {
|
||||
// const wsUrl=setWsUrl(`/ws/text/${token}`)
|
||||
// const wsUrl = `ws://frp.feashow.cn:31800/ws/history/${token}`
|
||||
const wsUrl = `ws://192.168.1.71:88/ws/history/${token}`
|
||||
socket = new WebSocket(wsUrl)
|
||||
// 2. ws.send()给服务器发送信息
|
||||
//连接发生错误的回调方法
|
||||
socket.onerror = function () {
|
||||
console.log("ws连接发生错误");
|
||||
};
|
||||
//连接成功建立的回调方法
|
||||
socket.onopen = function () {
|
||||
console.log("ws连接成功");
|
||||
}
|
||||
//接收到消息的回调方法
|
||||
socket.onmessage = function (event) {
|
||||
let data = JSON.parse(event.data)
|
||||
if (data.type !== 'pong') {
|
||||
if (data.type === 'error') {
|
||||
handleLogout()
|
||||
return;
|
||||
} else if (data.type === 'failed') {
|
||||
initWebSocket()
|
||||
return;
|
||||
}
|
||||
console.log("服务器返回的信息: ", data);
|
||||
let historyDataObj=JSON.parse(data)
|
||||
console.log("historyDataObj: ", historyDataObj);
|
||||
currentHistoryData.value=historyDataObj.rows
|
||||
currentHistoryTotal.value=historyDataObj.total
|
||||
// historyDataObj.rows?.forEach(item=>{
|
||||
// currentHistoryData.value.push(item)
|
||||
// })
|
||||
}
|
||||
}
|
||||
//连接关闭的回调方法
|
||||
socket.onclose = function () {
|
||||
// initWebSocket()
|
||||
console.log("ws连接关闭");
|
||||
}
|
||||
setInterval(() => {
|
||||
socket.send(JSON.stringify(send))
|
||||
}, 5000)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
console.log("ws连接失败");
|
||||
}
|
||||
}
|
||||
initWebSocket()
|
||||
|
||||
|
||||
</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>
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
<template>
|
||||
<div class="address-book">
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="searchAddressBook"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="addressBookTableConfig" @headBtnClick="headBtnClick"
|
||||
@selectionChange="selectionChange"></fvTable>
|
||||
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
||||
:form-schema="formSchema" :form-rules="formRules"
|
||||
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<el-button type="primary" v-perm="auths.add" @click="handleAdd">新增</el-button>
|
||||
<import-excel @success="importAddress"/>
|
||||
<el-button type="info" v-perm="auths.export" @click="handleExport">导出</el-button>
|
||||
<el-button type="danger" v-perm="auths.delete" @click="handleMoreDelete">删除</el-button>
|
||||
</div>
|
||||
<!-- @headBtnClick="headBtnClick"-->
|
||||
<fvTable ref="tableIns" :tableConfig="addressBookTableConfig"
|
||||
@selectionChange="selectionChange"></fvTable>
|
||||
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
||||
:form-schema="formSchema" :form-rules="formRules"
|
||||
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {addContact, editContact, getContactDetail, deleteContact} from "@/api/address-book";
|
||||
import {addContact, editContact, getContactDetail, deleteContact, exportContact} from "@/api/address-book";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {reactive} from "vue";
|
||||
import ImportExcel from "@/components/ImportExcel.vue";
|
||||
|
||||
const router = useRouter()
|
||||
const tableIns = ref()
|
||||
@@ -24,7 +33,8 @@ const dialogType = ref("");
|
||||
|
||||
// 手机号验证
|
||||
const checkPhone = (rule, value, callback) => {
|
||||
const phoneReg = /^1[3|4|5|6|7|8][0-9]{9}$/
|
||||
// const phoneReg = /^1[3|4|5|6|7|8][0-9]{9}$/
|
||||
const phoneReg = /^\d{11}$/
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(+value)) {
|
||||
callback(new Error('请输入数字值'))
|
||||
@@ -32,7 +42,7 @@ const checkPhone = (rule, value, callback) => {
|
||||
if (phoneReg.test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error('手机号码格式不正确'))
|
||||
callback(new Error('手机号码长度不足11位,如果是座机,请添加区号'))
|
||||
}
|
||||
}
|
||||
}, 100)
|
||||
@@ -47,9 +57,12 @@ const formRules = reactive({
|
||||
name: [
|
||||
{required: true, message: "请输入姓名", trigger: ["change", "blur"]}
|
||||
],
|
||||
dispatchUnit: [
|
||||
{required: true, message: "请输入拨打单位", trigger: ["change", "blur"]}
|
||||
],
|
||||
phone: [
|
||||
{required: true, message: "请输入手机号码", trigger: ["change", "blur"]},
|
||||
{ validator: checkPhone, trigger: ["change", "blur"]},
|
||||
{required: true, message: "请输入手机号码", trigger: ["change", "blur"]}
|
||||
//{validator: checkPhone, trigger: ["change", "blur"]},
|
||||
]
|
||||
});
|
||||
const formSchema = computed(() => {
|
||||
@@ -80,6 +93,30 @@ const formSchema = computed(() => {
|
||||
filterable: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '拨打单位',
|
||||
prop: 'dispatchUnit',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入拨打单位',
|
||||
clearable: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '班组信息',
|
||||
prop: 'team',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入班组信息',
|
||||
clearable: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '姓名',
|
||||
prop: 'name',
|
||||
@@ -95,14 +132,14 @@ const formSchema = computed(() => {
|
||||
{
|
||||
label: '手机号',
|
||||
prop: 'phone',
|
||||
component: 'el-input-number',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入手机号',
|
||||
clearable: true,
|
||||
controls:false
|
||||
controls: false
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -152,6 +189,13 @@ const searchConfig = reactive([
|
||||
component: 'el-input',
|
||||
}
|
||||
])
|
||||
const auths = reactive({
|
||||
add: ['order:contacts:add'],
|
||||
edit: ['order:contacts:edit'],
|
||||
import: ['order:contacts:import'],
|
||||
export: ['order:contacts:export'],
|
||||
delete: ['order:contacts:del'],
|
||||
})
|
||||
const addressBookTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -183,6 +227,16 @@ const addressBookTableConfig = reactive({
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'dispatchUnit',
|
||||
label: '拨打单位',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'team',
|
||||
label: '班组信息',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '姓名',
|
||||
@@ -207,15 +261,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 +285,10 @@ 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: 'import', type: 'warning', auth: auths.import},
|
||||
// {name: '导出', key: 'export', type: 'info', auth: auths.export},
|
||||
// {name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||
]
|
||||
})
|
||||
const searchAddressBook = (val) => {
|
||||
@@ -245,18 +301,48 @@ const searchAddressBook = (val) => {
|
||||
addressBookTableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
//通讯录导入
|
||||
const importAddress = () => {
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
case 'import':
|
||||
handleImport()
|
||||
break;
|
||||
case 'export':
|
||||
handleExport()
|
||||
break;
|
||||
case 'delete':
|
||||
handleMoreDelete()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//通讯录导出
|
||||
const handleExport = () => {
|
||||
exportContact().then(res => {
|
||||
let link = document.createElement('a')
|
||||
try {
|
||||
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'});
|
||||
let _fileName = "运维智能语音服务系统-通讯录.xlsx"
|
||||
link.style.display = 'none';
|
||||
// 兼容不同浏览器的URL对象
|
||||
const url = window.URL || window.webkitURL || window.moxURL;
|
||||
link.href = url.createObjectURL(blob);
|
||||
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
url.revokeObjectURL(link.href);//销毁url对象
|
||||
} catch (e) {
|
||||
console.log('下载的文件出错', e)
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleAdd = () => {
|
||||
formDialogRef.value.openOrCloseDialog(true)
|
||||
dialogTitle.value = "新增通讯录";
|
||||
@@ -277,13 +363,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)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -292,7 +378,7 @@ const selectionChange = (selection) => {
|
||||
if (selection.length !== 0) {
|
||||
contactIds.value = selection.map(item => item.contactsId).join()
|
||||
} else {
|
||||
contactIds.value=''
|
||||
contactIds.value = ''
|
||||
}
|
||||
}
|
||||
const deleteContactMethod = (contactsId) => {
|
||||
@@ -306,17 +392,17 @@ const deleteContactMethod = (contactsId) => {
|
||||
})
|
||||
}
|
||||
const handleMoreDelete = () => {
|
||||
if(contactIds.value){
|
||||
ElMessageBox.confirm(`确认删除选择的通讯录吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (contactIds.value) {
|
||||
ElMessageBox.confirm(`确认删除选择的通讯录吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteContactMethod(contactIds.value)
|
||||
})
|
||||
}else{
|
||||
ElMessage.warning("请选择要删除的通讯录")
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElMessage.warning("请选择要删除的通讯录")
|
||||
}
|
||||
}
|
||||
const handleSingleDelete = (row) => {
|
||||
ElMessageBox.confirm(`确认删除姓名为${row.name}的通讯录吗?`, '系统提示', {
|
||||
@@ -333,7 +419,12 @@ const handleSubmitAddressBook = async (formInstance) => {
|
||||
if (!formInstance) return;
|
||||
let validate = await formInstance.validate()
|
||||
if (!validate.isValidate) return;
|
||||
// if (formInstance.getValues().role == '1' && !formInstance.getValues().dispatchUnit) {
|
||||
// ElMessage.warning('请输入拨打单位');
|
||||
// return;
|
||||
// }
|
||||
if (dialogType.value === "add") {
|
||||
|
||||
addContact(formInstance.getValues()).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg);
|
||||
@@ -357,11 +448,12 @@ const handleSubmitAddressBook = async (formInstance) => {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.address-book{
|
||||
.address-book {
|
||||
|
||||
.el-input-number {
|
||||
width: 100% !important;
|
||||
.el-input__inner{
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
:props="treeProps"
|
||||
node-key="menuId"
|
||||
ref="tree"
|
||||
:check-strictly="checkStrictly"
|
||||
:check-strictly="true"
|
||||
show-checkbox
|
||||
@check-change="handleCheckChange"
|
||||
/>
|
||||
@@ -209,7 +209,7 @@ const rules = reactive({
|
||||
{required: true, message: '请选择显示顺序', trigger: 'blur'},
|
||||
]
|
||||
})
|
||||
const checkList = ref(['3'])
|
||||
const checkList = ref([])
|
||||
const treeProps = {
|
||||
value: "menuId",
|
||||
label: 'menuName',
|
||||
@@ -372,7 +372,7 @@ const getMenu = async () => {
|
||||
//多选框事件
|
||||
const changeCheckbox = (checked) => {
|
||||
//父子联动
|
||||
checkStrictly.value = checked.indexOf("3") === -1;
|
||||
// checkStrictly.value = checked.indexOf("3") === -1;
|
||||
let nodes = tree.value.store.nodesMap;
|
||||
console.log('checked',checked)
|
||||
//展开/折叠
|
||||
|
||||
@@ -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,15 +1,14 @@
|
||||
<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" />
|
||||
<WorkDialog ref="workDialogRef" :rowData="rowData"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { reactive, shallowRef } from 'vue';
|
||||
import {reactive, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import WorkDialog from '../components/WorkDialog.vue';
|
||||
import { orderdDetele, orderdClose } from "@/api/order/order.js"
|
||||
import {orderdDetele, orderdClose} from "@/api/order/order.js"
|
||||
|
||||
const rowData = ref()
|
||||
const workDialogRef = ref()
|
||||
@@ -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([
|
||||
{
|
||||
@@ -42,16 +43,18 @@ const searchConfig = reactive([
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
label: '工单名称',
|
||||
prop: 'orderName',
|
||||
props: {
|
||||
placeholder: '请输入工单名查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
},
|
||||
// {
|
||||
// label: '工单名称',
|
||||
// prop: 'orderName',
|
||||
// props: {
|
||||
// placeholder: '请输入工单名查询',
|
||||
// clearable: true,
|
||||
// checkStrictly: true
|
||||
// },
|
||||
// component: 'el-input',
|
||||
// },
|
||||
{
|
||||
label: '工单状态',
|
||||
prop: 'orderState',
|
||||
props: {
|
||||
@@ -61,7 +64,18 @@ const searchConfig = reactive([
|
||||
filterable: true,
|
||||
},
|
||||
component: shallowRef(fvSelect),
|
||||
}, {
|
||||
},
|
||||
{
|
||||
label: '联系人',
|
||||
prop: 'destinationNumber',
|
||||
props: {
|
||||
placeholder: '请输入联系人查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
{
|
||||
label: '处理人',
|
||||
prop: 'operationUser',
|
||||
props: {
|
||||
@@ -70,16 +84,17 @@ const searchConfig = reactive([
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
label: '关单人',
|
||||
prop: 'knotter',
|
||||
props: {
|
||||
placeholder: '请输入关单人查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
// {
|
||||
// label: '关单人',
|
||||
// prop: 'knotter',
|
||||
// props: {
|
||||
// placeholder: '请输入关单人查询',
|
||||
// clearable: true,
|
||||
// checkStrictly: true
|
||||
// },
|
||||
// component: 'el-input',
|
||||
// },
|
||||
{
|
||||
label: '创建时间',
|
||||
prop: 'createdTime',
|
||||
@@ -132,26 +147,38 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'orderName',
|
||||
label: '工单名称',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
// {
|
||||
// prop: 'orderName',
|
||||
// label: '工单名称',
|
||||
// align: 'center',
|
||||
// width: 200
|
||||
// },
|
||||
{
|
||||
prop: 'orderContent',
|
||||
label: '工单内容',
|
||||
align: 'center',
|
||||
width: 200
|
||||
width: 250
|
||||
},
|
||||
{
|
||||
prop: 'alarmUnit',
|
||||
label: '拨打单位',
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: 'alarmObject',
|
||||
label: '拨打对象',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
prop: 'orderState',
|
||||
label: '工单状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.orderState !== null) {
|
||||
return (<Tag dictType={'work_order_status'} value={row.orderState} />)
|
||||
return (<Tag dictType={'work_order_status'} value={row.orderState}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
@@ -163,9 +190,22 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.callState !== null) {
|
||||
return (<Tag dictType={'call_status'} value={row.callState} />)
|
||||
return (<Tag dictType={'call_status'} value={row.callState}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'destinationNumber',
|
||||
label: '联系人',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.destinationNumber) {
|
||||
return row.destinationNumber
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
@@ -175,7 +215,8 @@ const tableConfig = reactive({
|
||||
prop: 'operationUser',
|
||||
label: '处理人',
|
||||
align: 'center',
|
||||
currentRender: ({ row, index }) => {
|
||||
width: 100,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.operationUser) {
|
||||
return row.operationUser
|
||||
} else {
|
||||
@@ -207,11 +248,11 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'knotter',
|
||||
label: '关单人',
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'knotter',
|
||||
// label: '关单人',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
@@ -219,28 +260,28 @@ const tableConfig = reactive({
|
||||
fixed: 'right',
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({ row, index }) => {
|
||||
currentRender: ({row, index}) => {
|
||||
// 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}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -252,7 +293,7 @@ const tableConfig = reactive({
|
||||
]
|
||||
})
|
||||
const search = (val) => {
|
||||
let obj = { ...val }
|
||||
let obj = {...val}
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
@@ -281,30 +322,35 @@ const handleDetail = (row) => {
|
||||
const handleClose = async (row) => {
|
||||
if (row.orderState !== '2') {
|
||||
ElMessageBox.confirm(
|
||||
'确定要关单吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdClose(row.orderNumber)
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '关闭成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
'确定要关单吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdClose(
|
||||
{
|
||||
orderNumber: row.orderNumber,
|
||||
alarmObject: row.alarmObject,
|
||||
alarmUnit: row.alarmUnit
|
||||
})
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '关闭成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||
@@ -320,30 +366,30 @@ const handleClose = async (row) => {
|
||||
const handleDelete = async (row) => {
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'确定要删除吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdDetele(row.orderNumber)
|
||||
console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
'确定要删除吗?',
|
||||
'温馨提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdDetele(row.orderNumber)
|
||||
console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<script setup>
|
||||
import { nextTick, onMounted, reactive, ref, watch } from "vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { MoreFilled, Check, Download, VideoPlay } from "@element-plus/icons-vue";
|
||||
import { time } from "echarts";
|
||||
import { defineExpose } from "vue";
|
||||
import { defineProps } from "vue";
|
||||
import { orderGetDetails } from "@/api/order/order.js"
|
||||
import {nextTick, onMounted, reactive, ref, watch} from "vue";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import {MoreFilled, Check, Download, VideoPlay} from "@element-plus/icons-vue";
|
||||
import {time} from "echarts";
|
||||
import {defineExpose} from "vue";
|
||||
import {defineProps} from "vue";
|
||||
import {orderGetDetails} from "@/api/order/order.js"
|
||||
import Voice from '@/components/voice/index.vue'
|
||||
//控制显示隐藏
|
||||
const dialogVisible = ref(false);
|
||||
|
||||
const props = defineProps({
|
||||
rowData: Object
|
||||
rowData: Object
|
||||
})
|
||||
|
||||
let opsCallList = ref([]);
|
||||
@@ -20,424 +20,439 @@ let orderContent = ref([]);
|
||||
const voiceRef = ref()
|
||||
const rowUrl = ref()
|
||||
const open = (row) => {
|
||||
dialogVisible.value = true;
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
// console.log(123);
|
||||
const data = await orderGetDetails(props.rowData.orderNumber)
|
||||
// console.log("111", data);
|
||||
return data
|
||||
// console.log(123);
|
||||
const data = await orderGetDetails({
|
||||
orderNumber: props.rowData.orderNumber,
|
||||
alarmObject: props.rowData.alarmObject,
|
||||
alarmUnit: props.rowData.alarmUnit
|
||||
})
|
||||
// console.log("111", data);
|
||||
return data
|
||||
|
||||
}
|
||||
let contentState0 = [
|
||||
{
|
||||
content: "待处理",
|
||||
timestamp: "orderData.value",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "已处理",
|
||||
timestamp: "--",
|
||||
type: "primary",
|
||||
icon: MoreFilled,
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "结单",
|
||||
timestamp: "--",
|
||||
size: "large",
|
||||
// icon: Check,
|
||||
// color: "#0bbd87",
|
||||
},
|
||||
{
|
||||
content: "待处理",
|
||||
timestamp: "orderData.value",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "已处理",
|
||||
timestamp: "--",
|
||||
type: "primary",
|
||||
icon: MoreFilled,
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "结单",
|
||||
timestamp: "--",
|
||||
size: "large",
|
||||
// icon: Check,
|
||||
// color: "#0bbd87",
|
||||
},
|
||||
];
|
||||
let contentState1 = [
|
||||
{
|
||||
content: "待处理",
|
||||
timestamp: "orderData.value",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "已处理",
|
||||
timestamp: "2022-07-20 20:00:00",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "结单",
|
||||
timestamp: "--",
|
||||
size: "large",
|
||||
type: "primary",
|
||||
icon: MoreFilled,
|
||||
},
|
||||
{
|
||||
content: "待处理",
|
||||
timestamp: "orderData.value",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "已处理",
|
||||
timestamp: "2022-07-20 20:00:00",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "结单",
|
||||
timestamp: "--",
|
||||
size: "large",
|
||||
type: "primary",
|
||||
icon: MoreFilled,
|
||||
},
|
||||
];
|
||||
let contentState2 = [
|
||||
{
|
||||
content: "待处理",
|
||||
timestamp: "orderData.value",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "已处理",
|
||||
timestamp: "2022-07-20 20:00:00",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "结单",
|
||||
timestamp: "2022-07-20 20:00:00",
|
||||
size: "large",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
},
|
||||
{
|
||||
content: "待处理",
|
||||
timestamp: "orderData.value",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "已处理",
|
||||
timestamp: "2024-07-20 20:00:00",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
size: "large",
|
||||
},
|
||||
{
|
||||
content: "结单",
|
||||
timestamp: "2024-07-20 20:00:00",
|
||||
size: "large",
|
||||
icon: Check,
|
||||
color: "#0bbd87",
|
||||
},
|
||||
];
|
||||
|
||||
watch(() => props.rowData, (newRowData) => {
|
||||
if (newRowData) {
|
||||
// console.log(getData(newRowData));
|
||||
getData(newRowData).then((data) => {
|
||||
opsCallList.value = []
|
||||
orderData.value = data.data
|
||||
if (newRowData) {
|
||||
// console.log(getData(newRowData));
|
||||
getData(newRowData).then((data) => {
|
||||
opsCallList.value = []
|
||||
orderData.value = data.data
|
||||
|
||||
//电话拨打记录
|
||||
const dataDetails = data.data.opsCallList
|
||||
// console.log(dataDetails);
|
||||
const theData = [{ createTime: '', data: [] }]
|
||||
|
||||
dataDetails.forEach(for1data => {
|
||||
// console.log(for1data.createTime, '--------');
|
||||
for (let i = 0; i < theData.length; i++) {
|
||||
// console.log(theData[i]);
|
||||
if (theData[i].createTime === for1data.createTime) {
|
||||
theData[i].data.push(for1data)
|
||||
break;
|
||||
} else if (theData[i].createTime === '') {
|
||||
theData[i].createTime = for1data.createTime
|
||||
theData[i].data.push(for1data)
|
||||
} else {
|
||||
theData.push({ createTime: '', data: [] })
|
||||
}
|
||||
}
|
||||
});
|
||||
// theData.pop()
|
||||
// theData[0].data.sort((a, b) => b.answer_time- a.answer_time)
|
||||
// console.log(theData);
|
||||
theData.forEach(item => {
|
||||
item.data.forEach(info => {
|
||||
if (info.answeredTime !== null) {
|
||||
// console.log(info.answeredTime);
|
||||
let startIndex = info.answeredTime.indexOf(' ') + 1;
|
||||
let timeOnly = info.answeredTime.slice(startIndex, startIndex + 8);
|
||||
info.answeredTime = timeOnly.replace(/:/g, ':')
|
||||
// info.answeredTime = timeOnly
|
||||
}
|
||||
})
|
||||
// item.data.sort((a, b) => a.answeredTime - b.answeredTime)
|
||||
opsCallList.value.push(item)
|
||||
})
|
||||
|
||||
//工单时间线
|
||||
orderContent.value = []
|
||||
// console.log(orderData.value);
|
||||
// orderData.value.orderState='2'
|
||||
if (orderData.value.orderState === '0') {
|
||||
inputOrderContent(contentState0)
|
||||
}
|
||||
else if (orderData.value.orderState === '1') {
|
||||
inputOrderContent(contentState1)
|
||||
}
|
||||
else if (orderData.value.orderState === '2') {
|
||||
inputOrderContent(contentState2)
|
||||
}
|
||||
// console.log(orderContent.value);
|
||||
//电话拨打记录
|
||||
const dataDetails = data.data.opsCallList
|
||||
// console.log(dataDetails);
|
||||
const theData = [{createTime: '', data: []}]
|
||||
|
||||
dataDetails?.forEach(for1data => {
|
||||
// console.log(for1data.createTime, '--------');
|
||||
for (let i = 0; i < theData.length; i++) {
|
||||
// console.log(theData[i]);
|
||||
if (theData[i].createTime === for1data.createTime) {
|
||||
theData[i].data.push(for1data)
|
||||
break;
|
||||
} else if (theData[i].createTime === '') {
|
||||
theData[i].createTime = for1data.createTime
|
||||
theData[i].data.push(for1data)
|
||||
} else {
|
||||
theData.push({createTime: '', data: []})
|
||||
}
|
||||
}
|
||||
});
|
||||
// theData.pop()
|
||||
// theData[0].data.sort((a, b) => b.answer_time- a.answer_time)
|
||||
// console.log(theData);
|
||||
theData.forEach(item => {
|
||||
item.data.forEach(info => {
|
||||
if (info.answeredTime !== null) {
|
||||
// console.log(info.answeredTime);
|
||||
let startIndex = info.answeredTime.indexOf(' ') + 1;
|
||||
let timeOnly = info.answeredTime.slice(startIndex, startIndex + 8);
|
||||
info.answeredTime = timeOnly.replace(/:/g, ':')
|
||||
// info.answeredTime = timeOnly
|
||||
}
|
||||
})
|
||||
}
|
||||
// item.data.sort((a, b) => a.answeredTime - b.answeredTime)
|
||||
opsCallList.value.push(item)
|
||||
})
|
||||
|
||||
//工单时间线
|
||||
orderContent.value = []
|
||||
console.log(orderData.value);
|
||||
// orderData.value.orderState='2'
|
||||
if (orderData.value.orderState === '0') {
|
||||
inputOrderContent(contentState0)
|
||||
} else if (orderData.value.orderState === '1') {
|
||||
contentState1[1].timestamp = orderData.value.processedTime || '--'
|
||||
inputOrderContent(contentState1)
|
||||
} else if (orderData.value.orderState === '2') {
|
||||
contentState2[1].timestamp = orderData.value.processedTime || '--'
|
||||
contentState2[2].timestamp = orderData.value.completionTime || '--'
|
||||
inputOrderContent(contentState2)
|
||||
}
|
||||
// console.log(orderContent.value);
|
||||
|
||||
})
|
||||
}
|
||||
}, {
|
||||
immediate: true // 立即执行一次,以便在rowData初始值非空时也能触发
|
||||
immediate: true // 立即执行一次,以便在rowData初始值非空时也能触发
|
||||
});
|
||||
const inputOrderTime = (item, index) => {
|
||||
{
|
||||
if (index === 0) {
|
||||
item.timestamp = orderData.value.operationTime || '--'
|
||||
} else if (index === 1) {
|
||||
// item.timestamp = orderData.value.processedTime || '--'
|
||||
} else {
|
||||
// item.timestamp = orderData.value.completionTime || '--'
|
||||
}
|
||||
{
|
||||
if (index === 0) {
|
||||
item.timestamp = orderData.value.operationTime || '--'
|
||||
} else if (index === 1) {
|
||||
// item.timestamp = orderData.value.processedTime || '--'
|
||||
} else {
|
||||
// item.timestamp = orderData.value.completionTime || '--'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const inputOrderContent = (contentState) => {
|
||||
contentState.map((item, index) => {
|
||||
inputOrderTime(item, index)
|
||||
})
|
||||
contentState.forEach(item => {
|
||||
orderContent.value.push(item)
|
||||
})
|
||||
// console.log('contentState',contentState)
|
||||
contentState.map((item, index) => {
|
||||
inputOrderTime(item, index)
|
||||
orderContent.value.push(item)
|
||||
})
|
||||
// contentState.forEach(item => {
|
||||
// orderContent.value.push(item)
|
||||
// })
|
||||
}
|
||||
|
||||
const openRecord = () => {
|
||||
if ( props.rowData.recordUrl !== null) {
|
||||
voiceRef.value.open(true)
|
||||
rowUrl.value = props.rowData.recordUrl
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '暂无语音',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
if (props.rowData.recordUrl !== null) {
|
||||
voiceRef.value.open(true)
|
||||
rowUrl.value = props.rowData.recordUrl
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '暂无语音',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const downloadRecord = () => {
|
||||
if(props.rowData.recordUrl === null){
|
||||
ElMessage({
|
||||
message: '暂无语音',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
if (props.rowData.recordUrl === null) {
|
||||
ElMessage({
|
||||
message: '暂无语音',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
open,
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" :show-close=true title="工单详情" width="80%">
|
||||
<div class="common-layout">
|
||||
<el-container>
|
||||
<el-header class="header"><span>工单号:</span>
|
||||
<span>{{ rowData.orderNumber || '--' }}</span>
|
||||
</el-header>
|
||||
<el-container class="main-container">
|
||||
<el-aside width="200px" :style="{ position: 'static' }">
|
||||
<div class="aside-content">
|
||||
<el-timeline style="max-width: 600px">
|
||||
<el-timeline-item v-for="(activity, index) in orderContent" :key="index"
|
||||
:icon="activity.icon" :type="activity.type" :color="activity.color"
|
||||
:size="activity.size" :hollow="activity.hollow" :timestamp="activity.timestamp">
|
||||
<p style="font-size: 17px;"> {{ activity.content }}</p>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-main :style="{ position: 'static' }" class="main-content">
|
||||
<div class="top">
|
||||
<div class="info">
|
||||
<!-- <span>创始人:{{ rowData.createBy }}</span> -->
|
||||
<span>处理人:{{ rowData.operationUser || '--' }}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<span>工单名称:{{ rowData.orderName || '--' }}</span>
|
||||
<span>关单人:{{ rowData.knotter || '--' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div>
|
||||
<div>工单内容:</div>
|
||||
<div class="textBox">
|
||||
<el-scrollbar>
|
||||
<div class="text">{{ rowData.orderContent || '暂无工单内容' }}</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>通话记录:</div>
|
||||
<div class="textBox">
|
||||
<el-scrollbar>
|
||||
<div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<el-dialog v-model="dialogVisible" :show-close=true title="工单详情" width="80%">
|
||||
<div class="common-layout">
|
||||
<el-container>
|
||||
<el-header class="header"><span>工单号:</span>
|
||||
<span>{{ rowData.orderNumber || '--' }}</span>
|
||||
</el-header>
|
||||
<el-container class="main-container">
|
||||
<el-aside width="200px" :style="{ position: 'static' }">
|
||||
<div class="aside-content">
|
||||
<el-timeline style="max-width: 600px">
|
||||
<el-timeline-item v-for="(activity, index) in orderContent" :key="index"
|
||||
:icon="activity.icon" :type="activity.type" :color="activity.color"
|
||||
:size="activity.size" :hollow="activity.hollow" :timestamp="activity.timestamp">
|
||||
<p style="font-size: 17px;"> {{ activity.content }}</p>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-main :style="{ position: 'static' }" class="main-content">
|
||||
<div class="top">
|
||||
<div class="info">
|
||||
<!-- <span>创始人:{{ rowData.createBy }}</span> -->
|
||||
<span>处理人:{{ rowData.operationUser || '--' }}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<span>拨打单位:{{ rowData.alarmUnit || '--' }}</span>
|
||||
<span>拨打对象:{{ rowData.alarmObject || '--' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div>
|
||||
<div>工单内容:</div>
|
||||
<div class="textBox">
|
||||
<el-scrollbar>
|
||||
<div class="text">{{ rowData.orderContent || '暂无工单内容' }}</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <div>通话记录:</div>-->
|
||||
<!-- <div class="textBox">-->
|
||||
<!-- <el-scrollbar>-->
|
||||
<!-- <div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>-->
|
||||
<!-- </el-scrollbar>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<div>录音信息:</div>
|
||||
<div class="textBox—record">
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
<div>录音信息:</div>
|
||||
<div class="textBox—record">
|
||||
|
||||
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
||||
style="margin-right: 10px ;">播放录音
|
||||
</el-button>
|
||||
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl" />
|
||||
<a :href=rowData.recordUrl download>
|
||||
<el-button type="primary" :icon="Download"
|
||||
@click="downloadRecord">下载录音</el-button>
|
||||
</a>
|
||||
<!-- <el-scrollbar> -->
|
||||
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
|
||||
<!-- </el-scrollbar> -->
|
||||
</div>
|
||||
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
||||
style="margin-right: 10px ;">播放录音
|
||||
</el-button>
|
||||
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl"/>
|
||||
<a :href=rowData.recordUrl download>
|
||||
<el-button type="primary" :icon="Download"
|
||||
@click="downloadRecord">下载录音
|
||||
</el-button>
|
||||
</a>
|
||||
<!-- <el-scrollbar> -->
|
||||
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
|
||||
<!-- </el-scrollbar> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div>电话拨打记录:</div>
|
||||
<div class="timebox">
|
||||
<div>
|
||||
<el-scrollbar height="20vh">
|
||||
<p v-if="opsCallList.length === 0">暂无电话拨打记录</p>
|
||||
<el-timeline style="max-width: 99%" class="timeline">
|
||||
<el-timeline-item v-for="(activity, index) in opsCallList" :key="index"
|
||||
icon="MoreFilled" type="primary" size="large">
|
||||
<div class="custom-card">
|
||||
<div style="font-weight: bold">{{ activity.createTime }}</div>
|
||||
<template v-if="activity.data&&activity.data.length>0">
|
||||
<div v-for="(info, index) in activity.data" :key="index">
|
||||
<div class="timeline-row">
|
||||
<span :style="{ color: '#a8abb2' }">{{
|
||||
info.destinationNumber
|
||||
}}</span>
|
||||
<PointTag dictType="call_status" :value="info.callState"
|
||||
class="tag"/>
|
||||
<!-- <span :style="{
|
||||
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
|
||||
}">{{ info.callState }}</span> -->
|
||||
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
|
||||
info.answeredTime || '00:00:00'
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p>暂无电话拨打记录</p>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div>电话拨打记录:</div>
|
||||
<div class="timebox">
|
||||
<div>
|
||||
<el-scrollbar height="20vh">
|
||||
<p v-if="opsCallList.length === 0">暂无电话拨打记录</p>
|
||||
<el-timeline style="max-width: 99%" class="timeline">
|
||||
<el-timeline-item v-for="(activity, index) in opsCallList" :key="index"
|
||||
icon="MoreFilled" type="primary" size="large">
|
||||
<div class="custom-card">
|
||||
<div style="font-weight: bold">{{ activity.createTime }}</div>
|
||||
<div v-for="(info, index) in activity.data" :key="index">
|
||||
<div class="timeline-row">
|
||||
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
|
||||
}}</span>
|
||||
<PointTag dictType="call_status" :value="info.callState"
|
||||
class="tag" />
|
||||
<!-- <span :style="{
|
||||
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
|
||||
}">{{ info.callState }}</span> -->
|
||||
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
|
||||
info.answeredTime || '00:00:00' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
font-size: 27px;
|
||||
color: black;
|
||||
font-size: 27px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.aside-content {
|
||||
position: relative;
|
||||
left: 3px;
|
||||
position: relative;
|
||||
left: 3px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
background-color: white;
|
||||
background-color: white;
|
||||
|
||||
}
|
||||
|
||||
.main-content span {
|
||||
padding-bottom: 5px;
|
||||
color: black;
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 5px;
|
||||
color: black;
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.main-content .info {
|
||||
border-bottom: 1.5px solid #e4e7ed;
|
||||
margin-bottom: 50px;
|
||||
font-size: 17px;
|
||||
border-bottom: 1.5px solid #e4e7ed;
|
||||
margin-bottom: 50px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.main-content .body {
|
||||
font-size: 17px;
|
||||
color: black
|
||||
font-size: 17px;
|
||||
color: black
|
||||
}
|
||||
|
||||
.main-content .body .textBox {
|
||||
width: 100%;
|
||||
min-height: 10vh;
|
||||
max-height: 15vh;
|
||||
border: 1.5px solid #e4e7ed;
|
||||
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
min-height: 10vh;
|
||||
max-height: 15vh;
|
||||
border: 1.5px solid #e4e7ed;
|
||||
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.main-content .body .textBox—record {
|
||||
width: 100%;
|
||||
min-height: 10vh;
|
||||
// max-height: 15vh;
|
||||
// border: 1.5px solid #e4e7ed;
|
||||
// box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||
// margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
min-height: 10vh;
|
||||
// max-height: 15vh;
|
||||
// border: 1.5px solid #e4e7ed;
|
||||
// box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||
// margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.main-content .body .text {
|
||||
resize: none;
|
||||
// overflow-y: auto;
|
||||
font-size: 16px;
|
||||
line-height: 25px
|
||||
resize: none;
|
||||
// overflow-y: auto;
|
||||
font-size: 16px;
|
||||
line-height: 25px
|
||||
}
|
||||
|
||||
.main-content .footer {
|
||||
color: black;
|
||||
font-size: 17px;
|
||||
color: black;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.main-content .timebox {
|
||||
width: 100%;
|
||||
height: 25vh;
|
||||
border: 1.5px solid #e4e7ed;
|
||||
padding-left: 20px;
|
||||
padding-top: 20px;
|
||||
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||
// overflow-x: hidden;
|
||||
width: 100%;
|
||||
height: 25vh;
|
||||
border: 1.5px solid #e4e7ed;
|
||||
padding-left: 20px;
|
||||
padding-top: 20px;
|
||||
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||
// overflow-x: hidden;
|
||||
}
|
||||
|
||||
.main-content .timeline {
|
||||
// width: 100%;
|
||||
position: relative;
|
||||
left: 3px;
|
||||
// background-color: red;
|
||||
// width: 100%;
|
||||
position: relative;
|
||||
left: 3px;
|
||||
// background-color: red;
|
||||
|
||||
}
|
||||
|
||||
.main-content .timeline-row {
|
||||
// border: 1px solid #000;
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
// border: 1px solid #000;
|
||||
// border: 1px solid #000;
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
// border: 1px solid #000;
|
||||
|
||||
}
|
||||
|
||||
.main-content .tag {
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
margin-left: 30px;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.main-content .span-3th {
|
||||
// flex-grow: 1;
|
||||
// margin-right:;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
margin-right: 100px;
|
||||
// flex-grow: 1;
|
||||
// margin-right:;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
margin-right: 100px;
|
||||
|
||||
}
|
||||
|
||||
.custom-card {
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.custom-card span {
|
||||
padding-top: 10px;
|
||||
width: 20%;
|
||||
margin: 2px;
|
||||
padding-top: 10px;
|
||||
width: 20%;
|
||||
margin: 2px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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([
|
||||
{
|
||||
@@ -43,16 +45,28 @@ const searchConfig = reactive([
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
label: '工单名称',
|
||||
prop: 'orderName',
|
||||
},
|
||||
// {
|
||||
// label: '工单名称',
|
||||
// prop: 'orderName',
|
||||
// props: {
|
||||
// placeholder: '请输入工单名查询',
|
||||
// clearable: true,
|
||||
// checkStrictly: true
|
||||
// },
|
||||
// component: 'el-input',
|
||||
// },
|
||||
{
|
||||
label: '联系人',
|
||||
prop: 'destinationNumber',
|
||||
props: {
|
||||
placeholder: '请输入工单名查询',
|
||||
placeholder: '请输入联系人查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
},
|
||||
{
|
||||
label: '处理人',
|
||||
prop: 'operationUser',
|
||||
props: {
|
||||
@@ -61,16 +75,17 @@ const searchConfig = reactive([
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
label: '关单人',
|
||||
prop: 'knotter',
|
||||
props: {
|
||||
placeholder: '请输入关单人查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
// {
|
||||
// label: '关单人',
|
||||
// prop: 'knotter',
|
||||
// props: {
|
||||
// placeholder: '请输入关单人查询',
|
||||
// clearable: true,
|
||||
// checkStrictly: true
|
||||
// },
|
||||
// component: 'el-input',
|
||||
// },
|
||||
{
|
||||
label: '创建时间',
|
||||
prop: 'createdTime',
|
||||
@@ -123,17 +138,29 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'orderName',
|
||||
label: '工单名称',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
// {
|
||||
// prop: 'orderName',
|
||||
// label: '工单名称',
|
||||
// align: 'center',
|
||||
// width: 200
|
||||
// },
|
||||
{
|
||||
prop: 'orderContent',
|
||||
label: '工单内容',
|
||||
align: 'center',
|
||||
width: 200
|
||||
width: 250
|
||||
},
|
||||
{
|
||||
prop: 'alarmUnit',
|
||||
label: '拨打单位',
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: 'alarmObject',
|
||||
label: '拨打对象',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
prop: 'orderState',
|
||||
@@ -162,6 +189,20 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'destinationNumber',
|
||||
label: '联系人',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.destinationNumber) {
|
||||
return row.destinationNumber
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'operationUser',
|
||||
label: '处理人',
|
||||
@@ -191,11 +232,11 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'knotter',
|
||||
label: '关单人',
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'knotter',
|
||||
// label: '关单人',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
@@ -207,16 +248,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
|
||||
>
|
||||
@@ -273,7 +314,11 @@ const handleClose = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdClose(row.orderNumber)
|
||||
const info = await orderdClose({
|
||||
orderNumber: row.orderNumber,
|
||||
alarmObject: row.alarmObject,
|
||||
alarmUnit: row.alarmUnit
|
||||
})
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
|
||||
@@ -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([
|
||||
{
|
||||
@@ -43,16 +45,28 @@ const searchConfig = reactive([
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
label: '工单名称',
|
||||
prop: 'orderName',
|
||||
},
|
||||
// {
|
||||
// label: '工单名称',
|
||||
// prop: 'orderName',
|
||||
// props: {
|
||||
// placeholder: '请输入工单名查询',
|
||||
// clearable: true,
|
||||
// checkStrictly: true
|
||||
// },
|
||||
// component: 'el-input',
|
||||
// },
|
||||
{
|
||||
label: '联系人',
|
||||
prop: 'destinationNumber',
|
||||
props: {
|
||||
placeholder: '请输入工单名查询',
|
||||
placeholder: '请输入联系人查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
},
|
||||
{
|
||||
label: '处理人',
|
||||
prop: 'operationUser',
|
||||
props: {
|
||||
@@ -61,16 +75,17 @@ const searchConfig = reactive([
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
label: '关单人',
|
||||
prop: 'knotter',
|
||||
props: {
|
||||
placeholder: '请输入关单人查询',
|
||||
clearable: true,
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
},
|
||||
// {
|
||||
// label: '关单人',
|
||||
// prop: 'knotter',
|
||||
// props: {
|
||||
// placeholder: '请输入关单人查询',
|
||||
// clearable: true,
|
||||
// checkStrictly: true
|
||||
// },
|
||||
// component: 'el-input',
|
||||
// },
|
||||
{
|
||||
label: '创建时间',
|
||||
prop: 'createdTime',
|
||||
@@ -123,17 +138,29 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'orderName',
|
||||
label: '工单名称',
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
// {
|
||||
// prop: 'orderName',
|
||||
// label: '工单名称',
|
||||
// align: 'center',
|
||||
// width: 200
|
||||
// },
|
||||
{
|
||||
prop: 'orderContent',
|
||||
label: '工单内容',
|
||||
align: 'center',
|
||||
width: 200
|
||||
width: 250
|
||||
},
|
||||
{
|
||||
prop: 'alarmUnit',
|
||||
label: '拨打单位',
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
prop: 'alarmObject',
|
||||
label: '拨打对象',
|
||||
align: 'center',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
prop: 'orderState',
|
||||
@@ -162,6 +189,19 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'destinationNumber',
|
||||
label: '联系人',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.destinationNumber) {
|
||||
return row.destinationNumber
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'operationUser',
|
||||
label: '处理人',
|
||||
@@ -191,11 +231,11 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop: 'knotter',
|
||||
label: '关单人',
|
||||
align: 'center'
|
||||
},
|
||||
// {
|
||||
// prop: 'knotter',
|
||||
// label: '关单人',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
@@ -208,15 +248,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
|
||||
>
|
||||
@@ -273,7 +313,11 @@ const handleClose = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
const info = await orderdClose(row.orderNumber)
|
||||
const info = await orderdClose({
|
||||
orderNumber: row.orderNumber,
|
||||
alarmObject: row.alarmObject,
|
||||
alarmUnit: row.alarmUnit
|
||||
})
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
|
||||
@@ -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,59 @@ 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,
|
||||
width: '120',
|
||||
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',
|
||||
width: '120',
|
||||
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 +142,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 +166,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,
|
||||
}
|
||||
@@ -233,7 +267,7 @@ const headBtnClick = (key) => {
|
||||
}
|
||||
const handleAdd = () => {
|
||||
formDialogRef.value.openOrCloseDialog(true)
|
||||
dialogTitle.value = "新增话术";
|
||||
dialogTitle.value = "新增知识";
|
||||
dialogType.value = "add";
|
||||
nextTick(() => {
|
||||
formDialogRef.value.getFormInstance().setValues({})
|
||||
@@ -245,26 +279,27 @@ const handleAdd = () => {
|
||||
const handleEdit = (row) => {
|
||||
formDialogRef.value.openOrCloseDialog(true)
|
||||
getDetail(row)
|
||||
dialogTitle.value = "编辑话术";
|
||||
dialogTitle.value = "编辑知识";
|
||||
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=''
|
||||
}
|
||||
@@ -281,7 +316,7 @@ const deleteContactMethod = (verbalId) => {
|
||||
}
|
||||
const handleMoreDelete = () => {
|
||||
if(verbalIds.value){
|
||||
ElMessageBox.confirm(`确认删除选择的话术吗?`, '系统提示', {
|
||||
ElMessageBox.confirm(`确认删除选择的知识吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -289,16 +324,16 @@ const handleMoreDelete = () => {
|
||||
deleteContactMethod(verbalIds.value)
|
||||
})
|
||||
}else{
|
||||
ElMessage.warning("请选择要删除的话术")
|
||||
ElMessage.warning("请选择要删除的知识")
|
||||
}
|
||||
}
|
||||
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()
|
||||
|
||||
@@ -76,8 +76,9 @@ export default defineConfig({
|
||||
// rewrite: (path) => path.replace(/^\/api/, ""),
|
||||
// },
|
||||
"/api": {
|
||||
// target: "http://frp.feashow.cn:31800/",
|
||||
target: "http://10.8.105.91:28080/",
|
||||
target: "http://frp.feashow.cn:31800/",
|
||||
// target: "http://10.8.105.91:28080/",
|
||||
// target: "http://112.19.165.99:20002/",
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user