Merge pull request 'master' (#102) from master into test
Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/102
This commit is contained in:
@@ -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/detail/info',
|
||||||
method:'post',
|
method:'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询用户详细
|
||||||
|
export const detailsUser=()=>{
|
||||||
|
return request({
|
||||||
|
url:'ops/user/detail/info',
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
11
src/api/workbench/index.js
Normal file
11
src/api/workbench/index.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import request from '@/utils/request.js'
|
||||||
|
import { method } from 'lodash'
|
||||||
|
|
||||||
|
//获取历史通话文本记录
|
||||||
|
|
||||||
|
export const getHistoryCallContent=(params)=>{
|
||||||
|
return request({
|
||||||
|
url:`/text/history/list/${params}`,
|
||||||
|
method:'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -1,7 +1,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import LiveCallItem from '@/components/liveCall/LiveCallItem.vue'
|
import LiveCallItem from '@/components/liveCall/LiveCallItem.vue'
|
||||||
|
import { watch } from 'vue';
|
||||||
|
import { getHistoryCallContent } from '../../api/workbench';
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
const recordLeftRef = ref(null);
|
const recordLeftRef = ref(null);
|
||||||
|
const props = defineProps({
|
||||||
|
rowData: String
|
||||||
|
})
|
||||||
|
|
||||||
const open = (row) => {
|
const open = (row) => {
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
};
|
};
|
||||||
@@ -16,6 +22,26 @@ const recordLeftObj = ref({
|
|||||||
content: []
|
content: []
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(() => props.rowData, async (newVal) => {
|
||||||
|
recordLeftObj.value.content = []
|
||||||
|
const info = ref({})
|
||||||
|
await getHistoryCallContent(newVal).then(data => {
|
||||||
|
// console.log(data);
|
||||||
|
info.value=data.data[0]
|
||||||
|
data.data[0].textVoList.forEach(item => {
|
||||||
|
recordLeftObj.value.content.push(item)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log(info.value);
|
||||||
|
|
||||||
|
leftHeadData.value.username = info.value.callIdNumber;
|
||||||
|
leftHeadData.value.phone = info.value.callPhone;
|
||||||
|
leftHeadData.value.orderName = info.value.orderName||'--';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
const scrollToBottom = (scrollbarRef) => {
|
const scrollToBottom = (scrollbarRef) => {
|
||||||
if (scrollbarRef) {
|
if (scrollbarRef) {
|
||||||
const container = scrollbarRef.$el.querySelector('.el-scrollbar__wrap');
|
const container = scrollbarRef.$el.querySelector('.el-scrollbar__wrap');
|
||||||
@@ -29,11 +55,11 @@ scrollToBottom(recordLeftRef.value)
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
});
|
});
|
||||||
|
//5555
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="dialogVisible" title="历史通话记录" width="600" :before-close="handleClose" class="box">
|
<el-dialog v-model="dialogVisible" title="历史通话记录" width="600" class="box">
|
||||||
<LiveCallItem ref="recordLeftRef" :recordObj="recordLeftObj" :headData="leftHeadData" style="width: 100%;" />
|
<LiveCallItem ref="recordLeftRef" :recordObj="recordLeftObj" :headData="leftHeadData" style="width: 100%;" />
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ const handleLogout = () => {
|
|||||||
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/ws/text/${token}`
|
const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}`
|
||||||
socket = new WebSocket(wsUrl)
|
socket = new WebSocket(wsUrl)
|
||||||
// 2. ws.send()给服务器发送信息
|
// 2. ws.send()给服务器发送信息
|
||||||
//连接发生错误的回调方法
|
//连接发生错误的回调方法
|
||||||
|
|||||||
@@ -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,6 +205,18 @@ const belongToRole = (roles) => {
|
|||||||
|
|
||||||
// 修改密码
|
// 修改密码
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
// 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(
|
ElMessageBox.confirm(
|
||||||
'提交成功',
|
'提交成功',
|
||||||
{
|
{
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="call-history"><h3 >历史通话记录</h3>
|
<div class="call-history"><h3 >历史通话记录</h3>
|
||||||
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||||
<voice ref="voiceRef" title="语音详情"/>
|
<voice ref="voiceRef" title="语音详情"/>
|
||||||
<infoLiveCall ref="infoLiveCallRef"/>
|
<infoLiveCall ref="infoLiveCallRef" :rowData="rowData"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
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 rowData = ref()
|
||||||
const infoLiveCallRef=ref()
|
const infoLiveCallRef=ref()
|
||||||
const voiceRef=ref()
|
const voiceRef=ref()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
@@ -40,27 +41,33 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'index',
|
prop: 'index',
|
||||||
type: 'index',
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'orderNumber',
|
||||||
label: '工单号',
|
label: '工单号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'orderName',
|
||||||
label: '工单名称',
|
label: '工单名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'orderContent',
|
||||||
label: '工单内容',
|
label: '工单内容',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'operationUser',
|
||||||
label: '处理人',
|
label: '处理人',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workOrderNumber',
|
prop: 'knotter',
|
||||||
label: '关单人',
|
label: '关单人',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
@@ -124,7 +131,7 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '',
|
api: '/order/list',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
// {name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
// {name: '新增', key: 'add',type:'primary',icon:'Plus'},
|
||||||
@@ -134,7 +141,10 @@ const handleVoice = (row) => {
|
|||||||
voiceRef.value.open(true)
|
voiceRef.value.open(true)
|
||||||
}
|
}
|
||||||
const handleInfo = (row) => {
|
const handleInfo = (row) => {
|
||||||
|
// console.log(row);
|
||||||
|
|
||||||
infoLiveCallRef.value.open(true)
|
infoLiveCallRef.value.open(true)
|
||||||
|
rowData.value = row.orderNumber
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -108,25 +108,27 @@ watch(() => props.rowData, (newRowData) => {
|
|||||||
|
|
||||||
//电话拨打记录
|
//电话拨打记录
|
||||||
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.forEach(info => {
|
item.data.forEach(info => {
|
||||||
if (info.answeredTime !== null) {
|
if (info.answeredTime !== null) {
|
||||||
@@ -246,7 +248,8 @@ defineExpose({
|
|||||||
<div>录音信息:</div>
|
<div>录音信息:</div>
|
||||||
<div class="textBox—record">
|
<div class="textBox—record">
|
||||||
|
|
||||||
<el-button @click="openRecord" type="primary" :icon="VideoPlay" style="margin-right: 10px ;">播放录音
|
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
||||||
|
style="margin-right: 10px ;">播放录音
|
||||||
</el-button>
|
</el-button>
|
||||||
<voice ref="voiceRef" title="录音详情" />
|
<voice ref="voiceRef" title="录音详情" />
|
||||||
<a :href="opsCallList.recordUrl" download="record.mp3">
|
<a :href="opsCallList.recordUrl" download="record.mp3">
|
||||||
|
|||||||
Reference in New Issue
Block a user