Merge pull request 'master' (#139) from master into test
Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/139
This commit is contained in:
@@ -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 28081:80 smartopsweb:latest
|
docker run --name smartopsweb --link smartopsserver --restart=always -d -p 28081:80 smartopsweb:latest
|
||||||
|
|
||||||
|
|||||||
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;
|
||||||
|
|||||||
@@ -6,32 +6,36 @@
|
|||||||
<span>电话号码:{{ recordObj.phone ||'--'}}</span>
|
<span>电话号码:{{ recordObj.phone ||'--'}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div><span>工单名称:{{ recordObj.orderName||'--' }}</span></div>
|
<div><span>工单名称:{{ recordObj.orderName||'--' }}</span></div>
|
||||||
<div><span>{{ recordObj.type=='1'?'线路一':recordObj.type=='2'?'线路二':'' }}</span></div>
|
<!-- <div><span>{{ recordObj.type=='1'?'线路一':recordObj.type=='2'?'线路二':'' }}</span></div>-->
|
||||||
|
<div><span>{{ lineName }}</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 recordObj.content" :key="index">
|
||||||
<div class="time-grap"><span>{{ item.conversationTimestamp || '6月5日 12:05' }}</span></div>
|
<el-divider border-style="dotted" v-if="item.isLine">{{item.lineMsg}}</el-divider>
|
||||||
<!-- 我的 -->
|
<div v-else>
|
||||||
<div v-if="item.speaker==0" class="word-my">
|
<div class="time-grap"><span>{{ item.conversationTimestamp || '6月5日 12:05' }}</span></div>
|
||||||
<div class="info">
|
<!-- 我的 -->
|
||||||
<!-- <p class="name">{{ item.speaker==0?recordObj.name:'AI助手' }} </p>-->
|
<div v-if="item.speaker==0" class="word-my">
|
||||||
<p class="name">{{ item.speaker==0?item.callIdNumber:'AI助手' }} </p>
|
<div class="info">
|
||||||
<div class="info-content">{{ item.message }}</div>
|
<!-- <p class="name">{{ item.speaker==0?recordObj.name:'AI助手' }} </p>-->
|
||||||
|
<p class="name">{{ item.speaker==0?item.callIdNumber:'AI助手' }} </p>
|
||||||
|
<div class="info-content">{{ item.message }}</div>
|
||||||
|
</div>
|
||||||
|
<el-avatar text="我"/>
|
||||||
</div>
|
</div>
|
||||||
<el-avatar text="我"/>
|
|
||||||
</div>
|
<!-- 对方 -->
|
||||||
<!-- 对方 -->
|
<div v-else class="word">
|
||||||
<div v-else class="word">
|
<el-avatar text="对方"/>
|
||||||
<el-avatar text="对方"/>
|
<div class="info">
|
||||||
<div class="info">
|
<p class="name">{{ item.speaker==0?item.callIdNumber:'AI助手' }} </p>
|
||||||
<p class="name">{{ item.speaker==0?item.callIdNumber:'AI助手' }} </p>
|
<div class="info-content">{{ item.message }}</div>
|
||||||
<div class="info-content">{{ item.message }}</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <el-divider border-style="dotted" v-if="handleShowDeadLine(recordObj)">一轮通话结束~~</el-divider>-->
|
|
||||||
<!-- <el-empty description="暂无通话记录~" v-else/>-->
|
<!-- <el-empty description="暂无通话记录~" v-else/>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -51,6 +55,10 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {}
|
||||||
},
|
},
|
||||||
|
lineName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const getScrollbarRef=()=>{
|
const getScrollbarRef=()=>{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<!--测试 张三 : 17260625724565 李四: 17260625724123-->
|
<!--测试 张三 : 17260625724565 李四: 17260625724123-->
|
||||||
<div class="live-call-block">
|
<div class="live-call-block">
|
||||||
<live-call-item-home ref="recordLeftRef" :recordObj="recordLeftObj" :headData="leftHeadData"/>
|
<live-call-item-home ref="recordLeftRef" :recordObj="recordLeftObj" :headData="leftHeadData" lineName="线路一"/>
|
||||||
<live-call-item-home ref="recordRightRef" :recordObj="recordRightObj" :headData="rightHeadData"/>
|
<live-call-item-home ref="recordRightRef" :recordObj="recordRightObj" :headData="rightHeadData" lineName="线路二"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -55,6 +55,13 @@ const handleLogout = () => {
|
|||||||
permisstionStore.removeMenu()
|
permisstionStore.removeMenu()
|
||||||
router.push('/login')
|
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}`)
|
||||||
@@ -93,6 +100,19 @@ const initWebSocket = () => {
|
|||||||
recordLeftObj.value.phone=data.phone
|
recordLeftObj.value.phone=data.phone
|
||||||
recordLeftObj.value.type=data.type
|
recordLeftObj.value.type=data.type
|
||||||
recordLeftObj.value.orderName=data.orderName
|
recordLeftObj.value.orderName=data.orderName
|
||||||
|
let flag=handleShowDeadLine(recordLeftObj.value,data)
|
||||||
|
console.info("🚀 ~method:flag -----", flag)
|
||||||
|
if(flag){
|
||||||
|
recordLeftObj.value.content.push({
|
||||||
|
// callIdNumber: "17282197782048",
|
||||||
|
// conversationId:0,
|
||||||
|
// conversationTimestamp: "",
|
||||||
|
// createTime: "2024-10-08",
|
||||||
|
isLine:true,
|
||||||
|
lineMsg: "一轮通话结束~~",
|
||||||
|
speaker: data.content.speaker
|
||||||
|
})
|
||||||
|
}
|
||||||
recordLeftObj.value.content.push(data.content)
|
recordLeftObj.value.content.push(data.content)
|
||||||
// console.info("🚀 ~method:onmessage -----", recordLeftObj.value)
|
// console.info("🚀 ~method:onmessage -----", recordLeftObj.value)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -103,6 +123,19 @@ const initWebSocket = () => {
|
|||||||
recordRightObj.value.phone=data.phone
|
recordRightObj.value.phone=data.phone
|
||||||
recordRightObj.value.type=data.type
|
recordRightObj.value.type=data.type
|
||||||
recordRightObj.value.orderName=data.orderName
|
recordRightObj.value.orderName=data.orderName
|
||||||
|
let flag=handleShowDeadLine(recordRightObj.value,data)
|
||||||
|
console.info("🚀 ~method:flag -----", flag)
|
||||||
|
if(flag){
|
||||||
|
recordRightObj.value.content.push({
|
||||||
|
// callIdNumber: "17282197782048",
|
||||||
|
// conversationId:0,
|
||||||
|
// conversationTimestamp: "",
|
||||||
|
// createTime: "2024-10-08",
|
||||||
|
isLine:true,
|
||||||
|
lineMsg: "一轮通话结束~~",
|
||||||
|
speaker: data.content.speaker
|
||||||
|
})
|
||||||
|
}
|
||||||
recordRightObj.value.content.push(data.content)
|
recordRightObj.value.content.push(data.content)
|
||||||
// console.info("🚀 ~method:onmessage -----", recordRightObj.value)
|
// console.info("🚀 ~method:onmessage -----", recordRightObj.value)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user