0712
This commit is contained in:
parent
0231e6ce32
commit
9ce7a254bd
|
@ -30,9 +30,6 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
blt:{
|
||||
list:{
|
||||
|
|
|
@ -3,45 +3,78 @@
|
|||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch">同步</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="updateData">同步</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery" >
|
||||
<scTable ref="table" :apiObj="apiObj" :params="query" row-key="id" @selection-change="selectionChange" stripe>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="喇叭名称" prop="name" min-width="150"></el-table-column>
|
||||
<el-table-column label="音量" prop="extra" min-width="100">
|
||||
<el-table-column label="id" prop="id" min-width="90"></el-table-column>
|
||||
<el-table-column label="mac" prop="code" min-width="90"></el-table-column>
|
||||
<el-table-column label="id" prop="id" min-width="90"></el-table-column>
|
||||
<el-table-column label="电量" prop="third_info" min-width="90">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.extra&&scope.row.extra.player">{{scope.row.extra.player.EnvVolume}}</span>
|
||||
<span v-if="scope.row.third_info">{{scope.row.third_info.battery}}%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备sn" prop="sn" min-width="90"></el-table-column>
|
||||
<el-table-column label="ip" prop="extra" min-width="90">
|
||||
<el-table-column label="状态" prop="third_info" min-width="90">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.extra">{{scope.row.extra.ip}}</span>
|
||||
<span v-if="scope.row.third_info&&scope.row.third_info.workStatus===0">运动</span>
|
||||
<span v-else-if="scope.row.third_info&&scope.row.third_info.workStatus===2">静止</span>
|
||||
<span v-else>静止</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="extra" min-width="90">
|
||||
<el-table-column label="在线" prop="third_info" min-width="90">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.extra">{{scope.row.extra.online}}</span>
|
||||
<span v-if="scope.row.third_info.online">在线</span>
|
||||
<span v-else>离线</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="位置" prop="count_people" min-width="90"></el-table-column>-->
|
||||
<el-table-column label="所在区域" prop="create_time" min-width="180"></el-table-column>
|
||||
<el-table-column label="覆盖区域" prop="create_time" width="160"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button text type="primary" size="small" @click="handlePosition(scope.row)">标记位置</el-button>
|
||||
<el-button v-if="scope.row.employee!==null" text type="warning" size="small" @click="handleBindBlt(20, scope.row)">解绑</el-button>
|
||||
<el-button v-else text type="primary" size="small" @click="handleBindBlt(10, scope.row)">绑定</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<channel-view v-if="dialogSave" ref="saveDialog" :channelType="50" :channelCode="channelCode" :channelName="channelName" @closed="dialogSave=false"></channel-view>
|
||||
<el-Dialog
|
||||
title="绑定定位卡"
|
||||
v-model="showBindBlt"
|
||||
destroy-on-close
|
||||
@closed="closeDrawer"
|
||||
>
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="卡号">
|
||||
{{form.blt}}
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定员工">
|
||||
<el-select v-model="form.employee" style="width: 100%" :disabled="dis">
|
||||
<el-option
|
||||
v-for="item in employeeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button v-if="form.type===10" type="primary" @click="submitBindBlt">绑定</el-button>
|
||||
<el-button v-if="form.type===20" type="primary" @click="submitBindBlt">解绑</el-button>
|
||||
<el-button @click="showBindBlt = false">取消</el-button>
|
||||
</template>
|
||||
</el-Dialog>
|
||||
</template>
|
||||
<script>
|
||||
import channelView from './vchannel_view'
|
||||
|
@ -52,36 +85,64 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.third.blt.list,
|
||||
dialogSave: false,
|
||||
limitedVisible: false,
|
||||
query: {},
|
||||
apiObj: this.$API.third.tdevice.list,
|
||||
query: {
|
||||
type:30,
|
||||
},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null
|
||||
},
|
||||
channelCode:'',
|
||||
channelName:'',
|
||||
dis: false,
|
||||
showBindBlt: false,
|
||||
employeeList: [],
|
||||
bindBltMac: '',
|
||||
form: {
|
||||
type: 10,
|
||||
blt: '',
|
||||
employee: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlePosition(row){
|
||||
this.channelCode = row.sn;
|
||||
this.channelName = row.name;
|
||||
this.dialogSave = true;
|
||||
mounted(){
|
||||
this.getEmployeeList();
|
||||
},
|
||||
methods: {
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection){
|
||||
this.selection = selection;
|
||||
},
|
||||
|
||||
//搜索
|
||||
upsearch(){
|
||||
//同步
|
||||
updateData(){
|
||||
this.$API.third.tdevice.list.req({});
|
||||
},
|
||||
|
||||
resetQuery(){
|
||||
this.query = {}
|
||||
getEmployeeList() {
|
||||
let that = this;
|
||||
that.$API.hrm.employee.list.req({job_state:10,page: 0}).then(res => {
|
||||
that.tdevice = res;
|
||||
that.employeeList = res;
|
||||
})
|
||||
},
|
||||
handleBindBlt(type, row) {
|
||||
this.dis = false;
|
||||
this.form.blt = row.id;
|
||||
this.bindBltMac = row.mac;
|
||||
this.form.type = type;
|
||||
if(type===20){
|
||||
this.dis = true;
|
||||
this.form.employee = row.employee;
|
||||
}
|
||||
this.showBindBlt = true;
|
||||
},
|
||||
submitBindBlt() {
|
||||
let that = this;
|
||||
that.$API.third.tdevice.bltBind.req(this.form).then(res => {
|
||||
if(res.err_msg){}else{
|
||||
that.showBindBlt = false;
|
||||
that.$refs.table.refresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -949,7 +949,7 @@
|
|||
center: {x: 114.63059258861512, y: 38.81407163905287, z: 1},
|
||||
// center: {x:120,y:30,z:10},
|
||||
//相机距屏幕中心点距离(单位m)
|
||||
distance: 400,
|
||||
distance: 550,
|
||||
// 旋转角(单位°)
|
||||
rotate: 0,
|
||||
//倾斜角(单位°)
|
||||
|
@ -1041,6 +1041,7 @@
|
|||
otest.appendChild(newEle);
|
||||
otest.appendChild(newEle2);
|
||||
newEle2.onclick = () => {
|
||||
newEle2.setAttribute("style","width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;-webkit-animation: rotate 4s linear infinite;animation: rotate 4s linear infinite;");
|
||||
this.$API.am.video.item.req(this.params).then(res => {
|
||||
console.log(res);
|
||||
this.url = res.url;
|
||||
|
@ -1052,6 +1053,7 @@
|
|||
});
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load();
|
||||
newEle2.setAttribute("style","width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
|
||||
flvPlayer.play();
|
||||
}
|
||||
})
|
||||
|
@ -1090,7 +1092,7 @@
|
|||
this.getDangers();//危险作业$$
|
||||
// this.getRisks();//风险区域$$
|
||||
this.getSpeakers();//喇叭$$
|
||||
this.getAllMen();//人员
|
||||
// this.getAllMen();//人员
|
||||
this.getAllPost();//岗位
|
||||
setInterval(function () {
|
||||
|
||||
|
@ -1103,41 +1105,6 @@
|
|||
that.areaDetail = true;
|
||||
// let points = data.third_info.xx_rail.detail.polygon.points[0];
|
||||
window.map.flyToPosition(new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),{duration:1000});
|
||||
|
||||
/*debugger;
|
||||
let tool = new jsmap.JSMapCoordTool(map);
|
||||
let points = data.third_info.xx_rail.detail.polygon.points;
|
||||
let position = [];*/
|
||||
/*for(let i=0;i<points.length;i++){
|
||||
let item = tool.screenToMapCoordinate(points[i]);
|
||||
// let item = new jsmap.JSPoint(points[i].x, points[i].y, 0);
|
||||
position.push(item);
|
||||
}*/
|
||||
/*window.map.flyToPosition ({x: points[0].x, y: points[0].y, z:0},{
|
||||
duration:1000,
|
||||
offset:{
|
||||
rotate: 45,
|
||||
tilt: 60,
|
||||
range: 100
|
||||
}
|
||||
}*/
|
||||
/*that.eareMarker = new jsmap.JSPolygonMarker({
|
||||
id: data.id,//id
|
||||
position: [
|
||||
new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),
|
||||
new jsmap.JSPoint(114.63185023632963, 38.81241816295427, 0),
|
||||
new jsmap.JSPoint(114.63160294240738, 38.812229296478634,0),
|
||||
new jsmap.JSPoint(114.63143965827588, 38.81235778393449, 0),
|
||||
|
||||
],//坐标集合
|
||||
// position:position,//坐标集合
|
||||
floorId: 1,//楼层id
|
||||
color: 'rgba(0,0,255,.44)',//填充颜色
|
||||
strokeColor: '#2bff1d',//边线颜色
|
||||
depthTest: false,//是否开启深度检测
|
||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
|
||||
});
|
||||
that.areaMarkerLayer.addMarker(that.eareMarker);*/
|
||||
},
|
||||
//岗位
|
||||
getAllPost() {
|
||||
|
@ -2616,16 +2583,6 @@
|
|||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.item-img4 {
|
||||
background: url(/public/img/icon_nbcl.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.item-img5 {
|
||||
background: url(/public/img/icon_wbcl.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.item-info {
|
||||
.normal {
|
||||
font-size: 12px;
|
||||
|
|
|
@ -1,43 +1,42 @@
|
|||
<template>
|
||||
<el-card shadow="hover" header="欢迎">
|
||||
<el-card shadow="hover" header="今日事件">
|
||||
<div class="welcome">
|
||||
<div class="logo">
|
||||
<img src="img/logo.png">
|
||||
<h2>欢迎体验 SCUI</h2>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<div class="tips-item">
|
||||
<div class="tips-item-icon"><el-icon><el-icon-menu/></el-icon></div>
|
||||
<div class="tips-item-message">这里是项目控制台,你可以点击右上方的“自定义”按钮来添加移除或者移动部件。</div>
|
||||
</div>
|
||||
<div class="tips-item">
|
||||
<div class="tips-item-icon"><el-icon><el-icon-promotion/></el-icon></div>
|
||||
<div class="tips-item-message">在提高前端算力、减少带宽请求和代码执行力上多次优化,并且持续着。</div>
|
||||
</div>
|
||||
<div class="tips-item">
|
||||
<div class="tips-item-icon"><el-icon><el-icon-milk-tea/></el-icon></div>
|
||||
<div class="tips-item-message">项目目的:让前端工作更快乐</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<el-button type="primary" icon="el-icon-check" size="large" @click="godoc">文档</el-button>
|
||||
</div>
|
||||
<el-table :data="eventData.list">
|
||||
<el-table-column label="类型" prop=""></el-table-column>
|
||||
<el-table-column label="区域" prop=""></el-table-column>
|
||||
<el-table-column label="当事人" prop=""></el-table-column>
|
||||
<el-table-column label="人员类型" prop=""></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:page-size="params.page_size"
|
||||
:pager-count="5"
|
||||
v-model:currentPage="params.page"
|
||||
layout="prev, pager, next"
|
||||
:total="eventData.total"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
title: "欢迎",
|
||||
title: "今日事件",
|
||||
icon: "el-icon-present",
|
||||
description: "项目特色以及文档链接",
|
||||
description: "今日事件",
|
||||
data() {
|
||||
return {
|
||||
|
||||
params: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
eventData: {
|
||||
list: [],
|
||||
total: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
godoc(){
|
||||
godoc() {
|
||||
window.open("https://lolicode.gitee.io/scui-doc/")
|
||||
}
|
||||
}
|
||||
|
@ -45,15 +44,60 @@
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.welcome {}
|
||||
.welcome .logo {text-align: center;}
|
||||
.welcome .logo img {vertical-align: bottom;width: 100px;height: 100px;margin-bottom: 20px;}
|
||||
.welcome .logo h2 {font-size: 30px;font-weight: normal;display: flex;align-items: center;justify-content: center;}
|
||||
.welcome {
|
||||
}
|
||||
|
||||
.tips {margin-top: 20px;padding:0 40px;}
|
||||
.tips-item {display: flex;align-items: center;justify-content: center;padding:7.5px 0;}
|
||||
.tips-item-icon {width: 40px;height:40px;display: flex;align-items: center;justify-content: center;border-radius: 50%;font-size: 18px;margin-right: 20px;color: var(--el-color-primary);background: rgba(180,180,180,0.1);}
|
||||
.tips-item-message {flex: 1;font-size: 14px;}
|
||||
.welcome .logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.actions {text-align: center;margin: 40px 0 20px 0;}
|
||||
.welcome .logo img {
|
||||
vertical-align: bottom;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.welcome .logo h2 {
|
||||
font-size: 30px;
|
||||
font-weight: normal;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-top: 20px;
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
.tips-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 7.5px 0;
|
||||
}
|
||||
|
||||
.tips-item-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
font-size: 18px;
|
||||
margin-right: 20px;
|
||||
color: var(--el-color-primary);
|
||||
background: rgba(180, 180, 180, 0.1);
|
||||
}
|
||||
|
||||
.tips-item-message {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
text-align: center;
|
||||
margin: 40px 0 20px 0;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue