This commit is contained in:
曹前明 2022-09-06 17:19:25 +08:00
commit 8fca5caaa8
3 changed files with 73 additions and 16 deletions

View File

@ -131,6 +131,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="count-list-item">
<div class="item-img item-img4"></div>
<div class="item-info">
<div title="司机" class="normal">司机</div>
<div class="bottom">
<span class="large">{{ userCount.count_remployee }}</span>&nbsp;<span
class="normal"></span>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="cockpit-alarm"> <div class="cockpit-alarm">
@ -705,7 +715,7 @@
</div> </div>
<div class="risk-item"> <div class="risk-item">
<span class="risk-item-name">事件截图</span> <span class="risk-item-name">事件截图</span>
<img :src="'http://10.0.11.101:8000' + screenWarningItem.global_img" style="width: 250px;"> <img :src="screenWarningItem.global_img" style="width: 250px;">
</div> </div>
</div> </div>
</div> </div>
@ -1024,7 +1034,7 @@ export default {
// //
this.getManCount();//$$ this.getManCount();//$$
this.getWarnings();//$$ this.getWarnings();//$$
// this.getAreas();///$$ this.getAreaList();///$$
this.getGroup();//$$ this.getGroup();//$$
// //
this.getDangers();//$$ 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() { getAreas() {
let that = this; let that = this;
let areaList = that.$TOOL.data.get('qyjyAreaList'); // let areaList = that.$TOOL.data.get('qyjyAreaList');
that.showRiskMarkers(areaList);
that.$API.am.area.list.req({page:0}).then(res => {
if (res.err_msg) {
} else {
that.areaList = res;
that.showRiskMarkers(that.areaList);
}
})
}, },
//线 //线
getAllMen() { getAllMen() {
@ -1337,7 +1367,7 @@ export default {
}); });
let maskColor = '',strokeColor=''; let maskColor = '',strokeColor='';
if(item.level===10){ if(item.level===10){
maskColor = 'rgba(0,0,255,.2)';// maskColor = 'rgba(0,0,255,.3)';//
strokeColor = '#0000ff'; strokeColor = '#0000ff';
}else if(item.level===20){ }else if(item.level===20){
maskColor = 'rgba(255,255,0,0.44)';// maskColor = 'rgba(255,255,0,0.44)';//
@ -1355,7 +1385,7 @@ export default {
floorId: floorId,//id floorId: floorId,//id
color: maskColor,// color: maskColor,//
height: 0,// height: 0,//
stretchHeight: 25,// stretchHeight: 35,//
strokeColor: strokeColor,//线 strokeColor: strokeColor,//线
show: true, // show: true, //
allowPicking: true, // allowPicking: true, //
@ -2047,7 +2077,7 @@ export default {
} }
.screen-cockpit { .screen-cockpit {
width: 430px; width: 440px;
height: 100%; height: 100%;
z-index: 1; z-index: 1;
display: flex; display: flex;
@ -2536,7 +2566,7 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
.count-list-item { .count-list-item {
width: 33.3333%; width: 25%;
height: 50%; height: 50%;
display: flex; display: flex;
@ -2544,7 +2574,7 @@ export default {
width: 50px; width: 50px;
height: 50px; height: 50px;
position: relative; position: relative;
margin-right: 6px; margin-right: 5px;
flex-shrink: 0; flex-shrink: 0;
} }
@ -2576,6 +2606,10 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
} }
.item-img4 {
background: url(/public/img/icon_nbcl.png) no-repeat;
background-size: 100% 100%;
}
.item-info { .item-info {
.normal { .normal {
font-size: 12px; font-size: 12px;

View File

@ -54,6 +54,7 @@
v-model="query.search" v-model="query.search"
placeholder="登录账号 / 姓名" placeholder="登录账号 / 姓名"
clearable clearable
@keyup.enter="handleQuery"
></el-input> ></el-input>
<el-button <el-button
type="primary" type="primary"
@ -279,7 +280,8 @@ export default {
userTypeOptions :{ userTypeOptions :{
'employee': '正式员工', 'employee': '正式员工',
'remployee': '相关方', 'remployee': '相关方',
'visitor': '访客' 'visitor': '访客',
'driver':'司机'
}, },
idArr: [] idArr: []
}; };

View File

@ -342,16 +342,15 @@ export default {
}, },
handleWatch(scope) { handleWatch(scope) {
debugger;
let that = this; let that = this;
let workFlow = scope.row.id; let workFlow = scope.row.id;
that.limitedWatch = true; that.limitedWatch = true;
that.$nextTick(() => { that.$nextTick(() => {
var g = new dagreD3.graphlib.Graph().setGraph({ var g = new dagreD3.graphlib.Graph().setGraph({
rankdir: "DL", rankdir: "DL",
nodesep: 100, nodesep: 80,
edgesep: 50, //线 edgesep: 50, //线
ranksep: 50, // ranksep: 40, //
marginx: 160, marginx: 160,
marginy: 20, marginy: 20,
}); });
@ -361,7 +360,11 @@ export default {
let nodes = response; let nodes = response;
// //
nodes.forEach((item) => { nodes.forEach((item) => {
g.setNode(item.id, { if(item.id&&item.name){
if(item.id===1548915292174946304){
debugger;
}
g.setNode(item.id, {
// //
label: item.name, label: item.name,
// //
@ -373,6 +376,7 @@ export default {
rx: 5, // rx: 5, //
ry: 5, ry: 5,
}); });
}
}); });
//线 //线
that.$API.wf.workflow.transitions.req(workFlow).then((res) => { that.$API.wf.workflow.transitions.req(workFlow).then((res) => {
@ -406,7 +410,8 @@ export default {
} }
); );
}); });
} else { }else {
g.setEdge( g.setEdge(
transition0.source_state_.id, transition0.source_state_.id,
transition0.destination_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; g.nodes().length - 1;
// //
let render = new dagreD3.render(); let render = new dagreD3.render();
@ -431,7 +453,6 @@ export default {
document document
.getElementsByClassName("nodes")[0] .getElementsByClassName("nodes")[0]
.getBoundingClientRect().height + 50; .getBoundingClientRect().height + 50;
} else {
} }
}); });
} }