人员管控

This commit is contained in:
cwchen 2024-04-20 11:59:21 +08:00
parent 8ad5dc90b3
commit e604966071
6 changed files with 43 additions and 9 deletions

View File

@ -204,4 +204,9 @@ body {
.layui-form-item .layui-input-inline{
width: 150px;
}
.layui-table-cell {
height: auto;
white-space: normal;
}

View File

@ -310,4 +310,9 @@ ul li {
#tree>.layui-tree>.layui-tree-txt{
color: #fff !important;
}
.layui-table-cell {
height: auto;
white-space: normal;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -15,11 +15,17 @@ layui.config({
$("#voi-photo").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true });
$("#video-tree").niceScroll({ cursorborder: "", cursorcolor: "#c0c4cc", boxzoom: true });
dtree.on("node('video-tree')", function (obj) {
debugger
if (obj.param.level === '1') {
return parent.layer.msg('请选择球机', { icon: 7 });
}
const nodeId = obj.param.nodeId;
let puid = nodeId.replace('QJ', '');
let online = puid.substring(puid.length - 1, puid.length);
if(online === '0'){
return parent.layer.msg("设备离线",{icon:7});
}
puid = puid.substring(0, puid.length - 2);
if (puid) {
parent.layer.msg("视频加载中,请稍候...", { icon: 16, scrollbar: false, time: 1000, });
QXPlayVideo(puid, '0', winDom)

View File

@ -140,11 +140,11 @@ function wearGarList(){
bidCode: bidCode
},
cols: [[
{field: 'number', width:80,title: '序号', align: 'center', type: 'numbers'},
{field: 'deviceType', width:120, align: 'center', title: '装备类型'},
{field: 'deviceName', width:120, align: 'center', title: '装备名称'},
{field: 'userName', width:80, align: 'center', title: '负责人'},
{field: 'status', align: 'center', title: '状态' ,templet: function (d) {
{field: 'number', width:'10%',title: '序号', align: 'center', type: 'numbers'},
{field: 'deviceType', width:'20%', align: 'center', title: '装备类型'},
{field: 'deviceName', width:'20%', align: 'center', title: '装备名称'},
{field: 'userName', width:'20%', align: 'center', title: '负责人'},
{field: 'status', align: 'center', width:'10%', title: '状态' ,templet: function (d) {
if(d.status == 1){
return "在线";
}else if(d.status == 0){
@ -152,11 +152,11 @@ function wearGarList(){
}
}
},
{field: 'warningContent', align: 'center', fixed: 'right', title: '操作', templet: function (d) {
{field: 'warningContent', align: 'center', fixed: 'right', width:'10%', title: '操作', templet: function (d) {
if (d.status == 0) {
return "--";
}else{
return '<span color={red}>开启对讲</span>';
return '<a style="color:#008000;cursor: pointer;" onclick="openTalk()">开启对讲</a>';
}
}
@ -177,6 +177,11 @@ function wearGarList(){
}
// 安全帽开启对讲
function openTalk(){
return layer.msg('网络异常,无法开启对讲',{icon:2});
}
function mapInit(){
var lat,lon;
// if (navigator.geolocation) {

View File

@ -52,12 +52,12 @@ function loginout(type) {
backLoginPage();
}
}, function (xhr) {
error(xhr)
errorFn(xhr)
});
}
}
/* 请求错误 */
function error(xhr, status, error) {
function errorFn(xhr, status, error) {
if (xhr.status === 0) {
// 网络连接失败
console.error("网络连接失败,请检查网络是否正常");
@ -80,4 +80,17 @@ function backLoginPage() {
//判断字符是否为空的方法
function isEmpty(obj) {
return typeof obj == "undefined" || obj == null || obj == "" || obj == '00';
}
/**
* 获取当日时间
*/
function getNowTime() {
var nowDate = new Date();
var year = nowDate.getFullYear();
var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) :
nowDate.getMonth() + 1;
var day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
var dateStr = year + "-" + month + "-" + day;
return dateStr;
}