代码提交

This commit is contained in:
luoshiwen 2023-02-24 11:17:57 +08:00
commit 241b86b3b8
20 changed files with 858 additions and 262 deletions

View File

@ -0,0 +1,24 @@
{
"code": 200,
"msg": "成功",
"data": {
"analysisSettingId": "e1af117da47e402d9b30e7cc499a158f",
"cameraPositionLongitude": "1",
"cameraPositionLatitude": "3",
"licensePlateRecognitionSwitch": "1",
"parkingDisplacement": 1,
"parkingSpeed": 6,
"coordinateTransformationId": "7ab32c790ec34b95a58e18b8bad8e46c",
"utmArea": 10,
"hemisphere": "南",
"coordinateTransformation": "其他",
"pointData": [{
"pointId": "b0c734bfa81f41d8909b74b983429146",
"pointName": "点2",
"longitude": "1",
"latitude": "1",
"imageXCoordinate": "17.17",
"imageYCoordinate": "1065.16"
}]
}
}

25
src/api/logs.js Normal file
View File

@ -0,0 +1,25 @@
import axios from 'axios';
if (process.env.NODE_ENV === 'development') {
axios.defaults.baseURL = '/';
} else if (process.env.NODE_ENV === 'production') {
axios.defaults.baseURL = '/';
}
//获取所有账号数据接口
export const getTongzrzApi = params => {
return axios.get('api/GetTongzrz', {
params
});
};
//删除日志
export const deleteTongzrzApi = params => {
return axios.get(`api/DeleteTongzrz?JournalId=${params}`, {
params
});
};
//详情接口
export const getTongzrzDetailsApi = params => {
return axios.get(`api/GetTongzrzDetails?JournalId=${params}`, {
params
});
};

View File

@ -1,5 +1,4 @@
import axios from 'axios';
import qs from 'qs';
if (process.env.NODE_ENV === 'development') {
axios.defaults.baseURL = '/';
} else if (process.env.NODE_ENV === 'production') {
@ -11,3 +10,15 @@ export const getZhanghData = params => {
params
});
};
//获取角色下拉
export const getRoleApi = params => {
return axios.get('api/GetJues', {
params
});
};
//删除角色
export const deleteRoleApi = params => {
return axios.get(`api/DeleteZhangh?UserId=${params}`, {
params
});
};

12
src/api/myld.js Normal file
View File

@ -0,0 +1,12 @@
import axios from 'axios';
if (process.env.NODE_ENV === 'development') {
axios.defaults.baseURL = '/';
} else if (process.env.NODE_ENV === 'production') {
axios.defaults.baseURL = '/';
}
//获取用户信息
export const getUserApi = params => {
return axios.get('api/GetZhanghDetails', {
params
});
};

View File

@ -269,6 +269,169 @@ export default {
// this.$set(this.$parent.dataArr)
},
watch: {
<<<<<<< HEAD
=======
list: {
handler(newVal) {
console.log("newVal",newVal)
if (newVal.length!=0) {
// x
this.xData = newVal.map(val => {
return val.time;
});
this.series = [
{
name: '',
type: 'line',
symbolSize: 6,
smooth: true,
itemStyle: {
color: '#fb864b',
borderColor: '#fb864b'
// borderWidth: 2
},
data: []
}
];
// y
if (this.title == '类型') {
this.tooltip = {
formatter: '{a} {b}:{c}个',
show: true,
confine: true
};
this.series[0].name = '总量';
console.log('折线图', newVal);
//
let arr = newVal.map(function (ele) {
if (ele.type_data != null) {
return ele.type_data;
}
});
var mapN = [];
for (var t = 0; t < arr.length; t++) {
for (var i = 0; i < arr[t].length; i++) {
mapN.push(arr[t][i]);
}
}
var lineArr = [{
name: '机动车',
type: 'line',
data: [],
smooth: true
}, {
name: '非机动车',
type: 'line',
data: [],
smooth: true
}, {
name: '行人',
type: 'line',
data: [],
smooth: true
}];
// if (newVal[0].type_data != undefined) {
// newVal[0].type_data.forEach(ele => {
// lineArr.push({
// name: ele.name,
// type: 'line',
// data: [],
// smooth: true
// });
// });
// }
mapN.forEach(ele => {
if (ele.name == '机动车') {
lineArr[0].data.push(ele.quantity);
} else if (ele.name == '非机动车') {
lineArr[1].data.push(ele.quantity);
} else {
lineArr[2].data.push(ele.quantity);
}
});
for (let j = 0; j < lineArr.length; j++) {
this.series.push(lineArr[j]);
}
//
let mapNR1 = [];
newVal.map(function (ele) {
if (ele.type_data != null) {
var sum = ele.type_data.reduce(function (prev, cur) {
return cur.quantity + prev;
}, 0);
mapNR1.push(sum);
}
});
// console.log("mapNR1", mapNR1)
this.series[0].data = mapNR1;
} else if (this.title == '速度') {
console.log('速度的折线图');
this.tooltip = {
formatter: '{a} {b}:{c}km/h',
show: true,
confine: true
};
// console.log("newVal",newVal)
this.series[0].data = newVal.map(val => {
return val.speed;
});
} else if (this.title == '流量') {
this.tooltip = {
formatter: '{a} {b}:{c}辆',
show: true,
confine: true
};
this.series[0].data = newVal.map(ele => {
return ele.in_flow + ele.out_flow;
});
} else if (this.title == '车头时距') {
console.log('车头时距', newVal);
this.tooltip = {
formatter: '{a} {b}:{c}/s',
show: true,
confine: true
};
this.series[0].data = newVal.map(val => {
return val.headway;
});
} else if (this.title == '排队数' && this.status == '触发') {
this.series[0].data = newVal.map(val => {
return val.n_queue;
});
} else if (this.title == '排队数' && this.status == '周期统计') {
this.series[0].data = newVal.map(val => {
return val.ave_queue;
});
} else if (this.title == '检测数') {
this.series[0].data = newVal.map(val => {
return val.n_stay;
});
} else if (this.title == '延误') {
this.series[0].data = newVal.map(val => {
return val.ave_delay;
});
} else if (this.title == '拥堵') {
this.series[0].data = newVal.map(val => {});
}
if (this.$refs.lineChart) {
console.log("1111111")
this.$nextTick(() => {
this.drawLine();
});
}
this.drawLine()
}
},
deep: true
},
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
}
};
</script>

View File

@ -14,7 +14,7 @@
<div v-if="msg" class="regionBox">
<!-- 触发 -->
<el-table :data="msg" style="width: 100%" v-if="type == '触发' ">
<el-table :data="msg" style="width: 100%" v-if="triggerType == '触发' ">
<!-- <el-table-column align="center" prop="steam_id" label="视频路"></el-table-column> -->
<!-- <el-table-column align="center" prop="graphical_id" label="区域编号"></el-table-column> -->
<el-table-column align="center" prop="name" label="区域名称"></el-table-column>
@ -48,7 +48,7 @@
</el-table-column>
<el-table-column align="center" prop="speed" label="空间平均速度"></el-table-column>
</el-table>
<el-table :data="msg" style="width: 100%" v-if="type == '周期时刻' ">
<el-table :data="msg" style="width: 100%" v-if="triggerType == '周期时刻' ">
<!-- <el-table-column align="center" prop="steam_id" label="视频路"></el-table-column> -->
<!-- <el-table-column align="center" prop="graphical_id" label="区域编号"></el-table-column> -->
<el-table-column align="center" prop="name" label="区域名称"></el-table-column>
@ -83,7 +83,7 @@
<el-table-column align="center" prop="speed" label="空间平均速度"></el-table-column>
</el-table>
<!-- 周期统计 -->
<el-table :data="msg" style="width: 100%" v-if="type == '周期统计'">
<el-table :data="msg" style="width: 100%" v-if="triggerType == '周期统计'">
<!-- <el-table-column align="center" prop="zone_id" label="区域编号"></el-table-column> -->
<el-table-column align="center" prop="name" label="区域名称"></el-table-column>
<el-table-column align="center" prop="time" label="时间戳"></el-table-column>
@ -161,7 +161,7 @@ export default {
return [];
}
},
type: {
triggerType: {
type: String
},
},

View File

@ -13,7 +13,7 @@
<!-- 触发 -->
<div v-if="msg">
<el-table :data="msg" style="width: 100%" v-if="type == '触发'">
<el-table :data="msg" style="width: 100%" v-if="triggerType == '触发'">
<!-- <el-table-column align="center" prop="steam_id" label="视频路"></el-table-column>
<el-table-column align="center" prop="zone_id" label="区域编号"></el-table-column> -->
<el-table-column align="center" prop="name" label="区域名称"></el-table-column>
@ -48,7 +48,7 @@
<!-- 周期统计 -->
<el-table :data="msg" style="width: 100%" v-if="type == '周期统计'">
<el-table :data="msg" style="width: 100%" v-if="triggerType == '周期统计'">
<el-table-column align="center" prop="gate_id" label="断面编号"></el-table-column>
<el-table-column align="center" prop="name" label="断面名称"></el-table-column>
<el-table-column align="center" prop="timestamp" label="时间戳"></el-table-column>
@ -129,7 +129,7 @@ export default {
return [];
}
},
type: {
triggerType: {
type: String
}
},

View File

@ -43,7 +43,7 @@
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '排队数'">
<span style="font-size: 15px;">排队数</span><br />
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].n_queue }}</span>
<span style="font-size: 30px; font-weight: bold">{{ queue }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '检测数'">
<span style="font-size: 15px;">检测数</span><br />
@ -77,16 +77,29 @@
</div>
</div>
<div v-if="pageType == '断面'" style="margin-bottom: 20px; border: 1px solid #e4e7ed">
<tableShow :msg="dataArr" :type="triggerType" />
<tableShow :msg="dataArr" :triggerType="triggerType" />
</div>
<div v-if="pageType == '区域'">
<regionTable :msg="dataArr" :type="triggerType" />
<regionTable :msg="dataArr" :triggerType="triggerType" />
</div>
</div>
<div class="border" v-if="echartArr.includes('曲线图')">
<detailDialog />
<<<<<<< HEAD
<lineChart :componentName="componentName" :chartName="chartName" :pageType="pageType" :list="dataArr"
:status="triggerType" :title="title" :typeValue="typeValue" ref="lineChartRef" />
=======
<lineChart
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
:list="dataArr"
:status="triggerType"
:title="title"
:typeValue="typeValue"
/>
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
</div>
<div class="border" v-if="echartArr.includes('饼状图')">
<detailDialog />
@ -136,14 +149,37 @@ export default {
flow: 0,
isRefer: true,
valueShow: {}
valueShow: {},
//
queue:'',
};
},
created() {
console.log(this.title + 'TYPECHARTdataArr', this.dataArr)
},
methods: {
<<<<<<< HEAD
//
=======
//
getNewQueue(dataArr){
console.log("计算类型的数值",dataArr)
// if(dataArr[0].timeMode==''){
// this.queue = dataArr[0].n_queue
// }else if(dataArr[0].timeMode==''){
// this.queue = dataArr[0].ave_queue
// }else if(dataArr[0].timeMode==''){
// }
if(dataArr[0].n_queue){
this.queue = dataArr[0].n_queue
}else if(dataArr[0].ave_queue){
this.queue = dataArr[0].ave_queue
}else if(dataArr[0].timeMode=='周期时刻'){
}
}
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
},
computed: {
@ -159,17 +195,33 @@ export default {
//
dataArr: {
handler(newVal) {
<<<<<<< HEAD
=======
console.log('dataArr', newVal);
this.getNewQueue(newVal)
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
},
immediate: true
},
typeValue: {
handler(newVal) {
<<<<<<< HEAD
},
immediate: true
=======
this.total = 0;
if (this.title == '类型') {
newVal.type_data.forEach(ele => {
this.total += ele.quantity;
});
}
}
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
}
// cycleTimeData: {
// handler(newVal) {

View File

@ -1,33 +1,36 @@
var ipUurl = window.location.host.split(":")[0];
var ipUurl = window.location.host.split(':')[0];
export default {
// dataUrl: "http://172.16.1.22:8080/api/AddShipjk",
// getSpareElementOrder: "http://172.16.1.22:8080/api/Upload",
// postSetQuanjsz: "http://172.16.1.22:8080/api/SetQuanjsz",
// //新增图形接口
// addFigure: "http://172.16.1.22:8080/api/AddJianktx",
// //编辑图形名称
// editFigure: "http://172.16.1.22:8080/api/EditTuxmc",
// //编辑保存组件弹窗传参
// editComponent: "http://172.16.1.22:8080/api/SetMonqjkzjcs",
// dataUrl: "http://172.16.1.22:8080/api/AddShipjk",
// getSpareElementOrder: "http://172.16.1.22:8080/api/Upload",
// postSetQuanjsz: "http://172.16.1.22:8080/api/SetQuanjsz",
// //新增图形接口
// addFigure: "http://172.16.1.22:8080/api/AddJianktx",
// //编辑图形名称
// editFigure: "http://172.16.1.22:8080/api/EditTuxmc",
// //编辑保存组件弹窗传参
// editComponent: "http://172.16.1.22:8080/api/SetMonqjkzjcs",
dataUrl: 'http://172.16.1.168:5000/api/AddShipjk',
getSpareElementOrder: 'http://172.16.1.168:5000/api/Upload',
postSetQuanjsz: 'http://172.16.1.168:5000/api/SetQuanjsz',
saveRoleApi: 'http://172.16.1.168:5000/api/AddZhangh',
editRoleApi: 'http://172.16.1.168:5000/api/EditZhangh',
dataUrl: "http://172.16.1.168:5000/api/AddShipjk",
getSpareElementOrder: "http://172.16.1.168:5000/api/Upload",
postSetQuanjsz: "http://172.16.1.168:5000/api/SetQuanjsz",
//新增图形接口
addFigure: "http://172.16.1.168:5000/api/AddJianktx",
//编辑图形名称
editFigure: "http://172.16.1.168:5000/api/EditTuxmc",
//编辑保存组件弹窗传参
editComponent: "http://172.16.1.168:5000/api/SetMonqjkzjcs",
// `http://${ipUurl}:5000/api/AddShipjk`
// dataUrl: `http://${ipUurl}:5000/api/AddShipjk`,
// getSpareElementOrder: `http://${ipUurl}:5000/api/Upload`,
// postSetQuanjsz: `http://${ipUurl}:5000/api/SetQuanjsz`,
// //新增图形接口
// addFigure: `http://${ipUurl}:5000/api/AddJianktx`,
// //编辑图形名称
// editFigure: `http://${ipUurl}:5000/api/EditTuxmc`,
// //编辑保存组件弹窗传参
// editComponent: `http://${ipUurl}:5000/api/SetMonqjkzjcs`,
//新增图形接口
addFigure: 'http://172.16.1.168:5000/api/AddJianktx',
//编辑图形名称
editFigure: 'http://172.16.1.168:5000/api/EditTuxmc',
//编辑保存组件弹窗传参
editComponent: 'http://172.16.1.168:5000/api/SetMonqjkzjcs'
// `http://${ipUurl}:5000/api/AddShipjk`
// dataUrl: `http://${ipUurl}:5000/api/AddShipjk`,
// getSpareElementOrder: `http://${ipUurl}:5000/api/Upload`,
// postSetQuanjsz: `http://${ipUurl}:5000/api/SetQuanjsz`,
// //新增图形接口
// addFigure: `http://${ipUurl}:5000/api/AddJianktx`,
// //编辑图形名称
// editFigure: `http://${ipUurl}:5000/api/EditTuxmc`,
// //编辑保存组件弹窗传参
// editComponent: `http://${ipUurl}:5000/api/SetMonqjkzjcs`,
};

View File

@ -16,11 +16,11 @@
</el-input>
</el-form-item>
<div class="unforget" style="margin-left:15px">
<el-checkbox v-model="checked">保存登录</el-checkbox>
<el-checkbox v-model="checked">保存登录</el-checkbox>
</div>
</el-form>
<div class="login-btn">
<el-button type="primary" @click="submitForm()">登录</el-button>
<el-button type="primary" @click="submitForm()">登录</el-button>
</div>
</div>
</div>
@ -54,19 +54,18 @@ export default {
telephone: '13088888888',
typeCode: 2
};
loginApi(datas).then((res) => {
loginApi(datas).then(res => {
console.log('c', res);
});
},
submitForm() {
this.$refs.login.validate((valid) => {
this.$refs.login.validate(valid => {
if (valid) {
this.$message.success('登录成功');
localStorage.setItem('ms_username', this.param.username);
this.$router.push('/');
} else {
this.$message.error('请输入账号和密码');
console.log('error submit!!');
return false;
}
});
@ -76,28 +75,28 @@ export default {
</script>
<style lang="scss" scoped>
/deep/ .el-form-item__label{
text-align: right;
font-size: 14px;
margin-left: 15px;
padding: 0;
&::before{
display: none;
}
/deep/ .el-form-item__label {
text-align: right;
font-size: 14px;
margin-left: 15px;
padding: 0;
&::before {
display: none;
}
}
/deep/ .el-input{
width: 100%;
height: 100%;
border-radius: 20px;
border: 1px solid rgb(231, 231, 231);
.el-input-group__prepend{
background: transparent;
border: none;
}
.el-input__inner{
background: transparent;
border: none;
}
/deep/ .el-input {
width: 100%;
height: 100%;
border-radius: 20px;
border: 1px solid rgb(231, 231, 231);
.el-input-group__prepend {
background: transparent;
border: none;
}
.el-input__inner {
background: transparent;
border: none;
}
}
.login-wrap {
position: absolute;
@ -128,31 +127,29 @@ export default {
display: flex;
flex-flow: column nowrap;
align-items: center;
.welcome{
margin-top: 28px;
font-size: 16px;
letter-spacing: 1px;
// color: black;
.welcome {
margin-top: 28px;
font-size: 16px;
letter-spacing: 1px;
// color: black;
}
.ms-content{
width: 80%;
margin-top: 25px;
.ms-content {
width: 80%;
margin-top: 25px;
}
.login-btn{
width: 80%;
margin-top: 45px;
/deep/ .el-button {
width: 100%;
border-radius: 20px;
display: flex;
justify-content: center;
span{
letter-spacing: 15px;
margin-left: 15px;
.login-btn {
width: 80%;
margin-top: 45px;
/deep/ .el-button {
width: 100%;
border-radius: 20px;
display: flex;
justify-content: center;
span {
letter-spacing: 15px;
margin-left: 15px;
}
}
}
}
}
}

View File

@ -528,6 +528,7 @@ destroyed: function () {
});
})
this.videoList=arr
this.videoTypeForm.videoType = this.videoList[0].type
if(this.videoList.length=='0'){
this.videoTypeShow = true
}else{

View File

@ -2,10 +2,11 @@
<div class="content-box">
<div class="container">
<p class="title">账号管理</p>
<el-button @click="addAccountDialog = true" type="primary" style="margin-bottom: 10px;"
<el-button @click="addBtn" type="primary" style="margin-bottom: 10px;"
><i class="el-icon-circle-plus-outline" style="margin-right: 3px;"></i>新增</el-button
>
<el-table :data="tableData" :height="tableHeight" border style="width: 100%">
<el-table-column align="center" label="序号" type="index" width="80"></el-table-column>
<el-table-column align="center" prop="userName" label="用户名称" width="180"></el-table-column>
<el-table-column align="center" prop="account" label="用户账号" width="180"></el-table-column>
<el-table-column align="center" prop="roleName" label="角色"></el-table-column>
@ -17,29 +18,44 @@
<el-table-column align="center" label="操作" width="160">
<template slot-scope="scope">
<el-button @click="edit(scope.row)" type="text" size="small" class="">编辑</el-button>
<!-- <el-button @click="showView(scope.row)" type="text" size="small" class="el-icon-view"></el-button> -->
<el-button @click="clickDelete(scope.row)" type="text" size="small">删除</el-button>
<el-button style="color:red" @click="clickDelete(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="dialog">
<el-dialog :title="dialogTitle" :visible.sync="addAccountDialog" width="30%">
<el-form label-position="left" label-width="80px" :model="formLabelAlign">
<el-dialog :title="dialogTitle" :visible.sync="addAccountDialog" width="30%" @close="dialogClose">
<el-form label-position="left" label-width="100px" :model="formLabelAlign">
<el-form-item label="名称:">
<el-input v-model="formLabelAlign.name"></el-input>
<el-input v-model="formLabelAlign.userName"></el-input>
</el-form-item>
<el-form-item label="账号:">
<el-input v-model="formLabelAlign.account"></el-input>
<el-input :disabled="dialogTitle == '编辑'" v-model="formLabelAlign.account"></el-input>
</el-form-item>
<el-form-item label="密码:">
<el-input v-model="formLabelAlign.passWord"></el-input>
</el-form-item>
<el-form-item label="角色:">
<el-input v-model="formLabelAlign.role"></el-input>
<el-select
:disabled="dialogTitle == '编辑' && formLabelAlign.userName == 'admin'"
clearable
style="width:100%;"
v-model="formLabelAlign.roleId"
placeholder="请选择"
>
<el-option v-for="item in options" :key="item.roleId" :label="item.roleName" :value="item.roleId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="权限:">
<el-input v-model="formLabelAlign.jurisdiction"></el-input>
<el-form-item label="是否启用:">
<el-radio-group v-model="formLabelAlign.IsEnable">
<el-radio :label="'1'">启用</el-radio>
<el-radio :label="'0'">禁用</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addAccountDialog = false"> </el-button>
<el-button type="primary" @click="saveBtn">确定</el-button>
<el-button @click="addAccountDialog = false">取消</el-button>
</span>
</el-dialog>
</div>
@ -48,16 +64,20 @@
</template>
<script>
import { getZhanghData } from '@/api/management';
import axios from 'axios';
import { getZhanghData, getRoleApi, deleteRoleApi } from '@/api/management';
import serverUrl from '@/config/apiurl.js';
export default {
data() {
return {
options: [],
addAccountDialog: false,
formLabelAlign: {
name: '',
userName: '',
account: '',
role: '',
jurisdiction: ''
roleId: '',
IsEnable: '1',
passWord: ''
},
tableData: [],
tableHeight: 0,
@ -72,26 +92,119 @@ export default {
let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
this.tableHeight = windowHeight - 280;
this.getData();
//
this.getRoleList();
},
methods: {
getData() {
getZhanghData().then(res => {
console.log(res);
this.tableData = res.data.data;
//
addBtn() {
this.dialogTitle = '新增';
this.addAccountDialog = true;
},
//
dialogClose() {
for (let i in this.formLabelAlign) {
if (i == 'IsEnable') {
this.formLabelAlign[i] = '1';
} else {
this.formLabelAlign[i] = '';
}
}
},
//
saveBtn() {
let formData = new FormData();
formData.append('userName', this.formLabelAlign.userName);
formData.append('account', this.formLabelAlign.account);
formData.append('roleId', this.formLabelAlign.roleId);
formData.append('IsEnable', this.formLabelAlign.IsEnable);
formData.append('passWord', this.formLabelAlign.passWord);
if (this.dialogTitle === '编辑') {
formData.append('userId', this.formLabelAlign.userId);
}
axios({
method: 'post',
url: this.dialogTitle === '新增' ? serverUrl.saveRoleApi : serverUrl.editRoleApi,
data: formData
}).then(res => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: 'success'
});
this.addAccountDialog = false;
this.getData();
} else {
this.$message({
message: res.data.msg,
type: 'warning'
});
}
});
},
edit(scope) {
console.log(scope, '编辑');
//
getRoleList() {
var _this = this;
getRoleApi()
.then(res => {
_this.options = res.data.data;
})
.catch(err => {
_this.$message.error(err.msg);
});
},
//
getData() {
getZhanghData()
.then(res => {
this.tableData = res.data.data;
})
.catch(err => {
_this.$message.error(err.msg);
});
},
edit(row) {
this.formLabelAlign.roleId = row.roleId;
this.formLabelAlign.IsEnable = row.isEnable;
this.formLabelAlign.userName = row.userName;
this.formLabelAlign.account = row.account;
this.formLabelAlign.userId = row.userId;
this.dialogTitle = '编辑';
this.addAccountDialog = true;
},
showView(scope) {
console.log(scope, '查看');
this.dialogTitle = '查看';
this.addAccountDialog = true;
},
clickDelete(scope) {
console.log(scope, '删除');
clickDelete(row) {
this.$confirm('此操作将永久删除该角色, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteRoleApi(row.userId).then(res => {
if (res.data.code == 200) {
this.$message({
type: 'success',
message: '删除成功!'
});
} else {
this.$message({
type: 'error',
message: res.data.msg
});
}
this.getData();
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
@ -103,6 +216,7 @@ export default {
};
</script>
<style scoped>
.test-div i {
font-size: 25px;

View File

@ -737,7 +737,6 @@ export default {
OnSceneload(newV) {
var ip = window.location.host;
this.ipData = 'http://' + ip.split(':')[0] + ':5000';
document.getElementById('mapModule').contentWindow.getIpData(this.ipData);
this.$refs.analysisWeb.contentWindow.getIpData('http://172.16.1.168:5000');
// this.$refs.analysisWeb.contentWindow.getDianwei(this.$route.query.id);
this.unityDone = true;

View File

@ -89,7 +89,7 @@ export default {
}
},
//
cycleStatistics: {
cycleStatisticsData: {
type: Array,
default() {
return [];
@ -354,6 +354,7 @@ export default {
methods: {
getNew() {
// this.idVal = ;
<<<<<<< HEAD
getComponentSection({ VideoId: this.$route.query.id }).then(res => {
if (res.data.code == 200) {
console.log(res.data.data, '组件的数据');
@ -361,20 +362,37 @@ export default {
this.siftData();
}
});
=======
getComponentSection({ VideoId: this.$route.query.id ,Number:10}).then(res => {
if (res.data.code == 200) {
console.log("res.data.data",res.data.data)
this.componentList = res.data.data;
this.siftData();
}
});
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
},
siftData() {
this.sectionArr=[]
this.sectionData=[]
this.componentList.forEach(val => {
this.sectionArr.push(val.combinationName);
// var newSectionArr = []
// newSectionArr.push(val.combinationName)
// this.sectionArr = newSectionArr
this.sectionArr.push(val.combinationName)
this.sectionArr = Array.from(new Set(this.sectionArr));
});
// var newSectionData = []
this.sectionData = this.sectionArr.map(item => {
item = { title: item, children: [] };
this.acticveName = [];
this.componentList.forEach(val => {
if (item.title == val.combinationName) {
<<<<<<< HEAD
this.classify.push(val)
=======
console.log("val.combinationName",val.combinationName)
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
item.children.push(val);
}
this.acticveName.push(val.analogAreaComponentId);
@ -404,19 +422,19 @@ export default {
}
}
},
channge(oldVal, newVal) {
console.log("old", oldVal)
console.log("newVal", newVal)
if (oldVal == 'second') {
this.sectionArr = []
this.sectionData = []
this.getNew()
} else if (newVal == 'second') {
this.sectionArr = []
this.sectionData = []
this.getNew()
}
}
// channge(oldVal, newVal){
// console.log("old",oldVal)
// console.log("newVal",newVal)
// if(oldVal=='second'){
// this.sectionArr=[]
// this.sectionData=[]
// this.getNew()
// }else if(newVal=='second'){
// this.sectionArr=[]
// this.sectionData=[]
// this.getNew()
// }
// }
//
},
@ -442,6 +460,7 @@ export default {
handler(newVal) {
this.triggerList = newVal;
//
<<<<<<< HEAD
console.log(newVal, 'triggerlistData');
var _this = this
if (newVal.length != 0 && _this.sectionData) {
@ -449,6 +468,28 @@ export default {
if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = [];
=======
// console.log(newVal, 'triggerlistData');
console.log(this.componentList, 'this.componentList');
this.componentList.forEach(ele => {
if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = [];
}
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
if (ele.trigger.length == 10) {
ele.trigger.pop();
} else {
console.log("item",item)
item.time = item.time.split('.')[0];
//
if (item.type_data != null) {
// console.log(item,'461461');
this.typeTimeMode = item
}
ele.trigger.unshift(item);
}
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
}
newVal.forEach((item) => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
@ -494,6 +535,10 @@ export default {
if (
ele.analogAreaComponentId == item.component_id &&
ele.timeMode == '周期时刻'
<<<<<<< HEAD
=======
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
) {
if (ele.cycleTimeData.length == 10) {
ele.cycleTimeData.splice(newVal.length - 1, 1);
@ -512,25 +557,41 @@ export default {
},
immediate: true
},
<<<<<<< HEAD
cycleStatistics: {
=======
//
// cycleStatistics:{
// handler(newVal){
// console.log(newVal,'');
// }
// }
cycleStatisticsData: {
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
handler(newVal) {
if (newVal.length != 0 && this.sectionData) {
this.componentList.forEach(ele => {
if (ele.cycleStatistics == undefined && ele.timeMode == '周期统计') {
ele.cycleStatistics = [];
if (ele.cycleStatisticsData == undefined && ele.timeMode == '周期统计') {
ele.cycleStatisticsData = [];
}
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期统计') {
<<<<<<< HEAD
if (ele.cycleStatistics.length == 10) {
ele.cycleStatistics.splice(newVal.length - 1, 1);
=======
if (ele.cycleStatisticsData.length == 10) {
ele.cycleStatisticsData.pop();
>>>>>>> 50ae7f7e6c71ffc8022c17104f1cd97b91690446
} else {
item.time = item.time.split('.')[0];
if (item.type_data != null) {
//
this.typeCycleStatistics = item;
}
ele.cycleStatistics.unshift(item);
ele.cycleStatisticsData.unshift(item);
}
}
});
@ -541,7 +602,7 @@ export default {
// activeName: {
// handler(newVal) {
// if (newVal == "second") {
// getComponentSection({ VideoId: this.$route.query.id }).then(res => {
// getComponentSection({ VideoId: this.$route.query.id ,Number:10}).then(res => {
// if (res.data.code == 200) {
// this.componentList = res.data.data;
// this.siftData();

View File

@ -14,7 +14,7 @@
</el-tab-pane>
<el-tab-pane label="数据看板" name="second" >
<dataBoard ref="dataBoardRef" :activeName="activeName" :triggerData="triggerData" :triggerListData="triggerListData"
:cycleTimeData="cycleTimeData" :cycleStatistics="cycleStatistics"></dataBoard>
:cycleTimeData="cycleTimeData" :cycleStatisticsData="cycleStatisticsData" ></dataBoard>
</el-tab-pane>
<el-tab-pane label="分析配置" name="third">
<analysisConfiguration :analysisConfigurationdata="analysisConfigurationdata"></analysisConfiguration>
@ -69,8 +69,8 @@
componentForm.componentType != '类型' &&
componentForm.componentType != '流量'
">
<el-input-number v-model="componentForm.startValue"></el-input-number>
<el-input-number v-model="componentForm.endValue" style="margin-left:5%"></el-input-number>
<el-input-number v-model="componentForm.startValue" :min="0"></el-input-number>
<el-input-number v-model="componentForm.endValue" :min="1" style="margin-left:5%"></el-input-number>
</el-form-item>
<el-form-item label="流量类型:" v-if="componentForm.componentType == '流量'">
<el-radio-group v-model="componentForm.FlowType">
@ -87,6 +87,7 @@
componentForm.componentType != '检测数' &&
componentForm.componentType != '延误' &&
componentForm.componentType != '拥堵' &&
componentForm.componentType != '流量'&&
componentForm.componentType != '流量'
"></el-option>
<el-option label="周期统计" value="周期统计" v-if="componentForm.componentType != 'OD'"> </el-option>
@ -108,7 +109,9 @@
<el-option label="分钟" value="分钟"></el-option>
<el-option label="小时" value="小时"></el-option>
</el-select>
<el-slider v-model="componentForm.cycleInterval" :max="max"> </el-slider>
<!-- <el-slider v-model="componentForm.cycleInterval" :max="max" :min="min"> </el-slider> -->
<el-slider v-model="componentForm.cycleInterval" :max="100" :min="1" v-if="componentForm.company != '小时'"> </el-slider>
<el-slider v-model="componentForm.cycleInterval" :max="24" :min="1" v-if="componentForm.company == '小时'"> </el-slider>
</div>
</el-form-item>
<!-- <el-form-item label="单位:" ></el-form-item> -->
@ -142,12 +145,19 @@
<!-- <el-checkbox-group v-model="componentForm.presentation" @change="handlePresentation">
<el-checkbox v-for="item in sectionals" :label="item.graphicName" :key="item.graphicId" >{{item.graphicName}}</el-checkbox>
</el-checkbox-group> -->
<!-- <el-tag type="warning" ></el-tag> -->
<!-- <el-alert v-if="componentForm.componentType == '速度'"
title="请至分析配置设置坐标转换"
type="info"
show-icon>
</el-alert> -->
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmitComponent(componentForm)">确认</el-button>
<el-button @click="closeComponent(componentForm)">取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
@ -179,7 +189,8 @@ var client;
export default {
data() {
return {
max: '',
max:'100',
min:'1',
receiveNews: '',
topicSends: ['img0', 'stream0', 'trajectory0', 'detection0'],
trajectory: false, //
@ -245,7 +256,7 @@ export default {
componentName: '',
componentParameterId: '01888e05fac246b29e3a19a27c3d2ab0',
//
cycleInterval: '',
cycleInterval: 1,
startSectionIds: '',
startSectionNames: '',
endSectionIds: '',
@ -317,7 +328,7 @@ export default {
//
cycleTimeData: [],
//
cycleStatistics: [],
cycleStatisticsData: [],
//
videoType: '',
videoAnalysisShow: false,
@ -391,12 +402,13 @@ export default {
mounted() { },
methods: {
//
handleClick(tab, event) {
console.log(tab,event);
handleClick: function(tab, event) {
var that = this
if(tab._props.name=='second'){
this.$refs.dataBoardRef.getNew()
that.$nextTick(()=>{
that.$refs.dataBoardRef.getNew()
})
}
},
/** 创建mqtt */
createMqtt() {
@ -622,7 +634,7 @@ export default {
const temp = utf8decoder.decode(u8arr); //
var detId = [];
const msgN = JSON.parse(temp);
this.cycleStatistics = msgN;
this.cycleStatisticsData = msgN;
} catch (error) { }
break;
}
@ -694,7 +706,7 @@ export default {
}
}
this.componentForm.componentParameterId = res.data.data.componentParameterId;
this.componentForm.cycleInterval = res.data.data.cycleInterval;
this.componentForm.cycleInterval = parseInt(res.data.data.cycleInterval);
this.componentForm.startSectionIds = res.data.data.startSectionIds;
// this.componentForm.FlowType = res.data.data.flowType;
this.componentForm.startSectionNames = res.data.data.startSectionNames;
@ -796,7 +808,9 @@ export default {
}
this.componentForm.componentName = res.data.data.componentName;
this.componentForm.componentParameterId = res.data.data.componentParameterId;
this.componentForm.cycleInterval = res.data.data.cycleInterval;
this.componentForm.cycleInterval = parseInt(res.data.data.cycleInterval);
this.componentForm.startSectionIds = res.data.data.startSectionIds;
this.componentForm.startSectionNames = res.data.data.startSectionNames;
this.componentForm.endSectionIds = res.data.data.endSectionIds;

View File

@ -1,99 +1,214 @@
<template>
<div class="content-box">
<div class="container">
<p class="title">通知/日志</p>
<!-- <div class="test-div">
<i class="el-icon-edit"></i>
<i class="el-icon-share"></i>
<i class="el-icon-delete"></i>
</div> -->
<el-table :data="tableData" :height="tableHeight" border style="width: 100%">
<el-table-column align="center" prop="date" label="通知类型" width="180"></el-table-column>
<el-table-column align="center" prop="name" label="产生时机" width="180"></el-table-column>
<el-table-column align="center" prop="address" label="内容"></el-table-column>
<el-table-column align="center" label="操作" width="160">
<template slot-scope="scope">
<el-button @click="download(scope.row)" type="text" size="small" class="">下载</el-button>
<el-button @click="showView(scope.row)" type="text" size="small" class="el-icon-view"></el-button>
<el-button @click="clickDelete(scope.row)" type="text" size="small" class="el-icon-delete"></el-button>
</template>
</el-table-column>
</el-table>
<div class="content-box">
<div class="container">
<p class="title">通知/日志</p>
<el-form ref="form" :model="formData" label-width="100px" style="display:flex">
<el-form-item label="日期:">
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
size="small"
v-model="formData.value1"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="内容:">
<el-input size="small" v-model="formData.content"></el-input>
</el-form-item>
<el-form-item label="通知类型:">
<el-select size="small" clearable style="width:100%;" v-model="formData.notificationType" placeholder="请选择">
<el-option v-for="item in options" :key="item.name" :label="item.name" :value="item.name"> </el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="lookForMessage" type="primary" size="small">查询</el-button>
</el-form-item>
</el-form>
<el-table :data="tableData" :height="tableHeight" border style="width: 100%">
<el-table-column align="center" prop="notificationType" label="通知类型" width="180"></el-table-column>
<el-table-column align="center" prop="journalTime" label="产生时机" width="180"></el-table-column>
<el-table-column show-overflow-tooltip align="center" prop="content" label="内容"></el-table-column>
<el-table-column align="center" label="操作" width="160">
<template slot-scope="scope">
<el-button @click="showView(scope.row)" type="text" size="small">详情</el-button>
<el-button @click="clickDelete(scope.row)" style="color:red" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="pageSize"
layout="sizes, prev, pager, next" :total="totalNumber" style="padding-top: 10px;">
</el-pagination>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
layout="sizes, total,prev, pager, next"
:total="totalNumber"
style="padding-top: 10px;"
>
</el-pagination>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
<span>这是一段信息</span>
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span> -->
</el-dialog>
<el-dialog :title="concetData.notificationType" :visible.sync="dialogVisible" width="30%" @close="notificClosed">
<span>{{ concetData.content }}</span>
</el-dialog>
</div>
</div>
</div>
</template>
<script>
import { getTongzrzApi, deleteTongzrzApi, getTongzrzDetailsApi } from '@/api/logs';
import moment from 'moment';
export default {
data() {
return {
tableData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
data() {
return {
concetData: {
notificationType: '',
content: ''
},
options: [
{
name: '通知'
},
{
name: '警告'
},
{
name: '报警'
},
{
name: '成功'
}
],
formData: {
value1: [],
content: '',
notificationType: ''
},
tableData: [],
currentPage: 1,
pageSize: 10,
totalNumber: 0,
tableHeight: 0,
dialogVisible: false
};
},
created() {
let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
this.tableHeight = windowHeight - 270;
},
mounted() {
this.setTimes();
this.getData();
},
methods: {
setTimes() {
let arr = [];
//
let s = moment().format('YYYY-MM-DD HH:mm:ss'); //1day
//
let i = moment(s)
.subtract(2, 'days')
.format('YYYY-MM-DD HH:mm:ss');
arr = [s, i];
this.formData.value1 = arr;
this.$forceUpdate();
},
],
currentPage: 1,
pageSize: 100,
totalNumber: 1000,
tableHeight: 0,
dialogVisible: false
notificClosed() {
for (let i in this.concetData) {
this.concetData[i] = '';
}
},
clickDelete(row) {
this.$confirm('此操作将永久删除该日志, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteTongzrzApi(row.journalId).then(res => {
if (res.data.code == 200) {
this.$message({
type: 'success',
message: '删除成功!'
});
} else {
this.$message({
type: 'error',
message: res.data.msg
});
}
this.getData();
});
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//
getTongzrzDetails(JournalId) {
getTongzrzDetailsApi(JournalId)
.then(res => {
if (res.data.code === 200) {
this.concetData = res.data.data;
this.dialogVisible = true;
} else {
this.$message.error(res.data.msg);
}
})
.catch(err => {
this.$message.error(err.data.msg);
});
},
//
lookForMessage() {
this.currentPage = 1;
this.getData();
},
//
getData() {
getTongzrzApi({
Content: this.formData.content,
Type: this.formData.notificationType,
CurrentPage: this.currentPage,
PageSize: this.pageSize,
StartTime: this.formData.value1.length > 0 ? this.formData.value1[0] : '',
EndTime: this.formData.value1.length > 0 ? this.formData.value1[1] : ''
})
.then(res => {
if (res.data.code === 200) {
this.tableData = res.data.data.data;
this.totalNumber = res.data.data.total;
} else {
this.$message.error(res.data.msg);
}
})
.catch(err => {
this.$message.error(err.data.msg);
});
},
showView(scope) {
this.getTongzrzDetails(scope.journalId);
},
handleSizeChange(val) {
this.pageSize = val;
this.getData();
},
handleCurrentChange(val) {
this.currentPage = val;
this.getData();
}
}
},
created() {
let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
this.tableHeight = windowHeight - 170;
},
methods: {
download(scope) {
console.log(scope, '下载');
},
showView(scope) {
console.log(scope, '查看');
this.dialogVisible = true;
},
clickDelete(scope) {
console.log(scope, '删除');
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
}
}
}
};
</script>
<style>
.test-div i {
font-size: 25px;
font-size: 25px;
}
</style>
</style>

View File

@ -1,43 +1,48 @@
<template>
<div class="content-box">
<div class="container">
<p class="title">我的账号</p>
<!-- <div class="test-div">
<i class="el-icon-edit"></i>
<i class="el-icon-share"></i>
<i class="el-icon-delete"></i>
</div> -->
<el-form label-position="left" label-width="60px" :model="formLabelAlign">
<el-form-item label="名称:">
{{ formLabelAlign.name }}
</el-form-item>
<el-form-item label="账号:">
{{ formLabelAlign.account }}
</el-form-item>
<el-form-item label="密码:">
{{ formLabelAlign.password }}
</el-form-item>
</el-form>
<div class="content-box">
<div class="container">
<p class="title">我的账号</p>
<el-form label-position="left" label-width="60px" :model="formLabelAlign">
<el-form-item label="名称:">
{{ formLabelAlign.name }}
</el-form-item>
<el-form-item label="账号:">
{{ formLabelAlign.account }}
</el-form-item>
<el-form-item label="密码:">
{{ formLabelAlign.password }}
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
import { getUserApi } from '@/api/myld.js';
export default {
data() {
return {
formLabelAlign: {
name: 'admin',
account: 'admin',
password: '123456',
},
data() {
return {
formLabelAlign: {
name: 'admin',
account: 'admin',
password: '123456'
}
};
},
methods: {
getUser() {
console.log(window.localStorage.getItem(''));
}
},
mounted() {
this.getUser();
}
}
}
};
</script>
<style>
.test-div i {
font-size: 25px;
font-size: 25px;
}
</style>
</style>