Compare commits
3 Commits
808bc47a2d
...
0f90c79e98
| Author | SHA1 | Date |
|---|---|---|
|
|
0f90c79e98 | |
|
|
e953789377 | |
|
|
37a901e90f |
|
|
@ -3,7 +3,7 @@
|
|||
.toolBarRight {
|
||||
position: absolute;
|
||||
right: 500px;
|
||||
z-index: 10000;
|
||||
z-index: 100;
|
||||
background: rgba(43, 44, 47, 0.8);
|
||||
border-radius: 3px;
|
||||
box-shadow: 1px 2px 1px rgba(0, 0, 0, .15);
|
||||
|
|
|
|||
|
|
@ -2,11 +2,28 @@
|
|||
<div class="onebuttoncall-container">
|
||||
<div class="title">呼叫中心</div>
|
||||
<div class="filter-container">
|
||||
<el-checkbox-group v-model="checkList" @change="checkChange">
|
||||
<el-checkbox-group v-model="checkList" @change="checkChange" style="float:left;line-height:30px;color:#fff;">
|
||||
<el-checkbox label="护林员" value="1" style="margin-right:10px;"></el-checkbox>
|
||||
<el-checkbox label="消防员" value="2"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
<el-input clearable size="mini" prefix-icon="el-icon-search" style="width: 200px;margin-bottom: 0;margin:0px 12px;" class="filter-item" :placeholder="'人员姓名'"
|
||||
>
|
||||
</el-input>
|
||||
|
||||
<el-button type="default" size="mini" >重置</el-button>
|
||||
<el-button type="primary" size="mini" >搜索</el-button>
|
||||
|
||||
</div>
|
||||
<div class="call-text-container" v-if="callTextShow">
|
||||
<div class="call-title">呼叫内容</div>
|
||||
<div style="padding:15px;">
|
||||
<el-input placeholder="请输入呼叫内容" v-model="callText"></el-input>
|
||||
<p> </p>
|
||||
<el-button type="default" size="small" @click="callTextShow = false;">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="callPhone">呼叫</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-container">
|
||||
<div class="table-body">
|
||||
<div class="table-li" v-for="(item,index) in list" :key="index">
|
||||
|
|
@ -15,70 +32,56 @@
|
|||
<i class="el-icon el-icon-check" v-show="item.check" ></i>
|
||||
</div>
|
||||
<div style="positon:relative;width:160px;left:50px;">
|
||||
<div style="color:#156EF9;font-size:18px;">{{item.username}}</div>
|
||||
<div>{{item.phone}}</div>
|
||||
<div style="color:#156EF9;font-size:18px;">{{item.Name}}</div>
|
||||
<div>{{item.Account}}</div>
|
||||
</div>
|
||||
<div class="flex ai-c jc-e" style="width:75px">
|
||||
<img class="img-box" src="/img/phone.png" @click="callPhone(item.phone)" />
|
||||
<img class="img-box" src="/img/phone.png" @click="callPhoneOne(item.Account)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex ai-c jc-e callbox">
|
||||
<el-button type="primary" size="large" @click="callPhoneAll">一键呼叫</el-button>
|
||||
<div class="flex callbox">
|
||||
<el-pagination
|
||||
background
|
||||
:page-size="listQuery.pageSize"
|
||||
:pager-count="12"
|
||||
layout="prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
<el-button type="primary" size="small" style="float:right;position:absolute;right:30px;" @click="callPhoneAll">一键呼叫</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMethodCommon, postMethodCommon } from '../../../api/common';
|
||||
export default {
|
||||
name: 'onebuttoncall',
|
||||
data(){
|
||||
return {
|
||||
|
||||
list:[
|
||||
{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
},{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
},{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
},{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
},{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
},{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
},{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
},{
|
||||
username:"徐景良",
|
||||
phone:"17861857725",
|
||||
check:false,
|
||||
}
|
||||
|
||||
],
|
||||
listQuery:{
|
||||
pageIndex:1,
|
||||
pageSize:12
|
||||
},
|
||||
checkPhoneArr:[],
|
||||
checkRandom:1,
|
||||
checkList:[],
|
||||
checkNumber:[],
|
||||
|
||||
total:0,
|
||||
callText:null,
|
||||
callTextShow:false,
|
||||
phones:null,
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getListData();
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
|
|
@ -90,15 +93,25 @@
|
|||
|
||||
},
|
||||
getListData(){
|
||||
|
||||
getMethodCommon("/FireCodeApp/GetForestryUser",this.listQuery).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.list = res.data
|
||||
this.total = res.count
|
||||
}
|
||||
})
|
||||
},
|
||||
callPhoneOne(phone){
|
||||
this.phones = phone;
|
||||
this.callTextShow = true;
|
||||
},
|
||||
callPhoneAll(){
|
||||
|
||||
this.phones = this.checkList.join(",")
|
||||
this.callTextShow = true;
|
||||
},
|
||||
checkNews(index){
|
||||
this.list[index].check = !this.list[index].check;
|
||||
|
||||
this.getCheckList(this.list[index].check,this.list[index].phone);
|
||||
this.getCheckList(this.list[index].check,this.list[index].Account);
|
||||
|
||||
this.getCheckNumber(this.list[index].check,this.list[index]);
|
||||
this.checkRandom = Math.random()*100000000;
|
||||
|
|
@ -138,6 +151,27 @@
|
|||
this.checkNumber.splice(idx,1);
|
||||
}
|
||||
},
|
||||
callPhone(){
|
||||
let date = new Date();
|
||||
let dates = date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDate()+"日"+date.getHours()+"时"+date.getMinutes()+"分"+date.getSeconds()+"秒";
|
||||
|
||||
let param = {
|
||||
phoneNumbers: this.phones,
|
||||
time: dates,
|
||||
address:"暂无地址",
|
||||
work:this.callText
|
||||
}
|
||||
console.log("AAAAAAAAAAAAAA",param);
|
||||
return null;
|
||||
postMethodCommon('/FireCodePC/EventAssign',param).then(res =>{
|
||||
if(res.code == 200){
|
||||
this.$message({
|
||||
message: res.message,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -156,10 +190,10 @@
|
|||
text-indent:22px;
|
||||
height:60px;
|
||||
line-height:60px;
|
||||
text-indent:36px;
|
||||
text-indent:46px;
|
||||
}
|
||||
.filter-container{
|
||||
padding:15px;
|
||||
padding:15px 30px;
|
||||
}
|
||||
.box-container{
|
||||
width: calc( 100% - 0px);
|
||||
|
|
@ -196,6 +230,7 @@
|
|||
|
||||
.img-box{
|
||||
width:42px;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -250,4 +285,37 @@
|
|||
border: 1px solid #F18B00;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .el-pager li{
|
||||
background:none;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.call-text-container{
|
||||
width:400px;
|
||||
height:300px;
|
||||
background-image:url(/img/goods.png);
|
||||
background-size:100% 100%;
|
||||
position:absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
z-index:100000000000;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
.call-title{
|
||||
width:100%;
|
||||
height:40px;
|
||||
line-height: 40px;
|
||||
color:#fff;
|
||||
text-indent:15px;
|
||||
z-index:1000000;
|
||||
}
|
||||
.callbox{
|
||||
width:100%;
|
||||
padding-top:15px;
|
||||
}
|
||||
|
||||
::v-deep .el-checkbox__label{
|
||||
color:#fff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -33,26 +33,27 @@
|
|||
data(){
|
||||
return {
|
||||
list:[
|
||||
// {
|
||||
// "account":"13280580815",
|
||||
// "createtime":"2023-03-23 15:44:38",
|
||||
// "height":0.5,
|
||||
// "ip":"192.168.10.101",
|
||||
// "lat":34.999998687396594,
|
||||
// "lng":117.95890203784971,
|
||||
// "model":"Mavic Air 2"
|
||||
// },{
|
||||
// "account":"17861857725",
|
||||
// "createtime":"2023-03-23 15:44:38",
|
||||
// "height":0.5,
|
||||
// "ip":"192.168.10.101",
|
||||
// "lat":35.19998687396594,
|
||||
// "lng":117.95890203784971,
|
||||
// "model":"Air Two"
|
||||
// }
|
||||
{
|
||||
"account":"13280580815",
|
||||
"createtime":"2023-03-23 15:44:38",
|
||||
"height":0.5,
|
||||
"ip":"192.168.10.101",
|
||||
"lat":34.999998687396594,
|
||||
"lng":117.95890203784971,
|
||||
"model":"Mavic Air 2"
|
||||
},{
|
||||
"account":"17861857725",
|
||||
"createtime":"2023-03-23 15:44:38",
|
||||
"height":0.5,
|
||||
"ip":"192.168.10.101",
|
||||
"lat":35.19998687396594,
|
||||
"lng":117.95890203784971,
|
||||
"model":"Air Two"
|
||||
}
|
||||
],
|
||||
player:null,
|
||||
uavGraphicLayer:null,
|
||||
myWebSocket:null,
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
|
|
@ -63,9 +64,45 @@
|
|||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
this.initWebSocket();
|
||||
},
|
||||
methods:{
|
||||
initWebSocket() {
|
||||
let _this = this;
|
||||
if ("WebSocket" in window) {
|
||||
// 打开一个 web socket
|
||||
this.myWebSocket = new WebSocket("ws://221.2.83.254:9002/ws");
|
||||
this.myWebSocket.onopen = function () {
|
||||
//Web Socket 已连接上,使用 send() 方法发送数据
|
||||
console.log("WEBSOCKET-ONLINE");
|
||||
};
|
||||
this.myWebSocket.onmessage = function (evt) {
|
||||
if (!evt.data || evt.data == '发生数据') {
|
||||
return false;
|
||||
}
|
||||
let obj = JSON.parse(evt.data);
|
||||
|
||||
// if(obj != 'close'){
|
||||
// if(obj != ""){
|
||||
// this.list = [obj]
|
||||
// }else{
|
||||
// getUavData([]);
|
||||
// }
|
||||
// }else{
|
||||
// getUavData([]);
|
||||
// }
|
||||
};
|
||||
this.myWebSocket.onclose = function () {
|
||||
console.log("WEBSOCKET-CLOSED");
|
||||
};
|
||||
} else {
|
||||
// 浏览器不支持 WebSocket
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "您的浏览器不支持 WebSocket!",
|
||||
});
|
||||
}
|
||||
},
|
||||
flyToPoint(lngLat){
|
||||
try{
|
||||
this.globalmap.flyToPoint(lngLat, { radius: 1200, "pitch": -90 });
|
||||
|
|
@ -118,6 +155,7 @@
|
|||
})
|
||||
},
|
||||
playerVideo(phone){
|
||||
this.myWebSocket.send(phone);
|
||||
if (this.player) {
|
||||
this.player.src("http://live.hopetrytech.com/live/" + phone + ".flv");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue