Compare commits
218 Commits
clay-patch
...
zhangkaihu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
391d477f82 | ||
|
|
96680bfd6e | ||
|
|
89d24216e5 | ||
|
|
9b79836cb4 | ||
|
|
92408fb1a0 | ||
|
|
194768a232 | ||
| 35b8e263b6 | |||
| 00ff24a771 | |||
| cadf653193 | |||
| 2f4986a29e | |||
| 8037c31df7 | |||
| 760de05fc9 | |||
| 2f598104d8 | |||
| 5f460fcbdf | |||
| 6a8f5b4850 | |||
| 62125eb3b2 | |||
| 63c770775b | |||
| 560e56a67d | |||
| 786e51a38e | |||
| 25ba502545 | |||
| 979f24b68b | |||
| f4acb4b648 | |||
| 8269a47d2d | |||
|
|
95ffd79e33 | ||
|
|
f17f19466c | ||
|
|
d34e32314c | ||
|
|
666fd543b9 | ||
|
|
6f02c47da2 | ||
|
|
82a5cebf3b | ||
| 24f8fbf8ce | |||
| da5e062c88 | |||
| 9a514cf897 | |||
| 5aa3446d32 | |||
| f5303a281f | |||
| 18e3c4337e | |||
| f01efcc20e | |||
| b200df9d98 | |||
| dd31dd627e | |||
| c2abb10bb1 | |||
| c6b4145784 | |||
| a070573d42 | |||
| 4a6ce61091 | |||
| 02b1cc03f7 | |||
|
|
fca6d319dd | ||
| 80272fe80b | |||
| 4c86af02dc | |||
| 88b1052f14 | |||
| 0aff2a5fab | |||
| 0ddfde74a9 | |||
| 768ae544d3 | |||
| d127df718d | |||
| b1ee9508ae | |||
| 949915bb66 | |||
| 97522c6f1b | |||
| 225b382e8d | |||
| a1cb22ca55 | |||
| aa56640dae | |||
| 79ef8bc022 | |||
|
|
a3b3d68f60 | ||
|
|
7b53540e17 | ||
|
|
52af20bec8 | ||
|
|
6121fcd25e | ||
|
|
e5be1bebe9 | ||
| f87033dbcb | |||
| 6b7376b45d | |||
| 31c167d212 | |||
| bd2e5366aa | |||
| 935cc9dd2b | |||
| c6f93e586f | |||
| ade322708e | |||
| d6e6843ecb | |||
|
|
3b17cdc519 | ||
|
|
2046b486ee | ||
| 25da31b034 | |||
| 925b3de4f9 | |||
| 20f1b568fa | |||
| 9f2df9b3aa | |||
|
|
de83cc57da | ||
|
|
c32232a388 | ||
| 5c7a82ce0c | |||
| f4542e9ca9 | |||
| aa84769740 | |||
| 75be56f30b | |||
| 64c86783be | |||
| a1860c4f01 | |||
| 8e6ab64ce7 | |||
| 44e3679787 | |||
| 8849e991b2 | |||
| 46d951be4a | |||
| 7b9d7ed741 | |||
| e0ef98ef70 | |||
| 3ac16d6eda | |||
| 6bdd2620ca | |||
| f0fd5c543d | |||
| e59ca5d96c | |||
| 5bf8fbbed7 | |||
| 75917c2e5b | |||
| e9e1d7669f | |||
| 1eb45c714e | |||
| 26dcadc0c0 | |||
|
|
a32651559f | ||
|
|
04a65335dd | ||
|
|
57b4adf408 | ||
| de43201cc3 | |||
| b3cf22ec78 | |||
| 08b33132da | |||
|
|
7720295c0d | ||
|
|
afff92fb55 | ||
|
|
c3d602e585 | ||
|
|
459243bd80 | ||
|
|
6446df21be | ||
|
|
8f06f483ea | ||
|
|
f0c735e90d | ||
|
|
7a404a7d3a | ||
|
|
19e2cece7c | ||
|
|
501a64960c | ||
|
|
68f3d61974 | ||
|
|
6a2db2ee4c | ||
|
|
ad5354f046 | ||
|
|
03e57d8ee2 | ||
| f51fe7f903 | |||
| aac2d52bcc | |||
| b71c948854 | |||
| 46e5f80147 | |||
| 98384809b1 | |||
| 34340136fb | |||
|
|
bcacb3da43 | ||
|
|
b717acb328 | ||
|
|
886a59b5fd | ||
|
|
de6ea9a5db | ||
|
|
018ac4a8cf | ||
| 8301e9365b | |||
| 33ff064300 | |||
| 5f793349fd | |||
| 8f169b0958 | |||
| 17212a5c95 | |||
|
|
877b32c927 | ||
|
|
6f48d30d3e | ||
|
|
d33b4ac5e1 | ||
|
|
306d14246e | ||
|
|
b8b671d82b | ||
|
|
7aa9ccd68a | ||
|
|
540e28db44 | ||
|
|
4a1669941c | ||
|
|
570aaabba3 | ||
|
|
f411a9e9be | ||
|
|
4267612a5e | ||
|
|
53e9b1e714 | ||
|
|
2b37c7a012 | ||
|
|
53de377698 | ||
|
|
ee8e305c57 | ||
| 1997b77b72 | |||
| f9e09f2d49 | |||
| 1d161d315a | |||
|
|
a3e61d044d | ||
|
|
20d1342b74 | ||
|
|
1cb6697cc6 | ||
|
|
30cff06b5d | ||
|
|
595e9216ec | ||
| ad1c9e95f4 | |||
| 5c8862ff97 | |||
| b0baccb508 | |||
| 5a4b1a5194 | |||
| 45217c9e6a | |||
| 8811172d1e | |||
| e880b58eaa | |||
| 8b8a6a8bd5 | |||
|
|
73426259e7 | ||
| 50b61e83b8 | |||
| 1dbea2473b | |||
| 947798609c | |||
|
|
5ee7666af7 | ||
| ca2e8c379c | |||
| b1550815cf | |||
| 501db7bf03 | |||
| 2c7bdb5a74 | |||
| 173562c9d2 | |||
| 5076c5be37 | |||
| e30474c3ac | |||
| 35db42591f | |||
|
|
f4ed8ef352 | ||
|
|
b4f3f7d108 | ||
|
|
ca6261ab57 | ||
| 75d39366e9 | |||
|
|
02e6afbc30 | ||
|
|
2587456ba4 | ||
|
|
88b1daefe2 | ||
|
|
d2952b17d6 | ||
|
|
3d67a78d64 | ||
|
|
9551abe975 | ||
|
|
cb35773c47 | ||
|
|
19e04a76fc | ||
|
|
d6acc9cdb6 | ||
|
|
22b495e037 | ||
|
|
ef7f139dcc | ||
|
|
8c5e61721a | ||
|
|
b056e2b0e3 | ||
| 4fe43aaaed | |||
| e5c5c92723 | |||
|
|
a531c98f45 | ||
|
|
b972359d41 | ||
|
|
f5df7e63f7 | ||
|
|
f19d2bc5b9 | ||
| 8d9ff751cf | |||
|
|
d4c4fb7580 | ||
| b56e1dc181 | |||
|
|
b3a27acca0 | ||
| 97085df811 | |||
| 8f55b3ee94 | |||
|
|
44b399eebd | ||
| 21a9813258 | |||
| 0356a200fc | |||
|
|
34e5cf08a0 | ||
| 668853d3b4 | |||
| 4fb1b4390d | |||
| ae408d7140 | |||
| bf5ce6a241 | |||
| 5a4ba922bd |
@@ -20,9 +20,9 @@ steps:
|
|||||||
- npm -v
|
- npm -v
|
||||||
- mkdir -p ./node_modules
|
- mkdir -p ./node_modules
|
||||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||||
# - npm config set registry https://registry.npmmirror.com
|
# - npm config set registry https://registry.npmmirror.com
|
||||||
- set NODE_OPTIONS=--openssl-legacy-provider
|
# - set NODE_OPTIONS=--openssl-legacy-provider
|
||||||
# - npm install
|
# - npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
- echo $NODE_MODULES_PATH
|
- echo $NODE_MODULES_PATH
|
||||||
- cp -r dist /app/build/$DRONE_REPO_NAME
|
- cp -r dist /app/build/$DRONE_REPO_NAME
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ docker rmi smartopsweb:latest
|
|||||||
echo '----build image start----'
|
echo '----build image start----'
|
||||||
docker build -t smartopsweb:latest .
|
docker build -t smartopsweb:latest .
|
||||||
echo '----build image success----'
|
echo '----build image success----'
|
||||||
docker run --name smartopsweb --restart=always -d -p 8080:80 smartopsweb:latest
|
docker run --name smartopsweb --link smartopsserver --restart=always -d -p 8080:80 smartopsweb:latest
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>智能语音服务系统</title>
|
<title>运维智能语音服务系统</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
14
nginx.conf
14
nginx.conf
@@ -29,6 +29,20 @@ http {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
|
|
||||||
|
location /api {
|
||||||
|
proxy_pass http://smartopsserver:8080;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
rewrite "^/api/(.*)$" /$1 break;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
client_max_body_size 30m;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /home/clay;
|
root /home/clay;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from "@/utils/request.js";
|
import request from "@/utils/request.js";
|
||||||
|
import { method } from "lodash";
|
||||||
|
|
||||||
export const modifyUser=(data)=>{
|
export const modifyUser=(data)=>{
|
||||||
return request({
|
return request({
|
||||||
@@ -9,8 +10,16 @@ export const modifyUser=(data)=>{
|
|||||||
}
|
}
|
||||||
export const editPassword=(data)=>{
|
export const editPassword=(data)=>{
|
||||||
return request({
|
return request({
|
||||||
url:'/admin/mosr/user/update/password',
|
url:'/ops/user/update/password',
|
||||||
method:'post',
|
method:'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询用户详细
|
||||||
|
export const detailsUser=()=>{
|
||||||
|
return request({
|
||||||
|
url:'ops/user/detail/info',
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
36
src/api/phone-traffic-config/index.js
Normal file
36
src/api/phone-traffic-config/index.js
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import request from '@/utils/request.js'
|
||||||
|
|
||||||
|
// 获取参数配置表详情
|
||||||
|
export const getConfigDetails = (configId) => {
|
||||||
|
return request({
|
||||||
|
url: `/extra/config/${configId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增参数配置表
|
||||||
|
export const addConfig = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/extra/config',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改参数配置表
|
||||||
|
export const editConfig = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/extra/config',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除参数配置表
|
||||||
|
export const delConfig =(configIdList) => {
|
||||||
|
return request({
|
||||||
|
url: `/extra/config/${configIdList}`,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
16
src/api/workbench/index.js
Normal file
16
src/api/workbench/index.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import request from '@/utils/request.js'
|
||||||
|
|
||||||
|
//获取历史通话文本记录
|
||||||
|
export const getHistoryCallContent=(params)=>{
|
||||||
|
return request({
|
||||||
|
url:`/text/history/list/${params}`,
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取工作台当前线路记录
|
||||||
|
export const getCurrentContent=(line)=>{
|
||||||
|
return request({
|
||||||
|
url:`/text/records/${line}`,
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
background-color: #418DFF;
|
background-color: #418DFF;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 26px;
|
font-size: 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1,30 +1,109 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import LiveCall from '@/components/liveCall/index.vue'
|
import LiveCallItem from '@/components/liveCall/LiveCallItem.vue'
|
||||||
const dialogVisible = ref(false);
|
import {getHistoryCallContent} from '@/api/workbench';
|
||||||
const open = (row) => {
|
import {ElMessage} from "element-plus";
|
||||||
dialogVisible.value = true;
|
|
||||||
};
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
});
|
|
||||||
|
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
const recordLeftRef = ref(null);
|
||||||
|
const emit = defineEmits(['update:value'])
|
||||||
|
const props = defineProps({
|
||||||
|
value: {
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const open = (row) => {
|
||||||
|
dialogVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const leftHeadData = ref({
|
||||||
|
// username: '张三',
|
||||||
|
// phone: '13546812315',
|
||||||
|
// orderName: '张三工单',
|
||||||
|
})
|
||||||
|
const detailLoading=ref(false)
|
||||||
|
const recordLeftObj = ref({});
|
||||||
|
const _value = computed({
|
||||||
|
get() {
|
||||||
|
return props.value;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
emit("update:value", val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const convertArrayToMap=(array)=> {
|
||||||
|
const map = new Map();
|
||||||
|
array.forEach(item => {
|
||||||
|
// 如果时间戳对应的键已经存在,则添加到现有数组中
|
||||||
|
if (map.has(item.conversationTimestamp)) {
|
||||||
|
map.get(item.conversationTimestamp).push(item);
|
||||||
|
} else {
|
||||||
|
// 否则,创建一个新的数组并添加元素
|
||||||
|
map.set(item.conversationTimestamp, [item]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => props.value, async (newVal) => {
|
||||||
|
if(newVal){
|
||||||
|
|
||||||
|
getHistoryDetail(newVal)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const getHistoryDetail=(newVal)=>{
|
||||||
|
detailLoading.value=true
|
||||||
|
getHistoryCallContent(newVal).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
detailLoading.value=false
|
||||||
|
res.data?.forEach(item => {
|
||||||
|
if( item.textVoList&& item.textVoList.length>0){
|
||||||
|
item.textVoList = convertArrayToMap(item.textVoList);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
recordLeftObj.value = res.data
|
||||||
|
if (res.data && res.data.length > 0) {
|
||||||
|
leftHeadData.value.username = res.data[0].name || '--';
|
||||||
|
leftHeadData.value.phone = res.data[0].callPhone || '--';
|
||||||
|
leftHeadData.value.orderName = res.data[0].orderName || '--';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const scrollToBottom = (scrollbarRef) => {
|
||||||
|
if (scrollbarRef) {
|
||||||
|
const container = scrollbarRef.$el.querySelector('.el-scrollbar__wrap');
|
||||||
|
container.style.scrollBehavior = 'smooth'; // 添加平滑滚动效果
|
||||||
|
container.scrollTop = container.scrollHeight;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
scrollToBottom(recordLeftRef.value)
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="dialogVisible" title="历史通话记录" width="1000" :before-close="handleClose" class="box">
|
<el-dialog v-model="dialogVisible" title="历史通话记录" width="700" class="box">
|
||||||
<LiveCall />
|
<LiveCallItem ref="recordLeftRef" :recordArray="recordLeftObj" :headData="leftHeadData" style="width: 100%;" :detailLoading="detailLoading"/>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="dialogVisible = false">
|
<el-button type="primary" @click="dialogVisible = false">
|
||||||
关闭
|
关闭
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.box{
|
.box {
|
||||||
height: 68vh;
|
/*height: 68vh;*/
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,33 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="live-call">
|
<div class="live-call" v-loading="detailLoading">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div>
|
<div>
|
||||||
<span style="margin-right: 20px">{{ headData.username }}</span>
|
<span style="margin-right: 20px">{{ headData.username }}</span>
|
||||||
<span>{{ headData.phone }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div><span>工单名称:{{ headData.orderName }}</span></div>
|
<div>
|
||||||
|
<span>电话号码:{{ headData.phone ||'--'}}</span>
|
||||||
|
</div>
|
||||||
|
<div><span>工单名称:{{ headData.orderName ||'--'}}</span></div>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar ref="scrollbarRef" class="scrollbar">
|
<el-scrollbar ref="scrollbarRef" class="scrollbar">
|
||||||
<div class="chat-content" ref="innerRef">
|
<div class="chat-content" ref="innerRef">
|
||||||
<div v-for="(item,index) in recordObj.content" :key="index">
|
<div v-for="(item,index) in recordArray" :key="index">
|
||||||
<div class="time-grap"><span>{{ item.conversationTimestamp || '6月5日 12:05' }}</span></div>
|
<div v-for="[key,value] of item.textVoList">
|
||||||
<!-- 我的 -->
|
<div class="time-grap"><span>{{ key || '6月5日 12:05' }}</span></div>
|
||||||
<div v-if="item.speaker==0" class="word-my">
|
<div v-for="(recordItem) in value">
|
||||||
<div class="info">
|
<!-- 我的 -->
|
||||||
<p class="name">{{ item.speaker==0?headData.username:'AI助手' }} </p>
|
<div v-if="recordItem.speaker==0" class="word-my">
|
||||||
<div class="info-content">{{ item.message }}</div>
|
<div class="info">
|
||||||
</div>
|
<p class="name">{{ recordItem.speaker == 0 ? recordItem.name
|
||||||
<el-avatar text="我"/>
|
: '运维助手' }} </p>
|
||||||
</div>
|
<div class="info-content">{{ recordItem.message }}</div>
|
||||||
<!-- 对方 -->
|
</div>
|
||||||
<div v-else class="word">
|
<el-avatar>{{ recordItem.speaker==0?recordItem.name:'运维助手' }}</el-avatar>
|
||||||
<el-avatar text="对方"/>
|
</div>
|
||||||
<div class="info">
|
<!-- 对方 -->
|
||||||
<p class="name">{{ item.speaker==0?headData.username:'AI助手' }} </p>
|
<div v-else class="word">
|
||||||
<div class="info-content">{{ item.message }}</div>
|
<el-avatar>{{ recordItem.speaker==0?recordItem.name:'运维助手' }}</el-avatar>
|
||||||
|
<div class="info">
|
||||||
|
<p class="name">{{ recordItem.speaker == 0 ? recordItem.name
|
||||||
|
: '运维助手' }} </p>
|
||||||
|
<div class="info-content">{{ recordItem.message }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-divider border-style="dotted" v-if="item.textVoList&&item.textVoList.length>0">一轮通话结束~~</el-divider>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <el-empty description="暂无通话记录~" v-if="recordArray"/>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,20 +46,28 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {defineProps} from "vue";
|
import {defineProps} from "vue";
|
||||||
const scrollbarRef=ref()
|
|
||||||
|
const scrollbarRef = ref()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
recordObj: {
|
recordArray: {
|
||||||
type: Object,
|
type: Array,
|
||||||
default: {}
|
default: []
|
||||||
},
|
},
|
||||||
headData: {
|
headData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {}
|
||||||
},
|
},
|
||||||
|
detailLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const getScrollbarRef=()=>{
|
const getScrollbarRef = () => {
|
||||||
return scrollbarRef.value
|
return scrollbarRef.value
|
||||||
}
|
}
|
||||||
|
watch(() => props.detailLoading, (newVal) => {
|
||||||
|
props.detailLoading=newVal
|
||||||
|
})
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getScrollbarRef
|
getScrollbarRef
|
||||||
})
|
})
|
||||||
@@ -56,7 +75,7 @@ defineExpose({
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.live-call {
|
.live-call {
|
||||||
width: 48%;
|
width: 50%;
|
||||||
height: 47vh;
|
height: 47vh;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
235
src/components/liveCall/LiveCallItemHome.vue
Normal file
235
src/components/liveCall/LiveCallItemHome.vue
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
<template>
|
||||||
|
<div class="live-call">
|
||||||
|
<div class="header">
|
||||||
|
<div>
|
||||||
|
<span style="margin-right: 20px">{{ recordObj.name }}</span>
|
||||||
|
<span>电话号码:{{ recordObj.phone ||'--'}}</span>
|
||||||
|
</div>
|
||||||
|
<div><span>工单名称:{{ recordObj.orderName||'--' }}</span></div>
|
||||||
|
<div v-if="recordObj.type"><el-tag>{{ recordObj.type=='1'?'线路一':recordObj.type=='2'?'线路二':'' }}</el-tag></div>
|
||||||
|
<div v-else><el-tag>{{ lineName }}</el-tag></div>
|
||||||
|
</div>
|
||||||
|
<el-scrollbar ref="scrollbarRef" class="scrollbar">
|
||||||
|
<el-empty v-if="recordObj.content?.length==0" description="暂无通话" />
|
||||||
|
<div class="chat-content" ref="innerRef" v-else>
|
||||||
|
<div v-for="(item,index) in recordObj.content" :key="index">
|
||||||
|
<el-divider border-style="dotted" v-if="item.isLine">{{item.lineMsg}}</el-divider>
|
||||||
|
<div v-else>
|
||||||
|
<div class="time-grap"><span>{{ item.conversationTimestamp || '6月5日 12:05' }}</span></div>
|
||||||
|
<!-- 我的 -->
|
||||||
|
<div v-if="item.speaker==0" class="word-my">
|
||||||
|
<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>
|
||||||
|
<el-avatar>{{ item.speaker==0?recordObj.name:'运维助手' }}</el-avatar>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 对方 -->
|
||||||
|
<div v-else class="word">
|
||||||
|
<el-avatar > {{ item.speaker==0?recordObj.name:'运维助手' }} </el-avatar>
|
||||||
|
<div class="info">
|
||||||
|
<p class="name">{{ item.speaker==0?recordObj.name:'运维助手' }} </p>
|
||||||
|
<div class="info-content">{{ item.message }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <el-empty description="暂无通话记录~" v-else/>-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineProps} from "vue";
|
||||||
|
const scrollbarRef=ref()
|
||||||
|
const props = defineProps({
|
||||||
|
recordObj: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
headData: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
lineName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const getScrollbarRef=()=>{
|
||||||
|
return scrollbarRef.value
|
||||||
|
}
|
||||||
|
const handleShowDeadLine=(recordObj)=>{
|
||||||
|
console.info("🚀 ~method:'recordObj' -----", recordObj)
|
||||||
|
let flag=false
|
||||||
|
if(recordObj.content&&recordObj.content.length>1){
|
||||||
|
let indices = recordObj.content.reduce(function (r, v, i) {
|
||||||
|
return r.concat(v === 'a' ? i : []);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
console.log(indices);
|
||||||
|
|
||||||
|
recordObj.content.forEach((item,index)=>{
|
||||||
|
console.info("🚀 ~method:.callIdNumber -----",recordObj.content.findIndex(item=>item.callIdNumber), item.callIdNumber)
|
||||||
|
flag=recordObj.content[recordObj.content.length-2]?.callIdNumber!=recordObj.content[recordObj.content.length-1].callIdNumber
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
getScrollbarRef
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.live-call {
|
||||||
|
width: 48%;
|
||||||
|
height: 47vh;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #d5d4d4;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
height: 40px;
|
||||||
|
border-bottom: 1px solid #d5d4d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollbar {
|
||||||
|
padding: 10px 10px 0 10px;
|
||||||
|
height: 42vh;
|
||||||
|
|
||||||
|
.el-scrollbar__wrap {
|
||||||
|
height: 100%;
|
||||||
|
overflow: scroll;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 聊天内容样式
|
||||||
|
.chat-content {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.time-grap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
> span {
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
border: 1px solid #d7d9da;
|
||||||
|
border-radius: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.word {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 12px;
|
||||||
|
color: rgba(51, 51, 51, 0.8);
|
||||||
|
margin: 0;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-top: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-content {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
position: relative;
|
||||||
|
margin-top: 8px;
|
||||||
|
border: 1px solid #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
//小三角形
|
||||||
|
.info-content::before {
|
||||||
|
position: absolute;
|
||||||
|
left: -8px;
|
||||||
|
top: 8px;
|
||||||
|
content: '';
|
||||||
|
border-right: 10px solid #f5f5f5;
|
||||||
|
border-top: 8px solid transparent;
|
||||||
|
border-bottom: 8px solid transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.word-my {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
width: 90%;
|
||||||
|
margin-left: 10px;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 12px;
|
||||||
|
color: rgba(51, 51, 51, 0.8);
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-top: -5px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-content {
|
||||||
|
max-width: 70%;
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 10px;
|
||||||
|
position: relative;
|
||||||
|
margin-top: 8px;
|
||||||
|
background: #A3C3F6;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
//小三角形
|
||||||
|
.info-content::after {
|
||||||
|
position: absolute;
|
||||||
|
right: -8px;
|
||||||
|
top: 8px;
|
||||||
|
content: '';
|
||||||
|
border-left: 10px solid #A3C3F6;
|
||||||
|
border-top: 8px solid transparent;
|
||||||
|
border-bottom: 8px solid transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,87 +1,69 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--测试 张三 : 17260625724565 李四: 17260625724123-->
|
<!--测试 张三 : 17260625724565 李四: 17260625724123-->
|
||||||
<div class="live-call-block">
|
<div class="live-call-block">
|
||||||
<live-call-item ref="recordLeftRef" :recordObj="recordLeftObj" :headData="leftHeadData" />
|
<live-call-item-home ref="recordLeftRef" :recordObj="recordLeftObj" :headData="leftHeadData" lineName="线路一"/>
|
||||||
<live-call-item ref="recordRightRef" :recordObj="recordRightObj" :headData="rightHeadData" />
|
<live-call-item-home ref="recordRightRef" :recordObj="recordRightObj" :headData="rightHeadData" lineName="线路二"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import {getToken} from '@/utils/auth'
|
import {getToken} from '@/utils/auth'
|
||||||
|
import {usePermisstionStroe} from '@/stores/permisstion'
|
||||||
|
import {getCurrentContent} from "@/api/workbench";
|
||||||
|
|
||||||
|
const permisstionStore = usePermisstionStroe()
|
||||||
|
const authStore = useAuthStore()
|
||||||
//聊天消息滚动面板dom
|
//聊天消息滚动面板dom
|
||||||
const recordLeftRef = ref(null);
|
const recordLeftRef = ref(null);
|
||||||
const recordRightRef = ref(null);
|
const recordRightRef = ref(null);
|
||||||
const leftHeadData=ref({
|
const leftHeadData = ref({
|
||||||
username:'张三',
|
// username: '张三',
|
||||||
phone:'13546812315',
|
// phone: '13546812315',
|
||||||
orderName:'张三工单',
|
// orderName: '张三工单',
|
||||||
})
|
})
|
||||||
const rightHeadData=ref({
|
const rightHeadData = ref({
|
||||||
username:'李四',
|
// username: '李四',
|
||||||
phone:'18246812546',
|
// phone: '18246812546',
|
||||||
orderName:'李四工单',
|
// orderName: '李四工单',
|
||||||
})
|
})
|
||||||
const recordLeftObj = ref({
|
const recordLeftObj = ref({
|
||||||
content:[]
|
content: []
|
||||||
}
|
})
|
||||||
// {
|
|
||||||
// "callIdNumber": "17260625724565",
|
|
||||||
// "content": [{
|
|
||||||
// "callIdNumber": "17260625724565",
|
|
||||||
// "conversationId": 0,
|
|
||||||
// "conversationTimestamp": "2024-09-15 12:10",
|
|
||||||
// "createTime": "2024-09-16",
|
|
||||||
// "message": "你好11",
|
|
||||||
// "speaker": "1"
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "callIdNumber": "17260625724565",
|
|
||||||
// "conversationId": 0,
|
|
||||||
// "conversationTimestamp": "2024-09-15 16:10",
|
|
||||||
// "createTime": "2024-09-16",
|
|
||||||
// "message": "你好好11!",
|
|
||||||
// "speaker": "0"
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// "name": "",
|
|
||||||
// "phone": "",
|
|
||||||
// "timestamp": "1726416597958",
|
|
||||||
// "type": "1"
|
|
||||||
// }
|
|
||||||
)
|
|
||||||
const recordRightObj = ref({
|
const recordRightObj = ref({
|
||||||
content:[]
|
content: []
|
||||||
}
|
})
|
||||||
// {
|
|
||||||
// "callIdNumber": "17260625724123",
|
|
||||||
// "content": [{
|
|
||||||
// "callIdNumber": "17260625724123",
|
|
||||||
// "conversationId": 0,
|
|
||||||
// "conversationTimestamp": "2024-09-15 12:10",
|
|
||||||
// "createTime": "2024-09-16",
|
|
||||||
// "message": "你好22",
|
|
||||||
// "speaker": "1"
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "callIdNumber": "17260625724123",
|
|
||||||
// "conversationId": 0,
|
|
||||||
// "conversationTimestamp": "2024-09-15 16:10",
|
|
||||||
// "createTime": "2024-09-16",
|
|
||||||
// "message": "你好好222!",
|
|
||||||
// "speaker": "0"
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// "name": "",
|
|
||||||
// "phone": "",
|
|
||||||
// "timestamp": "1726416597958",
|
|
||||||
// "type": "2"
|
|
||||||
// }
|
|
||||||
)
|
|
||||||
let socket = reactive("");
|
let socket = reactive("");
|
||||||
let token = getToken();
|
let token = getToken();
|
||||||
let send = {
|
let send = {
|
||||||
type: "ping",
|
type: "ping",
|
||||||
};
|
};
|
||||||
|
// if(localStorage.getItem('recordLeftObj')){
|
||||||
|
// recordLeftObj.value=JSON.parse(localStorage.getItem('recordLeftObj'))
|
||||||
|
// }
|
||||||
|
// if(localStorage.getItem('recordRightObj')){
|
||||||
|
// recordRightObj.value=JSON.parse(localStorage.getItem('recordRightObj'))
|
||||||
|
// }
|
||||||
|
const getCurrentMsg=(line)=>{
|
||||||
|
getCurrentContent(line).then(res=>{
|
||||||
|
// console.info("🚀 ~method:res -----", res)
|
||||||
|
if(line==1){
|
||||||
|
recordLeftObj.value.name=res.data.name
|
||||||
|
recordLeftObj.value.phone=res.data.callPhone
|
||||||
|
recordLeftObj.value.orderName=res.data.orderName
|
||||||
|
recordLeftObj.value.type=res.data.type
|
||||||
|
recordLeftObj.value.content=res.data.textVoList||[]
|
||||||
|
}else if(line==2){
|
||||||
|
recordRightObj.value.name=res.data.name
|
||||||
|
recordRightObj.value.phone=res.data.callPhone
|
||||||
|
recordRightObj.value.orderName=res.data.orderName
|
||||||
|
recordRightObj.value.type=res.data.type
|
||||||
|
recordRightObj.value.content=res.data.textVoList||[]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getCurrentMsg(1)
|
||||||
|
getCurrentMsg(2)
|
||||||
//滚动面板自动滑动到底部
|
//滚动面板自动滑动到底部
|
||||||
const scrollToBottom = (scrollbarRef) => {
|
const scrollToBottom = (scrollbarRef) => {
|
||||||
if (scrollbarRef) {
|
if (scrollbarRef) {
|
||||||
@@ -93,12 +75,26 @@ const scrollToBottom = (scrollbarRef) => {
|
|||||||
|
|
||||||
|
|
||||||
const setWsUrl = (url) => {
|
const setWsUrl = (url) => {
|
||||||
return (window.location.protocol === 'http:' ? "ws://" : "wss://") + window.location.host + import.meta.env.VITE_BASE_WSURL + url;
|
return (window.location.protocol === 'http:' ? "ws://" : "wss://") + window.location.host + import.meta.env.VITE_BASE_URL + url;
|
||||||
|
}
|
||||||
|
const handleLogout = () => {
|
||||||
|
authStore.userLogout()
|
||||||
|
permisstionStore.removeMenu()
|
||||||
|
router.push('/login')
|
||||||
|
}
|
||||||
|
const handleShowDeadLine=(recordObj,data)=>{
|
||||||
|
let flag=false
|
||||||
|
if(recordObj.content&&recordObj.content.length>0){
|
||||||
|
flag=recordObj.content[recordObj.content.length-1]?.callIdNumber!=data.callIdNumber
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
}
|
}
|
||||||
const initWebSocket = () => {
|
const initWebSocket = () => {
|
||||||
try {
|
try {
|
||||||
// const wsUrl=setWsUrl(`/ws/text/${token}`)
|
// const wsUrl=setWsUrl(`/ws/text/${token}`)
|
||||||
const wsUrl = `ws://frp.feashow.cn:31800/ws/text/${token}`
|
// const wsUrl = `ws://frp.feashow.cn:31800/ws/text/${token}`
|
||||||
|
// const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}`
|
||||||
|
const wsUrl = `ws://192.168.1.71:88/ws/text/${token}`
|
||||||
socket = new WebSocket(wsUrl)
|
socket = new WebSocket(wsUrl)
|
||||||
// 2. ws.send()给服务器发送信息
|
// 2. ws.send()给服务器发送信息
|
||||||
//连接发生错误的回调方法
|
//连接发生错误的回调方法
|
||||||
@@ -119,31 +115,65 @@ const initWebSocket = () => {
|
|||||||
socket.onmessage = function (event) {
|
socket.onmessage = function (event) {
|
||||||
let data = JSON.parse(event.data)
|
let data = JSON.parse(event.data)
|
||||||
if (data.type !== 'pong') {
|
if (data.type !== 'pong') {
|
||||||
|
if (data.type === 'error') {
|
||||||
|
handleLogout()
|
||||||
|
return;
|
||||||
|
} else if (data.type === 'failed') {
|
||||||
|
initWebSocket()
|
||||||
|
return;
|
||||||
|
}
|
||||||
console.log("服务器返回的信息: ", data);
|
console.log("服务器返回的信息: ", data);
|
||||||
if(data.type=='1'){
|
if (data.type == '1') {
|
||||||
recordLeftObj.value.content.push(data.content)
|
recordLeftObj.value.name=data.name
|
||||||
console.info("🚀 ~method:onmessage -----", recordLeftObj.value)
|
recordLeftObj.value.phone=data.phone
|
||||||
|
recordLeftObj.value.type=data.type
|
||||||
|
recordLeftObj.value.orderName=data.orderName
|
||||||
|
let flag=handleShowDeadLine(recordLeftObj.value,data)
|
||||||
|
console.info("🚀 ~method:flag -----", flag)
|
||||||
|
if(flag){
|
||||||
|
recordLeftObj.value.content.push({
|
||||||
|
isLine:true,
|
||||||
|
lineMsg: "一轮通话结束~~",
|
||||||
|
speaker: data.content.speaker
|
||||||
|
})
|
||||||
|
}
|
||||||
|
recordLeftObj.value.content.push(data.content)
|
||||||
|
localStorage.setItem('recordLeftObj',JSON.stringify(recordLeftObj.value))
|
||||||
|
// console.info("🚀 ~method:onmessage -----", recordLeftObj.value)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
scrollToBottom(recordLeftRef.value)
|
scrollToBottom(recordLeftRef.value)
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
recordRightObj.value.content.push(data.content)
|
recordRightObj.value.name=data.name
|
||||||
console.info("🚀 ~method:onmessage -----", recordRightObj.value)
|
recordRightObj.value.phone=data.phone
|
||||||
|
recordRightObj.value.type=data.type
|
||||||
|
recordRightObj.value.orderName=data.orderName
|
||||||
|
let flag=handleShowDeadLine(recordRightObj.value,data)
|
||||||
|
console.info("🚀 ~method:flag -----", flag)
|
||||||
|
if(flag){
|
||||||
|
recordRightObj.value.content.push({
|
||||||
|
isLine:true,
|
||||||
|
lineMsg: "一轮通话结束~~",
|
||||||
|
speaker: data.content.speaker
|
||||||
|
})
|
||||||
|
}
|
||||||
|
recordRightObj.value.content.push(data.content)
|
||||||
|
// console.info("🚀 ~method:onmessage -----", recordRightObj.value)
|
||||||
|
localStorage.setItem('recordRightObj',JSON.stringify(recordRightObj.value))
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
scrollToBottom(recordRightRef.value);
|
scrollToBottom(recordRightRef.value);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//连接关闭的回调方法
|
//连接关闭的回调方法
|
||||||
socket.onclose = function () {
|
socket.onclose = function () {
|
||||||
initWebSocket()
|
// initWebSocket()
|
||||||
console.log("ws连接关闭");
|
console.log("ws连接关闭");
|
||||||
}
|
}
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
socket.send(JSON.stringify(send))
|
socket.send(JSON.stringify(send))
|
||||||
}, 10000)
|
}, 5000)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
console.log("ws连接失败");
|
console.log("ws连接失败");
|
||||||
|
|||||||
@@ -3,15 +3,23 @@ const dialogVisible = ref(false);
|
|||||||
const open = (row) => {
|
const open = (row) => {
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
};
|
};
|
||||||
|
// console.log(dialogVisible.value);
|
||||||
|
defineProps({
|
||||||
|
title:String,
|
||||||
|
rowUrl:String
|
||||||
|
})
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// console.log(props.rowUrl);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="dialogVisible" title="语音详情" width="500" :before-close="handleClose">
|
<el-dialog v-model="dialogVisible" :title="title" width="500" >
|
||||||
<audio src="" controls style="width: 100%;"></audio>
|
<audio :src=rowUrl controls style="width: 100%;"></audio>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,11 @@ const props = defineProps({
|
|||||||
isSettingCol: {
|
isSettingCol: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
//表格是否刷新
|
||||||
|
isLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -217,7 +222,7 @@ 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 = true
|
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)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="logo" ref="logo">
|
<div class="logo" ref="logo">
|
||||||
<span v-if="!siderbarStore.isCollapse">智能语音服务</span>
|
<span v-if="!siderbarStore.isCollapse">运维智能语音服务系统</span>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar :height="`calc(100vh - ${logoHeight}px)`" style="background-color: #ffffff">
|
<el-scrollbar :height="`calc(100vh - ${logoHeight}px)`" style="background-color: #ffffff">
|
||||||
<el-menu
|
<el-menu
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ init()
|
|||||||
.link-box {
|
.link-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
line-height: 30px;
|
line-height: 34px;
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ export const setAuthInfo = (info) => {
|
|||||||
|
|
||||||
export const removeAuthInfo = () => {
|
export const removeAuthInfo = () => {
|
||||||
return Cookies.remove('authinfo')
|
return Cookies.remove('authinfo')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { getToken, removeToken } from "./auth";
|
|||||||
axios.defaults.headers['Content-Type']='application/json'
|
axios.defaults.headers['Content-Type']='application/json'
|
||||||
console.log(import.meta.env.VITE_BASE_URL);
|
console.log(import.meta.env.VITE_BASE_URL);
|
||||||
|
|
||||||
|
|
||||||
const serveice = axios.create({
|
const serveice = axios.create({
|
||||||
baseURL: import.meta.env.VITE_BASE_URL,
|
baseURL: import.meta.env.VITE_BASE_URL,
|
||||||
timeout: 6000
|
timeout: 6000
|
||||||
@@ -50,8 +51,9 @@ serveice.interceptors.response.use(response=>{
|
|||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
removeToken()
|
removeToken()
|
||||||
window.location = '/login'
|
window.location = '/login'
|
||||||
|
return Promise.reject('会话已过期,请重新登录')
|
||||||
})
|
})
|
||||||
return Promise.reject('会话已过期,请重新登录')
|
break;
|
||||||
case 402:
|
case 402:
|
||||||
break;
|
break;
|
||||||
case 403:
|
case 403:
|
||||||
|
|||||||
@@ -20,10 +20,11 @@
|
|||||||
<User />
|
<User />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<strong>工号 :</strong>
|
<strong>工号 :</strong>
|
||||||
|
<!-- <p>{{ userInfo.orderNum }}</p> -->
|
||||||
|
<div class="box-info">{{ userParams.userNumber||'--' }}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>{{ userParams.userNumber }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="userInfo_item">
|
<div class="userInfo_item">
|
||||||
<div style="display: flex;align-items: center" class="userInfo_label">
|
<div style="display: flex;align-items: center" class="userInfo_label">
|
||||||
@@ -31,18 +32,18 @@
|
|||||||
<Notification />
|
<Notification />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<strong>邮箱 :</strong>
|
<strong>邮箱 :</strong>
|
||||||
|
<div class="box-info">{{ userParams.email||'--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ userParams.email }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="userInfo_item">
|
<div class="userInfo_item">
|
||||||
<div style="display: flex;align-items: center" class="userInfo_label">
|
<div style="display: flex;align-items: center" class="userInfo_label">
|
||||||
<el-icon size="18" style="margin-right: 5px">
|
<el-icon size="18" style="margin-right: 5px">
|
||||||
<Notification />
|
<Notification />
|
||||||
</el-icon><strong>登录账号 :</strong>
|
</el-icon><strong>登录账号 :</strong>
|
||||||
|
<div class="box-info">{{ userParams.loginAccount||'--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ userParams.loginAccount }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="userInfo_item">
|
<div class="userInfo_item">
|
||||||
<div style="display: flex;align-items: center" class="userInfo_label">
|
<div style="display: flex;align-items: center" class="userInfo_label">
|
||||||
@@ -50,9 +51,9 @@
|
|||||||
<Folder />
|
<Folder />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<strong>用户名称 :</strong>
|
<strong>用户名称 :</strong>
|
||||||
|
<div class="box-info">{{ userParams.userName||'--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ userParams.userName }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="userInfo_item">
|
<div class="userInfo_item">
|
||||||
<div style="display: flex;align-items: center" class="userInfo_label">
|
<div style="display: flex;align-items: center" class="userInfo_label">
|
||||||
@@ -60,9 +61,9 @@
|
|||||||
<Folder />
|
<Folder />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<strong>手机号码 :</strong>
|
<strong>手机号码 :</strong>
|
||||||
|
<div class="box-info">{{ userParams.phoneNumber||'--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ userParams.userPhone }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="userInfo_item">
|
<div class="userInfo_item">
|
||||||
<div style="display: flex;align-items: center" class="userInfo_label">
|
<div style="display: flex;align-items: center" class="userInfo_label">
|
||||||
@@ -70,9 +71,9 @@
|
|||||||
<Folder />
|
<Folder />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<strong>账号类型 :</strong>
|
<strong>账号类型 :</strong>
|
||||||
|
<div class="box-info">{{ userParams.remark||'--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ userParams.accountType }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -122,7 +123,8 @@ import { ElNotification } from 'element-plus'
|
|||||||
import { useTagsView } from '@/stores/tagsview.js'
|
import { useTagsView } from '@/stores/tagsview.js'
|
||||||
import { editPassword } from "@/api/auth/auth";
|
import { editPassword } from "@/api/auth/auth";
|
||||||
import { Lock } from '@element-plus/icons-vue'
|
import { Lock } from '@element-plus/icons-vue'
|
||||||
import { ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
import { detailsUser } from '@/api/auth/auth';
|
||||||
|
|
||||||
const infoWidth = ref(22)
|
const infoWidth = ref(22)
|
||||||
const isShowDiv = ref(true)
|
const isShowDiv = ref(true)
|
||||||
@@ -138,6 +140,18 @@ const userPassword = ref({
|
|||||||
});
|
});
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
|
|
||||||
|
const getUserInfo= async ()=>{
|
||||||
|
const res= await detailsUser()
|
||||||
|
userParams.value=res.data.user
|
||||||
|
console.log(userParams.value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getUserInfo()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const validatePasswordComplexity = (rule, value, callback) => {
|
const validatePasswordComplexity = (rule, value, callback) => {
|
||||||
const reg = /^(?=.*[a-zA-Z])(?=.*\d).{1,9}$/; //密码必须是至少包含字母、数字,1-9位
|
const reg = /^(?=.*[a-zA-Z])(?=.*\d).{1,9}$/; //密码必须是至少包含字母、数字,1-9位
|
||||||
if (!reg.test(value)) {
|
if (!reg.test(value)) {
|
||||||
@@ -191,7 +205,19 @@ const belongToRole = (roles) => {
|
|||||||
|
|
||||||
// 修改密码
|
// 修改密码
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
ElMessageBox.confirm(
|
// console.log(userPassword.value);
|
||||||
|
await passwordRef.value.validate()
|
||||||
|
editPassword({
|
||||||
|
...userPassword.value
|
||||||
|
}).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
passwordRef.value.resetFields()
|
||||||
|
ElMessageBox.confirm(
|
||||||
'提交成功',
|
'提交成功',
|
||||||
{
|
{
|
||||||
confirmButtonText: '关闭',
|
confirmButtonText: '关闭',
|
||||||
@@ -209,16 +235,6 @@ const handleSubmit = async () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
editPassword({
|
|
||||||
...userPassword.value
|
|
||||||
}).then(res => {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if (res.code === 1000) {
|
|
||||||
passwordRef.value.resetFields()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -321,6 +337,12 @@ div {
|
|||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
border-color: #daddd2;
|
border-color: #daddd2;
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
|
|
||||||
|
.box-info{
|
||||||
|
// background-color: red;
|
||||||
|
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -4,10 +4,11 @@
|
|||||||
<div class="real-time-call">
|
<div class="real-time-call">
|
||||||
<LiveCall />
|
<LiveCall />
|
||||||
</div>
|
</div>
|
||||||
<div class="call-history"><h3 >历史通话记录</h3>
|
<div class="call-history">
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
<h3>历史通话记录</h3>
|
||||||
<voice ref="voiceRef" />
|
<fvTable ref="tableIns" :tableConfig="tableConfig" :isLoading="isLoading"></fvTable>
|
||||||
<infoLiveCall ref="infoLiveCallRef"/>
|
<voice ref="voiceRef" title="语音详情" :rowUrl="rowUrl" />
|
||||||
|
<infoLiveCall ref="infoLiveCallRef" v-model:value="orderNumber" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -16,68 +17,67 @@
|
|||||||
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'
|
||||||
const infoLiveCallRef=ref()
|
const orderNumber = ref('')
|
||||||
const voiceRef=ref()
|
const rowUrl = ref()
|
||||||
|
const infoLiveCallRef = ref()
|
||||||
|
const isLoading = ref(false)
|
||||||
|
const voiceRef = ref()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const mockData = ref([
|
|
||||||
{
|
|
||||||
workOrderNumber: 1211,
|
|
||||||
workOrderTime: '2022-02-09 00 : 12',
|
|
||||||
state: 0,
|
|
||||||
callState: '01'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
workOrderNumber: 232,
|
|
||||||
state: 1,
|
|
||||||
callState: '02'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
const auths = reactive({
|
const auths = reactive({
|
||||||
report: ['mosr:collect:reported'],
|
record: ['order:dialogue:list'],
|
||||||
})
|
})
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
prop: 'index',
|
prop: 'index',
|
||||||
type: 'index',
|
type: 'index',
|
||||||
label: '工单号',
|
label: '序号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'orderNumber',
|
||||||
|
label: '工单号',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'orderName',
|
||||||
label: '工单名称',
|
label: '工单名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'orderContent',
|
||||||
label: '工单内容',
|
label: '工单内容',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'operationUser',
|
||||||
|
// prop: 'destinationName',
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'knotter',
|
||||||
|
// prop: 'destinationName',
|
||||||
label: '关单人',
|
label: '关单人',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'destinationName',
|
||||||
|
// prop: 'workOrderNumber',
|
||||||
label: '用户名',
|
label: '用户名',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'destinationNumber',
|
||||||
label: '号码',
|
label: '电话号码',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'callState',
|
prop: 'callState',
|
||||||
label: '电话拨打状态',
|
label: '电话拨打状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
if (row.callState !== null) {
|
if (row.callState !== null) {
|
||||||
@@ -88,7 +88,8 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderTime',
|
prop: 'createdTime',
|
||||||
|
// prop: 'workOrderTime',
|
||||||
label: '拨打时间',
|
label: '拨打时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
@@ -102,21 +103,26 @@ const tableConfig = reactive({
|
|||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
// console.log(row);
|
// console.log(row);
|
||||||
let btn = []
|
let btn = []
|
||||||
btn.push({ label: '播放语音', prem: auths.detail, func: () => handleVoice(row), type: 'primary' })
|
btn.push({ label: '播放语音', func: () => handleVoice(row), type: 'primary' })
|
||||||
btn.push({ label: '通话记录', prem: auths.detail, func: () => handleInfo(row), type: 'primary' })
|
btn.push({ label: '通话记录', prem: auths.record, func: () => handleInfo(row), type: 'primary' })
|
||||||
return (
|
return (
|
||||||
<div style={{ width: '100%' }}>
|
<div style={{ width: '100%' }}>
|
||||||
{
|
{
|
||||||
btn.map(item => (
|
btn.map(item => (
|
||||||
<>
|
item.prem?
|
||||||
<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>
|
||||||
</>
|
: <el-button
|
||||||
|
type={item.type}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</div >
|
</div >
|
||||||
@@ -124,21 +130,35 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '',
|
api: '/order/list',
|
||||||
params: {},
|
params: {
|
||||||
btns: [
|
}
|
||||||
// {name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
const handleVoice = (row) => {
|
const handleVoice = (row) => {
|
||||||
voiceRef.value.open(true)
|
if (row.recordUrl !== null) {
|
||||||
|
voiceRef.value.open(true)
|
||||||
|
rowUrl.value = row.recordUrl
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
message: '暂无语音',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
const handleInfo = (row) => {
|
const handleInfo = (row) => {
|
||||||
infoLiveCallRef.value.open(true)
|
orderNumber.value = row.orderNumber
|
||||||
|
infoLiveCallRef.value.open()
|
||||||
}
|
}
|
||||||
|
window.setInterval(() => {
|
||||||
|
setTimeout(tableIns.value.refresh(), 0)
|
||||||
|
}, 2000)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-table--fit){
|
||||||
|
min-height: 180px;
|
||||||
|
}
|
||||||
.home {
|
.home {
|
||||||
.real-time-call {
|
.real-time-call {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="70px"
|
label-width="70px"
|
||||||
>
|
>
|
||||||
<h3>智能语音服务系统</h3>
|
<h3>运维智能语音服务系统</h3>
|
||||||
<el-form-item prop="username" label="账号">
|
<el-form-item prop="username" label="账号">
|
||||||
<el-input v-model="loginForm.username" :prefix-icon="User" ></el-input>
|
<el-input v-model="loginForm.username" :prefix-icon="User" ></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -35,8 +35,10 @@ import { User,Lock, Key } from '@element-plus/icons-vue'
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const loginForm = reactive({
|
const loginForm = reactive({
|
||||||
username: 'admin',
|
username: '',
|
||||||
password: '123456',
|
password: '',
|
||||||
|
// username: 'admin',
|
||||||
|
// password: '123456',
|
||||||
code: '',
|
code: '',
|
||||||
uuid: ''
|
uuid: ''
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
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} from "@/api/address-book";
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {reactive} from "vue";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
@@ -152,6 +153,11 @@ const searchConfig = reactive([
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
const auths = reactive({
|
||||||
|
add: ['order:contacts:add'],
|
||||||
|
edit: ['order:contacts:edit'],
|
||||||
|
delete: ['order:contacts:del'],
|
||||||
|
})
|
||||||
const addressBookTableConfig = reactive({
|
const addressBookTableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -207,15 +213,15 @@ const addressBookTableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = []
|
let btn = []
|
||||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||||
btn.push({label: '删除', 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%'}}>
|
||||||
{
|
{
|
||||||
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
|
||||||
>
|
>
|
||||||
@@ -231,8 +237,8 @@ const addressBookTableConfig = reactive({
|
|||||||
api: '/contact/list',
|
api: '/contact/list',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add', type: 'primary'},
|
{name: '新增', key: 'add', type: 'primary' , auth: auths.add},
|
||||||
{name: '删除', key: 'delete', type: 'danger'},
|
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const searchAddressBook = (val) => {
|
const searchAddressBook = (val) => {
|
||||||
@@ -277,13 +283,13 @@ const handleEdit = (row) => {
|
|||||||
const getDetail = (row) => {
|
const getDetail = (row) => {
|
||||||
getContactDetail(row.contactsId).then(res => {
|
getContactDetail(row.contactsId).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||||
// 清空校验
|
// 清空校验
|
||||||
formDialogRef.value.getFormInstance().clearValidate()
|
formDialogRef.value.getFormInstance().clearValidate()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,72 +1,147 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search">
|
<fvSearchForm :searchConfig="searchConfig" @search="searchPhoneTraffic"></fvSearchForm>
|
||||||
</fvSearchForm>
|
<fvTable ref="tableIns" :tableConfig="phoneTrafficTableConfig" @headBtnClick="headBtnClick" @selectionChange="selectionChange"></fvTable>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
||||||
|
:form-schema="formSchema" :form-rules="formRules"
|
||||||
|
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import { shallowRef } from 'vue';
|
import {reactive, shallowRef} from 'vue';
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {addConfig, delConfig, editConfig, getConfigDetails} from "@/api/phone-traffic-config";
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const mockData = ref([
|
const formDialogRef = ref()
|
||||||
{
|
const extraConfigType = ref(0)
|
||||||
workOrderNumber: 1211,
|
const contactIds = ref("");
|
||||||
workOrderTime: '2022-02-09 00 : 12',
|
const dialogTitle = ref("");
|
||||||
state: 0,
|
const dialogType = ref("");
|
||||||
callState: 0
|
const formRules = reactive({
|
||||||
},
|
configName: [
|
||||||
{
|
{required: true, message: "参数名称不能为空", trigger: "blur"},
|
||||||
workOrderNumber: 232,
|
],
|
||||||
state: 1,
|
configKey: [
|
||||||
callState: 1
|
{required: true, message: "参数键名不能为空", trigger: "blur"},
|
||||||
}
|
],
|
||||||
])
|
configValue: [
|
||||||
|
{required: true, message: "参数键值不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
configType: [
|
||||||
|
{required: true, message: "系统内置不能为空", trigger: "change"},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const formSchema = computed(() => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '参数名称',
|
||||||
|
prop: 'configName',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入参数名称',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '参数键名',
|
||||||
|
prop: 'configKey',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入参数键名',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '参数键值',
|
||||||
|
prop: 'configValue',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入参数键值',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '系统内置',
|
||||||
|
prop: 'configType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择系统内置',
|
||||||
|
cacheKey: 'yes_no',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
prop: 'remark',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入备注',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '配置ID',
|
label: '参数名称',
|
||||||
prop: 'requirementName',
|
prop: 'configName',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入配置ID查询',
|
placeholder: '请输入参数名称查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '名称',
|
label: '参数键名',
|
||||||
prop: 'requirementName',
|
prop: 'configKey',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称查询',
|
placeholder: '请输入参数键名查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '系统内置',
|
||||||
prop: 'requirementName',
|
prop: 'configType',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择状态查询',
|
placeholder: '请选择系统内置查询',
|
||||||
cacheKey: 'work_order_status',
|
cacheKey: 'yes_no',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '创建日期',
|
|
||||||
prop: 'requirementName',
|
|
||||||
props: {
|
|
||||||
placeholder: '请选择',
|
|
||||||
clearable: true,
|
|
||||||
checkStrictly: true
|
|
||||||
},
|
|
||||||
component: 'el-date-picker',
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const tableConfig = reactive({
|
const auths = reactive({
|
||||||
|
add: ['extra:config:add'],
|
||||||
|
edit: ['extra:config:edit'],
|
||||||
|
delete: ['extra:config:del'],
|
||||||
|
})
|
||||||
|
const phoneTrafficTableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
|
// {
|
||||||
|
// type: 'selection',
|
||||||
|
// prop: 'selection'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'index',
|
prop: 'index',
|
||||||
type: 'index',
|
type: 'index',
|
||||||
@@ -75,62 +150,206 @@ const tableConfig = reactive({
|
|||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configName',
|
||||||
label: '配置ID',
|
label: '参数名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configKey',
|
||||||
label: '名称',
|
label: '参数键名',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configValue',
|
||||||
label: '类型',
|
label: '参数键值',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configType',
|
||||||
label: '内容',
|
label: '系统内置',
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'state',
|
|
||||||
label: '状态',
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
if (row.state !== null) {
|
if (row.configType !== null) {
|
||||||
return (<Tag dictType={'work_order_status'} value={row.state} />)
|
return (<Tag dictType={'yes_no'} value={row.configType} />)
|
||||||
} else {
|
} else {
|
||||||
return '--'
|
return '--'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'workOrderTime',
|
// prop: 'workOrderTime',
|
||||||
label: '创建时间',
|
// label: '创建时间',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 200
|
// width: 200
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
label: '备注',
|
label: '备注',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
},
|
||||||
|
{
|
||||||
|
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: '',
|
api: '/extra/config',
|
||||||
params: {},
|
params: {
|
||||||
|
extraConfigType:extraConfigType.value
|
||||||
|
},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
{name: '新增', key: 'add',type:'primary', auth: auths.add},
|
||||||
|
// {name: '删除', key: 'delete', type: 'danger'},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
const searchPhoneTraffic = (val) => {
|
||||||
|
let obj = {...val,extraConfigType:extraConfigType.value}
|
||||||
|
if (obj.dateValue) {
|
||||||
|
obj.startTime = obj.dateValue[0]
|
||||||
|
obj.endTime = obj.dateValue[1]
|
||||||
|
delete obj.dateValue
|
||||||
|
}
|
||||||
|
phoneTrafficTableConfig.params = obj
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
const headBtnClick = (key) => {
|
const headBtnClick = (key) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'add':
|
case 'add':
|
||||||
handleAdd()
|
handleAdd()
|
||||||
break;
|
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) => {
|
||||||
|
getConfigDetails(row.configId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
res.data.configType=''+res.data.configType
|
||||||
|
nextTick(() => {
|
||||||
|
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||||
|
// 清空校验
|
||||||
|
formDialogRef.value.getFormInstance().clearValidate()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectionChange = (selection) => {
|
||||||
|
if (selection.length !== 0) {
|
||||||
|
contactIds.value = selection.map(item => item.configId).join()
|
||||||
|
} else {
|
||||||
|
contactIds.value=''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const deleteContactMethod = (configId) => {
|
||||||
|
delConfig(configId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tableIns.value.refresh()
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleMoreDelete = () => {
|
||||||
|
if(contactIds.value){
|
||||||
|
ElMessageBox.confirm(`确认删除选择的话务配置吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteContactMethod(contactIds.value)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
ElMessage.warning("请选择要删除的话务配置")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSingleDelete = (row) => {
|
||||||
|
ElMessageBox.confirm(`确认删除参数名称为${row.configName}的话务配置吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteContactMethod(row.configId)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//提交
|
||||||
|
const handleSubmitAddressBook = async (formInstance) => {
|
||||||
|
if (!formInstance) return;
|
||||||
|
let validate = await formInstance.validate()
|
||||||
|
if (!validate.isValidate) return;
|
||||||
|
let params={
|
||||||
|
...formInstance.getValues(),
|
||||||
|
configType:parseInt(formInstance.getValues().configType),
|
||||||
|
extraConfigType:extraConfigType.value
|
||||||
|
}
|
||||||
|
if (dialogType.value === "add") {
|
||||||
|
addConfig(params).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg);
|
||||||
|
tableIns.value.refresh()
|
||||||
|
formDialogRef.value.openOrCloseDialog(false)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
editConfig(params).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg);
|
||||||
|
tableIns.value.refresh()
|
||||||
|
formDialogRef.value.openOrCloseDialog(false)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -17,6 +17,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="外部配置类型" prop="extraConfigType">
|
||||||
|
<el-select v-model="queryParams.extraConfigType" placeholder="请选择外部配置类型" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in cacheStore.getDict('extra_config_type')"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="getList" :icon="Search">搜索</el-button>
|
<el-button type="primary" @click="getList" :icon="Search">搜索</el-button>
|
||||||
<el-button @click="handleReset" :icon="Refresh">重置</el-button>
|
<el-button @click="handleReset" :icon="Refresh">重置</el-button>
|
||||||
@@ -24,12 +34,12 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="query-btn">
|
<div class="query-btn">
|
||||||
<el-button type="primary" v-perm="['admin:config:add']" @click="handleAdd" :icon="Plus" plain>新增</el-button>
|
<el-button type="primary" v-perm="['admin:config:add']" @click="handleAdd" :icon="Plus" plain>新增</el-button>
|
||||||
<el-button type="danger" v-perm="['admin:config:del']" @click="handleMoreDelete(configIds,configNameList)"
|
<!-- <el-button type="danger" v-perm="['admin:config:del']" @click="handleMoreDelete(configIds,configNameList)"-->
|
||||||
:icon="Delete" plain
|
<!-- :icon="Delete" plain-->
|
||||||
:disabled="disabled">删除
|
<!-- :disabled="disabled">删除-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button type="warning" v-perm="['admin:config:export']" @click="handleExport" :icon="Download" plain>导出
|
<!-- <el-button type="warning" v-perm="['admin:config:export']" @click="handleExport" :icon="Download" plain>导出-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<el-table
|
<el-table
|
||||||
@@ -41,7 +51,7 @@
|
|||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
v-tabh
|
v-tabh
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"/>
|
<!-- <el-table-column type="selection" width="55"/>-->
|
||||||
<el-table-column label="序号" type="index" width="60"/>
|
<el-table-column label="序号" type="index" width="60"/>
|
||||||
<el-table-column prop="configName" label="参数名称" align="center"/>
|
<el-table-column prop="configName" label="参数名称" align="center"/>
|
||||||
<el-table-column prop="configKey" label="参数键名" align="center"/>
|
<el-table-column prop="configKey" label="参数键名" align="center"/>
|
||||||
@@ -51,13 +61,23 @@
|
|||||||
<tag dict-type="yes_no" :value="scope.row.configType"/>
|
<tag dict-type="yes_no" :value="scope.row.configType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="extraConfigType" label="外部配置类型" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.extraConfigType">
|
||||||
|
<tag dict-type="extra_config_type" :value="scope.row.extraConfigType"/>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<span>--</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" align="center"/>
|
<el-table-column prop="remark" label="备注" align="center"/>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" size="mini" v-perm="['admin:config:edit']"
|
<el-button type="primary" size="mini" v-perm="['admin:config:edit']"
|
||||||
@click="handleEdit(scope.row.configId)" link>编辑
|
@click="handleEdit(scope.row.configId)" link>编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<popover-delete :name="scope.row.dsName" :type="'参数配置表'" :perm="['admin:config:del']"
|
<popover-delete :name="scope.row.configName" :type="'参数配置表'" :perm="['admin:config:del']"
|
||||||
@delete="handleDelete(scope.row.configId)"/>
|
@delete="handleDelete(scope.row.configId)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -96,11 +116,24 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输备注"></el-input>
|
<el-input v-model="form.remark" placeholder="请输备注"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-form-item label="外部配置类型" prop="extraConfigType" v-if="form.configType==0">
|
||||||
|
<el-select v-model="form.extraConfigType" placeholder="请选择外部配置类型" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in cacheStore.getDict('extra_config_type')"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -148,16 +181,16 @@ const form = ref()
|
|||||||
const formInstance = ref()
|
const formInstance = ref()
|
||||||
const formRules = ref({
|
const formRules = ref({
|
||||||
configName: [
|
configName: [
|
||||||
{required: true, message: "参数名称不能为空", trigger: "blur"},
|
{required: true, message: "参数名称不能为空", trigger: ["change","blur"]},
|
||||||
],
|
],
|
||||||
configKey: [
|
configKey: [
|
||||||
{required: true, message: "参数键名不能为空", trigger: "blur"},
|
{required: true, message: "参数键名不能为空", trigger: ["change","blur"]},
|
||||||
],
|
],
|
||||||
configValue: [
|
configValue: [
|
||||||
{required: true, message: "参数键值不能为空", trigger: "blur"},
|
{required: true, message: "参数键值不能为空", trigger:["change","blur"]},
|
||||||
],
|
],
|
||||||
configType: [
|
configType: [
|
||||||
{required: true, message: "系统内置不能为空", trigger: "change"},
|
{required: true, message: "系统内置不能为空", trigger: ["change","blur"]},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -214,6 +247,9 @@ const handleSubmit = async (instance) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
if(form.value.configType==1){
|
||||||
|
delete form.value.extraConfigType
|
||||||
|
}
|
||||||
editConfig(form.value).then(res => {
|
editConfig(form.value).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
@@ -231,7 +267,7 @@ const handleAdd = async () => {
|
|||||||
restFrom()
|
restFrom()
|
||||||
title.value = "新增参数配置表"
|
title.value = "新增参数配置表"
|
||||||
isVisited.value = true
|
isVisited.value = true
|
||||||
nextTick(() => {
|
await nextTick(() => {
|
||||||
// 清空校验
|
// 清空校验
|
||||||
formInstance.value.clearValidate()
|
formInstance.value.clearValidate()
|
||||||
})
|
})
|
||||||
@@ -241,6 +277,7 @@ const handleEdit = async (configId) => {
|
|||||||
restFrom()
|
restFrom()
|
||||||
getConfigDetails(configId).then(res => {
|
getConfigDetails(configId).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
|
res.data.configType= res.data.configType+''
|
||||||
form.value = res.data
|
form.value = res.data
|
||||||
title.value = "编辑参数配置表"
|
title.value = "编辑参数配置表"
|
||||||
isVisited.value = true
|
isVisited.value = true
|
||||||
@@ -253,10 +290,10 @@ const handleEdit = async (configId) => {
|
|||||||
formInstance.value.clearValidate()
|
formInstance.value.clearValidate()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//导出excel
|
// //导出excel
|
||||||
const handleExport = () => {
|
// const handleExport = () => {
|
||||||
downLoadExcel('/config/export', {...queryParams})
|
// downLoadExcel('/config/export', {...queryParams})
|
||||||
}
|
// }
|
||||||
|
|
||||||
//勾选table数据行的 Checkbox
|
//勾选table数据行的 Checkbox
|
||||||
const handleSelect = async (selection) => {
|
const handleSelect = async (selection) => {
|
||||||
|
|||||||
@@ -320,9 +320,15 @@ const handleDialogSelect = (selection) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = (userIds) => {
|
const handleSubmit = (userIds) => {
|
||||||
|
let ids=[]
|
||||||
|
if(userIds instanceof Array){
|
||||||
|
ids=userIds
|
||||||
|
}else{
|
||||||
|
ids.push(userIds)
|
||||||
|
}
|
||||||
roleBindUser({
|
roleBindUser({
|
||||||
id: roleId,
|
id: roleId,
|
||||||
ids: userIds,
|
ids: ids,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg);
|
ElMessage.success(res.msg);
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
||||||
<fvFormDialog v-if="showAddOrEditUserDialog" ref="formDialogRef" :title="dialogTitle" :form-schema="formSchema" :form-rules="formRules" @dialogCancel="handleCancel" @dialogSubmit="handleSubmit"></fvFormDialog>
|
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
||||||
|
:form-schema="formSchema" :form-rules="formRules"
|
||||||
|
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -11,6 +13,7 @@ import {useCacheStore} from "@/stores/cache.js";
|
|||||||
|
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const formDialogRef = ref()
|
const formDialogRef = ref()
|
||||||
|
const dialogType = ref("");
|
||||||
const showAddOrEditUserDialog = ref(false)
|
const showAddOrEditUserDialog = ref(false)
|
||||||
const dialogTitle = ref("");
|
const dialogTitle = ref("");
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
@@ -68,7 +71,7 @@ const tableConfig = reactive({
|
|||||||
api: '/user',
|
api: '/user',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '导入', key: 'add', type: 'primary'},
|
// {name: '新增', key: 'add', type: 'primary'},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
@@ -179,36 +182,60 @@ const headBtnClick = (key) => {
|
|||||||
}
|
}
|
||||||
//新增用户
|
//新增用户
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
// showAddOrEditUserDialog.value = true
|
showAddOrEditUserDialog.value = true
|
||||||
// formRules.value.password[0].required = true
|
// formRules.value.password[0].required = true
|
||||||
// restForm();
|
// restForm();
|
||||||
// dialogTitle.value = "新增用户";
|
dialogTitle.value = "新增用户";
|
||||||
// nextTick(()=>{
|
dialogType.value = "add";
|
||||||
// // 清空校验
|
nextTick(() => {
|
||||||
// formDialogRef.value.getFormInstance().clearValidate()
|
// formDialogRef.value.getFormInstance().setValues({})
|
||||||
// formDialogRef.value.getFormInstance().resetFields()
|
// 清空校验
|
||||||
// })
|
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) => {
|
||||||
|
getUserDetail(row.userId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
nextTick(() => {
|
||||||
|
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||||
|
// 清空校验
|
||||||
|
formDialogRef.value.getFormInstance().clearValidate()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//取消
|
//取消
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
showAddOrEditUserDialog.value = false;
|
showAddOrEditUserDialog.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
//提交
|
//提交
|
||||||
const handleSubmit = async (formInstance) => {
|
const handleSubmit = async (formInstance) => {
|
||||||
if (!formInstance) return;
|
if (!formInstance) return;
|
||||||
formInstance.validate(async (valid) => {
|
let validate = await formInstance.validate()
|
||||||
if (!valid) return;
|
if (!validate.isValidate) return;
|
||||||
// if (title.value === "新增用户") {
|
if (dialogType.value === "add") {
|
||||||
// addUser(userForm.value).then(res => {
|
addUser(formInstance.getValues()).then(res => {
|
||||||
// if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
// ElMessage.success(res.msg);
|
ElMessage.success(res.msg);
|
||||||
// isVisited.value = false;
|
tableIns.value.refresh()
|
||||||
// } else {
|
formDialogRef.value.openOrCloseDialog(false)
|
||||||
// ElMessage.error(res.msg);
|
} else {
|
||||||
// }
|
ElMessage.error(res.msg);
|
||||||
// });
|
}
|
||||||
// }
|
});
|
||||||
})
|
}
|
||||||
|
// editUser
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search">
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
</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>
|
||||||
@@ -30,7 +29,9 @@ const mockData = ref([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const auths = reactive({
|
const auths = reactive({
|
||||||
report: ['mosr:collect:reported'],
|
detail: ['order:order:detail'],
|
||||||
|
close: ['order:order:close'],
|
||||||
|
delete: ['order:order:del'],
|
||||||
})
|
})
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
@@ -81,30 +82,37 @@ const searchConfig = reactive([
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建日期',
|
label: '创建时间',
|
||||||
prop: 'createTime',
|
prop: 'createdTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择创建时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
label: '处理时间',
|
label: '处理时间',
|
||||||
prop: 'te',
|
prop: 'processedTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择处理时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}, {
|
}, {
|
||||||
label: '完成时间',
|
label: '完成时间',
|
||||||
prop: 'completionTime',
|
prop: 'completionTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择完成时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}
|
}
|
||||||
@@ -167,7 +175,14 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
currentRender: ({ row, index }) => {
|
||||||
|
if (row.operationUser) {
|
||||||
|
return row.operationUser
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -176,7 +191,7 @@ const tableConfig = reactive({
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createdTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
@@ -210,15 +225,15 @@ const tableConfig = reactive({
|
|||||||
|
|
||||||
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.detail, func: () => handleClose(row), type: 'primary' })
|
btn.push({ label: '关单', prem: auths.close, func: () => handleClose(row), type: 'primary' })
|
||||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'primary' })
|
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
|
||||||
>
|
>
|
||||||
@@ -258,7 +273,9 @@ const headBtnClick = (key) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
workDialogRef.value.open(row)
|
// console.log(row);
|
||||||
|
|
||||||
|
workDialogRef.value.open()
|
||||||
rowData.value = row
|
rowData.value = row
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,25 +291,27 @@ const handleClose = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await orderdClose(row.orderNumber)
|
const info = await orderdClose(row.orderNumber)
|
||||||
tableIns.value.refresh()
|
// console.log(info);
|
||||||
ElMessage({
|
if (info.code === 1000) {
|
||||||
type: 'success',
|
tableIns.value.refresh()
|
||||||
message: '关闭成功',
|
ElMessage({
|
||||||
})
|
message: '关闭成功',
|
||||||
})
|
type: 'success',
|
||||||
.catch(() => {
|
})
|
||||||
// tableIns.value.refresh()
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
message: info.msg,
|
||||||
message: '关闭失败',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||||
// if you want to disable its autofocus
|
// if you want to disable its autofocus
|
||||||
// autofocus: false,
|
// autofocus: false,
|
||||||
type:'warning',
|
type: 'warning',
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -311,19 +330,20 @@ const handleDelete = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await orderdDetele(row.orderNumber)
|
const info = await orderdDetele(row.orderNumber)
|
||||||
tableIns.value.refresh()
|
console.log(info);
|
||||||
ElMessage({
|
if (info.code === 1000) {
|
||||||
type: 'success',
|
tableIns.value.refresh()
|
||||||
message: '删除成功',
|
ElMessage({
|
||||||
})
|
message: '删除成功',
|
||||||
})
|
type: 'success',
|
||||||
.catch(() => {
|
})
|
||||||
// tableIns.value.refresh()
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
message: info.msg,
|
||||||
message: '删除失败',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
<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 } 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'
|
||||||
//控制显示隐藏
|
//控制显示隐藏
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
rowData: Object
|
rowData: Object
|
||||||
})
|
})
|
||||||
|
|
||||||
let opsCallList = ref([]);
|
let opsCallList = ref([]);
|
||||||
let orderData = ref([]);
|
let orderData = ref([]);
|
||||||
let orderContent = ref([]);
|
let orderContent = ref([]);
|
||||||
|
const voiceRef = ref()
|
||||||
|
const rowUrl = ref()
|
||||||
const open = (row) => {
|
const open = (row) => {
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
};
|
};
|
||||||
@@ -22,29 +26,77 @@ const open = (row) => {
|
|||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
// console.log(123);
|
// console.log(123);
|
||||||
const data = await orderGetDetails(props.rowData.orderNumber)
|
const data = await orderGetDetails(props.rowData.orderNumber)
|
||||||
|
|
||||||
// console.log("111", data);
|
// console.log("111", data);
|
||||||
return data
|
return data
|
||||||
|
|
||||||
}
|
}
|
||||||
|
let contentState0 = [
|
||||||
let content = [
|
|
||||||
{
|
{
|
||||||
content: "待处理",
|
content: "待处理",
|
||||||
timestamp: "orderData.value",
|
timestamp: "orderData.value",
|
||||||
|
icon: Check,
|
||||||
color: "#0bbd87",
|
color: "#0bbd87",
|
||||||
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "已处理",
|
content: "已处理",
|
||||||
timestamp: "2022-07-20 20:00",
|
timestamp: "--",
|
||||||
type: "primary",
|
type: "primary",
|
||||||
icon: MoreFilled,
|
icon: MoreFilled,
|
||||||
size: "large",
|
size: "large",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "结单",
|
content: "结单",
|
||||||
timestamp: "2022-07-20 20:00",
|
timestamp: "--",
|
||||||
size: "large",
|
size: "large",
|
||||||
|
// icon: Check,
|
||||||
|
// color: "#0bbd87",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
let contentState1 = [
|
||||||
|
{
|
||||||
|
content: "待处理",
|
||||||
|
timestamp: "orderData.value",
|
||||||
|
icon: Check,
|
||||||
|
color: "#0bbd87",
|
||||||
|
size: "large",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: "已处理",
|
||||||
|
timestamp: "2022-07-20 20:00:00",
|
||||||
|
icon: Check,
|
||||||
|
color: "#0bbd87",
|
||||||
|
size: "large",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: "结单",
|
||||||
|
timestamp: "--",
|
||||||
|
size: "large",
|
||||||
|
type: "primary",
|
||||||
|
icon: MoreFilled,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
let contentState2 = [
|
||||||
|
{
|
||||||
|
content: "待处理",
|
||||||
|
timestamp: "orderData.value",
|
||||||
|
icon: Check,
|
||||||
|
color: "#0bbd87",
|
||||||
|
size: "large",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: "已处理",
|
||||||
|
timestamp: "2022-07-20 20:00:00",
|
||||||
|
icon: Check,
|
||||||
|
color: "#0bbd87",
|
||||||
|
size: "large",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: "结单",
|
||||||
|
timestamp: "2022-07-20 20:00:00",
|
||||||
|
size: "large",
|
||||||
|
icon: Check,
|
||||||
|
color: "#0bbd87",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -54,50 +106,57 @@ watch(() => props.rowData, (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 => {
|
dataDetails.forEach(for1data => {
|
||||||
theData.forEach(for2data => {
|
// console.log(for1data.createTime, '--------');
|
||||||
if (for1data.createTime !== for2data.createTime) {
|
for (let i = 0; i < theData.length; i++) {
|
||||||
// console.log(for2data);
|
// console.log(theData[i]);
|
||||||
for2data.createTime = for1data.createTime
|
if (theData[i].createTime === for1data.createTime) {
|
||||||
for2data.data.push(for1data)
|
theData[i].data.push(for1data)
|
||||||
theData.push({ createTime: for1data.createTime, data: [] })
|
break;
|
||||||
|
} else if (theData[i].createTime === '') {
|
||||||
|
theData[i].createTime = for1data.createTime
|
||||||
|
theData[i].data.push(for1data)
|
||||||
} else {
|
} else {
|
||||||
for2data.data.push(for1data)
|
theData.push({ createTime: '', data: [] })
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
});
|
});
|
||||||
theData.pop()
|
// theData.pop()
|
||||||
// theData[0].data.sort((a, b) => b.answer_time- a.answer_time)
|
// theData[0].data.sort((a, b) => b.answer_time- a.answer_time)
|
||||||
// console.log(theData);
|
// console.log(theData);
|
||||||
theData.forEach(item => {
|
theData.forEach(item => {
|
||||||
item.data.sort((a, b) => b.answer_time- a.answer_time)
|
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)
|
opsCallList.value.push(item)
|
||||||
})
|
})
|
||||||
|
|
||||||
//工单时间线
|
//工单时间线
|
||||||
orderContent.value = []
|
orderContent.value = []
|
||||||
// console.log(orderData.value);
|
// console.log(orderData.value);
|
||||||
content.map((item, index) => {
|
// orderData.value.orderState='2'
|
||||||
if (index === 0) {
|
if (orderData.value.orderState === '0') {
|
||||||
item.timestamp = orderData.value.operationTime || '--'
|
inputOrderContent(contentState0)
|
||||||
} else if (index === 1) {
|
}
|
||||||
item.timestamp = orderData.value.processedTime || '--'
|
else if (orderData.value.orderState === '1') {
|
||||||
|
inputOrderContent(contentState1)
|
||||||
} else {
|
}
|
||||||
item.timestamp = orderData.value.completionTime || '--'
|
else if (orderData.value.orderState === '2') {
|
||||||
|
inputOrderContent(contentState2)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
|
||||||
content.forEach(item => {
|
|
||||||
orderContent.value.push(item)
|
|
||||||
})
|
|
||||||
|
|
||||||
// console.log(orderContent.value);
|
// console.log(orderContent.value);
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -105,37 +164,48 @@ watch(() => props.rowData, (newRowData) => {
|
|||||||
}, {
|
}, {
|
||||||
immediate: true // 立即执行一次,以便在rowData初始值非空时也能触发
|
immediate: true // 立即执行一次,以便在rowData初始值非空时也能触发
|
||||||
});
|
});
|
||||||
// getData()
|
const inputOrderTime = (item, index) => {
|
||||||
|
|
||||||
|
|
||||||
const test2 = [
|
|
||||||
{
|
{
|
||||||
|
if (index === 0) {
|
||||||
date: '2024-8-31',
|
item.timestamp = orderData.value.operationTime || '--'
|
||||||
type: "primary",
|
} else if (index === 1) {
|
||||||
icon: MoreFilled,
|
// item.timestamp = orderData.value.processedTime || '--'
|
||||||
size: "large",
|
} else {
|
||||||
}, {
|
// item.timestamp = orderData.value.completionTime || '--'
|
||||||
content: "结单",
|
}
|
||||||
size: "large",
|
|
||||||
}
|
}
|
||||||
];
|
}
|
||||||
// const data = [
|
|
||||||
// {
|
const inputOrderContent = (contentState) => {
|
||||||
// number: '17628661307',
|
contentState.map((item, index) => {
|
||||||
// state: '通话中',
|
inputOrderTime(item, index)
|
||||||
// time: '18 : 32',
|
})
|
||||||
// },
|
contentState.forEach(item => {
|
||||||
// {
|
orderContent.value.push(item)
|
||||||
// number: '17628661307',
|
})
|
||||||
// state: '已接通',
|
}
|
||||||
// time: '18 : 32',
|
|
||||||
// },
|
const openRecord = () => {
|
||||||
// {
|
if ( props.rowData.recordUrl !== null) {
|
||||||
// number: '17628661307',
|
voiceRef.value.open(true)
|
||||||
// state: '已接通',
|
rowUrl.value = props.rowData.recordUrl
|
||||||
// time: '18 : 32',
|
} else {
|
||||||
// }]
|
ElMessage({
|
||||||
|
message: '暂无语音',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const downloadRecord = () => {
|
||||||
|
if(props.rowData.recordUrl === null){
|
||||||
|
ElMessage({
|
||||||
|
message: '暂无语音',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
});
|
});
|
||||||
@@ -149,7 +219,7 @@ defineExpose({
|
|||||||
<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' }">
|
||||||
@@ -166,12 +236,12 @@ defineExpose({
|
|||||||
<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.siteName }}</span>
|
<span>工单名称:{{ rowData.orderName || '--' }}</span>
|
||||||
<span>关单人:{{ rowData.knotter }}</span>
|
<span>关单人:{{ rowData.knotter || '--' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
@@ -179,25 +249,34 @@ defineExpose({
|
|||||||
<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">
|
<div class="textBox—record">
|
||||||
<el-scrollbar>
|
|
||||||
<div class="text">{{ rowData.recordUrl }}</div>
|
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
||||||
</el-scrollbar>
|
style="margin-right: 10px ;">播放录音
|
||||||
|
</el-button>
|
||||||
|
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl" />
|
||||||
|
<a :href=rowData.recordUrl download>
|
||||||
|
<el-button type="primary" :icon="Download"
|
||||||
|
@click="downloadRecord">下载录音</el-button>
|
||||||
|
</a>
|
||||||
|
<!-- <el-scrollbar> -->
|
||||||
|
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
|
||||||
|
<!-- </el-scrollbar> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -207,6 +286,7 @@ defineExpose({
|
|||||||
<div class="timebox">
|
<div class="timebox">
|
||||||
<div>
|
<div>
|
||||||
<el-scrollbar height="20vh">
|
<el-scrollbar height="20vh">
|
||||||
|
<p v-if="opsCallList.length === 0">暂无电话拨打记录</p>
|
||||||
<el-timeline style="max-width: 99%" class="timeline">
|
<el-timeline style="max-width: 99%" class="timeline">
|
||||||
<el-timeline-item v-for="(activity, index) in opsCallList" :key="index"
|
<el-timeline-item v-for="(activity, index) in opsCallList" :key="index"
|
||||||
icon="MoreFilled" type="primary" size="large">
|
icon="MoreFilled" type="primary" size="large">
|
||||||
@@ -216,12 +296,13 @@ defineExpose({
|
|||||||
<div class="timeline-row">
|
<div class="timeline-row">
|
||||||
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
|
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
|
||||||
}}</span>
|
}}</span>
|
||||||
<PointTag dictType="call_status" :value="info.callState" class="tag"/>
|
<PointTag dictType="call_status" :value="info.callState"
|
||||||
|
class="tag" />
|
||||||
<!-- <span :style="{
|
<!-- <span :style="{
|
||||||
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
|
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
|
||||||
}">{{ info.callState }}</span> -->
|
}">{{ info.callState }}</span> -->
|
||||||
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
|
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
|
||||||
info.answer_time ||'00 : 00'}}</span>
|
info.answeredTime || '00:00:00' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -285,13 +366,19 @@ defineExpose({
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main-content .body .textBox—record {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 10vh;
|
||||||
|
// max-height: 15vh;
|
||||||
|
// border: 1.5px solid #e4e7ed;
|
||||||
|
// box-shadow: 0 4px 8px 0 rgba(242, 242, 242, 1);
|
||||||
|
// margin-bottom: 20px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.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
|
||||||
}
|
}
|
||||||
@@ -319,26 +406,29 @@ defineExpose({
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ const mockData = ref([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const auths = reactive({
|
const auths = reactive({
|
||||||
report: ['mosr:collect:reported'],
|
detail: ['order:order:detail'],
|
||||||
|
close: ['order:order:close'],
|
||||||
|
delete: ['order:order:del'],
|
||||||
})
|
})
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
@@ -52,16 +54,6 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}, {
|
|
||||||
label: '工单状态',
|
|
||||||
prop: 'orderState',
|
|
||||||
props: {
|
|
||||||
placeholder: '请选择工单状态查询',
|
|
||||||
cacheKey: 'work_order_status',
|
|
||||||
clearable: true,
|
|
||||||
filterable: true,
|
|
||||||
},
|
|
||||||
component: shallowRef(fvSelect),
|
|
||||||
}, {
|
}, {
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
@@ -82,30 +74,37 @@ const searchConfig = reactive([
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建日期',
|
label: '创建时间',
|
||||||
prop: 'createTime',
|
prop: 'createdTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择创建时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
label: '处理时间',
|
label: '处理时间',
|
||||||
prop: 'te',
|
prop: 'processedTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择处理时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}, {
|
}, {
|
||||||
label: '完成时间',
|
label: '完成时间',
|
||||||
prop: 'completionTime',
|
prop: 'completionTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择完成时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}
|
}
|
||||||
@@ -170,14 +169,14 @@ const tableConfig = reactive({
|
|||||||
label: '处理人',
|
label: '处理人',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: 'processedContent',
|
prop: 'processedContent',
|
||||||
label: '处理内容',
|
label: '处理内容',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createdTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
@@ -210,16 +209,16 @@ const tableConfig = reactive({
|
|||||||
// 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.detail, func: () => handleClose(row), type: 'primary' })
|
btn.push({ label: '关单', prem: auths.close, func: () => handleClose(row), type: 'primary' })
|
||||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'primary' })
|
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
|
||||||
>
|
>
|
||||||
@@ -233,14 +232,14 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '/order/list',
|
api: '/order/list',
|
||||||
params: {orderState:"2"},
|
params: { orderState: "2" },
|
||||||
btns: [
|
btns: [
|
||||||
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
let obj = {...val}
|
let obj = { ...val, orderState: '2' }
|
||||||
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]
|
||||||
@@ -276,25 +275,26 @@ const handleClose = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await orderdClose(row.orderNumber)
|
const info = await orderdClose(row.orderNumber)
|
||||||
tableIns.value.refresh()
|
// console.log(info);
|
||||||
ElMessage({
|
if (info.code === 1000) {
|
||||||
type: 'success',
|
tableIns.value.refresh()
|
||||||
message: '关闭成功',
|
ElMessage({
|
||||||
})
|
message: '关闭成功',
|
||||||
})
|
type: 'success',
|
||||||
.catch(() => {
|
})
|
||||||
// tableIns.value.refresh()
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
message: info.msg,
|
||||||
message: '关闭失败',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||||
// if you want to disable its autofocus
|
// if you want to disable its autofocus
|
||||||
// autofocus: false,
|
// autofocus: false,
|
||||||
type:'warning',
|
type: 'warning',
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -313,19 +313,20 @@ const handleDelete = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await orderdDetele(row.orderNumber)
|
const info = await orderdDetele(row.orderNumber)
|
||||||
tableIns.value.refresh()
|
console.log(info);
|
||||||
ElMessage({
|
if (info.code === 1000) {
|
||||||
type: 'success',
|
tableIns.value.refresh()
|
||||||
message: '删除成功',
|
ElMessage({
|
||||||
})
|
message: '删除成功',
|
||||||
})
|
type: 'success',
|
||||||
.catch(() => {
|
})
|
||||||
// tableIns.value.refresh()
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
message: info.msg,
|
||||||
message: '删除失败',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ const mockData = ref([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const auths = reactive({
|
const auths = reactive({
|
||||||
report: ['mosr:collect:reported'],
|
detail: ['order:order:detail'],
|
||||||
|
close: ['order:order:close'],
|
||||||
|
delete: ['order:order:del'],
|
||||||
})
|
})
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
@@ -52,16 +54,6 @@ const searchConfig = reactive([
|
|||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
}, {
|
|
||||||
label: '工单状态',
|
|
||||||
prop: 'orderState',
|
|
||||||
props: {
|
|
||||||
placeholder: '请选择工单状态查询',
|
|
||||||
cacheKey: 'work_order_status',
|
|
||||||
clearable: true,
|
|
||||||
filterable: true,
|
|
||||||
},
|
|
||||||
component: shallowRef(fvSelect),
|
|
||||||
}, {
|
}, {
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
prop: 'operationUser',
|
prop: 'operationUser',
|
||||||
@@ -82,30 +74,37 @@ const searchConfig = reactive([
|
|||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建日期',
|
label: '创建时间',
|
||||||
prop: 'createTime',
|
prop: 'createdTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择创建时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
label: '处理时间',
|
label: '处理时间',
|
||||||
prop: 'te',
|
prop: 'processedTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择处理时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}, {
|
}, {
|
||||||
label: '完成时间',
|
label: '完成时间',
|
||||||
prop: 'completionTime',
|
prop: 'completionTime',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择',
|
placeholder: '请选择完成时间',
|
||||||
|
type: 'datetime',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true,
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
}
|
}
|
||||||
@@ -170,14 +169,14 @@ const tableConfig = reactive({
|
|||||||
label: '处理人',
|
label: '处理人',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: 'processedContent',
|
prop: 'processedContent',
|
||||||
label: '处理内容',
|
label: '处理内容',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createdTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 200
|
width: 200
|
||||||
@@ -211,15 +210,15 @@ const tableConfig = reactive({
|
|||||||
|
|
||||||
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.detail, func: () => handleClose(row), type: 'primary' })
|
btn.push({ label: '关单', prem: auths.close,func: () => handleClose(row), type: 'primary' })
|
||||||
btn.push({ label: '删除', prem: auths.detail, func: () => handleDelete(row), type: 'primary' })
|
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
|
||||||
>
|
>
|
||||||
@@ -233,14 +232,14 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '/order/list',
|
api: '/order/list',
|
||||||
params: {orderState:"0"},
|
params: { orderState: "0" },
|
||||||
btns: [
|
btns: [
|
||||||
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
let obj = {...val}
|
let obj = { ...val, orderState: '0' }
|
||||||
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]
|
||||||
@@ -276,25 +275,26 @@ const handleClose = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await orderdClose(row.orderNumber)
|
const info = await orderdClose(row.orderNumber)
|
||||||
tableIns.value.refresh()
|
// console.log(info);
|
||||||
ElMessage({
|
if (info.code === 1000) {
|
||||||
type: 'success',
|
tableIns.value.refresh()
|
||||||
message: '关闭成功',
|
ElMessage({
|
||||||
})
|
message: '关闭成功',
|
||||||
})
|
type: 'success',
|
||||||
.catch(() => {
|
})
|
||||||
// tableIns.value.refresh()
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
message: info.msg,
|
||||||
message: '关闭失败',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||||
// if you want to disable its autofocus
|
// if you want to disable its autofocus
|
||||||
// autofocus: false,
|
// autofocus: false,
|
||||||
type:'warning',
|
type: 'warning',
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -313,19 +313,20 @@ const handleDelete = async (row) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await orderdDetele(row.orderNumber)
|
const info = await orderdDetele(row.orderNumber)
|
||||||
tableIns.value.refresh()
|
console.log(info);
|
||||||
ElMessage({
|
if (info.code === 1000) {
|
||||||
type: 'success',
|
tableIns.value.refresh()
|
||||||
message: '删除成功',
|
ElMessage({
|
||||||
})
|
message: '删除成功',
|
||||||
})
|
type: 'success',
|
||||||
.catch(() => {
|
})
|
||||||
// tableIns.value.refresh()
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'info',
|
message: info.msg,
|
||||||
message: '删除失败',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import { shallowRef } from 'vue';
|
import {reactive, shallowRef} from 'vue';
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {addSensitive, deleteSensitive, editSensitive,getSensitiveDetail} from "@/api/sensitive-words";
|
import {addSensitive, deleteSensitive, editSensitive,getSensitiveDetail} from "@/api/sensitive-words";
|
||||||
@@ -103,6 +103,11 @@ const searchConfig = reactive([
|
|||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
const auths = reactive({
|
||||||
|
add: ['order:sensitive:add'],
|
||||||
|
edit: ['order:sensitive:edit'],
|
||||||
|
delete: ['order:sensitive:del'],
|
||||||
|
})
|
||||||
const sensitiveTableConfig= reactive({
|
const sensitiveTableConfig= reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -116,11 +121,6 @@ const sensitiveTableConfig= reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'sensitiveId',
|
|
||||||
label: '敏感词ID',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'content',
|
prop: 'content',
|
||||||
label: '内容',
|
label: '内容',
|
||||||
@@ -158,15 +158,15 @@ const sensitiveTableConfig= reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = []
|
let btn = []
|
||||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||||
btn.push({label: '删除', 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%'}}>
|
||||||
{
|
{
|
||||||
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
|
||||||
>
|
>
|
||||||
@@ -183,8 +183,8 @@ const sensitiveTableConfig= reactive({
|
|||||||
api: '/sensitive/list',
|
api: '/sensitive/list',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
{name: '新增', key: 'add',type:'primary',icon:'Plus', auth: auths.add},
|
||||||
{name: '删除', key: 'delete', type: 'danger'},
|
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const searchSensitive = (val) => {
|
const searchSensitive = (val) => {
|
||||||
@@ -229,13 +229,13 @@ const handleEdit = (row) => {
|
|||||||
const getDetail = (row) => {
|
const getDetail = (row) => {
|
||||||
getSensitiveDetail(row.sensitiveId).then(res => {
|
getSensitiveDetail(row.sensitiveId).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||||
// 清空校验
|
// 清空校验
|
||||||
formDialogRef.value.getFormInstance().clearValidate()
|
formDialogRef.value.getFormInstance().clearValidate()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {addVerbal, editVerbal,deleteVerbal, getVerbalDetail} from "@/api/verbal-trick";
|
import {addVerbal, editVerbal,deleteVerbal, getVerbalDetail} from "@/api/verbal-trick";
|
||||||
|
import {reactive} from "vue";
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const dialogTitle = ref("");
|
const dialogTitle = ref("");
|
||||||
const dialogType = ref("");
|
const dialogType = ref("");
|
||||||
@@ -18,47 +19,53 @@ const formDialogRef = ref()
|
|||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '名称',
|
label: '话术问题',
|
||||||
prop: 'verbalName',
|
prop: 'query',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称查询',
|
placeholder: '请输入话术问题查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '类型',
|
label: '话术答案',
|
||||||
prop: 'verbalType',
|
prop: 'answer',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入类型查询',
|
placeholder: '请输入话术答案查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '内容',
|
// label: '是否挂断电话',
|
||||||
prop: 'verbalContent',
|
// prop: 'callOff',
|
||||||
props: {
|
// props: {
|
||||||
placeholder: '请输入内容查询',
|
// placeholder: '请选择是否挂断电话查询',
|
||||||
clearable: true,
|
// cacheKey: 'call_off',
|
||||||
checkStrictly: true
|
// clearable: true,
|
||||||
},
|
// filterable: true,
|
||||||
component: 'el-input',
|
// },
|
||||||
},
|
// component: shallowRef(fvSelect),
|
||||||
{
|
// },
|
||||||
label: '状态',
|
// {
|
||||||
prop: 'state',
|
// label: '上下文类型',
|
||||||
props: {
|
// prop: 'type',
|
||||||
placeholder: '请选择状态查询',
|
// props: {
|
||||||
cacheKey: 'verbal_trick_state',
|
// placeholder: '请选择上下文类型查询',
|
||||||
clearable: true,
|
// cacheKey: 'context_type',
|
||||||
filterable: true,
|
// clearable: true,
|
||||||
},
|
// filterable: true,
|
||||||
component: shallowRef(fvSelect),
|
// },
|
||||||
},
|
// component: shallowRef(fvSelect),
|
||||||
|
// },
|
||||||
])
|
])
|
||||||
|
const auths = reactive({
|
||||||
|
add: ['order:verbal:add'],
|
||||||
|
edit: ['order:verbal:edit'],
|
||||||
|
delete: ['order:verbal:del'],
|
||||||
|
})
|
||||||
const verbalTrickTableConfig = reactive({
|
const verbalTrickTableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -73,43 +80,57 @@ const verbalTrickTableConfig = reactive({
|
|||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'verbalId',
|
prop: 'query',
|
||||||
label: '话术ID',
|
label: '话术问题',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'verbalName',
|
prop: 'answer',
|
||||||
label: '名称',
|
label: '话术答案',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'verbalContent',
|
||||||
|
// label: '内容',
|
||||||
|
// align: 'center'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'verbalType',
|
prop: 'callOff',
|
||||||
label: '类型',
|
label: '是否挂断电话',
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'verbalContent',
|
|
||||||
label: '内容',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '创建时间',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'state',
|
|
||||||
label: '状态',
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
if (row.state !== null) {
|
if (row.callOff !== null) {
|
||||||
return (<Tag dictType={'verbal_trick_state'} value={row.state} />)
|
return (<Tag dictType={'call_off'} value={row.callOff} />)
|
||||||
} else {
|
} else {
|
||||||
return '--'
|
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',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
@@ -119,15 +140,15 @@ const verbalTrickTableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = []
|
let btn = []
|
||||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
|
||||||
btn.push({label: '删除', 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%'}}>
|
||||||
{
|
{
|
||||||
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
|
||||||
>
|
>
|
||||||
@@ -143,72 +164,78 @@ const verbalTrickTableConfig = reactive({
|
|||||||
api: '/verbal/list',
|
api: '/verbal/list',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
{name: '新增', key: 'add',type:'primary',icon:'Plus', auth: auths.add},
|
||||||
{name: '删除', key: 'delete', type: 'danger'},
|
{name: '删除', key: 'delete', type: 'danger', auth: auths.delete},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
verbalName: [
|
query: [
|
||||||
{required: true, message: "请输入名称", trigger: ["change", "blur"]}
|
{required: true, message: "请输入话术问题", trigger: ["change", "blur"]}
|
||||||
],
|
],
|
||||||
verbalType: [
|
// answer: [
|
||||||
{required: true, message: "请输入类型", trigger: ["change", "blur"]}
|
// {required: true, message: "请输入话术答案", trigger: ["change", "blur"]}
|
||||||
],
|
// ],
|
||||||
verbalContent: [
|
callOff: [
|
||||||
{required: true, message: "请输入内容", trigger: ["change", "blur"]}
|
{required: true, message: "请选择是否挂断电话", trigger: ["change", "blur"]}
|
||||||
],
|
|
||||||
state: [
|
|
||||||
{required: true, message: "请选择状态", trigger: ["change", "blur"]}
|
|
||||||
],
|
],
|
||||||
|
// state: [
|
||||||
|
// {required: true, message: "请选择状态", trigger: ["change", "blur"]}
|
||||||
|
// ],
|
||||||
});
|
});
|
||||||
const formSchema = computed(() => {
|
const formSchema = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: '名称',
|
label: '话术问题',
|
||||||
prop: 'verbalName',
|
prop: 'query',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称',
|
placeholder: '请输入话术问题',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
|
type:'textarea',
|
||||||
|
rows:3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '类型',
|
label: '话术答案',
|
||||||
prop: 'verbalType',
|
prop: 'answer',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入类型',
|
placeholder: '请输入话术答案',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
|
type:'textarea',
|
||||||
|
rows:3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '内容',
|
label: '是否挂断电话',
|
||||||
prop: 'verbalContent',
|
prop: 'callOff',
|
||||||
component: 'el-input',
|
|
||||||
colProps: {
|
|
||||||
span: 24
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
placeholder: '请输入内容',
|
|
||||||
clearable: true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '状态',
|
|
||||||
prop: 'state',
|
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
colProps: {
|
colProps: {
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择状态',
|
placeholder: '请选择是否挂断电话',
|
||||||
cacheKey: 'verbal_trick_state',
|
cacheKey: 'call_off',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '上下文类型',
|
||||||
|
prop: 'type',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择上下文类型',
|
||||||
|
cacheKey: 'context_type',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
}
|
}
|
||||||
@@ -254,22 +281,23 @@ const handleEdit = (row) => {
|
|||||||
dialogType.value = "edit";
|
dialogType.value = "edit";
|
||||||
}
|
}
|
||||||
const getDetail = (row) => {
|
const getDetail = (row) => {
|
||||||
getVerbalDetail(row.verbalId).then(res => {
|
getVerbalDetail(row.templateId).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
res.data.callOff=res.data.callOff+''
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
formDialogRef.value.getFormInstance().setValues(res.data)
|
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||||
// 清空校验
|
// 清空校验
|
||||||
formDialogRef.value.getFormInstance().clearValidate()
|
formDialogRef.value.getFormInstance().clearValidate()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
ElMessage.warning(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectionChange = (selection) => {
|
const selectionChange = (selection) => {
|
||||||
if (selection.length !== 0) {
|
if (selection.length !== 0) {
|
||||||
verbalIds.value = selection.map(item => item.verbalId).join()
|
verbalIds.value = selection.map(item => item.templateId).join()
|
||||||
} else {
|
} else {
|
||||||
verbalIds.value=''
|
verbalIds.value=''
|
||||||
}
|
}
|
||||||
@@ -298,12 +326,12 @@ const handleMoreDelete = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSingleDelete = (row) => {
|
const handleSingleDelete = (row) => {
|
||||||
ElMessageBox.confirm(`确认删除名称为${row.verbalName}的话术吗?`, '系统提示', {
|
ElMessageBox.confirm(`确认删除问题为${row.query}的话术吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteContactMethod(row.verbalId)
|
deleteContactMethod(row.templateId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,147 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search">
|
<fvSearchForm :searchConfig="searchConfig" @search="searchPhoneTraffic"></fvSearchForm>
|
||||||
</fvSearchForm>
|
<fvTable ref="tableIns" :tableConfig="phoneTrafficTableConfig" @headBtnClick="headBtnClick" @selectionChange="selectionChange"></fvTable>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
<fvFormDialog ref="formDialogRef" :title="dialogTitle" :dialogType="dialogType"
|
||||||
|
:form-schema="formSchema" :form-rules="formRules"
|
||||||
|
@dialogSubmit="handleSubmitAddressBook"></fvFormDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import { shallowRef } from 'vue';
|
import {reactive, shallowRef} from 'vue';
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {addConfig, delConfig, editConfig, getConfigDetails} from "@/api/phone-traffic-config";
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const mockData = ref([
|
const formDialogRef = ref()
|
||||||
{
|
const extraConfigType = ref(1)
|
||||||
workOrderNumber: 1211,
|
const contactIds = ref("");
|
||||||
workOrderTime: '2022-02-09 00 : 12',
|
const dialogTitle = ref("");
|
||||||
state: 0,
|
const dialogType = ref("");
|
||||||
callState: 0
|
const formRules = reactive({
|
||||||
},
|
configName: [
|
||||||
{
|
{required: true, message: "参数名称不能为空", trigger: "blur"},
|
||||||
workOrderNumber: 232,
|
],
|
||||||
state: 1,
|
configKey: [
|
||||||
callState: 1
|
{required: true, message: "参数键名不能为空", trigger: "blur"},
|
||||||
}
|
],
|
||||||
])
|
configValue: [
|
||||||
|
{required: true, message: "参数键值不能为空", trigger: "blur"},
|
||||||
|
],
|
||||||
|
configType: [
|
||||||
|
{required: true, message: "系统内置不能为空", trigger: "change"},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const formSchema = computed(() => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '参数名称',
|
||||||
|
prop: 'configName',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入参数名称',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '参数键名',
|
||||||
|
prop: 'configKey',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入参数键名',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '参数键值',
|
||||||
|
prop: 'configValue',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入参数键值',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '系统内置',
|
||||||
|
prop: 'configType',
|
||||||
|
component: shallowRef(fvSelect),
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择系统内置',
|
||||||
|
cacheKey: 'yes_no',
|
||||||
|
clearable: true,
|
||||||
|
filterable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
prop: 'remark',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入备注',
|
||||||
|
clearable: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '名称',
|
label: '参数名称',
|
||||||
prop: 'requirementName',
|
prop: 'configName',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称查询',
|
placeholder: '请输入参数名称查询',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
checkStrictly: true
|
checkStrictly: true
|
||||||
},
|
},
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '参数键名',
|
||||||
prop: 'requirementName',
|
prop: 'configKey',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择状态查询',
|
placeholder: '请输入参数键名查询',
|
||||||
cacheKey: 'work_order_status',
|
clearable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
},
|
||||||
|
component: 'el-input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '系统内置',
|
||||||
|
prop: 'configType',
|
||||||
|
props: {
|
||||||
|
placeholder: '请选择系统内置查询',
|
||||||
|
cacheKey: 'yes_no',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
component: shallowRef(fvSelect),
|
component: shallowRef(fvSelect),
|
||||||
},
|
}
|
||||||
])
|
])
|
||||||
const tableConfig = reactive({
|
const auths = reactive({
|
||||||
|
add: ['extra:config:add'],
|
||||||
|
edit: ['extra:config:edit'],
|
||||||
|
delete: ['extra:config:del'],
|
||||||
|
})
|
||||||
|
const phoneTrafficTableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
|
// {
|
||||||
|
// type: 'selection',
|
||||||
|
// prop: 'selection'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'index',
|
prop: 'index',
|
||||||
type: 'index',
|
type: 'index',
|
||||||
@@ -55,60 +150,206 @@ const tableConfig = reactive({
|
|||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configName',
|
||||||
label: 'ID',
|
label: '参数名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configKey',
|
||||||
label: '名称',
|
label: '参数键名',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configValue',
|
||||||
label: '类型',
|
label: '参数键值',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'configType',
|
||||||
label: '内容',
|
label: '系统内置',
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'workOrderNumber',
|
|
||||||
label: '创建时间',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'state',
|
|
||||||
label: '状态',
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
|
||||||
currentRender: ({ row, index }) => {
|
currentRender: ({ row, index }) => {
|
||||||
if (row.state !== null) {
|
if (row.configType !== null) {
|
||||||
return (<Tag dictType={'work_order_status'} value={row.state} />)
|
return (<Tag dictType={'yes_no'} value={row.configType} />)
|
||||||
} else {
|
} else {
|
||||||
return '--'
|
return '--'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'workOrderTime',
|
||||||
|
// label: '创建时间',
|
||||||
|
// align: 'center',
|
||||||
|
// width: 200
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'remark',
|
||||||
label: '备注',
|
label: '备注',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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: '',
|
api: '/extra/config',
|
||||||
params: {},
|
params: {
|
||||||
|
extraConfigType:extraConfigType.value
|
||||||
|
},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
{name: '新增', key: 'add',type:'primary',auth: auths.add},
|
||||||
|
// {name: '删除', key: 'delete', type: 'danger'},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
const searchPhoneTraffic = (val) => {
|
||||||
|
let obj = {...val,extraConfigType:extraConfigType.value}
|
||||||
|
if (obj.dateValue) {
|
||||||
|
obj.startTime = obj.dateValue[0]
|
||||||
|
obj.endTime = obj.dateValue[1]
|
||||||
|
delete obj.dateValue
|
||||||
|
}
|
||||||
|
phoneTrafficTableConfig.params = obj
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
const headBtnClick = (key) => {
|
const headBtnClick = (key) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'add':
|
case 'add':
|
||||||
handleAdd()
|
handleAdd()
|
||||||
break;
|
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) => {
|
||||||
|
getConfigDetails(row.configId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
res.data.configType=''+res.data.configType
|
||||||
|
nextTick(() => {
|
||||||
|
formDialogRef.value.getFormInstance().setValues(res.data)
|
||||||
|
// 清空校验
|
||||||
|
formDialogRef.value.getFormInstance().clearValidate()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectionChange = (selection) => {
|
||||||
|
if (selection.length !== 0) {
|
||||||
|
contactIds.value = selection.map(item => item.configId).join()
|
||||||
|
} else {
|
||||||
|
contactIds.value=''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const deleteContactMethod = (configId) => {
|
||||||
|
delConfig(configId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
tableIns.value.refresh()
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleMoreDelete = () => {
|
||||||
|
if(contactIds.value){
|
||||||
|
ElMessageBox.confirm(`确认删除选择的语音配置吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteContactMethod(contactIds.value)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
ElMessage.warning("请选择要删除的语音配置")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSingleDelete = (row) => {
|
||||||
|
ElMessageBox.confirm(`确认删除参数名称为${row.configName}的语音配置吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteContactMethod(row.configId)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//提交
|
||||||
|
const handleSubmitAddressBook = async (formInstance) => {
|
||||||
|
if (!formInstance) return;
|
||||||
|
let validate = await formInstance.validate()
|
||||||
|
if (!validate.isValidate) return;
|
||||||
|
let params={
|
||||||
|
...formInstance.getValues(),
|
||||||
|
configType:parseInt(formInstance.getValues().configType),
|
||||||
|
extraConfigType:extraConfigType.value
|
||||||
|
}
|
||||||
|
if (dialogType.value === "add") {
|
||||||
|
addConfig(params).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg);
|
||||||
|
tableIns.value.refresh()
|
||||||
|
formDialogRef.value.openOrCloseDialog(false)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
editConfig(params).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg);
|
||||||
|
tableIns.value.refresh()
|
||||||
|
formDialogRef.value.openOrCloseDialog(false)
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ export default defineConfig({
|
|||||||
// },
|
// },
|
||||||
"/api": {
|
"/api": {
|
||||||
// target: "http://frp.feashow.cn:31800/",
|
// target: "http://frp.feashow.cn:31800/",
|
||||||
target: "http://112.19.165.99:20002/",
|
target: "http://10.8.105.91:28080/",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
// rewrite: (path) => path.replace(/^\/api/, ""),
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||||
},
|
},
|
||||||
// "/socket": {
|
// "/socket": {
|
||||||
// target: "ws://frp.feashow.cn:8081/ws",
|
// target: "ws://frp.feashow.cn:8081/ws",
|
||||||
|
|||||||
Reference in New Issue
Block a user