Compare commits
94 Commits
zhangkaihu
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c7b76b7f53 | |||
| 3a38208744 | |||
| 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 |
1
auto-imports.d.ts
vendored
1
auto-imports.d.ts
vendored
@@ -5,6 +5,7 @@
|
|||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const EffectScope: typeof import('vue')['EffectScope']
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
|
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||||
const computed: typeof import('vue')['computed']
|
const computed: typeof import('vue')['computed']
|
||||||
const createApp: typeof import('vue')['createApp']
|
const createApp: typeof import('vue')['createApp']
|
||||||
const customRef: typeof import('vue')['customRef']
|
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 {
|
export interface GlobalComponents {
|
||||||
ElAside: typeof import('element-plus/es')['ElAside']
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
|
||||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
|
||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
|
||||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
|
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElImage: typeof import('element-plus/es')['ElImage']
|
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
ElMain: typeof import('element-plus/es')['ElMain']
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
@@ -41,26 +37,25 @@ declare module '@vue/runtime-core' {
|
|||||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElRate: typeof import('element-plus/es')['ElRate']
|
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElStep: typeof import('element-plus/es')['ElStep']
|
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
ElText: typeof import('element-plus/es')['ElText']
|
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']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
FvCheckbox: typeof import('./src/fvcomponents/fvCheckbox/index.vue')['default']
|
FvCheckbox: typeof import('./src/fvcomponents/fvCheckbox/index.vue')['default']
|
||||||
FvForm: typeof import('./src/fvcomponents/fvForm/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']
|
FvPagination: typeof import('./src/fvcomponents/fvPagination/index.vue')['default']
|
||||||
FvRadio: typeof import('./src/fvcomponents/fvRadio/index.vue')['default']
|
FvRadio: typeof import('./src/fvcomponents/fvRadio/index.vue')['default']
|
||||||
FvSearchForm: typeof import('./src/fvcomponents/fvSearchForm/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']
|
IconSelect: typeof import('./src/components/iconSelect/index.vue')['default']
|
||||||
IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
|
IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
|
||||||
IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
|
IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
|
||||||
JavaCodeEdit: typeof import('./src/components/codeEdit/JavaCodeEdit.vue')['default']
|
ImportExcel: typeof import('./src/components/ImportExcel.vue')['default']
|
||||||
JsCodeEdit: typeof import('./src/components/codeEdit/JsCodeEdit.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']
|
Pagination: typeof import('./src/components/pagination/index.vue')['default']
|
||||||
ParentView: typeof import('./src/components/ParentView.vue')['default']
|
ParentView: typeof import('./src/components/ParentView.vue')['default']
|
||||||
PointTag: typeof import('./src/components/PointTag.vue')['default']
|
PointTag: typeof import('./src/components/PointTag.vue')['default']
|
||||||
PopoverDelete: typeof import('./src/components/PopoverDelete.vue')['default']
|
PopoverDelete: typeof import('./src/components/PopoverDelete.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
SqlCodeEdit: typeof import('./src/components/codeEdit/SqlCodeEdit.vue')['default']
|
|
||||||
SvgIcon: typeof import('./src/components/svgIcon/index.vue')['default']
|
SvgIcon: typeof import('./src/components/svgIcon/index.vue')['default']
|
||||||
Tag: typeof import('./src/components/Tag.vue')['default']
|
Tag: typeof import('./src/components/Tag.vue')['default']
|
||||||
TheWelcome: typeof import('./src/components/TheWelcome.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']
|
WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
|
||||||
}
|
}
|
||||||
export interface ComponentCustomProperties {
|
export interface ComponentCustomProperties {
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# 定义应用组名
|
|
||||||
group_name='clay'
|
|
||||||
# 定义应用名称
|
|
||||||
app_name=$DRONE_REPO_NAME
|
|
||||||
# 定义应用版本
|
|
||||||
app_version=$DRONE_COMMIT
|
|
||||||
echo ${app_version}
|
|
||||||
# 打包编译docker镜像
|
# 打包编译docker镜像
|
||||||
docker rm -f smartopsweb
|
docker rm -f smartopsweb
|
||||||
docker rmi smartopsweb:latest
|
docker rmi smartopsweb:latest
|
||||||
|
|||||||
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 request from '@/utils/request.js'
|
||||||
|
import axios from "axios";
|
||||||
|
import {getToken} from "@/utils/auth";
|
||||||
|
|
||||||
export const addContact = (data) => {
|
export const addContact = (data) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -28,3 +30,23 @@ export const deleteContact = (contactIds) => {
|
|||||||
method: 'delete'
|
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)=>{
|
export const orderGetDetails =(params)=>{
|
||||||
return request({
|
return request({
|
||||||
url:`/order/info/${params}`,
|
url:'/order/info',
|
||||||
method:'get'
|
method:'get',
|
||||||
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,10 +32,11 @@ export const orderdDetele =(params)=>{
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const orderdClose =(params)=>{
|
export const orderdClose =(data)=>{
|
||||||
return request({
|
return request({
|
||||||
url:`/order/${params}`,
|
url:'/order/close',
|
||||||
method:'post'
|
method:'post',
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ export const addVerbal = (data) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export const addEnhanceVerbal = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/verbal/add/enhance',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
export const getVerbalDetail = (verbalId) => {
|
export const getVerbalDetail = (verbalId) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/verbal/${verbalId}`,
|
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) => {
|
export const deleteVerbal = (verbalIds) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/verbal/${verbalIds}`,
|
url: `/verbal/${verbalIds}`,
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ import request from '@/utils/request.js'
|
|||||||
//获取历史通话文本记录
|
//获取历史通话文本记录
|
||||||
export const getHistoryCallContent=(params)=>{
|
export const getHistoryCallContent=(params)=>{
|
||||||
return request({
|
return request({
|
||||||
url:`/text/history/list/${params}`,
|
url:`/text/history/list`,
|
||||||
method:'get'
|
method:'get',
|
||||||
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取工作台当前线路记录
|
//获取工作台当前线路记录
|
||||||
|
|||||||
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 emit = defineEmits(['update:value'])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
type:String,
|
type:Object,
|
||||||
default:''
|
default:{}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -54,7 +54,12 @@ watch(() => props.value, async (newVal) => {
|
|||||||
})
|
})
|
||||||
const getHistoryDetail=(newVal)=>{
|
const getHistoryDetail=(newVal)=>{
|
||||||
detailLoading.value=true
|
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) {
|
if (res.code === 1000) {
|
||||||
detailLoading.value=false
|
detailLoading.value=false
|
||||||
res.data?.forEach(item => {
|
res.data?.forEach(item => {
|
||||||
@@ -69,6 +74,7 @@ const getHistoryDetail=(newVal)=>{
|
|||||||
leftHeadData.value.orderName = res.data[0].orderName || '--';
|
leftHeadData.value.orderName = res.data[0].orderName || '--';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
detailLoading.value=false
|
||||||
ElMessage.error(res.msg);
|
ElMessage.error(res.msg);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,50 +3,66 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<div>
|
<div>
|
||||||
<span style="margin-right: 20px">{{ recordObj.name }}</span>
|
<span style="margin-right: 20px">{{ recordObj.name }}</span>
|
||||||
<span>电话号码:{{ recordObj.phone ||'--'}}</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>
|
||||||
<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>
|
</div>
|
||||||
<el-scrollbar ref="scrollbarRef" class="scrollbar">
|
<el-scrollbar ref="scrollbarRef" class="scrollbar">
|
||||||
<el-empty v-if="recordObj.content?.length==0" description="暂无通话" />
|
<el-empty v-if="recordObj.content?.length==0" description="暂无通话"/>
|
||||||
<div class="chat-content" ref="innerRef" v-else>
|
<div class="chat-content" ref="innerRef" v-else>
|
||||||
<div v-for="(item,index) in recordObj.content" :key="index">
|
<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 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 v-if="item.speaker==0" class="word-my">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<!-- <p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>-->
|
<!-- <p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>-->
|
||||||
<p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>
|
<p class="name">{{ item.speaker == 0 ? recordObj.name : '运维助手' }} </p>
|
||||||
<div class="info-content">{{ item.message }}</div>
|
<el-tooltip
|
||||||
|
effect="customized"
|
||||||
|
content="如果回答不准确,请右键告诉运维助手!"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
|
<div class="info-content" @contextmenu="showContextMenu($event,item.message)">{{ item.message }}</div>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<el-avatar>{{ item.speaker==0?recordObj.name:'运维助手' }}</el-avatar>
|
<el-avatar style="flex-shrink: 0;">{{ item.speaker == 0 ? recordObj.name : '运维助手' }}</el-avatar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 对方 -->
|
<!-- 对方 -->
|
||||||
<div v-else class="word">
|
<div v-else class="word">
|
||||||
<el-avatar > {{ item.speaker==0?recordObj.name:'运维助手' }} </el-avatar>
|
<el-avatar style="flex-shrink: 0;"> {{ item.speaker == 0 ? recordObj.name : '运维助手' }}</el-avatar>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>
|
<p class="name">{{ item.speaker == 0 ? recordObj.name : '运维助手' }} </p>
|
||||||
<div class="info-content">{{ item.message }}</div>
|
<div class="info-content">{{ item.message }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <el-empty description="暂无通话记录~" v-else/>-->
|
<!-- <el-empty description="暂无通话记录~" v-else/>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
<fvFormDialog ref="formDialogRef" width="550" :title="dialogTitle"
|
||||||
|
:form-schema="formSchema" :form-rules="formRules"
|
||||||
|
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {defineProps} from "vue";
|
import {defineProps, reactive} from "vue";
|
||||||
const scrollbarRef=ref()
|
import {addEnhanceVerbal} from "@/api/verbal-trick";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
|
const scrollbarRef = ref()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
recordObj: {
|
recordObj: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -61,33 +77,111 @@ const props = defineProps({
|
|||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
const formDialogRef = ref()
|
||||||
const getScrollbarRef=()=>{
|
const dialogTitle = ref("训练知识库");
|
||||||
return scrollbarRef.value
|
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)
|
console.info("🚀 ~method:'recordObj' -----", recordObj)
|
||||||
let flag=false
|
let flag = false
|
||||||
if(recordObj.content&&recordObj.content.length>1){
|
if (recordObj.content && recordObj.content.length > 1) {
|
||||||
let indices = recordObj.content.reduce(function (r, v, i) {
|
let indices = recordObj.content.reduce(function (r, v, i) {
|
||||||
return r.concat(v === 'a' ? i : []);
|
return r.concat(v === 'a' ? i : []);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
console.log(indices);
|
console.log(indices);
|
||||||
|
|
||||||
recordObj.content.forEach((item,index)=>{
|
recordObj.content.forEach((item, index) => {
|
||||||
console.info("🚀 ~method:.callIdNumber -----",recordObj.content.findIndex(item=>item.callIdNumber), item.callIdNumber)
|
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
|
flag = recordObj.content[recordObj.content.length - 2]?.callIdNumber != recordObj.content[recordObj.content.length - 1].callIdNumber
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getScrollbarRef
|
getScrollbarRef
|
||||||
})
|
})
|
||||||
</script>
|
</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>
|
<style lang="scss" scoped>
|
||||||
.live-call {
|
.live-call {
|
||||||
width: 48%;
|
width: 48%;
|
||||||
@@ -157,12 +251,14 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info-content {
|
.info-content {
|
||||||
|
//max-width: 94%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
border: 1px solid #f5f5f5;
|
border: 1px solid #f5f5f5;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
//小三角形
|
//小三角形
|
||||||
@@ -204,7 +300,7 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info-content {
|
.info-content {
|
||||||
max-width: 70%;
|
max-width: 94%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
@@ -48,11 +48,30 @@ const getCurrentMsg=(line)=>{
|
|||||||
getCurrentContent(line).then(res=>{
|
getCurrentContent(line).then(res=>{
|
||||||
// console.info("🚀 ~method:res -----", res)
|
// console.info("🚀 ~method:res -----", res)
|
||||||
if(line==1){
|
if(line==1){
|
||||||
recordLeftObj.value.name=res.data.name
|
recordLeftObj.value.name=res.data.name||'张三'
|
||||||
recordLeftObj.value.phone=res.data.callPhone
|
recordLeftObj.value.phone=res.data.callPhone
|
||||||
recordLeftObj.value.orderName=res.data.orderName
|
recordLeftObj.value.orderName=res.data.orderName
|
||||||
recordLeftObj.value.type=res.data.type
|
recordLeftObj.value.type=res.data.type
|
||||||
recordLeftObj.value.content=res.data.textVoList||[]
|
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){
|
}else if(line==2){
|
||||||
recordRightObj.value.name=res.data.name
|
recordRightObj.value.name=res.data.name
|
||||||
recordRightObj.value.phone=res.data.callPhone
|
recordRightObj.value.phone=res.data.callPhone
|
||||||
|
|||||||
@@ -101,8 +101,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ElMessage,ElNotification } from 'element-plus';
|
import {ElMessage, ElNotification} from 'element-plus';
|
||||||
import { requestList } from '../../api/common';
|
import {requestList} from '@/api/common';
|
||||||
// import {exportExcel} from "@/utils/export-excel";
|
// import {exportExcel} from "@/utils/export-excel";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -130,6 +130,11 @@ const props = defineProps({
|
|||||||
isLoading: {
|
isLoading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
//总数
|
||||||
|
total: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -219,12 +224,12 @@ const changeColShow = (val) => {
|
|||||||
filterColumns()
|
filterColumns()
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const { api, params } = props.tableConfig
|
const {api, params} = props.tableConfig
|
||||||
const queryParmas = {...localData.query, ...params}
|
const queryParmas = {...localData.query, ...params}
|
||||||
if(api) {
|
if (api) {
|
||||||
localData.loading = props.isLoading
|
localData.loading = props.isLoading
|
||||||
try {
|
try {
|
||||||
const {code, data, msg} = await requestList(api, queryParmas).then(res=>{
|
const {code, data, msg} = await requestList(api, queryParmas).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
@@ -247,8 +252,8 @@ const getList = async () => {
|
|||||||
localData.loading = false
|
localData.loading = false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("error",error)
|
console.log("error", error)
|
||||||
if (!error){
|
if (!error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -291,14 +296,26 @@ const handleCurrentChange = (val) => {
|
|||||||
emits('getBaseQuery', localData.query)
|
emits('getBaseQuery', localData.query)
|
||||||
getList()
|
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(() => {
|
watchEffect(() => {
|
||||||
if (localData.allColShow) {
|
if (localData.allColShow) {
|
||||||
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
//刷新
|
//刷新
|
||||||
const refresh = ({resetPage=false}={}) => {
|
const refresh = ({resetPage = false} = {}) => {
|
||||||
resetPage ? localData.query.pageNum = 1 : null
|
resetPage ? localData.query.pageNum = 1 : null
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
@@ -311,7 +328,7 @@ const getQuery = () => {
|
|||||||
return localData.query
|
return localData.query
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ refresh, updateLoading, getQuery, tableInstance })
|
defineExpose({refresh, updateLoading, getQuery, tableInstance})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
|
|||||||
@@ -1,122 +1,134 @@
|
|||||||
import { defineStore } from "pinia";
|
import {defineStore} from "pinia";
|
||||||
import { ref } from "vue";
|
import {ref} from "vue";
|
||||||
import { getRouters } from "@/api/system/menu";
|
import {getRouters} from "@/api/system/menu";
|
||||||
import Layout from '@/layout/index.vue'
|
import Layout from '@/layout/index.vue'
|
||||||
import ParentView from '@/components/ParentView.vue'
|
import ParentView from '@/components/ParentView.vue'
|
||||||
import router from "../router";
|
import router from "../router";
|
||||||
|
import {getUserInfo} from "@/api/login";
|
||||||
|
|
||||||
const VueComUrl = import.meta.glob('../views/**/*.vue')
|
const VueComUrl = import.meta.glob('../views/**/*.vue')
|
||||||
|
|
||||||
export const usePermisstionStroe = defineStore('permisstion', () => {
|
export const usePermisstionStroe = defineStore('permisstion', () => {
|
||||||
const asyncRouters = ref([])
|
const asyncRouters = ref([])
|
||||||
//定义是否加载路由变量
|
const userinfo = ref()
|
||||||
const isLoadRoutes = ref(false)
|
//定义是否加载路由变量
|
||||||
const menuList = ref([{
|
const isLoadRoutes = ref(false)
|
||||||
name: 'home',
|
const menuList = ref([{
|
||||||
path: '/home',
|
name: 'home',
|
||||||
icon: 'home',
|
path: '/home',
|
||||||
title: '工作台',
|
icon: 'home',
|
||||||
meta: {
|
title: '工作台',
|
||||||
breadcrumb: true
|
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
|
|
||||||
}
|
}
|
||||||
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]})
|
||||||
}
|
}
|
||||||
}
|
queryArr.forEach((item, index) => {
|
||||||
if (route.children !== null && route.children && route.children.length !== 0) {
|
if (!index) {
|
||||||
route.children = formatAsyncRouters(route.children)
|
newPath += `?${item.label}=${item.value}`
|
||||||
}
|
} else {
|
||||||
return true
|
newPath += `&${item.label}=${item.value}`
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
|
return newPath
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const loadView = (view) => {
|
const loadView = (view) => {
|
||||||
if (import.meta.env.MODE === 'development') {
|
if (import.meta.env.MODE === 'development') {
|
||||||
return () => import(/* @vite-ignore */`/src/views/${view}.vue`)
|
return () => import(/* @vite-ignore */`/src/views/${view}.vue`)
|
||||||
} else {
|
} else {
|
||||||
return VueComUrl['../views/' + view + '.vue']
|
return VueComUrl['../views/' + view + '.vue']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const removeMenu = () => {
|
const removeMenu = () => {
|
||||||
menuList.value.length = 0
|
menuList.value.length = 0
|
||||||
asyncRouters.value.length = 0
|
asyncRouters.value.length = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
asyncRouters,
|
asyncRouters,
|
||||||
menuList,
|
menuList,
|
||||||
isLoadRoutes,
|
isLoadRoutes,
|
||||||
setAsyncRouters,
|
setAsyncRouters,
|
||||||
setIsLoadRoutes,
|
setIsLoadRoutes,
|
||||||
removeMenu
|
removeMenu
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
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,23 +6,37 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="call-history">
|
<div class="call-history">
|
||||||
<h3>历史通话记录</h3>
|
<h3>历史通话记录</h3>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :isLoading="isLoading"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="currentHistoryData" :total="currentHistoryTotal" :isLoading="isLoading" @getBaseQuery="getBaseQuery"></fvTable>
|
||||||
<voice ref="voiceRef" title="语音详情" :rowUrl="rowUrl" />
|
<voice ref="voiceRef" title="语音详情" :rowUrl="rowUrl" />
|
||||||
<infoLiveCall ref="infoLiveCallRef" v-model:value="orderNumber" />
|
<infoLiveCall ref="infoLiveCallRef" v-model:value="historyData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<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 LiveCall from '@/components/liveCall/index.vue'
|
||||||
import Voice from '@/components/voice/index.vue'
|
import Voice from '@/components/voice/index.vue'
|
||||||
import InfoLiveCall from '@/components/infoLiveCall/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 orderNumber = ref('')
|
||||||
|
const currentHistoryTotal = ref('')
|
||||||
const rowUrl = ref()
|
const rowUrl = ref()
|
||||||
const infoLiveCallRef = ref()
|
const infoLiveCallRef = ref()
|
||||||
const isLoading = ref(false)
|
const isLoading = ref(true)
|
||||||
const voiceRef = ref()
|
const voiceRef = ref()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
|
let socket = reactive("");
|
||||||
|
let token = getToken();
|
||||||
|
let send = {
|
||||||
|
type: "ping",
|
||||||
|
};
|
||||||
const auths = reactive({
|
const auths = reactive({
|
||||||
record: ['order:dialogue:list'],
|
record: ['order:dialogue:list'],
|
||||||
})
|
})
|
||||||
@@ -40,28 +54,29 @@ const tableConfig = reactive({
|
|||||||
label: '工单号',
|
label: '工单号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'orderName',
|
// prop: 'orderName',
|
||||||
label: '工单名称',
|
// label: '工单名称',
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'orderContent',
|
prop: 'orderContent',
|
||||||
label: '工单内容',
|
label: '工单内容',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
width: 250,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
// prop: 'destinationName',
|
// prop: 'destinationName',
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'knotter',
|
|
||||||
// prop: 'destinationName',
|
|
||||||
label: '关单人',
|
|
||||||
align: 'center'
|
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'knotter',
|
||||||
|
// // prop: 'destinationName',
|
||||||
|
// label: '关单人',
|
||||||
|
// align: 'center'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'destinationName',
|
prop: 'destinationName',
|
||||||
// prop: 'workOrderNumber',
|
// prop: 'workOrderNumber',
|
||||||
@@ -77,7 +92,7 @@ const tableConfig = reactive({
|
|||||||
prop: 'callState',
|
prop: 'callState',
|
||||||
label: '电话拨打状态',
|
label: '电话拨打状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 160,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
if (row.callState !== null) {
|
if (row.callState !== null) {
|
||||||
@@ -130,10 +145,33 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '/order/list',
|
// api: '/order/list',
|
||||||
params: {
|
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) => {
|
const handleVoice = (row) => {
|
||||||
if (row.recordUrl !== null) {
|
if (row.recordUrl !== null) {
|
||||||
voiceRef.value.open(true)
|
voiceRef.value.open(true)
|
||||||
@@ -147,12 +185,71 @@ const handleVoice = (row) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
const handleInfo = (row) => {
|
const handleInfo = (row) => {
|
||||||
|
historyData.value=row
|
||||||
orderNumber.value = row.orderNumber
|
orderNumber.value = row.orderNumber
|
||||||
infoLiveCallRef.value.open()
|
infoLiveCallRef.value.open()
|
||||||
}
|
}
|
||||||
window.setInterval(() => {
|
// window.setInterval(() => {
|
||||||
setTimeout(tableIns.value.refresh(), 0)
|
// setTimeout(tableIns.value.refresh(), 0)
|
||||||
}, 2000)
|
// }, 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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -1,19 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="address-book">
|
<div class="address-book">
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="searchAddressBook"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="searchAddressBook"></fvSearchForm>
|
||||||
<fvTable ref="tableIns" :tableConfig="addressBookTableConfig" @headBtnClick="headBtnClick"
|
<div style="display: flex;">
|
||||||
@selectionChange="selectionChange"></fvTable>
|
<el-button type="primary" v-perm="auths.add" @click="handleAdd">新增</el-button>
|
||||||
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
<import-excel @success="importAddress"/>
|
||||||
:form-schema="formSchema" :form-rules="formRules"
|
<el-button type="info" v-perm="auths.export" @click="handleExport">导出</el-button>
|
||||||
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
<el-button type="danger" v-perm="auths.delete" @click="handleMoreDelete">删除</el-button>
|
||||||
</div>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
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 {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {reactive} from "vue";
|
import {reactive} from "vue";
|
||||||
|
import ImportExcel from "@/components/ImportExcel.vue";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
@@ -25,7 +33,8 @@ const dialogType = ref("");
|
|||||||
|
|
||||||
// 手机号验证
|
// 手机号验证
|
||||||
const checkPhone = (rule, value, callback) => {
|
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(() => {
|
setTimeout(() => {
|
||||||
if (!Number.isInteger(+value)) {
|
if (!Number.isInteger(+value)) {
|
||||||
callback(new Error('请输入数字值'))
|
callback(new Error('请输入数字值'))
|
||||||
@@ -33,7 +42,7 @@ const checkPhone = (rule, value, callback) => {
|
|||||||
if (phoneReg.test(value)) {
|
if (phoneReg.test(value)) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error('手机号码格式不正确'))
|
callback(new Error('手机号码长度不足11位,如果是座机,请添加区号'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -48,9 +57,12 @@ const formRules = reactive({
|
|||||||
name: [
|
name: [
|
||||||
{required: true, message: "请输入姓名", trigger: ["change", "blur"]}
|
{required: true, message: "请输入姓名", trigger: ["change", "blur"]}
|
||||||
],
|
],
|
||||||
|
dispatchUnit: [
|
||||||
|
{required: true, message: "请输入拨打单位", trigger: ["change", "blur"]}
|
||||||
|
],
|
||||||
phone: [
|
phone: [
|
||||||
{required: true, message: "请输入手机号码", trigger: ["change", "blur"]},
|
{required: true, message: "请输入手机号码", trigger: ["change", "blur"]}
|
||||||
{ validator: checkPhone, trigger: ["change", "blur"]},
|
//{validator: checkPhone, trigger: ["change", "blur"]},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
const formSchema = computed(() => {
|
const formSchema = computed(() => {
|
||||||
@@ -81,6 +93,30 @@ const formSchema = computed(() => {
|
|||||||
filterable: true,
|
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: '姓名',
|
label: '姓名',
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@@ -96,14 +132,14 @@ const formSchema = computed(() => {
|
|||||||
{
|
{
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
prop: 'phone',
|
prop: 'phone',
|
||||||
component: 'el-input-number',
|
component: 'el-input',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入手机号',
|
placeholder: '请输入手机号',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
controls:false
|
controls: false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -156,6 +192,8 @@ const searchConfig = reactive([
|
|||||||
const auths = reactive({
|
const auths = reactive({
|
||||||
add: ['order:contacts:add'],
|
add: ['order:contacts:add'],
|
||||||
edit: ['order:contacts:edit'],
|
edit: ['order:contacts:edit'],
|
||||||
|
import: ['order:contacts:import'],
|
||||||
|
export: ['order:contacts:export'],
|
||||||
delete: ['order:contacts:del'],
|
delete: ['order:contacts:del'],
|
||||||
})
|
})
|
||||||
const addressBookTableConfig = reactive({
|
const addressBookTableConfig = reactive({
|
||||||
@@ -189,6 +227,16 @@ const addressBookTableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'dispatchUnit',
|
||||||
|
label: '拨打单位',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'team',
|
||||||
|
label: '班组信息',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
@@ -213,8 +261,8 @@ const addressBookTableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = []
|
let btn = []
|
||||||
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||||
btn.push({label: '删除', prem: auths.delete,func: () => handleSingleDelete(row), type: 'danger'})
|
btn.push({label: '删除', prem: auths.delete, func: () => handleSingleDelete(row), type: 'danger'})
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
{
|
{
|
||||||
@@ -237,8 +285,10 @@ const addressBookTableConfig = reactive({
|
|||||||
api: '/contact/list',
|
api: '/contact/list',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add', type: 'primary' , auth: auths.add},
|
// {name: '新增', key: 'add', type: 'primary', auth: auths.add},
|
||||||
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
// {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) => {
|
const searchAddressBook = (val) => {
|
||||||
@@ -251,18 +301,48 @@ const searchAddressBook = (val) => {
|
|||||||
addressBookTableConfig.params = obj
|
addressBookTableConfig.params = obj
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
|
//通讯录导入
|
||||||
|
const importAddress = () => {
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
const headBtnClick = (key) => {
|
const headBtnClick = (key) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'add':
|
case 'add':
|
||||||
handleAdd()
|
handleAdd()
|
||||||
break;
|
break;
|
||||||
|
case 'import':
|
||||||
|
handleImport()
|
||||||
|
break;
|
||||||
|
case 'export':
|
||||||
|
handleExport()
|
||||||
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
handleMoreDelete()
|
handleMoreDelete()
|
||||||
break;
|
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 = () => {
|
const handleAdd = () => {
|
||||||
formDialogRef.value.openOrCloseDialog(true)
|
formDialogRef.value.openOrCloseDialog(true)
|
||||||
dialogTitle.value = "新增通讯录";
|
dialogTitle.value = "新增通讯录";
|
||||||
@@ -298,7 +378,7 @@ const selectionChange = (selection) => {
|
|||||||
if (selection.length !== 0) {
|
if (selection.length !== 0) {
|
||||||
contactIds.value = selection.map(item => item.contactsId).join()
|
contactIds.value = selection.map(item => item.contactsId).join()
|
||||||
} else {
|
} else {
|
||||||
contactIds.value=''
|
contactIds.value = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const deleteContactMethod = (contactsId) => {
|
const deleteContactMethod = (contactsId) => {
|
||||||
@@ -312,17 +392,17 @@ const deleteContactMethod = (contactsId) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleMoreDelete = () => {
|
const handleMoreDelete = () => {
|
||||||
if(contactIds.value){
|
if (contactIds.value) {
|
||||||
ElMessageBox.confirm(`确认删除选择的通讯录吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认删除选择的通讯录吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteContactMethod(contactIds.value)
|
deleteContactMethod(contactIds.value)
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
ElMessage.warning("请选择要删除的通讯录")
|
ElMessage.warning("请选择要删除的通讯录")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSingleDelete = (row) => {
|
const handleSingleDelete = (row) => {
|
||||||
ElMessageBox.confirm(`确认删除姓名为${row.name}的通讯录吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认删除姓名为${row.name}的通讯录吗?`, '系统提示', {
|
||||||
@@ -339,7 +419,12 @@ const handleSubmitAddressBook = async (formInstance) => {
|
|||||||
if (!formInstance) return;
|
if (!formInstance) return;
|
||||||
let validate = await formInstance.validate()
|
let validate = await formInstance.validate()
|
||||||
if (!validate.isValidate) return;
|
if (!validate.isValidate) return;
|
||||||
|
// if (formInstance.getValues().role == '1' && !formInstance.getValues().dispatchUnit) {
|
||||||
|
// ElMessage.warning('请输入拨打单位');
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
if (dialogType.value === "add") {
|
if (dialogType.value === "add") {
|
||||||
|
|
||||||
addContact(formInstance.getValues()).then(res => {
|
addContact(formInstance.getValues()).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg);
|
ElMessage.success(res.msg);
|
||||||
@@ -363,11 +448,12 @@ const handleSubmitAddressBook = async (formInstance) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.address-book{
|
.address-book {
|
||||||
|
|
||||||
.el-input-number {
|
.el-input-number {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
.el-input__inner{
|
|
||||||
|
.el-input__inner {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
:props="treeProps"
|
:props="treeProps"
|
||||||
node-key="menuId"
|
node-key="menuId"
|
||||||
ref="tree"
|
ref="tree"
|
||||||
:check-strictly="checkStrictly"
|
:check-strictly="true"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
@check-change="handleCheckChange"
|
@check-change="handleCheckChange"
|
||||||
/>
|
/>
|
||||||
@@ -209,7 +209,7 @@ const rules = reactive({
|
|||||||
{required: true, message: '请选择显示顺序', trigger: 'blur'},
|
{required: true, message: '请选择显示顺序', trigger: 'blur'},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const checkList = ref(['3'])
|
const checkList = ref([])
|
||||||
const treeProps = {
|
const treeProps = {
|
||||||
value: "menuId",
|
value: "menuId",
|
||||||
label: 'menuName',
|
label: 'menuName',
|
||||||
@@ -372,7 +372,7 @@ const getMenu = async () => {
|
|||||||
//多选框事件
|
//多选框事件
|
||||||
const changeCheckbox = (checked) => {
|
const changeCheckbox = (checked) => {
|
||||||
//父子联动
|
//父子联动
|
||||||
checkStrictly.value = checked.indexOf("3") === -1;
|
// checkStrictly.value = checked.indexOf("3") === -1;
|
||||||
let nodes = tree.value.store.nodesMap;
|
let nodes = tree.value.store.nodesMap;
|
||||||
console.log('checked',checked)
|
console.log('checked',checked)
|
||||||
//展开/折叠
|
//展开/折叠
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||||
<WorkDialog ref="workDialogRef" :rowData="rowData" />
|
<WorkDialog ref="workDialogRef" :rowData="rowData"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import { reactive, shallowRef } from 'vue';
|
import {reactive, shallowRef} from 'vue';
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import WorkDialog from '../components/WorkDialog.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 rowData = ref()
|
||||||
const workDialogRef = ref()
|
const workDialogRef = ref()
|
||||||
@@ -43,16 +43,18 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}, {
|
},
|
||||||
label: '工单名称',
|
// {
|
||||||
prop: 'orderName',
|
// label: '工单名称',
|
||||||
props: {
|
// prop: 'orderName',
|
||||||
placeholder: '请输入工单名查询',
|
// props: {
|
||||||
clearable: true,
|
// placeholder: '请输入工单名查询',
|
||||||
checkStrictly: true
|
// clearable: true,
|
||||||
},
|
// checkStrictly: true
|
||||||
component: 'el-input',
|
// },
|
||||||
}, {
|
// component: 'el-input',
|
||||||
|
// },
|
||||||
|
{
|
||||||
label: '工单状态',
|
label: '工单状态',
|
||||||
prop: 'orderState',
|
prop: 'orderState',
|
||||||
props: {
|
props: {
|
||||||
@@ -62,7 +64,18 @@ const searchConfig = reactive([
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
|
label: '联系人',
|
||||||
|
prop: 'destinationNumber',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入联系人查询',
|
||||||
|
clearable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
},
|
||||||
|
component: 'el-input',
|
||||||
|
},
|
||||||
|
{
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
props: {
|
props: {
|
||||||
@@ -71,16 +84,17 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
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: '创建时间',
|
label: '创建时间',
|
||||||
prop: 'createdTime',
|
prop: 'createdTime',
|
||||||
@@ -133,26 +147,38 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'orderName',
|
// prop: 'orderName',
|
||||||
label: '工单名称',
|
// label: '工单名称',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 200
|
// width: 200
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'orderContent',
|
prop: 'orderContent',
|
||||||
label: '工单内容',
|
label: '工单内容',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'alarmUnit',
|
||||||
|
label: '拨打单位',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'alarmObject',
|
||||||
|
label: '拨打对象',
|
||||||
|
align: 'center',
|
||||||
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'orderState',
|
prop: 'orderState',
|
||||||
label: '工单状态',
|
label: '工单状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({row, index}) => {
|
||||||
if (row.orderState !== null) {
|
if (row.orderState !== null) {
|
||||||
return (<Tag dictType={'work_order_status'} value={row.orderState} />)
|
return (<Tag dictType={'work_order_status'} value={row.orderState}/>)
|
||||||
} else {
|
} else {
|
||||||
return '--'
|
return '--'
|
||||||
}
|
}
|
||||||
@@ -164,9 +190,22 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({row, index}) => {
|
||||||
if (row.callState !== null) {
|
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 {
|
} else {
|
||||||
return '--'
|
return '--'
|
||||||
}
|
}
|
||||||
@@ -176,7 +215,8 @@ const tableConfig = reactive({
|
|||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
currentRender: ({ row, index }) => {
|
width: 100,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
if (row.operationUser) {
|
if (row.operationUser) {
|
||||||
return row.operationUser
|
return row.operationUser
|
||||||
} else {
|
} else {
|
||||||
@@ -208,11 +248,11 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'knotter',
|
// prop: 'knotter',
|
||||||
label: '关单人',
|
// label: '关单人',
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
@@ -220,28 +260,28 @@ const tableConfig = reactive({
|
|||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 150,
|
width: 150,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({row, index}) => {
|
||||||
// console.log(row);
|
// console.log(row);
|
||||||
|
|
||||||
let btn = []
|
let btn = []
|
||||||
btn.push({ label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary' })
|
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.close, func: () => handleClose(row), type: 'primary'})
|
||||||
btn.push({ label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger'})
|
btn.push({label: '删除', prem: auths.delete, func: () => handleDelete(row), type: 'danger'})
|
||||||
return (
|
return (
|
||||||
<div style={{ width: '100%' }}>
|
<div style={{width: '100%'}}>
|
||||||
{
|
{
|
||||||
btn.map(item => (
|
btn.map(item => (
|
||||||
<el-button
|
<el-button
|
||||||
type={item.type}
|
type={item.type}
|
||||||
v-perm={item.prem}
|
v-perm={item.prem}
|
||||||
onClick={() => item.func()}
|
onClick={() => item.func()}
|
||||||
link
|
link
|
||||||
>
|
>
|
||||||
{item.label}
|
{item.label}
|
||||||
</el-button>
|
</el-button>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,7 +293,7 @@ const tableConfig = reactive({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
let obj = { ...val }
|
let obj = {...val}
|
||||||
if (obj.dateValue) {
|
if (obj.dateValue) {
|
||||||
obj.startTime = obj.dateValue[0]
|
obj.startTime = obj.dateValue[0]
|
||||||
obj.endTime = obj.dateValue[1]
|
obj.endTime = obj.dateValue[1]
|
||||||
@@ -282,30 +322,35 @@ const handleDetail = (row) => {
|
|||||||
const handleClose = async (row) => {
|
const handleClose = async (row) => {
|
||||||
if (row.orderState !== '2') {
|
if (row.orderState !== '2') {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
'确定要关单吗?',
|
'确定要关单吗?',
|
||||||
'温馨提示',
|
'温馨提示',
|
||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
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',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
|
.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 {
|
} else {
|
||||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||||
@@ -321,30 +366,30 @@ const handleClose = async (row) => {
|
|||||||
const handleDelete = async (row) => {
|
const handleDelete = async (row) => {
|
||||||
|
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
'确定要删除吗?',
|
'确定要删除吗?',
|
||||||
'温馨提示',
|
'温馨提示',
|
||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
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',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
|
.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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { nextTick, onMounted, reactive, ref, watch } from "vue";
|
import {nextTick, onMounted, reactive, ref, watch} from "vue";
|
||||||
import { ElMessageBox } from "element-plus";
|
import {ElMessageBox} from "element-plus";
|
||||||
import { MoreFilled, Check, Download, VideoPlay } from "@element-plus/icons-vue";
|
import {MoreFilled, Check, Download, VideoPlay} from "@element-plus/icons-vue";
|
||||||
import { time } from "echarts";
|
import {time} from "echarts";
|
||||||
import { defineExpose } from "vue";
|
import {defineExpose} from "vue";
|
||||||
import { defineProps } from "vue";
|
import {defineProps} from "vue";
|
||||||
import { orderGetDetails } from "@/api/order/order.js"
|
import {orderGetDetails} from "@/api/order/order.js"
|
||||||
import Voice from '@/components/voice/index.vue'
|
import Voice from '@/components/voice/index.vue'
|
||||||
//控制显示隐藏
|
//控制显示隐藏
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
rowData: Object
|
rowData: Object
|
||||||
})
|
})
|
||||||
|
|
||||||
let opsCallList = ref([]);
|
let opsCallList = ref([]);
|
||||||
@@ -20,424 +20,439 @@ let orderContent = ref([]);
|
|||||||
const voiceRef = ref()
|
const voiceRef = ref()
|
||||||
const rowUrl = ref()
|
const rowUrl = ref()
|
||||||
const open = (row) => {
|
const open = (row) => {
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
// console.log(123);
|
// console.log(123);
|
||||||
const data = await orderGetDetails(props.rowData.orderNumber)
|
const data = await orderGetDetails({
|
||||||
// console.log("111", data);
|
orderNumber: props.rowData.orderNumber,
|
||||||
return data
|
alarmObject: props.rowData.alarmObject,
|
||||||
|
alarmUnit: props.rowData.alarmUnit
|
||||||
|
})
|
||||||
|
// console.log("111", data);
|
||||||
|
return data
|
||||||
|
|
||||||
}
|
}
|
||||||
let contentState0 = [
|
let contentState0 = [
|
||||||
{
|
{
|
||||||
content: "待处理",
|
content: "待处理",
|
||||||
timestamp: "orderData.value",
|
timestamp: "orderData.value",
|
||||||
icon: Check,
|
icon: Check,
|
||||||
color: "#0bbd87",
|
color: "#0bbd87",
|
||||||
size: "large",
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "已处理",
|
content: "已处理",
|
||||||
timestamp: "--",
|
timestamp: "--",
|
||||||
type: "primary",
|
type: "primary",
|
||||||
icon: MoreFilled,
|
icon: MoreFilled,
|
||||||
size: "large",
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "结单",
|
content: "结单",
|
||||||
timestamp: "--",
|
timestamp: "--",
|
||||||
size: "large",
|
size: "large",
|
||||||
// icon: Check,
|
// icon: Check,
|
||||||
// color: "#0bbd87",
|
// color: "#0bbd87",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
let contentState1 = [
|
let contentState1 = [
|
||||||
{
|
{
|
||||||
content: "待处理",
|
content: "待处理",
|
||||||
timestamp: "orderData.value",
|
timestamp: "orderData.value",
|
||||||
icon: Check,
|
icon: Check,
|
||||||
color: "#0bbd87",
|
color: "#0bbd87",
|
||||||
size: "large",
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "已处理",
|
content: "已处理",
|
||||||
timestamp: "2022-07-20 20:00:00",
|
timestamp: "2022-07-20 20:00:00",
|
||||||
icon: Check,
|
icon: Check,
|
||||||
color: "#0bbd87",
|
color: "#0bbd87",
|
||||||
size: "large",
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "结单",
|
content: "结单",
|
||||||
timestamp: "--",
|
timestamp: "--",
|
||||||
size: "large",
|
size: "large",
|
||||||
type: "primary",
|
type: "primary",
|
||||||
icon: MoreFilled,
|
icon: MoreFilled,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
let contentState2 = [
|
let contentState2 = [
|
||||||
{
|
{
|
||||||
content: "待处理",
|
content: "待处理",
|
||||||
timestamp: "orderData.value",
|
timestamp: "orderData.value",
|
||||||
icon: Check,
|
icon: Check,
|
||||||
color: "#0bbd87",
|
color: "#0bbd87",
|
||||||
size: "large",
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "已处理",
|
content: "已处理",
|
||||||
timestamp: "2022-07-20 20:00:00",
|
timestamp: "2024-07-20 20:00:00",
|
||||||
icon: Check,
|
icon: Check,
|
||||||
color: "#0bbd87",
|
color: "#0bbd87",
|
||||||
size: "large",
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "结单",
|
content: "结单",
|
||||||
timestamp: "2022-07-20 20:00:00",
|
timestamp: "2024-07-20 20:00:00",
|
||||||
size: "large",
|
size: "large",
|
||||||
icon: Check,
|
icon: Check,
|
||||||
color: "#0bbd87",
|
color: "#0bbd87",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
watch(() => props.rowData, (newRowData) => {
|
watch(() => props.rowData, (newRowData) => {
|
||||||
if (newRowData) {
|
if (newRowData) {
|
||||||
// console.log(getData(newRowData));
|
// console.log(getData(newRowData));
|
||||||
getData(newRowData).then((data) => {
|
getData(newRowData).then((data) => {
|
||||||
opsCallList.value = []
|
opsCallList.value = []
|
||||||
orderData.value = data.data
|
orderData.value = data.data
|
||||||
|
|
||||||
//电话拨打记录
|
//电话拨打记录
|
||||||
const dataDetails = data.data.opsCallList
|
const dataDetails = data.data.opsCallList
|
||||||
// console.log(dataDetails);
|
// console.log(dataDetails);
|
||||||
const theData = [{ createTime: '', data: [] }]
|
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);
|
|
||||||
|
|
||||||
|
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) => {
|
const inputOrderTime = (item, index) => {
|
||||||
{
|
{
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
item.timestamp = orderData.value.operationTime || '--'
|
item.timestamp = orderData.value.operationTime || '--'
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
// item.timestamp = orderData.value.processedTime || '--'
|
// item.timestamp = orderData.value.processedTime || '--'
|
||||||
} else {
|
} else {
|
||||||
// item.timestamp = orderData.value.completionTime || '--'
|
// item.timestamp = orderData.value.completionTime || '--'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const inputOrderContent = (contentState) => {
|
const inputOrderContent = (contentState) => {
|
||||||
contentState.map((item, index) => {
|
// console.log('contentState',contentState)
|
||||||
inputOrderTime(item, index)
|
contentState.map((item, index) => {
|
||||||
})
|
inputOrderTime(item, index)
|
||||||
contentState.forEach(item => {
|
orderContent.value.push(item)
|
||||||
orderContent.value.push(item)
|
})
|
||||||
})
|
// contentState.forEach(item => {
|
||||||
|
// orderContent.value.push(item)
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
const openRecord = () => {
|
const openRecord = () => {
|
||||||
if ( props.rowData.recordUrl !== null) {
|
if (props.rowData.recordUrl !== null) {
|
||||||
voiceRef.value.open(true)
|
voiceRef.value.open(true)
|
||||||
rowUrl.value = props.rowData.recordUrl
|
rowUrl.value = props.rowData.recordUrl
|
||||||
} else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '暂无语音',
|
message: '暂无语音',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadRecord = () => {
|
const downloadRecord = () => {
|
||||||
if(props.rowData.recordUrl === null){
|
if (props.rowData.recordUrl === null) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '暂无语音',
|
message: '暂无语音',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="dialogVisible" :show-close=true title="工单详情" width="80%">
|
<el-dialog v-model="dialogVisible" :show-close=true title="工单详情" width="80%">
|
||||||
<div class="common-layout">
|
<div class="common-layout">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header class="header"><span>工单号:</span>
|
<el-header class="header"><span>工单号:</span>
|
||||||
<span>{{ rowData.orderNumber || '--' }}</span>
|
<span>{{ rowData.orderNumber || '--' }}</span>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-container class="main-container">
|
<el-container class="main-container">
|
||||||
<el-aside width="200px" :style="{ position: 'static' }">
|
<el-aside width="200px" :style="{ position: 'static' }">
|
||||||
<div class="aside-content">
|
<div class="aside-content">
|
||||||
<el-timeline style="max-width: 600px">
|
<el-timeline style="max-width: 600px">
|
||||||
<el-timeline-item v-for="(activity, index) in orderContent" :key="index"
|
<el-timeline-item v-for="(activity, index) in orderContent" :key="index"
|
||||||
:icon="activity.icon" :type="activity.type" :color="activity.color"
|
:icon="activity.icon" :type="activity.type" :color="activity.color"
|
||||||
:size="activity.size" :hollow="activity.hollow" :timestamp="activity.timestamp">
|
:size="activity.size" :hollow="activity.hollow" :timestamp="activity.timestamp">
|
||||||
<p style="font-size: 17px;"> {{ activity.content }}</p>
|
<p style="font-size: 17px;"> {{ activity.content }}</p>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
</div>
|
</div>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main :style="{ position: 'static' }" class="main-content">
|
<el-main :style="{ position: 'static' }" class="main-content">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<!-- <span>创始人:{{ rowData.createBy }}</span> -->
|
<!-- <span>创始人:{{ rowData.createBy }}</span> -->
|
||||||
<span>处理人:{{ rowData.operationUser || '--' }}</span>
|
<span>处理人:{{ rowData.operationUser || '--' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span>工单名称:{{ rowData.orderName || '--' }}</span>
|
<span>拨打单位:{{ rowData.alarmUnit || '--' }}</span>
|
||||||
<span>关单人:{{ rowData.knotter || '--' }}</span>
|
<span>拨打对象:{{ rowData.alarmObject || '--' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div>
|
<div>
|
||||||
<div>工单内容:</div>
|
<div>工单内容:</div>
|
||||||
<div class="textBox">
|
<div class="textBox">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="text">{{ rowData.orderContent || '暂无工单内容' }}</div>
|
<div class="text">{{ rowData.orderContent || '暂无工单内容' }}</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<div>通话记录:</div>
|
<!-- <div>通话记录:</div>-->
|
||||||
<div class="textBox">
|
<!-- <div class="textBox">-->
|
||||||
<el-scrollbar>
|
<!-- <el-scrollbar>-->
|
||||||
<div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>
|
<!-- <div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>-->
|
||||||
</el-scrollbar>
|
<!-- </el-scrollbar>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div>
|
<div>
|
||||||
<div>录音信息:</div>
|
<div>录音信息:</div>
|
||||||
<div class="textBox—record">
|
<div class="textBox—record">
|
||||||
|
|
||||||
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
||||||
style="margin-right: 10px ;">播放录音
|
style="margin-right: 10px ;">播放录音
|
||||||
</el-button>
|
</el-button>
|
||||||
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl" />
|
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl"/>
|
||||||
<a :href=rowData.recordUrl download>
|
<a :href=rowData.recordUrl download>
|
||||||
<el-button type="primary" :icon="Download"
|
<el-button type="primary" :icon="Download"
|
||||||
@click="downloadRecord">下载录音</el-button>
|
@click="downloadRecord">下载录音
|
||||||
</a>
|
</el-button>
|
||||||
<!-- <el-scrollbar> -->
|
</a>
|
||||||
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
|
<!-- <el-scrollbar> -->
|
||||||
<!-- </el-scrollbar> -->
|
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
|
||||||
</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>
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<p>暂无电话拨打记录</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
</el-timeline-item>
|
||||||
<div>电话拨打记录:</div>
|
</el-timeline>
|
||||||
<div class="timebox">
|
</el-scrollbar>
|
||||||
<div>
|
</div>
|
||||||
<el-scrollbar height="20vh">
|
</div>
|
||||||
<p v-if="opsCallList.length === 0">暂无电话拨打记录</p>
|
</div>
|
||||||
<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-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-container>
|
</el-container>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.header {
|
.header {
|
||||||
font-size: 27px;
|
font-size: 27px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aside-content {
|
.aside-content {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 3px;
|
left: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
.main-content {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content span {
|
.main-content span {
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
color: black;
|
color: black;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .info {
|
.main-content .info {
|
||||||
border-bottom: 1.5px solid #e4e7ed;
|
border-bottom: 1.5px solid #e4e7ed;
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .body {
|
.main-content .body {
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
color: black
|
color: black
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .body .textBox {
|
.main-content .body .textBox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 10vh;
|
min-height: 10vh;
|
||||||
max-height: 15vh;
|
max-height: 15vh;
|
||||||
border: 1.5px solid #e4e7ed;
|
border: 1.5px solid #e4e7ed;
|
||||||
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .body .textBox—record {
|
.main-content .body .textBox—record {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 10vh;
|
min-height: 10vh;
|
||||||
// max-height: 15vh;
|
// max-height: 15vh;
|
||||||
// border: 1.5px solid #e4e7ed;
|
// border: 1.5px solid #e4e7ed;
|
||||||
// box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
// box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||||
// margin-bottom: 20px;
|
// margin-bottom: 20px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .body .text {
|
.main-content .body .text {
|
||||||
resize: none;
|
resize: none;
|
||||||
// overflow-y: auto;
|
// overflow-y: auto;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 25px
|
line-height: 25px
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .footer {
|
.main-content .footer {
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .timebox {
|
.main-content .timebox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 25vh;
|
height: 25vh;
|
||||||
border: 1.5px solid #e4e7ed;
|
border: 1.5px solid #e4e7ed;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||||
// overflow-x: hidden;
|
// overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .timeline {
|
.main-content .timeline {
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 3px;
|
left: 3px;
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .timeline-row {
|
.main-content .timeline-row {
|
||||||
// border: 1px solid #000;
|
// border: 1px solid #000;
|
||||||
display: flex;
|
display: flex;
|
||||||
// justify-content: space-between;
|
// justify-content: space-between;
|
||||||
// border: 1px solid #000;
|
// border: 1px solid #000;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .tag {
|
.main-content .tag {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content .span-3th {
|
.main-content .span-3th {
|
||||||
// flex-grow: 1;
|
// flex-grow: 1;
|
||||||
// margin-right:;
|
// margin-right:;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-right: 100px;
|
margin-right: 100px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-card {
|
.custom-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-card span {
|
.custom-card span {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -45,16 +45,28 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}, {
|
},
|
||||||
label: '工单名称',
|
// {
|
||||||
prop: 'orderName',
|
// label: '工单名称',
|
||||||
|
// prop: 'orderName',
|
||||||
|
// props: {
|
||||||
|
// placeholder: '请输入工单名查询',
|
||||||
|
// clearable: true,
|
||||||
|
// checkStrictly: true
|
||||||
|
// },
|
||||||
|
// component: 'el-input',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
label: '联系人',
|
||||||
|
prop: 'destinationNumber',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入工单名查询',
|
placeholder: '请输入联系人查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
props: {
|
props: {
|
||||||
@@ -63,16 +75,17 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
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: '创建时间',
|
label: '创建时间',
|
||||||
prop: 'createdTime',
|
prop: 'createdTime',
|
||||||
@@ -125,17 +138,29 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'orderName',
|
// prop: 'orderName',
|
||||||
label: '工单名称',
|
// label: '工单名称',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 200
|
// width: 200
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'orderContent',
|
prop: 'orderContent',
|
||||||
label: '工单内容',
|
label: '工单内容',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'alarmUnit',
|
||||||
|
label: '拨打单位',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'alarmObject',
|
||||||
|
label: '拨打对象',
|
||||||
|
align: 'center',
|
||||||
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'orderState',
|
prop: 'orderState',
|
||||||
@@ -164,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',
|
prop: 'operationUser',
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
@@ -193,11 +232,11 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'knotter',
|
// prop: 'knotter',
|
||||||
label: '关单人',
|
// label: '关单人',
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
@@ -275,7 +314,11 @@ const handleClose = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const info = await orderdClose(row.orderNumber)
|
const info = await orderdClose({
|
||||||
|
orderNumber: row.orderNumber,
|
||||||
|
alarmObject: row.alarmObject,
|
||||||
|
alarmUnit: row.alarmUnit
|
||||||
|
})
|
||||||
// console.log(info);
|
// console.log(info);
|
||||||
if (info.code === 1000) {
|
if (info.code === 1000) {
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
|
|||||||
@@ -45,16 +45,28 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}, {
|
},
|
||||||
label: '工单名称',
|
// {
|
||||||
prop: 'orderName',
|
// label: '工单名称',
|
||||||
|
// prop: 'orderName',
|
||||||
|
// props: {
|
||||||
|
// placeholder: '请输入工单名查询',
|
||||||
|
// clearable: true,
|
||||||
|
// checkStrictly: true
|
||||||
|
// },
|
||||||
|
// component: 'el-input',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
label: '联系人',
|
||||||
|
prop: 'destinationNumber',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入工单名查询',
|
placeholder: '请输入联系人查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
props: {
|
props: {
|
||||||
@@ -63,16 +75,17 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
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: '创建时间',
|
label: '创建时间',
|
||||||
prop: 'createdTime',
|
prop: 'createdTime',
|
||||||
@@ -125,17 +138,29 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'orderName',
|
// prop: 'orderName',
|
||||||
label: '工单名称',
|
// label: '工单名称',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 200
|
// width: 200
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'orderContent',
|
prop: 'orderContent',
|
||||||
label: '工单内容',
|
label: '工单内容',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'alarmUnit',
|
||||||
|
label: '拨打单位',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'alarmObject',
|
||||||
|
label: '拨打对象',
|
||||||
|
align: 'center',
|
||||||
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'orderState',
|
prop: 'orderState',
|
||||||
@@ -164,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',
|
prop: 'operationUser',
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
@@ -193,11 +231,11 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'knotter',
|
// prop: 'knotter',
|
||||||
label: '关单人',
|
// label: '关单人',
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
@@ -275,7 +313,11 @@ const handleClose = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const info = await orderdClose(row.orderNumber)
|
const info = await orderdClose({
|
||||||
|
orderNumber: row.orderNumber,
|
||||||
|
alarmObject: row.alarmObject,
|
||||||
|
alarmUnit: row.alarmUnit
|
||||||
|
})
|
||||||
// console.log(info);
|
// console.log(info);
|
||||||
if (info.code === 1000) {
|
if (info.code === 1000) {
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
|
|||||||
@@ -19,20 +19,20 @@ const formDialogRef = ref()
|
|||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '话术问题',
|
label: '知识内容',
|
||||||
prop: 'query',
|
prop: 'query',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入话术问题查询',
|
placeholder: '请输入知识内容查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '话术答案',
|
label: '期望回复',
|
||||||
prop: 'answer',
|
prop: 'answer',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入话术答案查询',
|
placeholder: '请输入期望回复查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
@@ -81,12 +81,12 @@ const verbalTrickTableConfig = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'query',
|
prop: 'query',
|
||||||
label: '话术问题',
|
label: '知识内容',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'answer',
|
prop: 'answer',
|
||||||
label: '话术答案',
|
label: '期望回复',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -98,6 +98,7 @@ const verbalTrickTableConfig = reactive({
|
|||||||
prop: 'callOff',
|
prop: 'callOff',
|
||||||
label: '是否挂断电话',
|
label: '是否挂断电话',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: '120',
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
if (row.callOff !== null) {
|
if (row.callOff !== null) {
|
||||||
return (<Tag dictType={'call_off'} value={row.callOff} />)
|
return (<Tag dictType={'call_off'} value={row.callOff} />)
|
||||||
@@ -110,6 +111,7 @@ const verbalTrickTableConfig = reactive({
|
|||||||
prop: 'type',
|
prop: 'type',
|
||||||
label: '上下文类型',
|
label: '上下文类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: '120',
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
if (row.type !== null) {
|
if (row.type !== null) {
|
||||||
return (<Tag dictType={'context_type'} value={row.type} />)
|
return (<Tag dictType={'context_type'} value={row.type} />)
|
||||||
@@ -170,10 +172,10 @@ const verbalTrickTableConfig = reactive({
|
|||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
query: [
|
query: [
|
||||||
{required: true, message: "请输入话术问题", trigger: ["change", "blur"]}
|
{required: true, message: "请输入知识内容", trigger: ["change", "blur"]}
|
||||||
],
|
],
|
||||||
// answer: [
|
// answer: [
|
||||||
// {required: true, message: "请输入话术答案", trigger: ["change", "blur"]}
|
// {required: true, message: "请输入期望回复", trigger: ["change", "blur"]}
|
||||||
// ],
|
// ],
|
||||||
callOff: [
|
callOff: [
|
||||||
{required: true, message: "请选择是否挂断电话", trigger: ["change", "blur"]}
|
{required: true, message: "请选择是否挂断电话", trigger: ["change", "blur"]}
|
||||||
@@ -185,28 +187,28 @@ const formRules = reactive({
|
|||||||
const formSchema = computed(() => {
|
const formSchema = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: '话术问题',
|
label: '知识内容',
|
||||||
prop: 'query',
|
prop: 'query',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入话术问题',
|
placeholder: '请输入知识内容',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
type:'textarea',
|
type:'textarea',
|
||||||
rows:3
|
rows:3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '话术答案',
|
label: '期望回复',
|
||||||
prop: 'answer',
|
prop: 'answer',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入话术答案',
|
placeholder: '请输入期望回复',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
type:'textarea',
|
type:'textarea',
|
||||||
rows:3
|
rows:3
|
||||||
@@ -265,7 +267,7 @@ const headBtnClick = (key) => {
|
|||||||
}
|
}
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
formDialogRef.value.openOrCloseDialog(true)
|
formDialogRef.value.openOrCloseDialog(true)
|
||||||
dialogTitle.value = "新增话术";
|
dialogTitle.value = "新增知识";
|
||||||
dialogType.value = "add";
|
dialogType.value = "add";
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
formDialogRef.value.getFormInstance().setValues({})
|
formDialogRef.value.getFormInstance().setValues({})
|
||||||
@@ -277,7 +279,7 @@ const handleAdd = () => {
|
|||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
formDialogRef.value.openOrCloseDialog(true)
|
formDialogRef.value.openOrCloseDialog(true)
|
||||||
getDetail(row)
|
getDetail(row)
|
||||||
dialogTitle.value = "编辑话术";
|
dialogTitle.value = "编辑知识";
|
||||||
dialogType.value = "edit";
|
dialogType.value = "edit";
|
||||||
}
|
}
|
||||||
const getDetail = (row) => {
|
const getDetail = (row) => {
|
||||||
@@ -314,7 +316,7 @@ const deleteContactMethod = (verbalId) => {
|
|||||||
}
|
}
|
||||||
const handleMoreDelete = () => {
|
const handleMoreDelete = () => {
|
||||||
if(verbalIds.value){
|
if(verbalIds.value){
|
||||||
ElMessageBox.confirm(`确认删除选择的话术吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认删除选择的知识吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -322,11 +324,11 @@ const handleMoreDelete = () => {
|
|||||||
deleteContactMethod(verbalIds.value)
|
deleteContactMethod(verbalIds.value)
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
ElMessage.warning("请选择要删除的话术")
|
ElMessage.warning("请选择要删除的知识")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSingleDelete = (row) => {
|
const handleSingleDelete = (row) => {
|
||||||
ElMessageBox.confirm(`确认删除问题为${row.query}的话术吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认删除问题为${row.query}的知识吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|||||||
@@ -76,8 +76,9 @@ export default defineConfig({
|
|||||||
// rewrite: (path) => path.replace(/^\/api/, ""),
|
// rewrite: (path) => path.replace(/^\/api/, ""),
|
||||||
// },
|
// },
|
||||||
"/api": {
|
"/api": {
|
||||||
// target: "http://frp.feashow.cn:31800/",
|
target: "http://frp.feashow.cn:31800/",
|
||||||
target: "http://10.8.105.91:28080/",
|
// target: "http://10.8.105.91:28080/",
|
||||||
|
// target: "http://112.19.165.99:20002/",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user