diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index df429eb8..32931369 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -131,6 +131,16 @@ +
+
+
+
司机
+
+ {{ userCount.count_remployee }}  +
+
+
@@ -705,7 +715,7 @@
事件截图: - +
@@ -1024,7 +1034,7 @@ export default { //左侧数据统计 this.getManCount();//人员统计$$ this.getWarnings();//报警统计$$ - // this.getAreas();//区域/风险区域$$ + this.getAreaList();//区域/风险区域$$ this.getGroup();//部门$$ //右上展示数据 this.getDangers();//危险作业$$ @@ -1147,11 +1157,31 @@ export default { } }) }, + getAreaList() { + debugger; + let that = this; + that.$API.am.area.list.req({page:0}).then(res => { + if (res.err_msg) { + } else { + debugger; + that.areaList = res; + } + }) + + }, //区域列表/获取风险区域 getAreas() { let that = this; - let areaList = that.$TOOL.data.get('qyjyAreaList'); - that.showRiskMarkers(areaList); + // let areaList = that.$TOOL.data.get('qyjyAreaList'); + + that.$API.am.area.list.req({page:0}).then(res => { + if (res.err_msg) { + } else { + that.areaList = res; + that.showRiskMarkers(that.areaList); + } + }) + }, //获取人员列表(全部在线标签列表信息) getAllMen() { @@ -1337,7 +1367,7 @@ export default { }); let maskColor = '',strokeColor=''; if(item.level===10){ - maskColor = 'rgba(0,0,255,.2)';//蓝色 + maskColor = 'rgba(0,0,255,.3)';//蓝色 strokeColor = '#0000ff'; }else if(item.level===20){ maskColor = 'rgba(255,255,0,0.44)';//黄色 @@ -1355,7 +1385,7 @@ export default { floorId: floorId,//楼层id color: maskColor,//颜色 height: 0,//基底高度 - stretchHeight: 25,//拉伸高度 + stretchHeight: 35,//拉伸高度 strokeColor: strokeColor,//边线颜色 show: true, //是否显示 allowPicking: true, //是否允许点击 @@ -2047,7 +2077,7 @@ export default { } .screen-cockpit { - width: 430px; + width: 440px; height: 100%; z-index: 1; display: flex; @@ -2536,7 +2566,7 @@ export default { margin-bottom: 10px; .count-list-item { - width: 33.3333%; + width: 25%; height: 50%; display: flex; @@ -2544,7 +2574,7 @@ export default { width: 50px; height: 50px; position: relative; - margin-right: 6px; + margin-right: 5px; flex-shrink: 0; } @@ -2576,6 +2606,10 @@ export default { background-size: 100% 100%; } + .item-img4 { + background: url(/public/img/icon_nbcl.png) no-repeat; + background-size: 100% 100%; + } .item-info { .normal { font-size: 12px; diff --git a/src/views/sys/user.vue b/src/views/sys/user.vue index 75d018ba..d7cdc650 100644 --- a/src/views/sys/user.vue +++ b/src/views/sys/user.vue @@ -54,6 +54,7 @@ v-model="query.search" placeholder="登录账号 / 姓名" clearable + @keyup.enter="handleQuery" > { var g = new dagreD3.graphlib.Graph().setGraph({ rankdir: "DL", - nodesep: 100, + nodesep: 80, edgesep: 50, //两条线之间的距离 - ranksep: 50, //节点之间的距离 + ranksep: 40, //节点之间的距离 marginx: 160, marginy: 20, }); @@ -361,7 +360,11 @@ export default { let nodes = response; // 添加节点 nodes.forEach((item) => { - g.setNode(item.id, { + if(item.id&&item.name){ + if(item.id===1548915292174946304){ + debugger; + } + g.setNode(item.id, { // 节点标签 label: item.name, // 节点形状 @@ -373,6 +376,7 @@ export default { rx: 5, //矩形节点圆角度 ry: 5, }); + } }); //获取流转得到线 链接关系 that.$API.wf.workflow.transitions.req(workFlow).then((res) => { @@ -406,7 +410,8 @@ export default { } ); }); - } else { + }else { + g.setEdge( transition0.source_state_.id, transition0.destination_state_.id, @@ -419,6 +424,23 @@ export default { ); } }); + // let nodess = g._nodes; + // let newObj = {}; + // for(let item in nodess){ + // if(nodess[item]===undefined){ + // }else{ + // newObj[item] = nodess[item]; + // } + // } + // debugger; + // console.log(newObj) + // // let list = Object.keys(nodess) + // // .filter((key) => nodess[key] !== null && nodess[key] !== undefined) + // // .reduce((acc, key) => ({ ...acc, [key]: nodess[key] }), {}); + // // debugger; + // // console.log(list) + // g._nodes = newObj; + console.log(g) g.nodes().length - 1; // 创建渲染器 let render = new dagreD3.render(); @@ -431,7 +453,6 @@ export default { document .getElementsByClassName("nodes")[0] .getBoundingClientRect().height + 50; - } else { } }); }