eventHandle

This commit is contained in:
shijing 2022-09-23 20:27:54 +08:00
parent 1fd8d1084e
commit 22cf3aedd8
3 changed files with 83 additions and 53 deletions

View File

@ -50,10 +50,17 @@
</div> </div>
</div> </div>
<div class="drop-content" v-if="showUserSelect"> <div class="drop-content" v-if="showUserSelect">
<el-tree ref="group" id="bigScreenTree" node-key="id" :data="postList" show-checkbox <el-tree
:current-node-key="''" :highlight-current="true" :expand-on-click-node="true" ref="group"
@node-click="groupClick"></el-tree> id="bigScreenTree"
node-key="id"
:data="postList"
show-checkbox
:current-node-key="''"
:highlight-current="true"
:expand-on-click-node="true"
@check="handleChange"
></el-tree>
<el-button type="primary" @click="userFilter">查看</el-button> <el-button type="primary" @click="userFilter">查看</el-button>
</div> </div>
<div class="filter-action showroam"> <div class="filter-action showroam">
@ -823,6 +830,7 @@ export default {
areaVideo:[], areaVideo:[],
areaSpeaker:[], areaSpeaker:[],
areaUser:[], areaUser:[],
deptChecked:[],
// //
userCount: { userCount: {
total: 0, total: 0,
@ -847,6 +855,9 @@ export default {
}, },
code: 'video_realtime' code: 'video_realtime'
}, },
userParams:{
depts:[],
},
group: [], group: [],
groupsProps: { groupsProps: {
value: "id", value: "id",
@ -1099,6 +1110,13 @@ export default {
clearInterval(this.eventAudioTimer)// clearInterval(this.eventAudioTimer)//
}, },
methods: { methods: {
handleChange(item, check) {
debugger;
console.log(check);
this.deptChecked = check.checkedKeys;
this.userParams.depts = check.checkedKeys;
this.refreshUserMarker();
},
audioFinished(){ audioFinished(){
if(this.audioIndex<this.audioList.length){ if(this.audioIndex<this.audioList.length){
this.audioIndex++; this.audioIndex++;
@ -1155,12 +1173,12 @@ export default {
if (res.err_msg) { if (res.err_msg) {
} else { } else {
// debugger; // debugger;
console.log('00000000000000'); // console.log('00000000000000');
console.log(res.results[0].id); // console.log(res.results[0].id);
console.log(that.audioList.id); // console.log(that.audioList.id);
let judge = res.results[0].id==that.audioList.id let judge = res.results[0].id==that.audioList.id
console.log(judge); // console.log(judge);
console.log('11111111111111'); // console.log('11111111111111');
let item = res.results[0]; let item = res.results[0];
if(that.audioSrc!==''){ if(that.audioSrc!==''){
if(item.id==that.audioList.id){ if(item.id==that.audioList.id){
@ -1279,8 +1297,8 @@ export default {
let rpartsList=[]; let rpartsList=[];
let arr = []; let arr = [];
let children = genTree(res); let children = genTree(res);
// debugger; debugger;
// console.log(children) console.log(children)
for (let i = 0; i < 5; i++) { for (let i = 0; i < 5; i++) {
let obj = new Object(); let obj = new Object();
if (i === 0) { if (i === 0) {
@ -1409,6 +1427,15 @@ export default {
groupClick(data) { groupClick(data) {
debugger; debugger;
console.log(data); console.log(data);
debugger;
},
checkChange(data1,data2,data3,data4){
debugger;
console.log(data1);
console.log(data2);
console.log(data3);
console.log(data4);
debugger;
}, },
// //
showUserDetail() { showUserDetail() {
@ -1423,12 +1450,13 @@ export default {
let that = this; let that = this;
this.showUserSelect = false; this.showUserSelect = false;
this.screenUser = true; this.screenUser = true;
that.screenUserItem.name = this.userList[0].my_info.employee_.name; // that.screenUserItem.name = this.userList[0].my_info.employee_.name;
that.screenUserItem.type = this.userList[0].my_info.employee_.type; // that.screenUserItem.type = this.userList[0].my_info.employee_.type;
that.screenUserItem.id = this.userList[0].my_info.employee_.id; // that.screenUserItem.id = this.userList[0].my_info.employee_.id;
that.screenUserItem.photo = this.userList[0].my_info.employee_.photo ? this.userList[0].my_info.employee_.photo : ''; // that.screenUserItem.photo = this.userList[0].my_info.employee_.photo ? this.userList[0].my_info.employee_.photo : '';
that.screenUserItem.post_name = this.userList[0].my_info.employee_.post_name ? this.userList[0].my_info.employee_.post_name : ''; // that.screenUserItem.post_name = this.userList[0].my_info.employee_.post_name ? this.userList[0].my_info.employee_.post_name : '';
that.screenUserItem.belong_dept_name = this.userList[0].my_info.employee_.belong_dept_name ? this.userList[0].my_info.employee_.belong_dept_name : ''; // that.screenUserItem.belong_dept_name = this.userList[0].my_info.employee_.belong_dept_name ? this.userList[0].my_info.employee_.belong_dept_name : '';
}, },
//layer //layer
riskMaskerLayers() { riskMaskerLayers() {
@ -1563,8 +1591,6 @@ export default {
areaId: areaId areaId: areaId
}, },
}); });
// debugger;
console.log(that.riskMarkerLayer);
that.riskMarkerLayer.addMarker(boxMarker); that.riskMarkerLayer.addMarker(boxMarker);
} }
}) })
@ -1614,8 +1640,6 @@ export default {
showSpeakersMarkers(list) { showSpeakersMarkers(list) {
let that = this; let that = this;
list.forEach(item => { list.forEach(item => {
// debugger;
console.log(item)
let materialMarker = null; let materialMarker = null;
let pixel = item.my_info.location; let pixel = item.my_info.location;
console.log(pixel) console.log(pixel)
@ -1664,8 +1688,6 @@ export default {
}else { }else {
userImage = "/img/visitor.png" userImage = "/img/visitor.png"
} }
// debugger;
// console.log(item);
let floorId = 1; let floorId = 1;
if(item.floorNo=='Floor1'){ if(item.floorNo=='Floor1'){
floorId = 1; floorId = 1;
@ -1718,7 +1740,7 @@ export default {
} }
// debugger; // debugger;
let that = this; let that = this;
that.$API.third.blt.all.req().then(res => { that.$API.third.blt.all.req(that.userParams).then(res => {
if (res.err_msg) { if (res.err_msg) {
} else { } else {
let userList = res.filter(item => { let userList = res.filter(item => {
@ -1728,8 +1750,11 @@ export default {
let refreshList = that.func(userList, that.userList)[1]; let refreshList = that.func(userList, that.userList)[1];
let subUser = that.func(that.userList, userList)[0]; let subUser = that.func(that.userList, userList)[0];
that.userList = refreshList.concat(addUser);//userList that.userList = refreshList.concat(addUser);//userList
subUser.forEach(subUserItem=>{
that.userMaskerLayer.removeMarker(that.userMarker[subUserItem.mac]);//线
})
that.showUserMarkers(addUser);//线 that.showUserMarkers(addUser);//线
//that.userMaskerLayer.removeMarker(sectorMarker)(addUser);//线
refreshList.forEach(item1 => { refreshList.forEach(item1 => {
// debugger; // debugger;
// console.log(item1) // console.log(item1)
@ -1930,14 +1955,10 @@ export default {
if (res.err_msg) { if (res.err_msg) {
that.$message.error(res.err_msg); that.$message.error(res.err_msg);
} else { } else {
// debugger;
console.log(res.pageData.length)
let Vchannels = res.pageData.filter(item=>{ let Vchannels = res.pageData.filter(item=>{
return item.my_info.location!==undefined; return item.my_info.location!==undefined;
}) })
that.Vchannels = Vchannels; that.Vchannels = Vchannels;
// debugger;
console.log(Vchannels.length)
that.showCameraMarkers(Vchannels); that.showCameraMarkers(Vchannels);
} }
}); });
@ -2002,8 +2023,6 @@ export default {
// //
userRowClick(row) { userRowClick(row) {
// debugger;
console.log(row);
let that = this; let that = this;
that.screenUserItem.name = row.my_info.employee_.name; that.screenUserItem.name = row.my_info.employee_.name;
that.screenUserItem.type = row.my_info.employee_.type; that.screenUserItem.type = row.my_info.employee_.type;
@ -2030,7 +2049,7 @@ export default {
that.lineTracking = true; that.lineTracking = true;
that.userMaskerLayer.show = false; that.userMaskerLayer.show = false;
let nowTime = new Date().getTime(); let nowTime = new Date().getTime();
let preTime = nowTime-30*60 * 1000; let preTime = nowTime-60*60 * 1000;
let params = { let params = {
url:"/api/datacenter/user/historypathV2", url:"/api/datacenter/user/historypathV2",
method:"post", method:"post",
@ -2057,8 +2076,6 @@ export default {
obj.z=item.z; obj.z=item.z;
points0.push(obj); points0.push(obj);
}); });
debugger;
console.log(points0)
if(points0.length>0){ if(points0.length>0){
that.line1 = null; that.line1 = null;
if (that.line1==null) { if (that.line1==null) {

View File

@ -187,7 +187,7 @@ export default {
methods: { methods: {
// //
table_handle(row) { table_handle(row) {
this.eventID = row.id; this.eventID = row.event;
this.dialog.handle = true; this.dialog.handle = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.handleDialog.open("edit").setData(row); this.$refs.handleDialog.open("edit").setData(row);
@ -195,7 +195,7 @@ export default {
}, },
// //
table_show(row) { table_show(row) {
this.eventID = row.id; this.eventID = row.event;
this.dialog.handle = true; this.dialog.handle = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.handleDialog.open("show").setData(row); this.$refs.handleDialog.open("show").setData(row);

View File

@ -105,7 +105,7 @@
text text
type="primary" type="primary"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_handle(scope.row, scope.$index)"
v-if="scope.row.can_handle && scope.row.event_.handle_user == null" v-if="scope.row.can_handle && scope.row.event_.handle_user == null"
>处理</el-button >处理</el-button
> >
@ -119,16 +119,25 @@
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
<detail-dialog
v-if="dialog.handle"
ref="handleDialog"
:eventID="eventID"
@success="handleSuccess"
@closed="dialog.handle = false"
></detail-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue"; import detailDialog from "./event_handlefrom.vue";
import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue";
export default { export default {
name: "myevent", name: "myevent",
components: { components: {
CircleCheckFilled, CircleCheckFilled,
CircleCloseFilled, CircleCloseFilled,
detailDialog
}, },
data() { data() {
return { return {
@ -137,6 +146,7 @@ export default {
areaOptions: [], areaOptions: [],
dialog: { dialog: {
save: false, save: false,
handle: false,
permission: false, permission: false,
}, },
apiObj: this.$API.ecm.myevent.list, apiObj: this.$API.ecm.myevent.list,
@ -145,6 +155,7 @@ export default {
search: { search: {
keyword: null, keyword: null,
}, },
eventID:'',
}; };
}, },
created() { created() {
@ -162,24 +173,26 @@ export default {
this.areaOptions = res; this.areaOptions = res;
}) })
}, },
// //
table_show(row) { table_handle(row) {
this.$router.push({ this.eventID = row.event;
name: "eventhandlefrom", // debugger;
query: { console.log(this.eventID)
id: row.event_.id, this.dialog.handle = true;
}, this.$nextTick(() => {
this.$refs.handleDialog.open("edit").setData(row);
}); });
}, },
table_handle(row) { //
table_show(row) {
this.$router.push({ this.eventID = row.event;
name: "eventhandlefrom", this.dialog.handle = true;
query: { this.$nextTick(() => {
id: row.event_.id, this.$refs.handleDialog.open("show").setData(row);
},
}); });
},
handleSuccess(){
this.dialog.handle = false
}, },
// //
handleQuery() {}, handleQuery() {},