Merge branch 'fly' into xy-ly

master
fanluyan 2 years ago
commit f29dee6dcd

@ -69,11 +69,11 @@ export default {
index: "/pictureRotation", index: "/pictureRotation",
title: "图片轮巡", title: "图片轮巡",
}, },
// { {
// icon: "el-icon-bell", icon: "el-icon-bell",
// index: "photoAlarm", index: "photoAlarm",
// title: "", title: "告警处理",
// }, },
{ {
icon: "el-icon-search", icon: "el-icon-search",
@ -129,6 +129,73 @@ export default {
], ],
}, },
], ],
items2: [
// {
// icon: "el-icon-s-home",
// index: "stritl",
// title: "",
// },
{
icon: "el-icon-camera",
index: "/realTimeMonitor",
title: "实时监控",
},
{
icon: "el-icon-film",
index: "/pictureRotation",
title: "图片轮巡",
},
// {
// icon: "el-icon-bell",
// index: "photoAlarm",
// title: "",
// },
{
icon: "el-icon-search",
index: "/realTimeSearch",
title: "历史图片",
},
{
icon: "el-icon-files",
index: "/property",
title: "资产管理",
subs: [
{
index: "/lineInformation",
title: "线路信息管理",
},
{
index: "/towerInformation",
title: "杆塔信息管理",
},
{
index: "/cameraChannel",
title: "通道管理",
},
{
index: "/photographicDevice",
title: "拍照装置管理",
},
{
index: "/devicePhotoSchedule",
title: "拍照时间表设置",
},
// {
// index: "/deviceUpgrade",
// title: "",
// },
// {
// icon: "el-icon-picture-outline",
// index: "imageSettings",
// title: "",
// },
],
},
],
role: "",
}; };
}, },
watch: { watch: {
@ -143,6 +210,16 @@ export default {
}, },
created() { created() {
this.setCurrentRoute(); this.setCurrentRoute();
this.role = localStorage.getItem("role");
console.log("用户管理");
console.log(this.role);
if (this.role == 1) {
this.items = this.items;
} else {
this.items = this.items2;
}
console.log(this.items);
}, },
}; };
</script> </script>

@ -50,7 +50,7 @@ Viewer.setDefaults({
//使用钩子函数对路由进行权限跳转 //使用钩子函数对路由进行权限跳转
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
document.title = `${to.meta.title} | 视频监控可视化平台`; document.title = `${to.meta.title} | 视频监控可视化平台`;
const role = localStorage.getItem("userName"); const role = localStorage.getItem("role");
const token = localStorage.getItem("token"); const token = localStorage.getItem("token");
console.log(role, token); console.log(role, token);
if (!token && to.path !== "/login") { if (!token && to.path !== "/login") {

@ -8,15 +8,17 @@ export default new Vuex.Store({
//用户登录token 存储 //用户登录token 存储
token: "", token: "",
userName: "", userName: "",
userid:'', userid: "",
channelid: "", channelid: "",
termid: "", termid: "",
role: "",
}, },
getters: { getters: {
channelid: (state) => state.channelid, channelid: (state) => state.channelid,
token: (state) => state.token, token: (state) => state.token,
userName: (state) => state.userName, userName: (state) => state.userName,
role: (state) => state.role,
}, },
mutations: { mutations: {
//保存通道id //保存通道id
@ -39,9 +41,11 @@ export default new Vuex.Store({
}, },
SET_USERINFO(state, val) { SET_USERINFO(state, val) {
state.userName = val.userName; state.userName = val.userName;
state.userid = val.id state.userid = val.id;
state.role = val.role;
localStorage.setItem("userName", state.userName); localStorage.setItem("userName", state.userName);
localStorage.setItem("userid", state.userid); localStorage.setItem("userid", state.userid);
localStorage.setItem("role", state.role);
}, },
//退出清除locastorge //退出清除locastorge
REMOVE_INFO(state) { REMOVE_INFO(state) {

@ -70,8 +70,8 @@ export default {
data: function () { data: function () {
return { return {
userInfo: { userInfo: {
userName: "admin", userName: "",
password: "123456", password: "",
//verificationCode: "", //verificationCode: "",
}, },
rules: { rules: {

@ -29,7 +29,7 @@
class="showPic" class="showPic"
@click="closePic" @click="closePic"
> >
<div class="picboxI" @click.stop> <div class="picboxI">
<img class="maskPic" :src="bigPicPath" /> <img class="maskPic" :src="bigPicPath" />
<i @click="closePic" class="el-icon-circle-close"></i> <i @click="closePic" class="el-icon-circle-close"></i>
</div> </div>
@ -190,9 +190,10 @@ export default {
canvas: null, canvas: null,
ctx: null, ctx: null,
imgpic: null, imgpic: null,
color: "#FF0000", color: "#00ff00",
num: 5, num: 5,
showBigpic: false, showBigpic: false,
flagline: true,
}; };
}, },
mounted() { mounted() {
@ -230,6 +231,11 @@ export default {
closePic() { closePic() {
this.showBigpic = false; this.showBigpic = false;
}, },
openline() {
this.flagline = true;
console.log("11111111111111111111111111", this.flagline);
this.drawline();
},
drawline() { drawline() {
this.canvas = this.$refs.myCanvas; this.canvas = this.$refs.myCanvas;
this.imgpic = this.$refs.picJpg; this.imgpic = this.$refs.picJpg;
@ -239,6 +245,11 @@ export default {
this.canvas.height = this.imgpic.offsetHeight; // this.canvas.height = this.imgpic.offsetHeight; //
this.ctx = this.canvas.getContext("2d"); this.ctx = this.canvas.getContext("2d");
console.log(this.localPoints); console.log(this.localPoints);
if (this.flagline == true) {
this.localPoints = this.localPoints;
} else {
this.localPoints = [];
}
console.log(this.ctx); console.log(this.ctx);
this.ctx.beginPath(); this.ctx.beginPath();
//线 //线
@ -262,6 +273,7 @@ export default {
//线 //线
handelClear() { handelClear() {
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.flagline = false;
}, },
getphotoList() { getphotoList() {
this.fiveList = this.terminalPhoto.slice( this.fiveList = this.terminalPhoto.slice(

@ -65,13 +65,14 @@
:max="9" :max="9"
></el-input-number> ></el-input-number>
</div> </div>
<!-- <div class="deStatus" v-if="isactive == data.id"> <div
<el-tag type="success" v-if="isCheck"></el-tag> class="deStatus"
<el-tag type="" v-if="isCheck" v-if="allCheckNode.indexOf(data) != -1 && showtag"
><i class="el-icon-loading"></i>下发中{{ data.id }}</el-tag >
> <!-- <el-tag type="success">下发成功</el-tag> -->
<el-tag type="danger" v-if="data.errortag"></el-tag> <el-tag type=""><i class="el-icon-loading"></i>下发中</el-tag>
</div> --> <!-- <el-tag type="danger">下发失败</el-tag> -->
</div>
</div> </div>
<span v-else class="custom-tree-node" slot-scope="{ data }"> <span v-else class="custom-tree-node" slot-scope="{ data }">
<span>{{ data.name }}</span> <span>{{ data.name }}</span>
@ -146,6 +147,7 @@ export default {
termzzid: [], termzzid: [],
flag: false, flag: false,
sureloading: false, sureloading: false,
showtag: false,
}; };
}, },
mounted() {}, mounted() {},
@ -218,6 +220,7 @@ export default {
submitForm() { submitForm() {
//console.log(this.termidArr); //console.log(this.termidArr);
this.sureSum(); this.sureSum();
this.showtag = true;
}, },
// //
sureSum() { sureSum() {
@ -280,6 +283,7 @@ export default {
this.timer = null; this.timer = null;
this.isShow = false; this.isShow = false;
this.sureloading = false; this.sureloading = false;
this.showtag = false;
} else if (this.i > 9) { } else if (this.i > 9) {
this.zzerror = true; this.zzerror = true;
this.i = 0; this.i = 0;
@ -287,6 +291,7 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
this.isShow = false; this.isShow = false;
this.showtag = false;
this.sureloading = false; this.sureloading = false;
} }
}) })
@ -303,6 +308,7 @@ export default {
clearTimeout(this.timer); clearTimeout(this.timer);
this.timer = null; this.timer = null;
this.sureloading = false; this.sureloading = false;
this.showtag = false;
}, },
}, },
}; };

@ -29,9 +29,9 @@
<el-table-column fixed="right" label="操作" width="200"> <el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text">修改</el-button> <el-button type="text">升级</el-button>
<el-button type="text" class="deleteText">删除</el-button> <!-- <el-button type="text" class="deleteText">删除</el-button>
<el-button type="text">设置</el-button> <el-button type="text">设置</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -93,7 +93,7 @@ export default {
ctx: null, ctx: null,
imgpic: null, imgpic: null,
drawingSurfaceImageData: "", drawingSurfaceImageData: "",
color: "#FF0000", color: "#00ff00",
num: 5, num: 5,
flag: false, flag: false,
x: 0, x: 0,

@ -93,35 +93,11 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-select
v-model="channelValue"
placeholder="请选择"
@change="changeChannelId"
ref="multiSelect"
>
<el-option key="0" label="全部" value="0"></el-option>
<el-option
v-for="item in channelOption"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> -->
</div> </div>
<div class="setTimebtn"> <div class="setTimebtn">
<h3>操作项</h3> <h3>操作项</h3>
<div class="buttonGroup"> <div class="buttonGroup">
<!-- <el-button
v-if="this.newTermId == this.termid"
type="primary"
@click.native.stop="handlexfTime()"
>下发时间表</el-button
> -->
<!-- <el-button type="primary" v-debounce="handleShowPic"
>手动拍照</el-button
> -->
<el-dropdown trigger="click" @command="handleCommandpic"> <el-dropdown trigger="click" @command="handleCommandpic">
<el-button type="primary" :loading="btnpicloading"> <el-button type="primary" :loading="btnpicloading">
主动拍照<i class="el-icon-arrow-down el-icon--right"></i> 主动拍照<i class="el-icon-arrow-down el-icon--right"></i>
@ -149,12 +125,6 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<!-- <el-button type="primary" @click="handleShowPic"
>手动拍视频</el-button
> -->
<!-- <el-button type="primary" v-debounce="handleShowGPS"
>获取GPS位置</el-button
> -->
<el-button type="primary" @click="handleShowInfo"> <el-button type="primary" @click="handleShowInfo">
装置信息</el-button 装置信息</el-button
> >
@ -545,7 +515,7 @@ export default {
handleCommandLine(command) { handleCommandLine(command) {
switch (command) { switch (command) {
case "open": // case "open": //
this.$refs.carouselpic.drawline(); this.$refs.carouselpic.openline();
break; break;
case "close": // case "close": //
this.$refs.carouselpic.handelClear(); this.$refs.carouselpic.handelClear();

Loading…
Cancel
Save