Commit de24949e by 罗鑫霖

Merge branch 'huaweiaqhx' of http://git.keliuyun.com:55676/platform/fanxing_new into huaweiaqhx

2 parents 9ba5a094 bf265bc4
No preview for this file type
window._ENUM = {
algorTypeList: [
{
value: "",
name: "全部"
},{
value: "0",
name: "城市电警卡口",
},{
value: "6",
name: "农交安"
},{
value: "7",
name: "高速"
},{
value: "1",
name: "客流"
},{
value: "3",
name: "违停"
},{
value: "5",
name: "交通行人"
}
]
}
\ No newline at end of file
......@@ -23,6 +23,10 @@
<script src="<%= BASE_URL %>js/keymaster.js"></script>
<script src="<%= BASE_URL %>js/config.js"></script>
<script src="<%= BASE_URL %>js/flv.js"></script>
<script src="<%= BASE_URL %>enum/index.js"></script>
<script>
window._versionTime = parseInt('<%=new Date().getTime()%>');
</script>
<!-- <script src="<%= BASE_URL %>js/NodePlayer-full.min.js"></script> -->
</head>
<body id="theme-name">
......
......@@ -19,9 +19,10 @@ window.config = {
"huasanDD": 'http://aaa.zzgx.gov.cn/oauth/authorize?response_type=code&scope=read&client_id=KLjmdAH0',
"ddwsurl":"123.6.38.39:29090",
"isdd":false, //是否开启钉钉登录
"version":"2.1.0",
"version":"2.1.1",
"encrypt":false,//是否加密true采用sha1加密,false不加密
"nvsUrl":'http://47.94.37.10:8888',
"nvsRegex":'rtsp://47.94.37.10/lskjapp/',
"isNvs3000":true,//是否开启nvs3000拉取功能
"isGaoXinQu": true, //是否是郑州高新区
}
{"commit":"4b64e700aabddfd8a3571739b1bece4194641df5","commitDate":"2021-9-27 18:45","buildDate":"2021-11-11 16:23","version":"2.1.0","info":"【BUG】存储配置导出"}
{"commit":"0e5038400902761c6f098626feeb8634c767e7a7","commitDate":"2022-4-17 16:25","buildDate":"2022-5-6 16:10","version":"2.1.0","info":"高新区-软测修改"}
\ No newline at end of file
......@@ -30,10 +30,10 @@ export default {
window.opsTableHeight = document.body.clientHeight - 260 + "px";
if (document.body.clientWidth > 1366) {
window.oneSearchTableHeight = document.body.clientHeight - 280 + "px";
window.twoSearchTableHeight = document.body.clientHeight - 320 + "px";
window.twoSearchTableHeight = document.body.clientHeight - 330 + "px";
} else {
window.oneSearchTableHeight = document.body.clientHeight - 280 + "px";
window.twoSearchTableHeight = document.body.clientHeight - 315 + "px";
window.twoSearchTableHeight = document.body.clientHeight - 320 + "px";
}
}
};
......
......@@ -21,7 +21,7 @@ let wsIP = "";
let flvIP = "";
switch (process.env.NODE_ENV) {
case "development":
wsIP = window.config.https?"192.168.9.227":"123.6.38.39:20080:20080"; // 测试环境url
wsIP = window.config.https?"192.168.9.227":"192.168.9.233:20080"; // 测试环境url
flvIP = window.config.https?"192.168.9.233":"192.168.9.233";
break;
case "pre":
......
......@@ -9,21 +9,21 @@
let baseUrl = "/api"; // 本地代理
import axios from "axios";
switch (process.env.NODE_ENV) {
case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = window.config.https?"https://192.168.9.245:20070":"http://123.6.38.39:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
break;
case "pre":
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
break;
case "production":
baseUrl = window.config.https?`https://${location.host}`:`http://${location.host}`; // 生产环境url
break;
}
switch (process.env.NODE_ENV) {
case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
// baseUrl = window.config.https ? "https://192.168.9.245:20070" : "http://192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
baseUrl = "http://123.6.38.39:20080";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
break;
case "pre":
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
break;
case "production":
baseUrl = window.config.https ? `https://${location.host}` : `http://${location.host}`; // 生产环境url
break;
}
export default baseUrl;
export default baseUrl;
\ No newline at end of file
......@@ -25,15 +25,26 @@ export default {
case "短视频":
url = "/vchans?vchan_type=vfile";
break;
case "视频云设备":
url = "/video_cloud?vchan_type=cloud";
break;
}
if(window.config.bigtree && devname == "外部设备") {
return `${baseUrl}/api/v1/devconf_fx${url}` //ztree版本
} else if(devname == "外部设备"){
return api.get(`${baseUrl}/api/v1/devconf_fx/${url}`, params);
} else if(window.config.bigtree){
return `${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`
}else {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`)
if (window.config.bigtree) {
if(devname == "外部设备") {
return `${baseUrl}/api/v1/devconf_fx${url}`; //ztree版本
} else if (devname == "视频云设备") {
return `${baseUrl}/api/v1/devconf_fx${url}`; //ztree版本
} else {
return `${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`;
}
} else {
if(devname == "外部设备") {
return api.get(`${baseUrl}/api/v1/devconf_fx/${url}`, params);
} else if (devname == "视频云设备") {
return `${baseUrl}/api/v1/devconf_fx${url}`; //ztree版本
} else {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`);
}
}
},
......@@ -99,5 +110,11 @@ export default {
},
saveConfig:(id,params) => {
return api.post(`${baseUrl}/api/v1/devconf_fx/content/${id}`,params)
}
},
refreshCloudDev: (params) => {
return api.get(`${baseUrl}/api/v1/devconf_fx/video_cloud/refresh`,params)
},
getCloudDev: (params) => {
return api.get(`${baseUrl}/api/v1/devconf_fx/video_cloud`,params)
},
};
......@@ -136,7 +136,7 @@ export default {
},
getcatalogs(params){
return api.get(
`${baseUrl}/api/v1/devconf_fx/device_catalogs`,params
`${baseUrl}/api/v1/devconf_fx/device_catalogs`, params
);
},
refreshcatlog(){
......
......@@ -8,6 +8,9 @@ export default {
detailImg(params, id) {
return api.get(urls.detailImg + id, params);
},
detailImgBatch(params) {
return api.post(urls.detailImgBatch, params);
},
detailVideo(params, id) {
return api.get(urls.detailvideo + id, params);
},
......
import baseUrl from '../baseUrl'
export default {
// 交通方面表格
// 交通方面表格
tableList: baseUrl + '/api/v1/traffic/events',
// 事件查询表格
eventTableList: baseUrl + '/api/v1/behavior/events',
// 获取详情图片
detailImg: baseUrl + '/api/v1/web/pics/',
//批量获取照片
detailImgBatch: baseUrl + '/api/v1/web/pics/batch_get',
// 删除
delVehicle: baseUrl + '/api/v1/traffic/events/',
// 批量删除
......
......@@ -56,9 +56,8 @@ class Codes {
publicCode() {
try {
// eslint-disable-next-line camelcase
let shoot_dt = this.timeForm(this.result.pics[0].shoot_dt, "local").split(
" "
);
const _time = this.result.pics[0].shoot_dt || this.result.event_dt;
let shoot_dt = this.timeForm(_time, "local").split(" ");
this.result.shoot_date = shoot_dt[0];
this.result.shoot_time = shoot_dt[1];
} catch (error) {
......@@ -144,17 +143,17 @@ class Codes {
try {
this.result.illegalTypestate = parseInt(this.allData.event_data.illegal.state);
this.result.illegalType =
parseInt(this.allData.event_data.illegal.state) === 1
? this.getCode("违法类型", this.allData.event_data.illegal.code)
: "正常";
parseInt(this.allData.event_data.illegal.state) === 1 ?
this.getCode("违法类型", this.allData.event_data.illegal.code) :
"正常";
} catch (err) {
this.result.illegalType = "未识别";
}
try {
this.result.location_name =
this.allData.event_data.location.name === ""
? "未知"
: this.allData.event_data.location.name;
this.allData.event_data.location.name === "" ?
"未知" :
this.allData.event_data.location.name;
} catch (e) {
this.result.location_name = "未识别";
}
......@@ -182,14 +181,14 @@ class Codes {
} catch (err) {
this.result.plate_type_text = "未识别";
}
try {
this.result.plate_color_text = this.getCode(
"号牌颜色",
this.allData.event_data.vehicle.plate.color_code
);
} catch (err) {
this.result.plate_color_text = "未识别";
}
try {
this.result.plate_color_text = this.getCode(
"号牌颜色",
this.allData.event_data.vehicle.plate.color_code
);
} catch (err) {
this.result.plate_color_text = "未识别";
}
try {
this.result.vehicle_body_color_text = this.getCode(
"车身颜色",
......@@ -227,7 +226,7 @@ class Codes {
} catch (e) {
// console.log("遮阳板无");
}
if (ary.length) {
this.result.RefinedFeature_text = ary.join("");
} else {
......@@ -290,9 +289,9 @@ class Codes {
// 违法类型
try {
this.result.illegalType =
parseInt(this.allData.event_data.illegal.state) === 1
? this.getCode("违法类型", this.allData.event_data.illegal.code)
: "正常";
parseInt(this.allData.event_data.illegal.state) === 1 ?
this.getCode("违法类型", this.allData.event_data.illegal.code) :
"正常";
} catch (err) {
this.result.illegalType = "未识别";
}
......@@ -334,9 +333,9 @@ class Codes {
// 地点名称
try {
this.result.location_name =
this.allData.event_data.location.name === ""
? "未知"
: this.allData.event_data.location.name;
this.allData.event_data.location.name === "" ?
"未知" :
this.allData.event_data.location.name;
} catch (e) {
this.result.location_name = "未识别";
}
......@@ -347,7 +346,7 @@ class Codes {
} catch (error) {
this.result.xcycle_plate_text = "未识别";
}
// 骑车类型
// console.log(this.allData.event_data.xcycle_type)
if (!this.allData.event_data.xcycle_type) {
......@@ -371,27 +370,37 @@ class Codes {
this.result.xcycle_type_text = "未识别";
}
}
console.log('company',this.allData.event_data.xcycle.company.code)
try {
if (this.result.xcycle_type_text === "自行车") {
this.result.company = this.allData.event_data.xcycle.company.name;
} else if (this.result.xcycle_type_text === "摩托车") {
this.result.company = this.getCode(
"外卖公司",
this.allData.event_data.xcycle.company.code
);
} else if (this.result.xcycle_type_text === "三轮车") {
this.result.company = this.getCode(
"快递公司",
this.allData.event_data.xcycle.company.code
);
if (this.event_type === 'xcycle') {
this.result.company = this.getCode(
"运营公司",
this.allData.event_data.xcycle.company.code
);
} else {
this.result.company = "";
this.result.company = "未识别";
}
} catch (error) {
this.result.company = "未识别";
}
// try {
// if (this.result.xcycle_type_text === "自行车") {
// this.result.company = this.allData.event_data.xcycle.company.name;
// } else if (this.result.xcycle_type_text === "摩托车") {
// this.result.company = this.getCode(
// "外卖公司",
// this.allData.event_data.xcycle.company.code
// );
// } else if (this.result.xcycle_type_text === "三轮车") {
// this.result.company = this.getCode(
// "快递公司",
// this.allData.event_data.xcycle.company.code
// );
// } else {
// this.result.company = "无";
// }
// } catch (error) {
// this.result.company = "未识别";
// }
}
// 客流
pflow() {}
......@@ -403,7 +412,7 @@ class Codes {
}
getCode(codeName, code) {
var name = window.localStorage.getItem(codeName + "-" + code);
name = name || "";
name = name || "未识别";
return name;
}
/**
......@@ -451,13 +460,13 @@ class Codes {
bjTime = new Date(time);
}
var standardTime = [
[bjTime.getFullYear(), bjTime.getMonth() + 1, bjTime.getDate()].join("-"),
[bjTime.getHours(), bjTime.getMinutes(), bjTime.getSeconds()].join(":")
]
[bjTime.getFullYear(), bjTime.getMonth() + 1, bjTime.getDate()].join("-"),
[bjTime.getHours(), bjTime.getMinutes(), bjTime.getSeconds()].join(":")
]
.join(" ")
.replace(/(?=\b\d\b)/g, "0");
return standardTime;
}
}
export let buildCode = new Codes();
export let buildCode = new Codes();
\ No newline at end of file
import Vue from "vue";
import { buildImgurl } from "@/libs/utils";
Vue.prototype.dev_unid = "2cb6e39adc5176b81879f6c22f1d9e1c";
/**
* @param {unid} 设备id
*/
Vue.prototype.setDevunid = function(devuid) {
Vue.prototype.setDevunid = function (devuid) {
Vue.prototype.dev_unid = devuid;
};
/**
* tar文件上传设置
*/
Vue.prototype.uploadFile = function(file, type, size) {
Vue.prototype.uploadFile = function (file, type, size) {
const isType = file.raw.type === type;
let isSize = true;
if (size) {
......@@ -27,7 +28,7 @@ Vue.prototype.uploadFile = function(file, type, size) {
};
Vue.prototype.globalWs = null;
Vue.prototype.getCode = function(codeName, code) {
Vue.prototype.getCode = function (codeName, code) {
var name = window.localStorage.getItem(codeName + "-" + code);
name = name ? name : "";
return name;
......@@ -36,10 +37,10 @@ Vue.prototype.getCode = function(codeName, code) {
* @param {src} 图片路径
* 图片放大
*/
Vue.prototype.zoomImg = function(data) {
Vue.prototype.zoomImg = function (data) {
store.commit("setImgsrc", data);
};
Vue.filter("sexfn", function(value) {
Vue.filter("sexfn", function (value) {
if (!value) return;
var str = "";
if (value == 1) str = "男";
......@@ -47,7 +48,7 @@ Vue.filter("sexfn", function(value) {
return str;
});
Vue.filter("dbnamefn", function(value) {
Vue.filter("dbnamefn", function (value) {
let dbData = store.state.initinfo.facedbdata,
dbname = "";
dbData.forEach(ele => {
......@@ -58,7 +59,7 @@ Vue.filter("dbnamefn", function(value) {
return dbname;
});
Vue.filter("filterDeployType", function(value) {
Vue.filter("filterDeployType", function (value) {
let dbData = store.state.alarmtype,
dbname = "";
dbData.forEach(ele => {
......@@ -73,7 +74,7 @@ Vue.filter("filterDeployType", function(value) {
* @param {provenceid} 省份id
* @param {cityid} 城市id
*/
Vue.prototype.showCity = function(provenceid, cityid) {
Vue.prototype.showCity = function (provenceid, cityid) {
this.cData = this.$store.state.initinfo.province;
var province = provenceid;
var provinceNmae = "";
......@@ -81,7 +82,7 @@ Vue.prototype.showCity = function(provenceid, cityid) {
var curProvince = "";
var city = cityid;
if (province) {
this.cData.forEach(function(ele) {
this.cData.forEach(function (ele) {
if (ele.code == province) {
if (ele.cities) curProvince = ele.cities;
provinceNmae = ele.name;
......@@ -89,7 +90,7 @@ Vue.prototype.showCity = function(provenceid, cityid) {
}, this);
if (city) {
if (curProvince)
curProvince.list_data.forEach(function(ele) {
curProvince.list_data.forEach(function (ele) {
if (ele.code == city) {
cityName = ele.name;
}
......@@ -105,7 +106,7 @@ Vue.prototype.showCity = function(provenceid, cityid) {
* @param {obj}
* 格式化时间
*/
Vue.prototype.timeForm = function(obj) {
Vue.prototype.timeForm = function (obj) {
var nowY = obj.getFullYear();
var nowM =
obj.getMonth() + 1 < 10 ? "0" + (obj.getMonth() + 1) : obj.getMonth() + 1;
......@@ -117,12 +118,12 @@ Vue.prototype.timeForm = function(obj) {
nowY + "-" + nowM + "-" + nowD + " " + nowH + ":" + nowMi + ":" + nowS;
return timeNow;
};
Vue.prototype.yesterDay = function() {
Vue.prototype.yesterDay = function () {
var data = new Date().getTime() - 24 * 60 * 60 * 1000;
var curdate = this.timeForm(new Date(data));
return curdate.split(" ")[0] + " " + "00:00:00";
};
Vue.prototype.nowDay = function(){
Vue.prototype.nowDay = function () {
var data = new Date();
return this.timeForm(data);
};
......@@ -130,7 +131,7 @@ Vue.prototype.nowDay = function(){
* @param {obj}
* UTC时间处理
*/
Vue.prototype.setUtcTime = function(obj) {
Vue.prototype.setUtcTime = function (obj) {
if (obj && obj != "") {
let num = new Date(obj).getTime();
let offset = Math.abs(new Date().getTimezoneOffset());
......@@ -168,7 +169,7 @@ function checkIE() {
}
}
let sha1 = require('js-sha1')
Vue.prototype.baseencode = function(str){
Vue.prototype.baseencode = function (str) {
// return str
// let base = "";
// let version = window.config.version
......@@ -178,7 +179,7 @@ Vue.prototype.baseencode = function(str){
// if(vs > 210) {
// base = str;
// } else {
// }
// } else {
// base = sha1(str);
......@@ -190,7 +191,7 @@ Vue.prototype.baseencode = function(str){
return base
// return sha1(str);
}
Vue.prototype.showLocalTime = function(obj) {
Vue.prototype.showLocalTime = function (obj) {
if (obj == undefined) return;
let dt = "",
ndt = "";
......@@ -223,11 +224,11 @@ Vue.prototype.showLocalTime = function(obj) {
* @param {*} key
* @param {*} val
*/
Vue.prototype.uuid = function() {
Vue.prototype.uuid = function () {
var s = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
......@@ -239,7 +240,7 @@ Vue.prototype.uuid = function() {
/**
* 本地存储相机信息
*/
Vue.prototype.setCameralocalStor = function(key, val) {
Vue.prototype.setCameralocalStor = function (key, val) {
if (window.localStorage) {
localStorage[key] = val;
} else {
......@@ -251,7 +252,7 @@ Vue.prototype.setCameralocalStor = function(key, val) {
* @param {key}
* 获取本地存储相机信息
*/
Vue.prototype.getCameralocalStor = function(key) {
Vue.prototype.getCameralocalStor = function (key) {
var val = "";
if (window.localStorage) {
val = localStorage[key];
......@@ -264,7 +265,7 @@ Vue.prototype.getCameralocalStor = function(key) {
/**
* 图片上传限制
*/
Vue.prototype.uploadImgCondition = function(file) {
Vue.prototype.uploadImgCondition = function (file) {
const isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < 2;
......@@ -280,7 +281,7 @@ Vue.prototype.uploadImgCondition = function(file) {
/**
* base64图片
*/
Vue.prototype.base64Img = function(file) {
Vue.prototype.base64Img = function (file) {
// eslint-disable-next-line no-redeclare
var file = file.file;
return new Promise((resolve, reject) => {
......@@ -289,7 +290,7 @@ Vue.prototype.base64Img = function(file) {
if (file) {
reader.readAsDataURL(file);
}
reader.onloadend = function(evt) {
reader.onloadend = function (evt) {
srcs = reader.result.split(",")[1];
let data = {
pic_base64: srcs,
......@@ -305,18 +306,14 @@ Vue.prototype.base64Img = function(file) {
/**
* 判断是否是chrome浏览器
*/
Vue.prototype.checkchrome = function() {
var isWebKit = navigator.userAgent.indexOf('WebKit') > -1 //
Vue.prototype.checkchrome = function () {
var isWebKit = navigator.userAgent.indexOf('WebKit') > -1 //
return isWebKit
};
/**
* https路径处理
*/
Vue.prototype.buildImgurl = function(url){
let uri = window.config.https? url.replace('http','https'):url;
let result = window.config.https? uri.replace('20080','20070'):uri;
return result
}
Vue.prototype.buildImgurl = buildImgurl;
/**
* code操作
......@@ -337,4 +334,4 @@ Vue.prototype.getCode = (codeName, code) => {
var name = localStorage.getItem(codeName + "-" + code);
name = name ? name : "";
return name;
};
};
\ No newline at end of file
......@@ -182,6 +182,9 @@
.el-table--small td, .el-table--small th{
padding: 8px 0;
}
.ten-table-wrapper td, .ten-table-wrapper th {
padding: 16px 0;
}
.el-table--border::after, .el-table--group::after, .el-table::before{
// background-color: rgba(0,0,0,0);
}
......@@ -267,6 +270,9 @@ display: table-cell!important;
.el-dialog .el-select--small{
width: 100%;
}
.el-form--inline .el-form-item__content {
vertical-align: middle;
}
/* .el-dialog .el-form-item--small .el-form-item__content,.el-dialog .el-form-item--small .el-form-item__label{
line-height: 26px;
} */
......@@ -285,7 +291,7 @@ display: table-cell!important;
margin-left: -10px;
}
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
margin-bottom: 4px;
margin-bottom: 15px;
line-height: 32px;
}
/* 切换 */
......
......@@ -566,6 +566,9 @@ a:active{
transform:none;
left: 0;
}
.el-image-viewer__wrapper {
z-index: 3600 !important;
}
.detailDialog .el-icon-circle-close{
color: #fff;
}
......@@ -649,7 +652,7 @@ a:active{
}
.listboxitem .el-form-item--small .el-form-item__content, .el-form-item--small .el-form-item__label {
line-height: 20px!important;
line-height: 32px!important;
padding-left: 5px;
}
.displaybtn-box {
......
<template>
<div style="width: 100%;height: 100%;position: relative;">
<p style="position: absolute;top: 113px;z-index: 99;text-align: center;width: 100%;" v-if="noIE">请选择IE9以上版本查看视频!</p>
<object v-show="videoShow" id="nvrTotalOcx" name="nvrTotalOcx"
classid="CLSID:96DFBBAF-4220-4978-9681-4ABA534A7718"
codebase="./static/OcxInstall/VionNvrVideoInstall.exe#version=1,0,24"
style="width: 100%; height:100%;">
<param name="BorderStyle" value="1" />
<param name="MousePointer" value="0" />
<param name="Enabled" value="1" />
<param name="Min" value="0" />
<param name="Max" value="10" />
<embed wmode="opaque"/>
<param name="wmode" value="transparent"/>
</object>
<!--安装弹框-->
<el-dialog title="提示" :visible.sync="stepDialogVisible" width='252px' :close-on-click-modal='false' @close="stepClose">
<span>本网站需要安装视频插件才可正常使用,请安装完成后请手动重启浏览器</span>
<div slot="footer" class="dialog-footer">
<el-button @click="stepDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
<!--更新弹框-->
<el-dialog title="提示" :visible.sync="updateDialogVisible" width='252px' :close-on-click-modal='false' @close="stepClose">
<span>该网站当前视频插件版本为{{currentVersion}},可能导致部分功能不完善,请更新到最新版本1.0.33</span>
<div slot="footer" class="dialog-footer">
<el-button @click="updateDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
<div style="width: 100%; height: 100%; position: relative">
<p
style="
position: absolute;
top: 113px;
z-index: 99;
text-align: center;
width: 100%;
"
v-if="noIE"
>
请选择IE9以上版本查看视频!
</p>
<object
v-show="videoShow"
id="nvrTotalOcx"
name="nvrTotalOcx"
classid="CLSID:96DFBBAF-4220-4978-9681-4ABA534A7718"
codebase="./static/OcxInstall/VionNvrVideoInstall.exe#version=1,0,24"
style="width: 100%; height: 100%"
>
<param name="BorderStyle" value="1" />
<param name="MousePointer" value="0" />
<param name="Enabled" value="1" />
<param name="Min" value="0" />
<param name="Max" value="10" />
<embed wmode="opaque" />
<param name="wmode" value="transparent" />
</object>
<!--安装弹框-->
<el-dialog
title="提示"
:visible.sync="stepDialogVisible"
width="252px"
:close-on-click-modal="false"
@close="stepClose"
>
<span
>本网站需要安装视频插件才可正常使用,请安装完成后请手动重启浏览器</span
>
<div slot="footer" class="dialog-footer">
<el-button @click="stepDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
<!--更新弹框-->
<el-dialog
title="提示"
:visible.sync="updateDialogVisible"
width="252px"
:close-on-click-modal="false"
@close="stepClose"
>
<span
>该网站当前视频插件版本为{{
currentVersion
}},可能导致部分功能不完善,请更新到最新版本1.0.33</span
>
<div slot="footer" class="dialog-footer">
<el-button @click="updateDialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default{
data(){
return{
videoShow:true,
noIE:false,
currentVersion:0,
updateDialogVisible:false,
stepDialogVisible:false
}
},
mounted(){
setTimeout(()=>{
this.initVideo();
},300)
},
methods:{
stepClose(){
this.videoShow=true;
},
initVideo(){
var ieVer=this.IEVersion();
if(ieVer==7||ieVer==8||ieVer==6||ieVer=='-1'){
this.noIE=true
}else{
this.noIE=false
try{
this.currentVersion=document.getElementById('nvrTotalOcx').GetOcxVersion();
var versionArr=this.currentVersion.split('.');
var versionNum=0;
versionArr.forEach((item,index,arr)=>{
versionNum=versionNum+Number(item);
})
if(versionNum<34){
this.videoShow=false;
this.updateDialogVisible=true;
window.open('./OcxInstall/NvrVideoInstall_1.0.33.exe')
}
}catch(e){
this.videoShow=false;
this.stepDialogVisible=true;
window.open('./OcxInstall/NvrVideoInstall_1.0.33.exe')
return false
}
}
if(typeof nvrTotalOcx != 'undefined'){
var testStr = 'Null';
nvrTotalOcx.Init(0, testStr, 1);
nvrTotalOcx.SetSingleWindow(true);
nvrTotalOcx.SetParam("VideoSize", 0);
var medianame = '视频0';
// var hostname = window.location.hostname;
var hostname = '192.168.9.120';
var port=8554;
var url = "rtsp://"+hostname+":"+port+"/ch0";
nvrTotalOcx.PlayRealVideo(url,1,'video',hostname,0);
window.onbeforeunload=function(){
nvrTotalOcx.CloseVideoByChannelnum(1)
}
}
},
IEVersion() {
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
if(isIE) {
var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
reIE.test(userAgent);
var fIEVersion = parseFloat(RegExp["$1"]);
if(fIEVersion == 7) {
return 7;
} else if(fIEVersion == 8) {
return 8;
} else if(fIEVersion == 9) {
return 9;
} else if(fIEVersion == 10) {
return 10;
} else {
return 6;//IE版本<=7
}
} else if(isEdge) {
return 'edge';//edge
} else if(isIE11) {
return 11; //IE11
}else{
return -1;//不是ie浏览器
}
},
hideHanlde(){
this.videoShow=false;
},
showHanlde(){
this.videoShow=true;
}
}
}
export default {
data() {
return {
videoShow: true,
noIE: false,
currentVersion: 0,
updateDialogVisible: false,
stepDialogVisible: false,
};
},
mounted() {
setTimeout(() => {
this.initVideo();
}, 300);
},
methods: {
stepClose() {
this.videoShow = true;
},
initVideo() {
var ieVer = this.IEVersion();
if (ieVer == 7 || ieVer == 8 || ieVer == 6 || ieVer == "-1") {
this.noIE = true;
} else {
this.noIE = false;
try {
this.currentVersion = document
.getElementById("nvrTotalOcx")
.GetOcxVersion();
var versionArr = this.currentVersion.split(".");
var versionNum = 0;
versionArr.forEach((item, index, arr) => {
versionNum = versionNum + Number(item);
});
if (versionNum < 34) {
this.videoShow = false;
this.updateDialogVisible = true;
window.open("./OcxInstall/NvrVideoInstall_1.0.33.exe");
}
} catch (e) {
this.videoShow = false;
this.stepDialogVisible = true;
window.open("./OcxInstall/NvrVideoInstall_1.0.33.exe");
return false;
}
}
if (typeof nvrTotalOcx != "undefined") {
var testStr = "Null";
nvrTotalOcx.Init(0, testStr, 1);
nvrTotalOcx.SetSingleWindow(true);
nvrTotalOcx.SetParam("VideoSize", 0);
var medianame = "视频0";
// var hostname = window.location.hostname;
var hostname = "192.168.9.120";
var port = 8554;
var url = "rtsp://" + hostname + ":" + port + "/ch0";
nvrTotalOcx.PlayRealVideo(url, 1, "video", hostname, 0);
window.onbeforeunload = function () {
nvrTotalOcx.CloseVideoByChannelnum(1);
};
}
},
IEVersion() {
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
var isIE =
userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
var isIE11 =
userAgent.indexOf("Trident") > -1 && userAgent.indexOf("rv:11.0") > -1;
if (isIE) {
var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
reIE.test(userAgent);
var fIEVersion = parseFloat(RegExp["$1"]);
if (fIEVersion == 7) {
return 7;
} else if (fIEVersion == 8) {
return 8;
} else if (fIEVersion == 9) {
return 9;
} else if (fIEVersion == 10) {
return 10;
} else {
return 6; //IE版本<=7
}
} else if (isEdge) {
return "edge"; //edge
} else if (isIE11) {
return 11; //IE11
} else {
return -1; //不是ie浏览器
}
},
hideHanlde() {
this.videoShow = false;
},
showHanlde() {
this.videoShow = true;
},
},
};
</script>
<style>
......
<template>
<div class="video-box">
<el-dialog title="录像" :visible.sync="videoDialogVisible">
<video id="playerVideo" class="dom-video" controls muted></video>
<div slot="footer" class="player-footer">
<button @click="closeVideoDialog">关闭</button>
</div>
</el-dialog>
</div>
<div class="video-box">
<el-dialog title="录像" :visible.sync="videoDialogVisible">
<video id="playerVideo" class="dom-video" controls muted></video>
<div slot="footer" class="player-footer">
<button @click="closeVideoDialog">关闭</button>
</div>
</el-dialog>
</div>
</template>
<script>
// import {config} from '../../public/js/config'
export default {
data () {
return {
videoDialogVisible: false,
domTimer: null,
player: ''
}
},
methods: {
playvideos: function (play_url) {
let _this = this;
this.videoDialogVisible = true;
this.domTimer = setTimeout(() => {
this.player = document.getElementById('playerVideo');
this.player.loop = true;
if(window.config.https) {
let loc = location.host
this.player.src = `https://${loc}/${play_url.split(":20080")[1]}`
} else {
this.player.src = play_url;
}
this.player.play();
}, 100);
},
closeVideoDialog: function () {
let _this = this;
window.clearTimeout(_this.domTimer)
this.domTimer = null;
this.player.src = '';
this.player = '';
this.videoDialogVisible = false;
}
export default {
data() {
return {
videoDialogVisible: false,
domTimer: null,
player: "",
};
},
methods: {
playvideos: function (play_url) {
let _this = this;
this.videoDialogVisible = true;
this.domTimer = setTimeout(() => {
this.player = document.getElementById("playerVideo");
this.player.loop = true;
if (window.config.https) {
let loc = location.host;
this.player.src = `https://${loc}/${play_url.split(":20080")[1]}`;
} else {
this.player.src = play_url;
}
}
this.player.play();
}, 100);
},
closeVideoDialog: function () {
let _this = this;
window.clearTimeout(_this.domTimer);
this.domTimer = null;
this.player.src = "";
this.player = "";
this.videoDialogVisible = false;
},
},
};
</script>
<style scoped>
.dom-video {
width: 100%;
height: 100%;
border-radius: 5px;
}
.dom-video {
width: 100%;
height: 100%;
border-radius: 5px;
}
.player-footer button {
padding: 0 2%;
}
.player-footer button {
padding: 0 2%;
}
</style>
const algorTypeEnumTemp = {};
window._ENUM.algorTypeList.forEach(d => {
if (d.name) {
algorTypeEnumTemp[d.name] = d.value;
}
if (d.value) {
algorTypeEnumTemp[d.value] = d.name;
}
});
export const algorTypeList = window._ENUM.algorTypeList;
export const algorTypeEnum = algorTypeEnumTemp;
\ No newline at end of file
import api from "@/api/search";
import {
buildCode
} from "@/assets/js/buildcodes";
const splitUrlOrigin = (url) => {
if (url.includes("://")) {
let temp = url.split("://")[1].split("/"),
newUrl = "";
temp.forEach((e, i) => {
if (i != 0) {
newUrl += "/" + e;
}
})
return newUrl;
} else {
return url;
}
};
export const splitUrlOriginG = splitUrlOrigin;
export const buildImgurl = (url) => {
let isHttps = window.config.https,
origin = window.location.origin;
if (isHttps) {
url.replace('http', 'https');
url.replace('20080', '20070')
}
if (!origin.includes("localhost")) {
url = origin + splitUrlOrigin(url);
}
return url;
};
export const matchDetailImg = (picUnidArr) => {
return new Promise((resolve, reject) => {
api.detailImgBatch({
pic_unids: picUnidArr,
})
.then((res) => {
let imgUnidEnum = {};
if (res.length > 0) {
res.forEach((item) => {
imgUnidEnum[item.pic_unid] = buildImgurl(item.pic_url);
});
}
resolve({
imgUnidEnum: imgUnidEnum
});
});
});
};
export const getDataList = (params, type = "") => {
let httpRequest = null;
if (type == "event") {
httpRequest = api.eventTableList;
} else {
httpRequest = api.tableList;
}
let origin = window.location.origin,
isLocalhost = false;
if (origin.includes("localhost")) {
isLocalhost = true;
}
return new Promise(async (resolve, reject) => {
const res = await httpRequest(params);
let formatterData = [],
picUnid_Arr = [];
res.list_data.forEach((item, index) => {
if (item.pics[0].pic_unid) {
picUnid_Arr.push(item.pics[0].pic_unid);
}
});
let imgUnidEnum = {};
if (picUnid_Arr.length > 0) {
const imgRes = await matchDetailImg(picUnid_Arr);
console.log('imgRes', imgRes);
imgUnidEnum = imgRes.imgUnidEnum;
}
console.log('imgUnidEnum', imgUnidEnum)
res.list_data.forEach((item, index) => {
const pic_unid = item.pics ? item.pics[0].pic_unid : null;
if (pic_unid) {
item.pics[0].src_url = imgUnidEnum[pic_unid] || "";
} else {
item.pics[0].src_url = "";
}
const videoSrc_url = item.video ? item.video[0].src_url : null;
if (videoSrc_url) {
if (!isLocalhost) {
item.video[0].src_url = origin + splitUrlOrigin(videoSrc_url);
}
}
formatterData.push(buildCode.init(item));
});
console.log('formatterData', formatterData)
resolve({
total_num: res.total_num,
formatterData: formatterData,
list_data: res.list_data
})
});
}
\ No newline at end of file
......@@ -23,6 +23,8 @@ Vue.prototype.$moment = moment;
Vue.prototype.$buildCode = buildCode;
Vue.prototype.oParse = new XML.ObjTree();
Vue.prototype.axios = axios;
Vue.prototype.$pageSizeOpts = [10, 30, 50, 100];
Vue.prototype.$pageSize = 10;
// import VueParticles from "vue-particles";
Vue.use(api);
Vue.use(log);
......
<template>
<div>
</div>
<div></div>
</template>
<script>
export default {
data() {
return {
}
},
created(){
}
}
data() {
return {};
},
created() {},
};
</script>
<style>
</style>>
\ No newline at end of file
......@@ -12,6 +12,16 @@
}"
@click="openmenu"
></span>
<div class="jump-san-box">
<span
v-for="(item, index) in jumpSanList"
:key="index"
class="jump-item"
@click="jumpHandler(item)"
>
<span class="jump-name">{{ item.name }}</span>
</span>
</div>
<div class="headRight">
<span class="timerbox">{{ curdate }}</span>
<el-dropdown class="zt-box" @command="handleCommand">
......@@ -70,9 +80,17 @@ export default {
headertitle: "",
topbarArr: [],
uname: "",
jumpSanList: []
};
},
methods: {
jumpHandler(item) {
if(item.ddPath && location.href.includes('code')) {
window.open(item.ddPath);
} else {
window.open(item.path);
}
},
setTopBar(data) {
if (this.topbarArr.length < 1) {
this.topbarArr.push(data);
......@@ -177,6 +195,20 @@ export default {
},
},
created() {
if(window.config.isGaoXinQu) {
this.jumpSanList = [
{
name: "渣土车综合管控系统",
path: window.config.zhatucheWin || "http://123.6.38.39/#/login",
ddPath: window.config.zhatucheddWin || "http://123.6.38.39/#/ddlogin",
},{
name: "AI图片分析系统",
path:
window.config.aiPicWin ||
"http://123.6.38.39:20080/web/picplat/dist/index.html#/Login"
}
];
}
this.headertitle = window.config.hadertitle;
this.uname = localStorage.getItem("uname");
this.$api.device.getDev().then((m) => {
......@@ -308,7 +340,7 @@ export default {
color: #fff;
font-size: 25px;
margin-left: 25px;
margin-top: 20px;
vertical-align: -4px;
}
.headRight img {
......@@ -352,4 +384,21 @@ export default {
.uname-box {
padding-right: 10px;
}
.jump-san-box {
display: inline-block;
line-height: 60px;
color: #fff;
font-size: 18px;
padding: 0 0 0 60px;
}
.jump-item {
padding: 0 20px;
cursor pointer;
}
.jump-item:hover {
display: inline-block;
background: #1810ff;
line-height: 60px;
}
</style>
......@@ -71,8 +71,14 @@
</template>
<script>
import moment from "moment";
let particlesConfig = require("../assets/js/particles.json");
let versioninfo = window.config.version;
let versionTime = window._versionTime;
if (versionTime) {
versionTime = moment(new Date(versionTime)).format("YYYY-MM-DD");
}
let versioninfo =
window.config.version + (versionTime ? "-" + versionTime : "");
let sha1 = require("js-sha1");
import types from "../store/types.js";
export default {
......@@ -143,15 +149,15 @@ export default {
})
.then((res) => {
if (!res.ecode) {
if(res.user_name !== this.ruleForm.username){
if (res.user_name !== this.ruleForm.username) {
return false;
}
this.loginMount(res, "user");
} else {
if (res.ecode == "1000") {
if (res.ecode == "1000") {
localStorage.setItem("user_unid", res.user_unid);
localStorage.setItem("atoken", res.atoken);
this.$router.push("/resetpass")
this.$router.push("/resetpass");
} else {
this.$logs.oplogs(res, "serv_login", res.enote);
this.$message({
......@@ -341,9 +347,9 @@ export default {
particlesJS("login", particlesConfig);
document.body.style.overflow = "hidden";
let { href } = window.location,
code = "";
code = "";
if (href.includes("code")) {
this.$router.push('/ddlogin')
this.$router.push("/ddlogin");
}
},
created() {
......
<template>
<div class="passform-box">
<div class="re-header">重置密码</div>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="passform"
>
<div class="passformitem">
<el-form-item label="旧密码" prop="oldpassword">
<el-input v-model="ruleForm.oldpassword" type="password"></el-input>
<div class="passform-container">
<div class="passform-box">
<div class="re-header">重置密码</div>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="passform"
>
<div class="passformitem">
<el-form-item label="旧密码" prop="oldpassword">
<el-input v-model="ruleForm.oldpassword" type="password"></el-input>
</el-form-item>
</div>
<div class="passformitem">
<el-form-item label="新密码" prop="newpassword">
<el-input v-model="ruleForm.newpassword" type="password"></el-input>
</el-form-item>
</div>
<div class="passformitem">
<el-form-item label="密码确认" prop="checknewpassword">
<el-input
v-model="ruleForm.checknewpassword"
type="password"
></el-input>
</el-form-item>
</div>
<el-form-item>
<el-button @click="back('ruleForm')">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')"
>提交</el-button
>
</el-form-item>
</div>
<div class="passformitem">
<el-form-item label="新密码" prop="newpassword">
<el-input v-model="ruleForm.newpassword" type="password"></el-input>
</el-form-item>
</div>
<div class="passformitem">
<el-form-item label="密码确认" prop="checknewpassword">
<el-input
v-model="ruleForm.checknewpassword"
type="password"
></el-input>
</el-form-item>
</div>
<el-form-item>
<el-button @click="back('ruleForm')">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')"
>提交</el-button
>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</template>
<script>
let sha1 = require('js-sha1')
let sha1 = require("js-sha1");
export default {
data() {
var validatePass = (rule, value, callback) => {
if (value === "") {
callback(new Error("请输入密码"));
} else {
if(value == this.ruleForm.oldpassword) {
callback(new Error("新旧密码不能重复!"));
return
if (value == this.ruleForm.oldpassword) {
callback(new Error("新旧密码不能重复!"));
return;
}
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}');
var pwdRegex = new RegExp(
"(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}"
);
if (!pwdRegex.test(value)) {
callback(new Error("您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!"))
callback(
new Error(
"您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!"
)
);
}
if (this.ruleForm.checkPass !== "") {
this.$refs.ruleForm.validateField("checkPass");
......@@ -71,57 +79,63 @@ export default {
ruleForm: {
oldpassword: "",
newpassword: "",
checknewpassword: ""
checknewpassword: "",
},
rules: {
oldpassword: [
{ required: true, message: "请输入旧密码", trigger: "blur" }
{ required: true, message: "请输入旧密码", trigger: "blur" },
],
newpassword: [
{ validator: validatePass, trigger: "blur" },
{ required: true, message: "", trigger: "blur" }
{ required: true, message: "", trigger: "blur" },
],
checknewpassword: [
{ validator: validatePass2, trigger: "blur" },
{ required: true, message: "", trigger: "blur" }
]
}
{ required: true, message: "", trigger: "blur" },
],
},
};
},
methods: {
submitForm(formName) {
let data = {
old_pwd: window.config.encrypt?sha1(this.ruleForm.oldpassword):this.baseencode(this.ruleForm.oldpassword),
new_pwd: window.config.encrypt?sha1(this.ruleForm.newpassword):this.baseencode(this.ruleForm.newpassword),
old_pwd: window.config.encrypt
? sha1(this.ruleForm.oldpassword)
: this.baseencode(this.ruleForm.oldpassword),
new_pwd: window.config.encrypt
? sha1(this.ruleForm.newpassword)
: this.baseencode(this.ruleForm.newpassword),
};
this.$refs[formName].validate(valid => {
this.$refs[formName].validate((valid) => {
if (valid) {
let user_unid = localStorage.getItem("user_unid");
this.$api.ops.resetPwd(data, user_unid).then(res => {
if(res.ecode == 200){
this.$logs.oplogs(res, "serv_login", `修改密码`);
this.$router.push("/login");
this.$message({
type: "success",
message: res.enote
});
} else {
this.$logs.oplogs(res, "serv_login", `修改密码${res.enote}`);
this.$message({
type: "error",
message: res.enote
});
}
}).catch(err => {
if (err.response) {
this.$message({
type: "error",
message: err.response.data.enote
});
}
});
this.$api.ops
.resetPwd(data, user_unid)
.then((res) => {
if (res.ecode == 200) {
this.$logs.oplogs(res, "serv_login", `修改密码`);
this.$router.push("/login");
this.$message({
type: "success",
message: res.enote,
});
} else {
this.$logs.oplogs(res, "serv_login", `修改密码${res.enote}`);
this.$message({
type: "error",
message: res.enote,
});
}
})
.catch((err) => {
if (err.response) {
this.$message({
type: "error",
message: err.response.data.enote,
});
}
});
} else {
console.log("error submit!!");
return false;
......@@ -133,12 +147,18 @@ export default {
},
resetForm(formName) {
this.$refs[formName].resetFields();
}
}
},
},
};
</script>
<style>
.passform-container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
}
.passform {
margin: 20px;
width: 400px;
......@@ -146,10 +166,11 @@ export default {
.passformitem {
margin-bottom: 20px;
}
.passform-box{
.passform-box {
width: 400px;
margin-top: 10%;
}
.re-header{
.re-header {
margin-left: 60px;
margin-top: 20px;
}
......
<template>
<div class="contentBox">
<div class="content">
<div style="padding:8px 20px;">
<span style="float: right;">
<el-button type="info" v-if="uname=='admin'" @click="addUser">添加新用户</el-button>
<div style="padding: 8px 20px">
<span style="float: right">
<el-button type="info" v-if="uname == 'admin'" @click="addUser"
>添加新用户</el-button
>
</span>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
<div style="padding: 0 15px 20px 23px;">
<div style="padding: 0 15px 20px 23px">
<el-table
:height="tableHeight"
:data="tableData"
......@@ -32,18 +34,23 @@
width="300"
label="创建时间"
>
<template slot-scope="scope">
<div>
{{$moment(scope.row.create_dt).local().add(8,'h').format("YYYY-MM-DD HH:mm:ss")}}
</div>
</template>
<template slot-scope="scope">
<div>
{{
$moment(scope.row.create_dt)
.local()
.add(8, "h")
.format("YYYY-MM-DD HH:mm:ss")
}}
</div>
</template>
</el-table-column>
<el-table-column
align="center"
width="300"
prop="operation"
label="操作"
v-if="uname=='admin'"
v-if="uname == 'admin'"
>
<template slot-scope="scope">
<el-tooltip
......@@ -57,11 +64,19 @@
@click="editUser(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="重置密码" placement="bottom" effect="light" :visible-arrow=false >
<span class="el-icon-refresh-right reseticon" @click="reset(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<span class="tableSpanBorder"></span>
<el-tooltip
content="重置密码"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-refresh-right reseticon"
@click="reset(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
......@@ -69,19 +84,22 @@
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
:content="scope.row.lock==null||scope.row.lock?'解锁':'锁定'"
<el-tooltip
:content="scope.row.lock ? '解锁' : '锁定'"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
:class="{'el-icon-lock delIcon':scope.row.lock,'el-icon-unlock editIcon':scope.row.lock==null||scope.row.lock==false}"
:class="{
'el-icon-lock delIcon': !scope.row.lock,
'el-icon-unlock editIcon': scope.row.lock,
}"
@click="clockuser(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -100,9 +118,9 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px">
<el-pagination
style="float: right;"
style="float: right"
background
prev-text="上一页"
next-text="下一页"
......@@ -114,7 +132,7 @@
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
</div>
</div>
......@@ -203,7 +221,7 @@
</div>
</template>
<script>
let sha1 = require('js-sha1')
let sha1 = require("js-sha1");
export default {
data() {
var checkRole = (rule, value, callback) => {
......@@ -214,7 +232,7 @@ export default {
}
};
var checkUser = (rule, value, callback) => {
var userReg = /^[a-zA-Z0-9]{5,32}/
var userReg = /^[a-zA-Z0-9]{5,32}/;
if (!userReg.test(value)) {
callback(new Error("用户名长度为5到32个字符数字字母组合"));
} else {
......@@ -222,13 +240,19 @@ export default {
}
};
var validatePass = (rule, value, callback) => {
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}');
var pwdRegex = new RegExp(
"(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}"
);
if (!pwdRegex.test(value)) {
callback(new Error("您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!"))
} else {
callback(
new Error(
"您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!"
)
);
} else {
callback();
}
callback();
callback();
};
var validatePass2 = (rule, value, callback) => {
if (value === "") {
......@@ -243,18 +267,18 @@ export default {
total: 0,
page: 1,
pageSize: 30,
uname:'',
uname: "",
addForm: {
norm_type: "login",
role_unid: "",
username: "",
password: "",
checkPass: ""
checkPass: "",
},
editForm: {
role_unid: ""
role_unid: "",
},
isadmin:true,
isadmin: true,
editRoleUnid: "",
editUnid: "",
tableData: [],
......@@ -265,17 +289,17 @@ export default {
role_unid: [{ validator: checkRole, trigger: "change" }],
username: [{ validator: checkUser, trigger: "change" }],
password: [{ validator: validatePass, trigger: "change" }],
checkPass: [{ validator: validatePass2, trigger: "change" }]
checkPass: [{ validator: validatePass2, trigger: "change" }],
},
tableHeight: window.opsTableHeight,
currow: ""
currow: "",
};
},
components: {},
mounted() {
this.getTableList();
this.getRoleList();
this.uname = localStorage.getItem('uname')
this.uname = localStorage.getItem("uname");
},
methods: {
numFormatter(row, column, cellValue, index) {
......@@ -296,9 +320,9 @@ export default {
this.$api.ops
.getUserList({
limit: this.pageSize,
offset: offset
offset: offset,
})
.then(res => {
.then((res) => {
this.total = res.total_num;
if (res.list_data == null) {
......@@ -307,7 +331,7 @@ export default {
this.tableData = res.list_data;
}
})
.catch(error => {});
.catch((error) => {});
},
getRoleList() {
this.roleList = [];
......@@ -315,36 +339,36 @@ export default {
.getRoleList({
limit: 9999,
offset: 0,
is_active: true
is_active: true,
})
.then(res => {
.then((res) => {
if (res.list_data == null) {
this.roleList = [];
} else {
this.roleList = res.list_data;
}
})
.catch(error => {});
.catch((error) => {});
},
delFun(index, row) {
this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
this.$api.ops.delUser({}, row.user_unid).then(res => {
this.$api.ops.delUser({}, row.user_unid).then((res) => {
if (!res.ecode) {
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.getTableList();
this.$logs.oplogs(res,'serv_auth',`删除用户${row.username}`);
this.$logs.oplogs(res, "serv_auth", `删除用户${row.username}`);
} else {
this.$message({
type: "error",
message: "删除失败!"
message: "删除失败!",
});
}
});
......@@ -352,56 +376,68 @@ export default {
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
message: "已取消删除",
});
});
},
//注销用户
logoutuser(index,row){
localStorage.removeItem("menu");
localStorage.removeItem("curmenu");
let uid = localStorage.getItem("user_unid");
this.$api.login.logout(row.user_unid).then((res) => {
if(res.ecode == "200") {
this.$message({
type: "success",
message: "注销成功!"
});
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}`);
} else {
this.$message({
type: "error",
message: "注销失败!"
});
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}失败`);
}
logoutuser(index, row) {
localStorage.removeItem("menu");
localStorage.removeItem("curmenu");
let uid = localStorage.getItem("user_unid");
this.$api.login.logout(row.user_unid).then((res) => {
if (res.ecode == "200") {
this.$message({
type: "success",
message: "注销成功!",
});
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}`);
} else {
this.$message({
type: "error",
message: "注销失败!",
});
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}失败`);
}
// localStorage.removeItem("atoken");
});
},
clockuser(index, row){
let text = row.lock?"此操作将解锁该用户":"此操作将锁定该用户"
clockuser(index, row) {
const { user_type } = row;
if (user_type === "user_1") {
this.$message({
type: "error",
message: "不支持锁定新用户!",
});
return;
}
let text = row.lock ? "此操作将解锁该用户" : "此操作将锁定该用户";
this.$confirm(text + ", 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
let params = {
lock:row.lock==null?true:!row.lock,
user_type:'user'
}
this.$api.ops.lockUser(row.user_unid, params).then(res => {
lock: row.lock == null ? true : !row.lock,
user_type: "user",
};
this.$api.ops.lockUser(row.user_unid, params).then((res) => {
if (res.ecode == "200") {
this.$message({
type: "success",
message: params.lock?"锁定成功!":"解锁成功!"
message: params.lock ? "锁定成功!" : "解锁成功!",
});
this.getTableList();
this.$logs.oplogs(res,'serv_auth',`${params.lock?"锁定成功!":"解锁成功!"}${row.username}`);
this.$logs.oplogs(
res,
"serv_auth",
`${params.lock ? "锁定成功!" : "解锁成功!"}${row.username}`
);
} else {
this.$message({
type: "error",
message: params.lock?"锁定失败!":"解锁失败!"
message: params.lock ? "锁定失败!" : "解锁失败!",
});
}
});
......@@ -409,7 +445,7 @@ export default {
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
message: "已取消删除",
});
});
},
......@@ -417,33 +453,32 @@ export default {
this.$confirm("此操作将重置密码, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
this.$api.ops
.adminresetPwd({},
row.user_unid
)
.then(res => {
if (res.ecode == '200') {
this.$message({
type: "success",
message: "重置密码成功!"
});
this.$logs.oplogs(res,'serv_auth',`重置用户${row.username}的密码`);
} else {
this.$message({
type: "error",
message: res.enote
});
}
});
this.$api.ops.adminresetPwd({}, row.user_unid).then((res) => {
if (res.ecode == "200") {
this.$message({
type: "success",
message: "重置密码成功!",
});
this.$logs.oplogs(
res,
"serv_auth",
`重置用户${row.username}的密码`
);
} else {
this.$message({
type: "error",
message: res.enote,
});
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消"
message: "已取消",
});
});
},
......@@ -454,7 +489,7 @@ export default {
this.editVisible = true;
},
openAddDialog() {
if(this.$refs["addForm"]){
if (this.$refs["addForm"]) {
this.$refs["addForm"].resetFields();
}
},
......@@ -462,81 +497,88 @@ export default {
this.addVisible = true;
},
addFun(formName) {
this.$refs[formName].validate(valid => {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$api.ops
.addUser({
norm_type: this.addForm.norm_type,
username: this.addForm.username,
password: window.config.encrypt?sha1(this.addForm.password):this.baseencode(this.addForm.password),
password: window.config.encrypt
? sha1(this.addForm.password)
: this.baseencode(this.addForm.password),
})
.then(res => {
.then((res) => {
if (res.ecode == "200" || !res.ecode) {
this.$api.ops
.bindRole(
{
role_unid: this.addForm.role_unid
role_unid: this.addForm.role_unid,
},
res.enote.user_unid
)
.then(data => {
.then((data) => {
if (!data.ecode) {
this.$message({
type: "success",
message: "添加成功!"
message: "添加成功!",
});
this.$logs.oplogs(res,'serv_auth',`添加了用户${this.addForm.username}`);
this.$logs.oplogs(
res,
"serv_auth",
`添加了用户${this.addForm.username}`
);
this.addVisible = false;
this.getTableList();
} else {
this.$message({
type: "error",
message: "添加失败!"
message: "添加失败!",
});
}
});
} else {
debugger
debugger;
this.$message({
type: "error",
message: res.enote
message: res.enote,
});
}
});
} else {
return false;
}
});
},
editFun(formName) {
this.$refs[formName].validate(valid => {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$api.ops
.unbindRole({}, this.editUnid, this.editRoleUnid)
.then(res => {
.then((res) => {
this.$api.ops
.bindRole(
{
role_unid: this.editForm.role_unid
role_unid: this.editForm.role_unid,
},
this.editUnid
)
.then(res => {
.then((res) => {
if (!res.ecode) {
this.$message({
type: "success",
message: "修改成功!"
message: "修改成功!",
});
this.editVisible = false;
this.getTableList();
this.$logs.oplogs(res,'serv_auth',`修改了用户${this.editForm.username}`);
this.$logs.oplogs(
res,
"serv_auth",
`修改了用户${this.editForm.username}`
);
} else {
this.$message({
type: "error",
message: "修改失败!"
message: "修改失败!",
});
}
});
......@@ -545,8 +587,8 @@ export default {
return false;
}
});
}
}
},
},
};
</script>
<style lang="scss" scoped>
......@@ -678,6 +720,6 @@ export default {
font-size: 16px;
}
.reseticon {
cursor: pointer;
cursor: pointer;
}
</style>
<template>
<div class="info-dialog" v-if="infoDialogShow">
<iframe :src="iframeSrc" ref="infoIframe" frameborder="0" class="info-iframe"></iframe>
</div>
<div class="info-dialog" v-if="infoDialogShow">
<iframe
:src="iframeSrc"
ref="infoIframe"
frameborder="0"
class="info-iframe"
></iframe>
</div>
</template>
<script>
import Vue from 'vue'
export default {
data () {
return {
infoDialogShow: false,
iframeSrc: '',
visiableTimer: null
}
},
methods: {
showInfo(info, isVisible, type) {
this.infoDialogShow = true;
window.infoDialogVm = this;
if(arguments.length > 1) {
this.infoDialogShow = isVisible;
switch (type) {
case 'info':
this.iframeSrc = 'static/infoDialog.html';
break;
case 'picDetail':
this.iframeSrc = 'static/picDetailDialog.html';
break;
case 'paramSetting':
this.iframeSrc = 'static/paramSettingDialog.html';
break;
default:
break;
}
} else if(arguments.length == 1) {
this.iframeSrc = 'static/infoDialog.html';
} else {
return;
import Vue from "vue";
export default {
data() {
return {
infoDialogShow: false,
iframeSrc: "",
visiableTimer: null,
};
},
methods: {
showInfo(info, isVisible, type) {
this.infoDialogShow = true;
window.infoDialogVm = this;
if (arguments.length > 1) {
this.infoDialogShow = isVisible;
switch (type) {
case "info":
this.iframeSrc = "static/infoDialog.html";
break;
case "picDetail":
this.iframeSrc = "static/picDetailDialog.html";
break;
case "paramSetting":
this.iframeSrc = "static/paramSettingDialog.html";
break;
default:
break;
}
} else if (arguments.length == 1) {
this.iframeSrc = "static/infoDialog.html";
} else {
return;
}
if (this.infoDialogShow) {
let self = this;
if (self && !self._isDestroyed) {
self.visiableTimer = setTimeout(() => {
try {
this.$refs.infoIframe.contentWindow.globalVm = this;
} catch (error) {}
if (type == undefined) {
try {
if (this.$refs.infoIframe.contentWindow) {
this.$refs.infoIframe.contentWindow.changeText(info, this);
}
if(this.infoDialogShow) {
let self = this;
if(self && !self._isDestroyed) {
self.visiableTimer = setTimeout(() => {
try {
this.$refs.infoIframe.contentWindow.globalVm = this;
} catch (error) { }
if(type == undefined) {
try {
if(this.$refs.infoIframe.contentWindow) {
this.$refs.infoIframe.contentWindow.changeText(info, this);
}
} catch (err) {
this.infoDialogShow = false;
eval("console.log('自定义弹窗changeText异常:', err.message)")
}
} else {
try {
if(this.$refs.infoIframe.contentWindow) {
this.$refs.infoIframe.contentWindow.filterType(info);
}
} catch (err) {
this.infoDialogShow = false;
eval("console.log('自定义弹窗filterType异常:', err.message)");
}
}
}, 500);
}
} catch (err) {
this.infoDialogShow = false;
eval("console.log('自定义弹窗changeText异常:', err.message)");
}
} else {
try {
if (this.$refs.infoIframe.contentWindow) {
this.$refs.infoIframe.contentWindow.filterType(info);
}
},
hide() {
} catch (err) {
this.infoDialogShow = false;
window.clearTimeout(this.visiableTimer);
eval("console.log('自定义弹窗filterType异常:', err.message)");
}
}
}, 500);
}
}
}
},
hide() {
this.infoDialogShow = false;
window.clearTimeout(this.visiableTimer);
},
},
};
</script>
<style scoped>
.info-dialog {
width: 100%;
height: 100%;
position: relative;
z-index: 99990;
}
.info-iframe {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
/* z-index: 99990; */
}
.info-dialog {
width: 100%;
height: 100%;
position: relative;
z-index: 99990;
}
.info-iframe {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
/* z-index: 99990; */
}
</style>
......@@ -9,115 +9,125 @@
<template>
<div class="config-box">
<div class="switch-box">
<el-radio v-model="radio" label="defaultConfig">正常配置</el-radio>
<el-radio v-model="radio" label="illegalStopDefaultConfig">违停配置</el-radio>
<el-radio v-model="radio" label="defaultConfigTemplate"
>正常配置</el-radio
>
<el-radio v-model="radio" label="illegalStopDefaultConfigTemplate"
>违停配置</el-radio
>
</div>
<el-row>
<el-row>
<el-col :span="3" class="search-box">
<el-input placeholder="请输入内容" v-model="paramsval" class="input-with-select">
<el-input
placeholder="请输入内容"
v-model="paramsval"
class="input-with-select"
>
<el-button
slot="append"
icon="el-icon-search"
@click="$refs.iframeconfig.contentWindow.clickButton(paramsval)"
></el-button>
</el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="20" class="content-box">
<iframe
id="iframeconfig"
ref="iframeconfig"
src="./dynamicParameters.html"
frameborder="0"
width="100%"
height="600"
scrolling="no"
></iframe>
</el-col>
<el-col :span="1" :offset="19">
<el-button type="primary" @click="saveConfig" class="save-btn">保存</el-button>
slot="append"
icon="el-icon-search"
@click="$refs.iframeconfig.contentWindow.clickButton(paramsval)"
></el-button>
</el-input>
</el-col>
</el-row>
</el-row>
<el-row>
<el-col :span="20" class="content-box">
<iframe
id="iframeconfig"
ref="iframeconfig"
src="./dynamicParameters.html"
frameborder="0"
width="100%"
height="600"
scrolling="no"
></iframe>
</el-col>
<el-col :span="1" :offset="19">
<el-button type="primary" @click="saveConfig" class="save-btn"
>保存</el-button
>
</el-col>
</el-row>
</div>
</template>
<script>
import xml from './baseConfig.js'
import xml from "./baseConfig.js";
export default {
data() {
return {
paramsval:'',
radio: 'defaultConfig',
config:'',
configid:''
}
paramsval: "",
radio: "defaultConfigTemplate",
config: "",
configid: "",
};
},
watch:{
radio(val){
this.getbaseConf(val)
}
watch: {
radio(val) {
this.getbaseConf(val);
},
},
methods:{
xmlInit: function(obj) {
methods: {
xmlInit: function (obj) {
this.$refs.iframeconfig.contentWindow.loadParameterTree(
obj.content,
'<?xml version="1.0" encoding="GBK"?><root></root>'
);
},
getbaseConf(type){
this.$api.device.getConfig(type).then(res => {
this.config = res.data.content
this.configid = res.data.id
this.xmlInit(res.data)
})
getbaseConf(type) {
this.$api.device.getConfig(type).then((res) => {
this.config = res.data.content;
this.configid = res.data.id;
this.xmlInit(res.data);
});
},
saveConfig(){
saveConfig() {
this.$refs.iframeconfig.contentWindow.submit();
//ifram 传递回来的饿xml
let XMLStr = this.$refs.iframeconfig.contentWindow.xmlStr;
if(!XMLStr) {
XMLStr = this.config
if (!XMLStr) {
XMLStr = this.config;
}
this.$api.device.saveConfig(this.configid,{content:XMLStr}).then(res => {
if(res.ecode == 200) {
this.$message({
type: "success",
message: '保存成功!'
});
} else {
this.$message({
type: "error",
message: '保存失败!'
});
}
})
this.$api.device
.saveConfig(this.configid, { content: XMLStr })
.then((res) => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: "保存成功!",
});
} else {
this.$message({
type: "error",
message: "保存失败!",
});
}
});
},
},
mounted(){
mounted() {
setTimeout(() => {
this.getbaseConf('defaultConfig')
this.getbaseConf("defaultConfig");
}, 2000);
}
}
},
};
</script>
<style>
.config-box{
margin:10px;
.config-box {
margin: 10px;
background: #fff;
overflow: hidden;
}
.switch-box{
margin:10px 0 0 10px
.switch-box {
margin: 10px 0 0 10px;
}
.search-box,.content-box{
margin:10px;
.search-box,
.content-box {
margin: 10px;
}
.save-btn{
.save-btn {
float: right;
margin-bottom: 20px;
}
......
<template>
<div class="contentBox">
<div class="content">
<div style="padding:8px 20px;">
<div style="padding: 8px 20px">
<span class="inputBox">
<el-input
v-model="storename"
......@@ -10,17 +10,17 @@
</span>
<el-button
type="primary"
style="position: relative;top: -2px;"
style="position: relative; top: -2px"
@click="query"
>查询</el-button
>
<span style="float: right;">
<span style="float: right">
<el-button type="info" icon="el-icon-search" @click="add"
>添加</el-button
>
</span>
</div>
<div style="padding: 0 15px 20px 23px;">
<div style="padding: 0 15px 20px 23px">
<el-table
:height="tableHeight"
:data="tableData"
......@@ -30,10 +30,10 @@
>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column align="center" label="上传时间">
<el-table-column align="center" label="上传时间">
<template slot-scope="scope">
<div>
{{showLocalTime(scope.row.create_dt,'local')}}
{{ showLocalTime(scope.row.create_dt, "local") }}
</div>
</template>
</el-table-column>
......@@ -75,11 +75,11 @@
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<span class="tableSpanBorder"></span>
<el-tooltip
content="导出"
placement="bottom"
......@@ -87,16 +87,16 @@
:visible-arrow="false"
>
<span
class="el-icon-upload editIcon"
class="el-icon-upload editIcon"
@click="exportFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px">
<el-pagination
style="float: right;"
style="float: right"
background
prev-text="上一页"
next-text="下一页"
......@@ -108,7 +108,7 @@
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
</div>
</div>
......@@ -125,15 +125,17 @@
action="uploadUrl"
:http-request="httpRequest"
:on-success="uploadsuccess"
:before-upload="beforeUpload"
multiple
name="file"
:auto-upload="false"
:auto-upload="true"
>
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> -->
</el-upload>
<div>提示:上传文件仅支持xml格式!</div>
</el-form-item>
</el-form>
</div>
......@@ -162,7 +164,7 @@ export default {
props: {
label: "name",
children: "child",
isLeaf: "leaf"
isLeaf: "leaf",
},
detailData: [],
dev_unid: localStorage.getItem("dev_unid"),
......@@ -170,7 +172,7 @@ export default {
picture_busy: 0,
picture_free: 0,
video_busy: 0,
video_free: 0
video_free: 0,
},
total: 0,
page: 1,
......@@ -181,7 +183,7 @@ export default {
detailVisible: false,
storename: "",
curentSubList: [],
tableHeight: window.opsTableHeight
tableHeight: window.opsTableHeight,
};
},
components: {},
......@@ -189,6 +191,13 @@ export default {
this.query();
},
methods: {
beforeUpload(file) {
let isXML = file.type == "text/xml";
if (!isXML) {
this.$message.error("上传文件只能是 XML 格式!");
}
return isXML;
},
// 自定义的上传函数
httpRequest(param) {
this.file = [];
......@@ -196,27 +205,27 @@ export default {
this.file.push(param.file);
},
save() {
this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件
// this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件
// 最重要的就是这段代码
var upData = new FormData(); // 首先创建FormData对象
this.file.forEach(file => {
this.file.forEach((file) => {
upData.append("file", file); // 因为要上传多个文件,所以需要遍历一下才行
upData.append("name", this.names);
upData.append("is_temp", 0);
});
this.$api.resource.uploadStore(upData).then(res => {
this.$api.resource.uploadStore(upData).then((res) => {
if (res.unid) {
this.addVisible = false;
this.query();
this.$logs.oplogs(res,'serv_store',`上传配置:${ this.names}`);
this.$logs.oplogs(res, "serv_store", `上传配置:${this.names}`);
this.$message({
type: "success",
message: "上传成功!"
message: "上传成功!",
});
} else {
this.$message({
type: "error",
message: res.enote
message: res.enote,
});
}
});
......@@ -230,11 +239,11 @@ export default {
}
if (node.level > 1) return resolve([]);
this.$api.resource.getSubTask({}, node.data.unid).then(res => {
this.$api.resource.getSubTask({}, node.data.unid).then((res) => {
if (res.list_data == null) {
res.list_data = [];
}
res.list_data.forEach(item => {
res.list_data.forEach((item) => {
item.name = item.subtask_name;
item["leaf"] = true;
});
......@@ -249,20 +258,20 @@ export default {
{
limit: this.pageSize,
offset: offset,
name__like: this.storename
name__like: this.storename,
},
this.dev_unid
)
.then(res => {
.then((res) => {
this.total = res.total_num;
if (res.list_data == null) {
this.tableData = [];
} else {
this.tableData = res.list_data;
}
this.tableData.forEach(list => {
this.tableData.forEach((list) => {
let ellipsisText = "";
list.task_list.forEach(item => {
list.task_list.forEach((item) => {
ellipsisText += item.name + ",";
});
ellipsisText = ellipsisText.substring(0, ellipsisText.length - 1);
......@@ -272,14 +281,14 @@ export default {
});
console.log(this.tableData);
})
.catch(error => {});
.catch((error) => {});
},
add() {
this.addVisible = true;
},
taskFormatter(row, column, cellValue, index) {
let columnText = "";
row.task_list.forEach(item => {
row.task_list.forEach((item) => {
columnText += item.name + ",";
});
columnText = columnText.substring(0, columnText.length - 1);
......@@ -302,16 +311,16 @@ export default {
this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
this.$api.resource.delStore({}, row.unid).then(res => {
this.$api.resource.delStore({}, row.unid).then((res) => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_store',`删除配置:${ row.name}`);
this.$logs.oplogs(res, "serv_store", `删除配置:${row.name}`);
this.query();
}
});
......@@ -319,15 +328,15 @@ export default {
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
message: "已取消删除",
});
});
},
exportFun(index, row){
exportFun(index, row) {
let url = location.origin;
location.href = `${url}/api/v1/devconf_fx/store_confs/export/${row.unid}`
}
}
location.href = `${url}/api/v1/devconf_fx/store_confs/export/${row.unid}`;
},
},
};
</script>
<style lang="scss" scoped>
......
......@@ -11,13 +11,20 @@
@node-click="handleNodeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>
<span class="tree-label">{{
data.label
}}</span>
<span>
<span class="tree-label">{{ data.label }}</span>
</span>
<span class="tree-btn" v-if="node.label=='平台同步资源'">
<i :class="{'el-icon-refresh':true,'animterefresh':refreshload}" @click.stop="nodeRefreshClick(node, data)"></i>
<span class="tree-btn" v-if="node.label == '平台同步资源'">
<i
:class="{ 'el-icon-refresh': true, animterefresh: refreshload }"
@click.stop="nodeRefreshClick(node, data)"
></i>
</span>
<span class="tree-btn" v-if="node.label == '视频云平台同步资源'">
<i
:class="{ 'el-icon-refresh': true, animterefresh: cloudRefreshload }"
@click.stop="cloudNodeRefreshClick(node, data)"
></i>
</span>
</span>
</el-tree>
......@@ -30,31 +37,39 @@ export default {
data() {
return {
isLoadingTree: false,
refreshload:false,
refreshload: false,
cloudRefreshload: false,
syncTreeData: [
{
id: "0",
unid: "0",
label: "平台同步资源",
root: "平台同步资源",
children: []
}
children: [],
},
{
id: "-1",
unid: "-1",
label: "视频云平台同步资源",
root: "视频云平台同步资源",
children: [],
},
],
defaultProps: {
children: "children",
label: "label"
}
label: "label",
},
};
},
props: {
filterText: {
type: String,
default: ""
default: "",
},
treeDatas: {
type: Array,
defalut: []
}
defalut: [],
},
},
components: {},
watch: {
......@@ -66,7 +81,7 @@ export default {
},
treeDatas(val) {
this.treeData[0].childs = val;
}
},
},
methods: {
initTree(data) {
......@@ -74,15 +89,20 @@ export default {
this.refreshload = false;
this.isLoadingTree = true;
},
initCloudTree(data) {
this.syncTreeData[1].children = data;
this.cloudRefreshload = false;
this.isLoadingTree = true;
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
handleNodeClick(data) {
debugger
debugger;
if (data.label !== "平台同步资源" && data.is_leaf) {
this.$emit("syncTable", data);
};
}
},
handleRefresh(s, d, n) {
// console.log(s, d, n)
......@@ -92,16 +112,26 @@ export default {
id: "1",
label: "平台同步资源",
root: "平台同步资源",
children: []
}
children: [],
},
{
id: "2",
label: "视频云平台同步资源",
root: "视频云平台同步资源",
children: [],
},
];
this.$parent.getSyncTree();
},
nodeRefreshClick(){
nodeRefreshClick() {
this.refreshload = true;
this.$emit('refreshData')
}
}
this.$emit("refreshData");
},
cloudNodeRefreshClick() {
this.cloudRefreshload = true;
this.$emit("cloudRefreshData");
},
},
};
</script>
......@@ -110,14 +140,30 @@ export default {
/* max-height: 216px; */
/* overflow: hidden; */
}
.animterefresh{
animation:turn 1s linear infinite;
.animterefresh {
animation: turn 1s linear infinite;
}
@keyframes turn {
0% {
-webkit-transform: rotate(0deg);
}
25% {
-webkit-transform: rotate(90deg);
}
50% {
-webkit-transform: rotate(180deg);
}
75% {
-webkit-transform: rotate(270deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes turn{
0%{-webkit-transform:rotate(0deg);}
25%{-webkit-transform:rotate(90deg);}
50%{-webkit-transform:rotate(180deg);}
75%{-webkit-transform:rotate(270deg);}
100%{-webkit-transform:rotate(360deg);}
}
</style>
</style>
\ No newline at end of file
......@@ -9,7 +9,14 @@
v-model="searchText"
>
</el-input>
<SyncTree ref="syncRef" :filterText="searchText" :treeDatas="syncTree" @syncTable="syncTable" @refreshData="refreshData">
<SyncTree
ref="syncRef"
:filterText="searchText"
:treeDatas="syncTree"
@syncTable="syncTable"
@refreshData="refreshData"
@cloudRefreshData="cloudRefreshData"
>
</SyncTree>
<cameraTree
:filterText="searchText"
......@@ -61,7 +68,7 @@
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row,formattterData)"
@click="delFun(scope.$index, scope.row, formattterData)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
......@@ -166,7 +173,7 @@
<el-form-item
label="名称"
:rules="[
{ required: true, message: '请输入名称', trigger: 'change' }
{ required: true, message: '请输入名称', trigger: 'change' },
]"
>
<el-input v-model="videoEditParam.vchan_name"></el-input>
......@@ -219,11 +226,11 @@ export default {
vchan_name: "",
video_url: "",
longitude: "",
latitude: ""
latitude: "",
},
videoEditVisible: false,
vchan_duid: "",
tableHeight: window.videoEquitTableHeight
tableHeight: window.videoEquitTableHeight,
};
},
watch: {},
......@@ -232,19 +239,20 @@ export default {
cameraDialog,
videoTree,
SyncTree,
syncDialog
syncDialog,
},
mounted() {
this.getCameraTree();
this.getVideoTree();
this.getSyncTree();
this.getCloudSyncTree();
},
methods: {
syncdetail(index, data) {
this.$refs.syncdetail.initDialog(data);
},
setCamerInfo(){
debugger
setCamerInfo() {
debugger;
this.getCameraTree();
},
getCameraTree() {
......@@ -252,11 +260,11 @@ export default {
this.$api.resource
.treeList(
{
vchan_type: "camera"
vchan_type: "camera",
},
this.dev_unid
)
.then(res => {
.then((res) => {
this.cameraArr = [];
if (res.vchan_struct.length) {
this.cameraTreeData = this.cameraBuildTree(res.vchan_struct);
......@@ -268,19 +276,20 @@ export default {
this.$api.resource
.getVideoList(
{
vchan_type: "vfile"
vchan_type: "vfile",
},
this.dev_unid
)
.then(res => {
.then((res) => {
this.videoTree = res.list_data;
// this.getTable(this.videoTree, "video");
});
},
getSyncTree() {
this.tableType = "sync";
this.$api.device.getcatadev()
.then(m => {
this.$api.device
.getcatadev()
.then((m) => {
if (m.ecode == 200) {
var sync_data = this.syncBuildTree(m.result.childs);
this.$refs.syncRef.initTree(sync_data);
......@@ -289,7 +298,7 @@ export default {
this.$refs.syncRef.initTree(emptyChild);
}
})
.catch(err => {
.catch((err) => {
console.log(err.message);
let emptyData = [];
// this.$message({
......@@ -298,16 +307,38 @@ export default {
// })
});
},
getCloudSyncTree() {
this.tableType = "sync";
this.$api.device.getCloudDev().then((res) => {
if(res.ecode === 200) {
this.dealCloudTree(res.data);
this.$refs.syncRef.initCloudTree(res.data);
}else {
this.$refs.syncRef.initCloudTree([]);
}
});
},
dealCloudTree(list) {
list.forEach(d => {
d.label = d.orgName || d.name;
d.id = d.addressUnid || d.vchan_duid;
d.vchan_type = "cloud";
if (d.child && d.child.length > 0) {
d.children = d.child;
this.dealCloudTree(d.child);
}
});
},
submitLaterGet(data) {
this.tableType = "camera";
this.$api.resource
.treeList(
{
vchan_type: "camera"
vchan_type: "camera",
},
this.dev_unid
)
.then(res => {
.then((res) => {
this.cameraTree = res.vchan_struct;
this.cameraArr = [];
this.cameraTreeData = this.cameraBuildTree(res.vchan_struct);
......@@ -335,26 +366,27 @@ export default {
}
return newData;
},
//重新拉取28181树形结构
refreshData(){
this.$api.device.postcatadev()
.then(m => {
//重新拉取28181树形结构
refreshData() {
this.$api.device
.postcatadev()
.then((m) => {
if (m.ecode == 200) {
this.$message({
type: 'success',
message: m.enote
})
this.getSyncTree()
this.$message({
type: "success",
message: m.enote,
});
this.getSyncTree();
} else {
let emptyChild = [];
this.$refs.syncRef.initTree(emptyChild);
this.$message({
type: 'error',
message: data
})
type: "error",
message: data,
});
}
})
.catch(err => {
.catch((err) => {
console.log(err.message);
let emptyData = [];
// this.$message({
......@@ -363,6 +395,18 @@ export default {
// })
});
},
//拉取视频云平台设备
cloudRefreshData() {
this.$api.device.refreshCloudDev().then(res => {
if (res.ecode === 200) {
this.getCloudSyncTree();
this.$message({
type: "success",
message: res.enote
});
}
});
},
//处理树状图数据
cameraBuildTree(data, orgObject, addrObject) {
// 获取相机资源
......@@ -425,44 +469,48 @@ export default {
editFun(index, row) {
this.$refs.editCamera.initDialog(row, "edit", this.dev_unid);
},
delFun(index, row,rows) {
delFun(index, row, rows) {
this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
this.$api.resource.delCamera({}, this.dev_unid, row.id).then(res => {
.then(() => {
this.$api.resource
.delCamera({}, this.dev_unid, row.id)
.then((res) => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
debugger
rows.splice(index, 1);
let data = {
org_type: "address",
unid: row.addrNode.unid
unid: row.addrNode.unid,
};
console.log(row)
if(row.addrNode && row.addrNode.childs) {
console.log(row);
if (row.addrNode && row.addrNode.childs) {
let childrenarr = row.addrNode.childs;
childrenarr.map(ele => {
if(ele.vchan_refid == row.id) {
this.$refs.cameratree.delTreenode(ele)
childrenarr.map((ele) => {
if (ele.vchan_refid == row.id) {
this.$refs.cameratree.delTreenode(ele);
}
})
});
}
// this.submitLaterGet(data);
this.$logs.oplogs(res,'serv_vchan',`删除实时视频,视频名称:${row.label}`);
this.$logs.oplogs(
res,
"serv_vchan",
`删除实时视频,视频名称:${row.label}`
);
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
message: "已取消删除",
});
});
},
......@@ -472,16 +520,16 @@ export default {
getTable(data, type) {
if (data.org_type != "root") {
this.tableType = type;
debugger
debugger;
if (this.tableType == "camera") {
if (data.type || data.org_type) {
this.tableType = type;
this.formattterData = [];
let filterData = [];
debugger
debugger;
let search_params = {
vchan_type: "camera",
org_unid: data.unid
org_unid: data.unid,
};
if (data.vtype) {
this.formattterData.push(data);
......@@ -489,10 +537,10 @@ export default {
}
this.$api.resource
.getCameraTable(search_params, this.dev_unid)
.then(res => {
.then((res) => {
if (res.list_data.length > 0) {
for (var i = 0; i < res.list_data.length; i++) {
filterData = this.cameraArr.filter(list => {
filterData = this.cameraArr.filter((list) => {
return list.id === res.list_data[i].vchan_refid;
});
if (filterData.length > 0) {
......@@ -501,21 +549,21 @@ export default {
}
}
})
.catch(err => {});
.catch((err) => {});
} else {
this.formattterData = [];
let filterData = [];
this.$api.resource
.getCameraTable({}, this.dev_unid, data.vchan_refid)
.then(res => {
filterData = this.cameraArr.filter(list => {
.then((res) => {
filterData = this.cameraArr.filter((list) => {
return list.id === res.refid;
});
if (filterData.length > 0) {
this.formattterData.push(filterData[0]);
}
})
.catch(err => {});
.catch((err) => {});
}
} else if (this.tableType == "video") {
if (data.org_type == "video") {
......@@ -541,7 +589,7 @@ export default {
}
},
editVideo(index, row) {
console.log("视频信息",row)
console.log("视频信息", row);
this.vchan_duid = row.vchan_duid;
this.videoEditParam.vchan_name = row.vchan_name;
this.videoEditParam.video_url = row.video_url;
......@@ -555,25 +603,29 @@ export default {
{
name: this.videoEditParam.vchan_name,
longitude: this.videoEditParam.longitude,
latitude: this.videoEditParam.latitude
latitude: this.videoEditParam.latitude,
},
this.dev_unid,
this.vchan_duid
)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: res.enote
message: res.enote,
});
this.getVideoTree();
this.formattterData.forEach(item => {
this.formattterData.forEach((item) => {
if (item.vchan_duid == this.vchan_duid) {
item.vchan_name = this.videoEditParam.vchan_name;
}
});
this.$logs.oplogs(res,'serv_vchan',`修改离线视频,视频名称:${ this.videoEditParam.vchan_name}`);
this.$logs.oplogs(
res,
"serv_vchan",
`修改离线视频,视频名称:${this.videoEditParam.vchan_name}`
);
} else {
this.$message.error(res.enote);
}
......@@ -584,16 +636,16 @@ export default {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
this.$api.resource
.delVideo({}, this.dev_unid, row.vchan_duid)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: res.enote
message: res.enote,
});
this.getVideoTree();
......@@ -603,7 +655,11 @@ export default {
// item.vchan_name=this.videoEditParam.vchan_name
// }
// })
this.$logs.oplogs(res,'serv_vchan',`删除离线视频,视频名称${ row.vchan_name}`);
this.$logs.oplogs(
res,
"serv_vchan",
`删除离线视频,视频名称${row.vchan_name}`
);
} else {
this.$message.error(res.enote);
}
......@@ -612,11 +668,11 @@ export default {
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
message: "已取消删除",
});
});
}
}
},
},
};
</script>
<style lang="scss" scoped>
......@@ -624,4 +680,4 @@ export default {
border: 1px solid #ebeef5;
padding: 12px;
}
</style>
</style>
\ No newline at end of file
......@@ -9,7 +9,7 @@
<el-col :span="24">
<div class="pic-wrap">
<el-image
style="width: 100%;"
style="width: 100%"
:src="curPicData.bigpic"
:preview-src-list="srcList"
>
......@@ -17,7 +17,7 @@
<img
:src="curPicData.bigpic"
alt=""
style="width: 30%;display: block;margin: 0 auto;"
style="width: 30%; display: block; margin: 0 auto"
/>
</div>
</el-image>
......@@ -52,32 +52,26 @@
:span="24"
v-if="
curPicData.event_type === 'vehicle' ||
curPicData.event_type === 'xcycle' ||
curPicData.event_type === 'pedestrian'
curPicData.event_type === 'xcycle' ||
curPicData.event_type === 'pedestrian'
"
>
<ul class="pic-info">
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.vehicle_body_type_text"
>
<span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span>
</li>
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.vehicle_plate_text"
>
<span>车牌号码:</span>
<span>{{ curPicData.vehicle_plate_text }}</span>
</li>
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.plate_type_text"
>
<span>车牌类型:</span>
<span>{{ curPicData.plate_type_text }}</span>
</li>
<div v-if="curPicData.event_type === 'vehicle'">
<li :title="curPicData.vehicle_body_type_text">
<span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span>
</li>
<li :title="curPicData.vehicle_plate_text">
<span>车牌号码:</span>
<span>{{ curPicData.vehicle_plate_text }}</span>
</li>
<li :title="curPicData.plate_type_text">
<span>车牌类型:</span>
<span>{{ curPicData.plate_type_text }}</span>
</li>
</div>
<li :title="curPicData.shoot_date">
<span>经过日期:</span>
<span>{{ curPicData.shoot_date }}</span>
......@@ -90,138 +84,92 @@
<span>经过地点:</span>
<span>{{ curPicData.location_name }}</span>
</li>
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.vehicle_body_logo_text"
>
<span>车辆品牌:</span>
<span>{{ curPicData.vehicle_body_logo_text }}</span>
</li>
<!-- <li :title="curPicData.vehicle_body_type_text">
<span>车辆类型:</span>
<span>{{ curPicData.vehicle_body_type_text }}</span>
</li> -->
<!-- 机动车 -->
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.plate_color_text"
>
<span>车牌颜色:</span>
<span>{{ curPicData.plate_color_text }}</span>
</li>
<li
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.vehicle_body_color_text"
>
<span>车身颜色:</span>
<span>{{ curPicData.vehicle_body_color_text }}</span>
</li>
<li
hidden
v-if="curPicData.event_type === 'vehicle'"
:title="curPicData.RefinedFeature_text"
>
<span>标志物:</span>
<span>{{ curPicData.RefinedFeature_text }}</span>
</li>
<div v-if="curPicData.event_type === 'vehicle'">
<li :title="curPicData.vehicle_body_logo_text">
<span>车辆品牌:</span>
<span>{{ curPicData.vehicle_body_logo_text }}</span>
</li>
<!-- 机动车 -->
<li :title="curPicData.plate_color_text">
<span>车牌颜色:</span>
<span>{{ curPicData.plate_color_text }}</span>
</li>
<li :title="curPicData.vehicle_body_color_text">
<span>车身颜色:</span>
<span>{{ curPicData.vehicle_body_color_text }}</span>
</li>
<li hidden :title="curPicData.RefinedFeature_text">
<span>标志物:</span>
<span>{{ curPicData.RefinedFeature_text }}</span>
</li>
</div>
<!-- 非机动车 -->
<li
v-if="curPicData.event_type === 'xcycle'"
:title="curPicData.xcycle_type_text"
>
<span>骑车类型:</span>
<span>{{ curPicData.xcycle_type_text }}</span>
</li>
<li
v-if="curPicData.event_type === 'xcycle'"
:title="curPicData.xcycle_color_type"
>
<span>车辆颜色:</span>
<span>{{ curPicData.xcycle_color_type }}</span>
</li>
<li
:title="curPicData.driver_face_sex"
v-if="curPicData.event_type === 'xcycle'"
>
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li
v-if="curPicData.event_type === 'xcycle'"
:title="curPicData.company"
>
<span>运营公司:</span>
<span>{{ curPicData.company }}</span>
</li>
<li
v-if="curPicData.event_type === 'xcycle'"
:title="curPicData.driver_face_upbody_text"
>
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li
:title="curPicData.driver_face_lobody_text"
v-if="curPicData.event_type === 'xcycle'"
>
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li
:title="curPicData.driver_face_lobody_text"
v-if="curPicData.event_type === 'xcycle'"
>
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
<div v-if="curPicData.event_type === 'xcycle'">
<li :title="curPicData.xcycle_type_text">
<span>骑车类型:</span>
<span>{{ curPicData.xcycle_type_text }}</span>
</li>
<li :title="curPicData.xcycle_color_type">
<span>车辆颜色:</span>
<span>{{ curPicData.xcycle_color_type }}</span>
</li>
<li :title="curPicData.driver_face_sex">
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li :title="curPicData.company">
<span>运营公司:</span>
<span>{{ curPicData.company }}</span>
</li>
<li :title="curPicData.driver_face_upbody_text">
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
</div>
<!-- 行人 -->
<li
:title="curPicData.driver_face_sex"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li
:title="curPicData.driver_face_upbody_text"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li
:title="curPicData.driver_face_lobody_text"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>下身颜色:</span>
<span>{{ curPicData.driver_face_lobody_text }}</span>
</li>
<li
:title="curPicData.pedestrian_height"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>身高:</span>
<span>{{ curPicData.pedestrian_height }}</span>
</li>
<li
:title="curPicData.driver_face_lobody_text"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li
:title="curPicData.driver_face_lobody_text"
v-if="curPicData.event_type === 'pedestrian'"
>
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
<div v-if="curPicData.event_type === 'pedestrian'">
<li :title="curPicData.driver_face_sex">
<span>性别:</span>
<span>{{ curPicData.driver_face_sex }}</span>
</li>
<li :title="curPicData.driver_face_upbody_text">
<span>上身颜色:</span>
<span>{{ curPicData.driver_face_upbody_text }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>下身颜色:</span>
<span>{{ curPicData.driver_face_lobody_text }}</span>
</li>
<li :title="curPicData.pedestrian_height">
<span>身高:</span>
<span>{{ curPicData.pedestrian_height }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>速度:</span>
<span>{{ curPicData.location_speed }}</span>
</li>
<li :title="curPicData.driver_face_lobody_text">
<span>戴帽子:</span>
<span>{{ curPicData.driver_face_with_hats }}</span>
</li>
</div>
<li v-if="curPicData.illegalType" :title="curPicData.illegalType">
<span>违法类型:</span>
<span>{{ curPicData.illegalType }}</span>
</li>
<li v-if="curPicData.illegalType" :title="curPicData.illegalType">
<li v-if="curPicData.illegalType" :title="curPicData.illegalType">
<span>特殊车辆:</span>
<span>{{ curPicData.special_text }}</span>
</li>
......@@ -239,9 +187,7 @@
</li>
<li :title="getCode('安防事件', curPicData.event_type)">
<span>事件类型:</span>
<span>{{
curPicData.event_type
}}</span>
<span>{{ curPicData.event_type }}</span>
</li>
<li
:title="curPicData.shoot_time"
......@@ -272,14 +218,15 @@ export default {
carImg: "",
isShow: false,
curPicData: {},
srcList: []
srcList: [],
};
},
methods: {
detailInfo: function(data) {
detailInfo: function (data) {
this.curPicData = {};
this.curPicData = data;
this.srcList = [];
console.log('curPicData', this.curPicData);
setTimeout(() => {
if (data.bigpic) {
this.srcList.push(data.bigpic);
......@@ -288,11 +235,11 @@ export default {
this.isShow = true;
this.$store.commit("setocxstate", 0);
},
beforeHideModal: function() {
beforeHideModal: function () {
this.isShow = false;
this.$emit("closeDetailModal");
},
picMove: function(e) {
picMove: function (e) {
var e = e || window.event;
if (e.target.getAttribute("class").indexOf("small") > -1) {
let imgWidth = e.target.width;
......@@ -304,8 +251,8 @@ export default {
} else {
return;
}
}
}
},
},
};
</script>
......
......@@ -23,7 +23,7 @@
:class="{
'task-lsit': true,
runningtask: item.status == 'Running',
stoptask: item.status != 'Running'
stoptask: item.status != 'Running',
}"
>
<!-- <i
......@@ -47,7 +47,7 @@
v-show="subTask.enableStatus != 1"
:class="[
{ subtaskActive: subTask.subtask_id == currentSubtaskId },
{ disabledColor: subTask.enableStatus == 5 }
{ disabledColor: subTask.enableStatus == 5 },
]"
:data-subtask="subTask.subtask_id"
:id="subTask.vchan.vdev_unid + ',' + subTask.vchan.vchan_refid"
......@@ -63,8 +63,12 @@
<el-col :span="15" class="ht100">
<div class="video-box">
<div class="play-box">
<videoplay ref="videoplay" :playurl="playurl" v-if="!ischrome"></videoplay>
<flvvideo ref="flvideo" v-if="ischrome"></flvvideo>
<videoplay
ref="videoplay"
:playurl="playurl"
v-if="!ischrome"
></videoplay>
<flvvideo ref="flvideo" v-if="ischrome"></flvvideo>
</div>
<div class>
<setting
......@@ -90,7 +94,7 @@
</template>
<script>
import videoplay from "../public/videoPlay";
import flvvideo from "../public/flvvideo"
import flvvideo from "../public/flvvideo";
import InfoDialog from "../public/infodialog";
import setting from "./setting";
import eventtab from "./eventTab";
......@@ -100,7 +104,7 @@ export default {
InfoDialog,
setting,
flvvideo,
eventtab
eventtab,
},
data() {
return {
......@@ -112,21 +116,21 @@ export default {
subindex: -1,
playurl: "",
taskID: "",
streamclock:null,
streamclock: null,
currentSubtaskId: "",
defaultProps: {
children: "children",
label: "label"
label: "label",
},
timer: null,
searchstate: null
searchstate: null,
};
},
methods: {
selecttask(data, index) {
this.subTasks = [];
this.subindex = index;
this.$api.task.getSubTask(data.task_id).then(res => {
this.$api.task.getSubTask(data.task_id).then((res) => {
this.subTasks = res.list_data;
this.taskID = data.task_id;
});
......@@ -143,120 +147,119 @@ export default {
if (vdata.running_status != "Running") {
this.$message({
message: "该任务没有运行,无法获取分析视频和抓拍信息",
type: "error"
type: "error",
});
return;
}
this.pushSteam(vdata);
this.$refs.event.dataInit(this.currentSubtaskId, vdata.task_type);
this.$refs.event.dataInit(this.currentSubtaskId, vdata.task_type);
},
getTask(data) {
let that = this;
this.$api.task
.getTask({
task_name: this.searchInfo
task_name: this.searchInfo,
})
.then(res => {
.then((res) => {
that.taskdata = res.list_data;
console.log(res);
});
},
//发送推流请求
pushSteam(vdata) {
this.steam(vdata).then(m => {
if (m.ecode) {
this.$message({
message: "发送推流请求失败:" + m.enote,
type: "error"
});
} else {
this.vchandata = vdata.vchan;
clearInterval(this.streamclock)
this.streamclock = null;
this.getPlayUrl();
}
})
this.steam(vdata).then((m) => {
if (m.ecode) {
this.$message({
message: "发送推流请求失败:" + m.enote,
type: "error",
});
} else {
this.vchandata = vdata.vchan;
clearInterval(this.streamclock);
this.streamclock = null;
this.getPlayUrl();
}
});
},
steam(vdata){
return new Promise((resolve, reject) =>{
let data = {
send_stream: true,
task_id: this.currentSubtaskId,
is_analyse: true
};
this.$api.task
.getStream(this.dev_unid, vdata.vchan.vchan_refid, data)
.then(m => {
resolve(m);
});
})
steam(vdata) {
return new Promise((resolve, reject) => {
let data = {
send_stream: true,
task_id: this.currentSubtaskId,
is_analyse: true,
};
this.$api.task
.getStream(this.dev_unid, vdata.vchan.vchan_refid, data)
.then((m) => {
resolve(m);
});
});
},
getPlayUrl: function() {
if(this.ischrome) {
getPlayUrl: function () {
if (this.ischrome) {
let ip = this.$api.flvIP;
let url = `${window.config.https?'https':'http'}://${ip}:${window.config.https?'20070':'8080'}/live/${this.currentSubtaskId}.flv`
console.log("FLV播放地址:", url)
debugger
let url = `${window.config.https ? "https" : "http"}://${ip}:${
window.config.https ? "20070" : "20080"
}/live/${this.currentSubtaskId}.flv`;
console.log("FLV播放地址:", url);
debugger;
this.$refs.flvideo.startFunc(url);
this.streamclock = setInterval(()=> {
this.steam(this.subtaskdata)
},9000)
this.streamclock = setInterval(() => {
this.steam(this.subtaskdata);
}, 9000);
}
if(this.subtaskdata.task_algo_type == '12') {
console.log(this.subtaskdata)
this.playurl = {rtsp_url:this.subtaskdata.vchan.url};
console.log("bkurl",this.playurl)
if (this.subtaskdata.task_algo_type == "12") {
console.log(this.subtaskdata);
this.playurl = { rtsp_url: this.subtaskdata.vchan.url };
console.log("bkurl", this.playurl);
setTimeout(() => {
this.$refs.videoplay.videoPlay();
}, 2000);
return false;
}
this.$api.task.getPlayUrl(this.currentSubtaskId).then(res => {
}
this.$api.task.getPlayUrl(this.currentSubtaskId).then((res) => {
this.playurl = res;
if (this.playurl.rtsp_url) {
this.$message({
message: "获取播放地址成功,请耐心等待视频加载",
type: "success"
type: "success",
});
setTimeout(() => {
!this.ischrome?this.$refs.videoplay.videoPlay():null;
!this.ischrome ? this.$refs.videoplay.videoPlay() : null;
}, 2000);
console.info("视频播放地址:", this.playurl.rtsp_url);
} else {
this.$message({
message: "获取rtsp播放地址失败!请重试!",
type: "error"
type: "error",
});
}
});
},
getVchansIsSending() {
this.axios.get(this.API.task.getstream()).then(res => {});
this.axios.get(this.API.task.getstream()).then((res) => {});
},
debounce(fn, wait) {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
fn;
}, wait);
}
},
},
watch: {
searchInfo(val) {
this.debounce(this.getTask(), 800);
}
},
},
created() {
this.getTask();
this.ischrome = this.checkchrome();
},
mounted() {
},
beforeDestroy(){
mounted() {},
beforeDestroy() {
clearInterval(this.streamclock);
this.streamclock = null;
}
},
};
</script>
......@@ -352,7 +355,6 @@ export default {
.runningtask {
// color rgba(1, 206, 184, 0.56);
@include font-colr(runtask_color);
}
.stoptask {
......@@ -405,7 +407,7 @@ export default {
.subtaskActive {
position: relative;
color: #333;
padding-right:10px;
padding-right: 10px;
}
.subtaskActive::before {
......
......@@ -75,14 +75,19 @@
</el-select>
</span>
</el-form-item>
<el-form-item label="组织名称">
<el-form-item label="导出设置">
<el-checkbox v-model="checked" true-label="1" false-label="0">
<span> 带视频导出</span></el-checkbox
>
</el-form-item>
<!-- <el-form-item label="组织名称">
<span class="inputBox">
<el-input
placeholder="请输入组织名称"
v-model="conditions.location_code"
></el-input>
</span>
</el-form-item>
</el-form-item> -->
<el-form-item label="起始时间">
<span class="dateBox">
<el-date-picker
......@@ -100,7 +105,7 @@
</el-form>
</el-col>
<el-col :span="2">
<div style="margin-bottom: 6px;padding-top: 3px;">
<div style="margin-bottom: 6px; padding-top: 3px">
<el-button type="primary" style="" @click="query" class="block"
>查询</el-button
>
......@@ -110,113 +115,118 @@
</div>
</el-col>
<div style="">
<div class="desplay-icon">
<div class="desplay-icon">
<i class="el-icon-s-grid" @click="dataDisplay('list')"></i>
<i class="el-icon-tickets" @click="dataDisplay('table')"></i>
</div>
<div v-if="displaystatus == 'table'">
<el-table
:data="formatterData"
:height="tableHeight"
stripe
v-loading="loading"
border
@selection-change="handleSelectionChange"
>
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
>
</el-table-column>
<el-table-column
prop="event_cate"
align="center"
:formatter="cateFormatter"
label="事件分类"
>
</el-table-column>
<el-table-column prop="event_type" align="center" label="事件类型">
</el-table-column>
<el-table-column
prop="event_data.location.code"
align="center"
label="组织名称"
<el-table
:data="formatterData"
:height="tableHeight"
stripe
v-loading="loading"
border
@selection-change="handleSelectionChange"
:class="$pageSizeOpts[0] === 10 ? 'ten-table-wrapper' : ''"
>
</el-table-column>
<el-table-column align="center" label="抓拍地点">
<template slot-scope="scope">
<div>
<span v-if="scope.row.event_data && scope.row.event_data">{{
scope.row.event_data.location
? scope.row.event_data.location.name
: ""
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
>
</el-table-column>
<el-table-column
prop="event_cate"
align="center"
:formatter="cateFormatter"
label="事件分类"
>
</el-table-column>
<el-table-column prop="event_type" align="center" label="事件类型">
</el-table-column>
<!-- <el-table-column
prop="event_data.location.code"
align="center"
label="组织名称"
>
</el-table-column> -->
<el-table-column align="center" label="抓拍地点">
<template slot-scope="scope">
<div>
<span v-if="scope.row.event_data && scope.row.event_data">{{
scope.row.event_data.location
? scope.row.event_data.location.name
: ""
}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="抓拍时间">
<template slot-scope="scope">
<span v-if="scope.row.event_data">{{
showLocalTime(scope.row.event_dt)
}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="抓拍时间">
<template slot-scope="scope">
<span v-if="scope.row.event_data"
>{{showLocalTime(scope.row.event_dt)}}</span
>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip
content="播放"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
:class="{
'iconfont icon-fanxing-qidong playIcon': true,
'no-btn':
scope.row.video && scope.row.video[0].src_url != ''
? false
: true
}"
@click="playFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip
content="播放"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
:class="{
'iconfont icon-fanxing-qidong playIcon': true,
'no-btn':
scope.row.video && scope.row.video[0].src_url != ''
? false
: true,
}"
@click="playFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="displaystatus == 'list'">
<div class="listbox" :style="{'height':tableHeight}">
<div v-for="(item, index) in formatterData" :key="index" class="listboxitem" @click="detailFun(index,item)">
<div class="listbox" :style="{ height: tableHeight }">
<div
v-for="(item, index) in formatterData"
:key="index"
class="listboxitem"
@click="detailFun(index, item)"
>
<div class="imgbox">
<img :src="item.pics[0].src_url" alt="">
<img :src="item.pics[0].src_url" alt="" />
</div>
<div class="displayinfo">
<el-form label-width="80px" inline>
......@@ -224,11 +234,10 @@
<span>{{ item.event_type }}</span>
</el-form-item>
<el-form-item label="经过日期:">
<span>{{
item.shoot_date ? item.shoot_date : ""
}} {{
item.shoot_time ? item.shoot_time : ""
}}</span>
<span
>{{ item.shoot_date ? item.shoot_date : "" }}
{{ item.shoot_time ? item.shoot_time : "" }}</span
>
</el-form-item>
</el-form>
</div>
......@@ -237,27 +246,25 @@
:class="{
'iconfont icon-fanxing-qidong playIcon': true,
'no-btn':
item.video && item.video[0].src_url != ''
? false
: true
item.video && item.video[0].src_url != '' ? false : true,
}"
@click.stop="playFun(index, item)"
></span>
<span
class="el-icon-delete delIcon"
<span
class="el-icon-delete delIcon"
@click.stop="delFun(index, item)"
></span>
</div>
</div>
</div>
</div>
<div style="margin-top: 28px;">
<div style="margin-top: 28px">
<el-pagination
style="float: right;"
style="float: right"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -265,7 +272,7 @@
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
</div>
<el-dialog
......@@ -275,15 +282,15 @@
class="detailDialog"
width="800px"
>
<div style="position: relative;padding: 10px 20px;">
<div style="position: relative; padding: 10px 20px">
<!-- <div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div> -->
<div class="detaiCon">
<el-image style="width: 100%;" :src="this.detailImg">
<el-image style="width: 100%" :src="this.detailImg">
<div slot="error" class="image-slot">
<img
:src="carImg"
alt=""
style="width: 40%;display: block;margin: 0 auto;"
style="width: 40%; display: block; margin: 0 auto"
/>
</div>
</el-image>
......@@ -317,7 +324,9 @@
:class="{
playButton: true,
'no-video-btn':
detailObj.video && detailObj.video[0].src_url != '' ? false : true
detailObj.video && detailObj.video[0].src_url != ''
? false
: true,
}"
>播 放</el-button
>
......@@ -331,6 +340,7 @@
</template>
<script>
import videoDialog from "@/components/video";
import { getDataList } from "@/libs/utils";
export default {
data() {
let start_dt = this.yesterDay();
......@@ -348,15 +358,15 @@ export default {
task_id: "",
subtask_id: "",
location_code: "",
event_cate: "安防事件"
event_cate: "安防事件",
},
formatterData: [],
loading: false,
formatterData: [],
checked: "0",
total: 0,
page: 1,
displaystatus:'table',
pageSize: 30,
displaystatus: "table",
pageSize: this.$pageSize,
selectcheck: [],
currentIndex: 0,
cateList: JSON.parse(window.localStorage.getItem("cate列表")) || [],
......@@ -364,17 +374,17 @@ export default {
playurl: "",
taskList: [],
subTaskList: [],
tableHeight: window.twoSearchTableHeight
tableHeight: window.twoSearchTableHeight,
};
},
watch: {
dates(val) {
this.conditions.start_dt = val[0];
this.conditions.end_dt = val[1];
}
},
},
components: {
videoDialog
videoDialog,
},
mounted() {
this.getTaskList();
......@@ -384,12 +394,12 @@ export default {
indexFormatter(row, column, cellValue, index) {
return index + (this.page - 1) * this.pageSize + 1;
},
dataDisplay(data){
this.displaystatus = data
dataDisplay(data) {
this.displaystatus = data;
},
cateFormatter(row, column, cellValue, index) {
let name = "";
this.cateList.forEach(item => {
this.cateList.forEach((item) => {
if (item.code == cellValue) {
name = item.name;
}
......@@ -400,14 +410,14 @@ export default {
this.$api.task
.getTask({
source_type: "pull_video_stream",
task_type: "normal"
task_type: "normal",
})
.then(res => {
.then((res) => {
this.taskList = res.list_data;
});
},
getSubTask() {
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.$api.task.getSubTask(this.conditions.task_id).then((res) => {
if (res.list_data == null) {
this.subTaskList = [];
} else {
......@@ -415,7 +425,7 @@ export default {
}
this.subTaskList.unshift({
subtask_id: "",
subtask_name: "全部"
subtask_name: "全部",
});
this.conditions.subtask_id = "";
});
......@@ -429,24 +439,24 @@ export default {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delEvents({}, row.event_unid)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.formatterData.splice(index);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.getData();
this.$logs.oplogs(res,'serv_serarch',`事件数据删除`);
this.$logs.oplogs(res, "serv_serarch", `事件数据删除`);
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
......@@ -472,15 +482,17 @@ export default {
this.conditions.location_code
? this.conditions.location_code.replace(/\s\s*/g, "")
: this.conditions.location_code
}&event_cate=${cate}&event_type=${this.conditions.type}`;
this.$logs.oplogs({},'serv_serarch',`事件数据导出`);
}&event_cate=${cate}&event_type=${this.conditions.type}&isHasVideo=${
this.checked
}`;
this.$logs.oplogs({}, "serv_serarch", `事件数据导出`);
window.open(encodeURI(url));
},
leftFun() {
if (this.currentIndex - 1 < 0) {
this.$message({
message: "目前为第一条",
type: "warning"
type: "warning",
});
return false;
}
......@@ -492,7 +504,7 @@ export default {
if (this.currentIndex == this.formatterData.length - 1) {
this.$message({
message: "目前为最后一条",
type: "warning"
type: "warning",
});
return false;
}
......@@ -502,7 +514,7 @@ export default {
},
handleSelectionChange(obj) {
this.selectcheck = [];
obj.forEach(item => {
obj.forEach((item) => {
this.selectcheck.push(item.id);
});
},
......@@ -536,32 +548,31 @@ export default {
.format("YYYY-MM-DD HH:mm:ss"),
event_dt__lt: this.$moment(this.conditions.end_dt)
.utc()
.format("YYYY-MM-DD HH:mm:ss")
.format("YYYY-MM-DD HH:mm:ss"),
};
if (this.conditions.event_cate == "安防事件") {
search_params.event_cate = "";
} else {
search_params.event_cate = this.conditions.event_cate;
}
this.$api.search
.eventTableList(search_params)
.then(res => {
getDataList(search_params, "event")
.then((res) => {
this.total = res.total_num;
res.list_data.forEach((item, index) => {
this.formatterData.push(this.$buildCode.init(item));
});
this.formatterData = res.formatterData;
this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`事件检索`);
this.$logs.oplogs(res, "serv_serarch", `事件检索`);
})
.catch(err => {});
.catch((err) => {});
},
getImg(unid) {
this.detailImg = "";
if (!unid) return;
this.$api.search
.detailImg({}, unid)
.then(res => {
.then((res) => {
this.detailImg = res.pic_url ? this.buildImgurl(res.pic_url) : carImg;
})
.catch(e => {});
.catch((e) => {});
},
playFun(index, row) {
if (!row.video) {
......@@ -575,21 +586,20 @@ export default {
},
detailFun(index, row) {
this.currentIndex = index;
if (row.pics.length > 0) {
this.detailObj = Object.assign({}, row);
this.getImg(row.pics[0].pic_unid);
}
this.detailObj = Object.assign({}, row);
const pic_unid = row.pics.length > 0 ? row.pics[0].pic_unid : "";
this.getImg(pic_unid);
this.detailVisible = true;
},
detailDel() {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delEvents({}, this.detailObj.event_unid)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.formatterData.splice(this.currentIndex, 1);
this.detailObj = Object.assign(
......@@ -601,19 +611,19 @@ export default {
);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`数据删除`);
this.$logs.oplogs(res, "serv_serarch", `数据删除`);
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
}
}
},
},
};
</script>
<style lang="scss" scoped></style>
......@@ -132,14 +132,15 @@
</el-date-picker>
</span>
</el-form-item>
<el-form-item label="导出设置">
<el-form-item label="导出设置">
<el-checkbox v-model="checked" true-label="1" false-label="0">
<span> 带视频导出</span></el-checkbox>
<span> 带视频导出</span></el-checkbox
>
</el-form-item>
</el-form>
</el-col>
<el-col :span="2">
<div style="margin-bottom: 6px;padding-top: 3px;">
<div style="margin-bottom: 6px; padding-top: 3px">
<el-button type="primary" style="" @click="query" class="block"
>查询</el-button
>
......@@ -159,126 +160,132 @@
<i class="el-icon-tickets" @click="dataDisplay('table')"></i>
</div>
<div v-if="displaystatus == 'table'">
<el-table
:data="formatterData"
:height="tableHeight"
v-loading="loading"
ref="eventTable"
stripe
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" align="center" width="55">
</el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
>
</el-table-column>
<el-table-column
prop="vehicle_plate_text"
align="center"
label="车牌号码"
>
</el-table-column>
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车辆类型"
>
</el-table-column>
<el-table-column
prop="vehicle_body_logo_text"
align="center"
label="车辆品牌"
<el-table
:data="formatterData"
:height="tableHeight"
v-loading="loading"
ref="eventTable"
stripe
border
@selection-change="handleSelectionChange"
:class="$pageSizeOpts[0] === 10 ? 'ten-table-wrapper' : ''"
>
</el-table-column>
<el-table-column
prop="vehicle_body_color_text"
align="center"
label="车身颜色"
>
</el-table-column>
<el-table-column
prop="plate_color_text"
align="center"
label="车牌颜色"
>
</el-table-column>
<el-table-column prop="illegalType" align="center" label="违法类型">
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="违法日期">
<template slot-scope="scope">
<span>{{ scope.row.shoot_date }} {{ scope.row.shoot_time }}</span>
</template>
</el-table-column>
<el-table-column prop="location_name" align="center" label="抓拍地点">
</el-table-column>
<el-table-column align="center" width="150" label="操作">
<template slot-scope="scope">
<el-tooltip
content="播放"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
:class="{
'iconfont icon-fanxing-qidong playIcon': true,
'no-btn':
scope.row.video && scope.row.video[0].src_url != ''
? false
: true
}"
@click="playFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<el-table-column type="selection" align="center" width="55">
</el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
>
</el-table-column>
<el-table-column
prop="vehicle_plate_text"
align="center"
label="车牌号码"
>
</el-table-column>
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车辆类型"
>
</el-table-column>
<el-table-column
prop="vehicle_body_logo_text"
align="center"
label="车辆品牌"
>
</el-table-column>
<el-table-column
prop="vehicle_body_color_text"
align="center"
label="车身颜色"
>
</el-table-column>
<el-table-column
prop="plate_color_text"
align="center"
label="车牌颜色"
>
</el-table-column>
<el-table-column prop="illegalType" align="center" label="违法类型">
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="违法日期">
<template slot-scope="scope">
<span>{{ scope.row.shoot_date }} {{ scope.row.shoot_time }}</span>
</template>
</el-table-column>
<el-table-column prop="location_name" align="center" label="抓拍地点">
</el-table-column>
<el-table-column align="center" width="150" label="操作">
<template slot-scope="scope">
<el-tooltip
content="播放"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
:class="{
'iconfont icon-fanxing-qidong playIcon': true,
'no-btn':
scope.row.video && scope.row.video[0].src_url != ''
? false
: true,
}"
@click="playFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="displaystatus == 'list'">
<div class="listbox" :style="{'height':tableHeight}">
<div v-for="(item, index) in formatterData" :key="index" class="listboxitem" @click="detailFun(index,item)">
<div class="listbox" :style="{ height: tableHeight }">
<div
v-for="(item, index) in formatterData"
:key="index"
class="listboxitem"
@click="detailFun(index, item)"
>
<div class="imgbox">
<img :src="item.pics[0].src_url" alt="">
<img :src="item.pics[0].src_url" alt="" />
</div>
<div class="displayinfo">
<el-form label-width="80px" inline>
<el-form-item label="车牌号码:">
<el-form-item label="车牌号码:">
<span>{{ item.vehicle_plate_text }}</span>
</el-form-item>
<el-form-item label="车辆类型:">
<span>{{ item.vehicle_body_type_text }}</span>
</el-form-item>
<el-form-item label="车辆品牌:">
<el-form-item label="车辆品牌:">
<span>{{ item.vehicle_body_logo_text }}</span>
</el-form-item>
<el-form-item label="车身颜色:">
......@@ -287,22 +294,14 @@
<el-form-item label="车牌颜色:">
<span>{{ item.plate_color_text }}</span>
</el-form-item>
<el-form-item label="违法日期:">
<span>{{
item.shoot_date ? item.shoot_date : ""
}}{{
item.shoot_time ? item.shoot_time : ""
}}</span>
</el-form-item>
<el-form-item label="违法类型:">
<span>{{ item.illegalType }}</span>
</el-form-item>
<el-form-item label="违法日期:">
<span>{{
item.shoot_date ? item.shoot_date : ""
}}{{
item.shoot_time ? item.shoot_time : ""
}}</span>
<el-form-item label="违法日期:">
<span
>{{ item.shoot_date ? item.shoot_date : ""
}}{{ item.shoot_time ? " " + item.shoot_time : "" }}</span
>
</el-form-item>
<el-form-item label="经过地点:">
<span>{{ item.location_name }}</span>
......@@ -314,27 +313,25 @@
:class="{
'iconfont icon-fanxing-qidong playIcon': true,
'no-btn':
item.video && item.video[0].src_url != ''
? false
: true
item.video && item.video[0].src_url != '' ? false : true,
}"
@click.stop="playFun(index, item)"
></span>
<span
class="el-icon-delete delIcon"
<span
class="el-icon-delete delIcon"
@click.stop="delFun(index, item)"
></span>
</div>
</div>
</div>
</div>
<div style="margin-top: 28px;">
<div style="margin-top: 28px">
<el-pagination
style="float: right;"
style="float: right"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -342,7 +339,7 @@
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
</div>
<el-dialog
......@@ -352,22 +349,33 @@
class="detailDialog"
width="1000px"
>
<div style="position: relative;padding: 10px 20px;">
<div style="position: relative; padding: 10px 20px">
<!-- <div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div> -->
<div class="detaiCon">
<el-image
style="width: 60%;display: block;margin: 0 auto;"
:src="this.detailImg"
:preview-src-list="srcList"
>
<div slot="error" class="image-slot">
<img
:src="carImg"
alt=""
style="width: 40%;display: block;margin: 0 auto;"
/>
<div class="img-box">
<div class="img-placeholder-box">
<div v-for="itemSrc in srcList" :key="itemSrc">
<el-image :src="itemSrc" @click.native="swtichImg(itemSrc)">
<div slot="error" class="image-slot">
<img :src="carImg" alt="" />
</div>
</el-image>
</div>
</div>
</el-image>
<el-image
style="width: 60%; display: block; margin: 0 auto"
:src="this.detailImg"
:preview-src-list="srcList"
>
<div slot="error" class="image-slot">
<img
:src="carImg"
alt=""
style="width: 40%; display: block; margin: 0 auto"
/>
</div>
</el-image>
</div>
<el-form label-width="90px" inline>
<el-form-item label="车牌号码:">
<span>{{ detailObj.vehicle_plate_text }}</span>
......@@ -419,7 +427,9 @@
:class="{
playButton: true,
'no-video-btn':
detailObj.video && detailObj.video[0].src_url != '' ? false : true
detailObj.video && detailObj.video[0].src_url != ''
? false
: true,
}"
>播 放</el-button
>
......@@ -433,6 +443,7 @@
</template>
<script>
import videoDialog from "@/components/video";
import { getDataList, splitUrlOriginG } from "@/libs/utils";
export default {
data() {
let start_dt = this.yesterDay();
......@@ -440,11 +451,15 @@ export default {
return {
loading: false,
playurl: "",
checked:"0",
checked: "0",
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
detailImg: "",
srcList: [],
srcList: [
"https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg",
"2",
"https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg",
],
detailVisible: false,
dates: [start_dt, end_dt],
conditions: {
......@@ -458,7 +473,7 @@ export default {
car_color: "",
illegal: "all",
source_type: "pull_video_stream",
is_key_vehicle: false
is_key_vehicle: false,
},
brandList: this.$buildCode.getCodeList("车辆品牌"),
vehicleTypeList: this.$buildCode.getCodeList("车辆类型"),
......@@ -469,21 +484,22 @@ export default {
formatterData: [],
total: 0,
page: 1,
pageSize: 30,
pageSize: this.$pageSize,
selectcheck: [],
exportevent:[],
exportevent: [],
currentIndex: 0,
taskList: [],
displaystatus:'table',
displaystatus: "table",
subTaskList: [],
tableHeight: window.twoSearchTableHeight
tableHeight: window.twoSearchTableHeight,
imgUnidEnum: {},
};
},
watch: {
dates(val) {
this.conditions.start_dt = val[0];
this.conditions.end_dt = val[1];
}
},
},
components: { videoDialog },
mounted() {
......@@ -494,25 +510,25 @@ export default {
indexFormatter(row, column, cellValue, index) {
return index + (this.page - 1) * this.pageSize + 1;
},
dataDisplay(data){
this.displaystatus = data
dataDisplay(data) {
this.displaystatus = data;
},
getTaskList() {
this.$api.task
.getTask({
source_type: "pull_video_stream",
task_type: "normal"
task_type: "normal",
})
.then(res => {
.then((res) => {
this.taskList = res.list_data;
this.taskList.unshift({
task_id: "",
task_name: "全部"
task_name: "全部",
});
});
},
getSubTask() {
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.$api.task.getSubTask(this.conditions.task_id).then((res) => {
if (res.list_data == null) {
this.subTaskList = [];
} else {
......@@ -520,7 +536,7 @@ export default {
}
this.subTaskList.unshift({
subtask_id: "",
subtask_name: "全部"
subtask_name: "全部",
});
this.conditions.subtask_id = "";
});
......@@ -531,11 +547,11 @@ export default {
}
var play_url = "";
if (row.video) {
this.getVideo(row.video[0].unid)
this.getVideo(row.video[0].unid);
}
},
exportFun() {
this.$logs.oplogs({},'serv_serarch',`违法事件导出`);
this.$logs.oplogs({}, "serv_serarch", `违法事件导出`);
window.open(
encodeURI(
process.env.VUE_APP_URL +
......@@ -578,7 +594,7 @@ export default {
if (this.selectcheck.length == 0) {
this.$message({
message: "请选择至少一条记录",
type: "warning"
type: "warning",
});
return false;
}
......@@ -586,19 +602,23 @@ export default {
this.$confirm("此操作将永久删除选中记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.patchdel({
event_unids: this.selectcheck
event_unids: this.selectcheck,
})
.then(res => {
.then((res) => {
if (res.ecode == "200") {
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`违法批量删除了${this.selectcheck.length}条`);
this.$logs.oplogs(
res,
"serv_serarch",
`违法批量删除了${this.selectcheck.length}条`
);
this.getData();
} else {
this.$message.error("删除失败!");
......@@ -610,30 +630,30 @@ export default {
if (this.currentIndex - 1 < 0) {
this.$message({
message: "目前为第一条",
type: "warning"
type: "warning",
});
return false;
}
this.detailObj = this.formatterData[this.currentIndex - 1];
this.currentIndex -= 1;
this.getImg(this.detailObj.pics[0].pic_unid);
this.getImg(this.detailObj.pics);
},
rightFun() {
if (this.currentIndex == this.formatterData.length - 1) {
this.$message({
message: "目前为最后一条",
type: "warning"
type: "warning",
});
return false;
}
this.detailObj = this.formatterData[this.currentIndex + 1];
this.currentIndex += 1;
this.getImg(this.detailObj.pics[0].pic_unid);
this.getImg(this.detailObj.pics);
},
handleSelectionChange(obj) {
this.selectcheck = [];
this.exportevent = [];
obj.forEach(item => {
obj.forEach((item) => {
this.selectcheck.push(item.id);
this.exportevent.push(item.unid);
});
......@@ -672,49 +692,67 @@ export default {
illegal_code: this.conditions.illegal,
source_type: this.conditions.source_type,
is_key_vehicle: this.conditions.is_key_vehicle,
event_type: ""
event_type: "",
};
this.$api.search
.tableList(search_params)
.then(res => {
getDataList(search_params)
.then((res) => {
this.total = res.total_num;
res.list_data.forEach((item, index) => {
this.formatterData.push(this.$buildCode.init(item));
});
this.formatterData = res.formatterData;
this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`违法事件查询`);
this.$logs.oplogs(res, "serv_serarch", `违法事件查询`);
})
.catch(err => {});
.catch((err) => {});
},
getImg(unid) {
getImg(pics) {
this.srcList = [];
// this.$api.search
// .detailImg({}, unid)
// .then((res) => {
// this.detailImg = res.pic_url ? this.buildImgurl(res.pic_url) : carImg;
// this.srcList.push(this.detailImg);
// })
// .catch((e) => {});
const picUnidArr = [];
pics.forEach((p) => {
picUnidArr.push(p.pic_unid);
});
this.$api.search
.detailImg({}, unid)
.then(res => {
this.detailImg = res.pic_url ? this.buildImgurl(res.pic_url) : carImg;
this.srcList.push(this.detailImg);
.detailImgBatch({
pic_unids: picUnidArr,
})
.catch(e => {});
.then((res) => {
if (res.length > 0) {
const firstSrc = res[0].pic_url;
this.detailImg = firstSrc ? this.buildImgurl(firstSrc) : carImg;
res.forEach((item) => {
this.srcList.push(this.buildImgurl(item.pic_url));
});
}
});
},
swtichImg(src) {
this.detailImg = src;
},
getVideo(unid) {
this.$api.search
.detailVideo({}, unid)
.then(res => {
let play_url = res.mp4_url
console.log("录像路径",play_url);
setTimeout(() => {
this.$refs.visableDialog.playvideos(play_url);
console.log('videourl',url)
}, 0);
.then((res) => {
if (res.mp4_url) {
let play_url = location.origin + splitUrlOriginG(res.mp4_url);
console.log("录像路径", play_url);
setTimeout(() => {
this.$refs.visableDialog.playvideos(play_url);
console.log("videourl", url);
}, 0);
}
})
.catch(e => {});
.catch((e) => {});
},
detailFun(index, row) {
this.currentIndex = index;
if (row.pics.length > 0) {
this.detailObj = Object.assign({}, row);
this.getImg(row.pics[0].pic_unid);
this.getImg(row.pics);
}
this.detailVisible = true;
},
......@@ -722,24 +760,24 @@ export default {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delVehicle({}, row.id)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.formatterData.splice(index);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`违法事件删除`);
this.$logs.oplogs(res, "serv_serarch", `违法事件删除`);
this.getData();
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
......@@ -748,35 +786,57 @@ export default {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delVehicle({}, this.detailObj.id)
.then(res => {
if (res.ecode == 200) {19
.then((res) => {
if (res.ecode == 200) {
19;
this.formatterData.splice(this.currentIndex, 1);
this.detailObj = Object.assign(
{},
this.formatterData[this.currentIndex]
);
this.getImg(
this.formatterData[this.currentIndex].pics[0].pic_unid
);
this.getImg(this.formatterData[this.currentIndex].pics);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`违法事件删除`);
this.$logs.oplogs(res, "serv_serarch", `违法事件删除`);
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
}
}
},
},
};
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.img-box {
position: relative;
min-height: 200px;
}
.img-placeholder-box {
position: absolute;
top: 0;
left: 0;
width: 15%;
img {
width: 100px;
height: 100px;
cursor: pointer;
}
/deep/.el-image {
cursor: pointer;
img {
width: 100px;
height: 100px;
}
}
}
</style>
......@@ -178,7 +178,7 @@
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -297,7 +297,7 @@ export default {
formattterData: [],
total: 0,
page: 1,
pageSize: 30,
pageSize: this.$pageSize,
selectcheck: [],
currentIndex: 0,
taskList: [],
......
......@@ -180,7 +180,7 @@
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -300,7 +300,7 @@ export default {
formatterData: [],
total: 0,
page: 1,
pageSize: 30,
pageSize: this.$pageSize,
selectcheck: [],
currentIndex: 0,
taskList: [],
......
......@@ -109,6 +109,7 @@
stripe
v-loading="loading"
border
:class="$pageSizeOpts[0] === 10 ? 'ten-table-wrapper' : ''"
>
<el-table-column
prop="index"
......@@ -200,7 +201,7 @@
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -232,7 +233,7 @@ export default {
formatterData: [],
total: 0,
page: 1,
pageSize: 30,
pageSize: this.$pageSize,
taskList: [],
subTaskList: [],
tableHeight: window.oneSearchTableHeight
......
......@@ -162,7 +162,7 @@
</el-form>
</el-col>
<el-col :span="2">
<div style="margin-bottom: 6px;padding-top: 3px;">
<div style="margin-bottom: 6px; padding-top: 3px">
<el-button type="primary" style="" @click="query" class="block"
>查询</el-button
>
......@@ -182,139 +182,144 @@
<i class="el-icon-tickets" @click="dataDisplay('table')"></i>
</div>
<div v-if="displaystatus == 'table'">
<el-table
:data="formatterData"
:height="tableHeight"
stripe
border
v-loading="loading"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" align="center" width="55">
</el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
<el-table
:data="formatterData"
:height="tableHeight"
stripe
border
v-loading="loading"
@selection-change="handleSelectionChange"
:class="$pageSizeOpts[0] === 10 ? 'ten-table-wrapper' : ''"
>
</el-table-column>
<el-table-column
prop="vehicle_plate_text"
align="center"
label="车牌号码"
>
</el-table-column>
<el-table-column
prop="plate_color_text"
align="center"
label="车牌颜色"
>
</el-table-column>
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车辆类型"
>
</el-table-column>
<!-- <el-table-column
<el-table-column type="selection" align="center" width="55">
</el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
>
</el-table-column>
<el-table-column
prop="vehicle_plate_text"
align="center"
label="车牌号码"
>
</el-table-column>
<el-table-column
prop="plate_color_text"
align="center"
label="车牌颜色"
>
</el-table-column>
<el-table-column
prop="vehicle_body_type_text"
align="center"
label="车辆类型"
>
</el-table-column>
<!-- <el-table-column
prop="vehicle_body_logo_text"
align="center"
label="车辆品牌">
</el-table-column> -->
<el-table-column
prop="vehicle_body_color_text"
align="center"
label="车辆颜色"
>
</el-table-column>
<!-- <el-table-column
<el-table-column
prop="vehicle_body_color_text"
align="center"
label="车辆颜色"
>
</el-table-column>
<!-- <el-table-column
prop="RefinedFeature_text"
align="center"
label="标识物">
</el-table-column> -->
<el-table-column prop="special_text" align="center" label="特殊车辆">
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="抓拍时间">
<template slot-scope="scope">
<span>{{ scope.row.shoot_date }} {{ scope.row.shoot_time }}</span>
</template>
</el-table-column>
<el-table-column prop="location_name" align="center" label="抓拍地点">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-table-column prop="special_text" align="center" label="特殊车辆">
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="抓拍时间">
<template slot-scope="scope">
<span>{{ scope.row.shoot_date }} {{ scope.row.shoot_time }}</span>
</template>
</el-table-column>
<el-table-column prop="location_name" align="center" label="抓拍地点">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="displaystatus == 'list'">
<div class="listbox" :style="{'height':tableHeight}">
<div v-for="(item, index) in formatterData" :key="index" class="listboxitem" @click="detailFun(index,item)">
<div class="listbox" :style="{ height: tableHeight }">
<div
v-for="(item, index) in formatterData"
:key="index"
class="listboxitem"
@click="detailFun(index, item)"
>
<div class="imgbox">
<img :src="item.pics[0].src_url" alt="">
<img :src="item.pics[0].src_url" alt="" />
</div>
<div class="displayinfo">
<el-form>
<el-form-item label="车牌号码:">
<span>{{ item.vehicle_plate_text }}</span>
</el-form-item>
<el-form-item label="车牌颜色:">
<span>{{ item.plate_color_text }}</span>
</el-form-item>
<el-form-item label="车辆类型:">
<span>{{ item.vehicle_body_type_text }}</span>
</el-form-item>
<el-form-item label="车辆颜色:">
<span>{{ item.vehicle_body_color_text }}</span>
</el-form-item>
<el-form-item label="特殊车辆:">
<span>{{ item.special_text }}</span>
</el-form-item>
<el-form-item label="车牌号码:">
<span>{{ item.vehicle_plate_text }}</span>
</el-form-item>
<el-form-item label="车牌颜色:">
<span>{{ item.plate_color_text }}</span>
</el-form-item>
<el-form-item label="车辆类型:">
<span>{{ item.vehicle_body_type_text }}</span>
</el-form-item>
<el-form-item label="车辆颜色:">
<span>{{ item.vehicle_body_color_text }}</span>
</el-form-item>
<el-form-item label="特殊车辆:">
<span>{{ item.special_text }}</span>
</el-form-item>
<el-form-item label="抓拍时间:">
<span>{{
item.shoot_date ? item.shoot_date : ""
}} {{
item.shoot_time ? item.shoot_time : ""
}}</span>
</el-form-item>
</el-form>
<span
>{{ item.shoot_date ? item.shoot_date : "" }}
{{ item.shoot_time ? item.shoot_time : "" }}</span
>
</el-form-item>
</el-form>
</div>
</div>
</div>
</div>
<div style="margin-top: 28px;">
<div style="margin-top: 28px">
<el-pagination
style="float: right;"
style="float: right"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -322,7 +327,7 @@
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
</div>
<el-dialog
......@@ -332,11 +337,11 @@
class="detailDialog"
width="1000px"
>
<div style="position: relative;padding: 10px 20px;">
<div style="position: relative; padding: 10px 20px">
<!-- <div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div> -->
<div class="detaiCon">
<el-image
style="width: 100%;"
style="width: 100%"
z-index="100"
:src="this.detailImg"
:preview-src-list="srcList"
......@@ -345,7 +350,7 @@
<img
:src="carImg"
alt=""
style="width: 30%;display: block;margin: 0 auto;"
style="width: 30%; display: block; margin: 0 auto"
/>
</div>
</el-image>
......@@ -381,13 +386,15 @@
<el-form-item label="车身颜色:">
<span>{{ detailObj.vehicle_body_color_text }}</span>
</el-form-item>
<el-form-item label="车辆速度:">
<span v-if="detailObj.event_data">{{ detailObj.event_data.speed?detailObj.event_data.speed:"0" }}</span>
<el-form-item label="车辆速度:">
<span v-if="detailObj.event_data">{{
detailObj.event_data.speed ? detailObj.event_data.speed : "0"
}}</span>
</el-form-item>
<el-form-item label="特殊车辆:">
<span>{{ detailObj.special_text }}</span>
</el-form-item>
<!-- <el-form-item label="标志物:">
<span>{{ detailObj.RefinedFeature_text }}</span>
</el-form-item> -->
......@@ -407,6 +414,7 @@
</div>
</template>
<script>
import { getDataList } from "@/libs/utils";
export default {
data() {
let start_dt = this.yesterDay();
......@@ -431,7 +439,7 @@ export default {
task_id: "",
curdelid: "",
special_type: "",
subtask_id: ""
subtask_id: "",
},
loading: false,
brandList: this.$buildCode.getCodeList("车辆品牌") || [],
......@@ -443,20 +451,21 @@ export default {
formatterData: [],
total: 0,
page: 1,
pageSize: 30,
pageSize: this.$pageSize,
selectcheck: [],
currentIndex: 0,
taskList: [],
subTaskList: [],
displaystatus:"table",
tableHeight: window.twoSearchTableHeight
displaystatus: "table",
tableHeight: window.twoSearchTableHeight,
imgUnidEnum: {},
};
},
watch: {
dates(val) {
this.conditions.start_dt = val[0];
this.conditions.end_dt = val[1];
}
},
},
components: {},
mounted() {
......@@ -467,25 +476,25 @@ export default {
indexFormatter(row, column, cellValue, index) {
return index + (this.page - 1) * this.pageSize + 1;
},
dataDisplay(data){
this.displaystatus = data
dataDisplay(data) {
this.displaystatus = data;
},
getTaskList() {
this.$api.task
.getTask({
source_type: "pull_video_stream",
task_type: "normal"
task_type: "normal",
})
.then(res => {
.then((res) => {
this.taskList = res.list_data;
this.taskList.unshift({
task_id: "",
task_name: "全部"
task_name: "全部",
});
});
},
getSubTask() {
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.$api.task.getSubTask(this.conditions.task_id).then((res) => {
if (res.list_data == null) {
this.subTaskList = [];
} else {
......@@ -493,13 +502,13 @@ export default {
}
this.subTaskList.unshift({
subtask_id: "",
subtask_name: "全部"
subtask_name: "全部",
});
this.conditions.subtask_id = "";
});
},
exportFun() {
this.$logs.oplogs({},'serv_serarch',`过车事件导出`);
this.$logs.oplogs({}, "serv_serarch", `过车事件导出`);
window.open(
encodeURI(
process.env.VUE_APP_URL +
......@@ -536,7 +545,7 @@ export default {
if (this.selectcheck.length == 0) {
this.$message({
message: "请选择至少一条记录",
type: "warning"
type: "warning",
});
return false;
}
......@@ -544,19 +553,23 @@ export default {
this.$confirm("此操作将永久删除选中记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.patchdel({
event_unids: this.selectcheck
event_unids: this.selectcheck,
})
.then(res => {
.then((res) => {
if (res.ecode == "200") {
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`过车事件批量删除了${this.selectcheck.length}条`);
this.$logs.oplogs(
res,
"serv_serarch",
`过车事件批量删除了${this.selectcheck.length}条`
);
this.getData();
} else {
this.$message.error("删除失败!");
......@@ -568,12 +581,12 @@ export default {
if (this.currentIndex - 1 < 0) {
this.$message({
message: "目前为第一条",
type: "warning"
type: "warning",
});
return false;
}
this.detailObj = this.formatterData[this.currentIndex - 1];
console.log( this.detailObj );
console.log(this.detailObj);
this.currentIndex -= 1;
this.getImg(this.detailObj.pics[0].pic_unid);
},
......@@ -581,7 +594,7 @@ export default {
if (this.currentIndex == this.formatterData.length - 1) {
this.$message({
message: "目前为最后一条",
type: "warning"
type: "warning",
});
return false;
}
......@@ -591,7 +604,7 @@ export default {
},
handleSelectionChange(obj) {
this.selectcheck = [];
obj.forEach(item => {
obj.forEach((item) => {
this.selectcheck.push(item.id);
});
},
......@@ -630,31 +643,28 @@ export default {
event_type: "",
special_type: this.conditions.special_type,
task_id: this.conditions.task_id,
subtask_id: this.conditions.subtask_id
subtask_id: this.conditions.subtask_id,
};
this.$api.search
.tableList(search_params)
.then(res => {
getDataList(search_params)
.then((res) => {
this.total = res.total_num;
res.list_data.forEach((item, index) => {
this.formatterData.push(this.$buildCode.init(item));
});
this.formatterData = res.formatterData;
this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`过车事件查询`);
this.$logs.oplogs(res, "serv_serarch", `过车事件查询`);
})
.catch(err => {});
.catch((err) => {});
},
getImg(unid) {
this.srcList = [];
this.$api.search
.detailImg({}, unid)
.then(res => {
.then((res) => {
this.detailImg = res.pic_url ? this.buildImgurl(res.pic_url) : carImg;
this.srcList.push(this.detailImg);
})
.catch(e => {});
.catch((e) => {});
},
detailFun(index, row) {
this.currentIndex = index;
if (row.pics.length > 0) {
......@@ -667,24 +677,24 @@ export default {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delVehicle({}, row.id)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.formatterData.splice(index);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.getData();
this.$logs.oplogs(res,'serv_serarch',`过车事件删除`);
this.$logs.oplogs(res, "serv_serarch", `过车事件删除`);
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
......@@ -693,11 +703,11 @@ export default {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delVehicle({}, this.detailObj.id)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.formatterData.splice(this.currentIndex, 1);
this.detailObj = Object.assign(
......@@ -709,28 +719,28 @@ export default {
);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`过车事件删除`);
this.$logs.oplogs(res, "serv_serarch", `过车事件删除`);
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
}
}
},
},
};
</script>
<style lang="scss" scoped>
.imgaddbtn{
.imgaddbtn {
position: absolute;
z-index: 2000;
height: 200px;
width: 200px;
top:0;
top: 0;
left: 0;
background: red;
}
......
......@@ -107,10 +107,20 @@
v-show="conditions.event_type == 'xcycle'"
>
<span class="inputBox">
<el-input
placeholder="请输入公司名称"
<el-select
filterable
placeholder="请选择"
:popper-append-to-body="false"
v-model="conditions.company"
></el-input>
>
<el-option value="" label="全部"></el-option>
<el-option
v-for="item in companyList"
:value="item.code"
:key="item.code"
:label="item.name"
></el-option>
</el-select>
</span>
</el-form-item>
<el-form-item
......@@ -192,9 +202,9 @@
<el-option value="" label="全部"></el-option>
<el-option
v-for="item in bodyColorList"
:value="item.value"
:key="item.value"
:label="item.label"
:value="item.code"
:key="item.code"
:label="item.name"
></el-option>
</el-select>
</span>
......@@ -213,9 +223,9 @@
<el-option value="" label="全部"></el-option>
<el-option
v-for="item in bodyColorList"
:value="item.value"
:key="item.value"
:label="item.label"
:value="item.code"
:key="item.code"
:label="item.name"
></el-option>
</el-select>
</span>
......@@ -238,7 +248,7 @@
</el-form>
</el-col>
<el-col :span="2">
<div style="margin-bottom: 6px;padding-top: 3px;">
<div style="margin-bottom: 6px; padding-top: 3px">
<el-button type="primary" style="" @click="query" class="block"
>查询</el-button
>
......@@ -258,155 +268,166 @@
<i class="el-icon-tickets" @click="dataDisplay('table')"></i>
</div>
<div v-if="displaystatus == 'table'">
<el-table
:data="formatterData"
v-loading="loading"
:height="tableHeight"
stripe
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" align="center" width="55">
</el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
>
</el-table-column>
<el-table-column
prop="xcycle_type_text"
align="center"
label="检测类型"
>
</el-table-column>
<el-table-column prop="driver_face_sex" align="center" label="性别">
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'xcycle'"
prop="driver_face_with_hats"
align="center"
label="是否带盔"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'pedestrian'"
prop="driver_face_with_hats"
align="center"
label="是否带帽"
<el-table
:data="formatterData"
v-loading="loading"
:height="tableHeight"
stripe
border
@selection-change="handleSelectionChange"
:class="$pageSizeOpts[0] === 10 ? 'ten-table-wrapper' : ''"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'pedestrian'"
prop="driver_face_upbody_text"
align="center"
label="上身颜色"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'pedestrian'"
prop="driver_face_lobody_text"
align="center"
label="下身颜色"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'xcycle'"
prop="xcycle_plate_text"
align="center"
label="车牌号码"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'xcycle'"
prop="company"
align="center"
label="运营公司"
>
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="抓拍时间">
<template slot-scope="scope">
<span>{{ scope.row.shoot_date }} {{ scope.row.shoot_time }}</span>
</template>
</el-table-column>
<el-table-column prop="location_name" align="center" label="抓拍地点">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="displaystatus == 'list'">
<div class="listbox" :style="{'height':tableHeight}">
<div v-for="(item, index) in formatterData" :key="index" class="listboxitem" @click="detailFun(index,item)">
<el-table-column type="selection" align="center" width="55">
</el-table-column>
<el-table-column
prop="index"
align="center"
label="#"
type="index"
width="50"
>
</el-table-column>
<el-table-column
prop="xcycle_type_text"
align="center"
label="检测类型"
>
</el-table-column>
<el-table-column prop="driver_face_sex" align="center" label="性别">
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'xcycle'"
prop="driver_face_with_hats"
align="center"
label="是否带盔"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'pedestrian'"
prop="driver_face_with_hats"
align="center"
label="是否带帽"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'pedestrian'"
prop="driver_face_upbody_text"
align="center"
label="上身颜色"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'pedestrian'"
prop="driver_face_lobody_text"
align="center"
label="下身颜色"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'xcycle'"
prop="xcycle_plate_text"
align="center"
label="车牌号码"
>
</el-table-column>
<el-table-column
v-if="conditions.event_type == 'xcycle'"
prop="company"
align="center"
label="运营公司"
>
</el-table-column>
<el-table-column prop="shoot_date" align="center" label="抓拍时间">
<template slot-scope="scope">
<span>{{ scope.row.shoot_date }} {{ scope.row.shoot_time }}</span>
</template>
</el-table-column>
<el-table-column prop="location_name" align="center" label="抓拍地点">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detailFun(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="displaystatus == 'list'">
<div class="listbox" :style="{ height: tableHeight }">
<div
v-for="(item, index) in formatterData"
:key="index"
class="listboxitem"
@click="detailFun(index, item)"
>
<div class="imgbox">
<img :src="item.pics[0].src_url" alt="">
<img :src="item.pics[0].src_url" alt="" />
</div>
<div class="displayinfo">
<el-form>
<el-form-item label="检测类型:">
<span>{{ item.xcycle_type_text }}</span>
<el-form-item label="检测类型:">
<span>{{ item.xcycle_type_text }}</span>
</el-form-item>
<el-form-item label="性别:">
<span>{{ item.driver_face_sex }}</span>
</el-form-item>
<el-form-item label="是否带头盔:" v-if="item.event_type == 'xcycle'">
<el-form-item
label="是否带头盔:"
v-if="item.event_type == 'xcycle'"
>
<span>{{ item.driver_face_with_hats }}</span>
</el-form-item>
<el-form-item label="是否带头盔:" v-if="item.event_type == 'pedestrian'">
<el-form-item
label="是否带头盔:"
v-if="item.event_type == 'pedestrian'"
>
<span>{{ item.driver_face_with_hats }}</span>
</el-form-item>
<el-form-item label="运营公司:">
<span>{{ item.company }}</span>
</el-form-item>
<el-form-item label="经过日期:">
<span>{{
item.shoot_date ? item.shoot_date : ""
}} {{
item.shoot_time ? item.shoot_time : ""
}}</span>
<span
>{{ item.shoot_date ? item.shoot_date : "" }}
{{ item.shoot_time ? item.shoot_time : "" }}</span
>
</el-form-item>
<el-form-item label="经过地点:">
<span>{{ item.location_name }}</span>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</div>
</div>
<div style="margin-top: 28px;">
<div style="margin-top: 28px">
<el-pagination
style="float: right;"
style="float: right"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -414,7 +435,7 @@
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
</div>
<el-dialog
......@@ -424,15 +445,15 @@
class="detailDialog"
width="1000px"
>
<div style="position: relative;padding: 10px 20px;">
<div style="position: relative; padding: 10px 20px">
<!-- <div class="leftArrow" @click="leftFun"><i class="el-icon-d-arrow-left"></i></div> -->
<div class="detaiCon">
<el-image style="width: 100%;" :src="this.detailImg">
<el-image style="width: 100%" :src="this.detailImg">
<div slot="error" class="image-slot">
<img
:src="carImg"
alt=""
style="width: 36%;display: block;margin: 0 auto;"
style="width: 36%; display: block; margin: 0 auto"
/>
</div>
</el-image>
......@@ -494,6 +515,7 @@
</div>
</template>
<script>
import { getDataList } from "@/libs/utils";
export default {
data() {
let start_dt = this.yesterDay();
......@@ -502,6 +524,7 @@ export default {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
bodyColorList: this.$buildCode.getCodeList("车身颜色"),
companyList: this.$buildCode.getCodeList("运营公司"),
detailImg: "",
detailVisible: false,
loading: false,
......@@ -518,7 +541,7 @@ export default {
with_hats: "",
plate: "",
upbodyColor: "",
lobodyColor: ""
lobodyColor: "",
},
brandList: this.$buildCode.getCodeList("车辆品牌"),
vehicleTypeList: this.$buildCode.getCodeList("车辆类型"),
......@@ -527,20 +550,20 @@ export default {
formatterData: [],
total: 0,
page: 1,
pageSize: 30,
pageSize: this.$pageSize,
selectcheck: [],
currentIndex: 0,
taskList: [],
displaystatus:'table',
displaystatus: "table",
subTaskList: [],
tableHeight: window.twoSearchTableHeight
tableHeight: window.twoSearchTableHeight,
};
},
watch: {
dates(val) {
this.conditions.start_dt = val[0];
this.conditions.end_dt = val[1];
}
},
},
components: {},
mounted() {
......@@ -551,25 +574,25 @@ export default {
indexFormatter(row, column, cellValue, index) {
return index + (this.page - 1) * this.pageSize + 1;
},
dataDisplay(data){
this.displaystatus = data
dataDisplay(data) {
this.displaystatus = data;
},
getTaskList() {
this.$api.task
.getTask({
source_type: "pull_video_stream",
task_type: "normal"
task_type: "normal",
})
.then(res => {
.then((res) => {
this.taskList = res.list_data;
this.taskList.unshift({
task_id: "",
task_name: "全部"
task_name: "全部",
});
});
},
getSubTask() {
this.$api.task.getSubTask(this.conditions.task_id).then(res => {
this.$api.task.getSubTask(this.conditions.task_id).then((res) => {
if (res.list_data == null) {
this.subTaskList = [];
} else {
......@@ -577,7 +600,7 @@ export default {
}
this.subTaskList.unshift({
subtask_id: "",
subtask_name: "全部"
subtask_name: "全部",
});
this.conditions.subtask_id = "";
});
......@@ -610,7 +633,7 @@ export default {
this.conditions.task_id +
"&subtask_id=" +
this.conditions.subtask_id +
"&company_like=" +
"&company=" +
this.conditions.company +
"&with_hats=" +
this.conditions.with_hats +
......@@ -644,14 +667,14 @@ export default {
"&lobodyColor=" +
this.conditions.lobodyColor;
}
this.$logs.oplogs({},'serv_serarch',`行人非机动车导出`);
this.$logs.oplogs({}, "serv_serarch", `行人非机动车导出`);
window.open(encodeURI(url));
},
batchdel() {
if (this.selectcheck.length == 0) {
this.$message({
message: "请选择至少一条记录",
type: "warning"
type: "warning",
});
return false;
}
......@@ -659,19 +682,23 @@ export default {
this.$confirm("此操作将永久删除选中记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.patchdel({
event_unids: this.selectcheck
event_unids: this.selectcheck,
})
.then(res => {
.then((res) => {
if (res.ecode == "200") {
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`行人非机动车批量删除了${this.selectcheck.length}条`);
this.$logs.oplogs(
res,
"serv_serarch",
`行人非机动车批量删除了${this.selectcheck.length}条`
);
this.getData();
} else {
this.$message.error("删除失败!");
......@@ -683,7 +710,7 @@ export default {
if (this.currentIndex - 1 < 0) {
this.$message({
message: "目前为第一条",
type: "warning"
type: "warning",
});
return false;
}
......@@ -695,7 +722,7 @@ export default {
if (this.currentIndex == this.formatterData.length - 1) {
this.$message({
message: "目前为最后一条",
type: "warning"
type: "warning",
});
return false;
}
......@@ -705,7 +732,7 @@ export default {
},
handleSelectionChange(obj) {
this.selectcheck = [];
obj.forEach(item => {
obj.forEach((item) => {
this.selectcheck.push(item.id);
});
},
......@@ -738,35 +765,32 @@ export default {
subtask_id: this.conditions.subtask_id,
event_type: this.conditions.event_type,
sex: this.conditions.sex,
with_hats: this.conditions.with_hats
with_hats: this.conditions.with_hats,
};
if (this.conditions.event_type == "xcycle") {
search_params.xcycle_type = this.conditions.xcycle_type;
search_params.company_like = this.conditions.company;
search_params.company = this.conditions.company;
search_params.plate_number__like = this.conditions.plate;
} else {
search_params.upbodyColor = this.conditions.upbodyColor;
search_params.lobodyColor = this.conditions.lobodyColor;
}
this.$api.search
.tableList(search_params)
.then(res => {
getDataList(search_params)
.then((res) => {
this.total = res.total_num;
res.list_data.forEach((item, index) => {
this.formatterData.push(this.$buildCode.init(item));
});
this.formatterData = res.formatterData;
this.loading = false;
this.$logs.oplogs(res,'serv_serarch',`行人非机动车查询`);
this.$logs.oplogs(res, "serv_serarch", `行人非机动车查询`);
})
.catch(err => {});
.catch((err) => {});
},
getImg(unid) {
this.$api.search
.detailImg({}, unid)
.then(res => {
this.detailImg = res.pic_url ? this.buildImgurl(res.pic_url) : carImg;
.then((res) => {
this.detailImg = res.pic_url ? this.buildImgurl(res.pic_url) : carImg;
})
.catch(e => {});
.catch((e) => {});
},
detailFun(index, row) {
this.currentIndex = index;
......@@ -780,24 +804,24 @@ export default {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delVehicle({}, row.id)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.formatterData.splice(index);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.getData();
this.$logs.oplogs(res,'serv_serarch',`行人非机动车删除`);
this.$logs.oplogs(res, "serv_serarch", `行人非机动车删除`);
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
......@@ -806,11 +830,11 @@ export default {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.search
.delVehicle({}, this.detailObj.id)
.then(res => {
.then((res) => {
if (res.ecode == 200) {
this.formatterData.splice(this.currentIndex, 1);
this.detailObj = Object.assign(
......@@ -822,19 +846,19 @@ export default {
);
this.$message({
type: "success",
message: "删除成功!"
message: "删除成功!",
});
this.$logs.oplogs(res,'serv_serarch',`行人非机动车删除`);
this.$logs.oplogs(res, "serv_serarch", `行人非机动车删除`);
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
.catch((e) => {
this.$message.error("删除失败!");
});
});
}
}
},
},
};
</script>
<style lang="scss" scoped></style>
......@@ -129,7 +129,7 @@
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
:page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
......@@ -255,7 +255,7 @@ export default {
formattterData: [],
total: 0,
page: 1,
pageSize: 30,
pageSize: this.$pageSize,
selectcheck: [],
currentIndex: 0
};
......
......@@ -19,7 +19,7 @@
prop="task_name"
class="form-item"
:rules="[
{ required: true, message: '请输入任务名称', trigger: 'blur' }
{ required: true, message: '请输入任务名称', trigger: 'blur' },
]"
>
<el-input
......@@ -38,14 +38,12 @@
:popper-append-to-body="false"
:disabled="pedittype == 'edit'"
>
<el-option value="" label="--"></el-option>
<el-option value="0" label="交通"></el-option>
<el-option value="1" label="客流"></el-option>
<el-option value="2" label="安防"></el-option>
<el-option value="2" label="行为分析"></el-option>
<el-option value="12" label="行为分析_BG"></el-option>
<el-option value="3" label="违停"></el-option>
<el-option value="5" label="交通行人"></el-option>
<el-option
v-for="(item, index) in algorTypeList"
:key="index"
:value="item.value"
:label="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="场景占用" class="form-item" prop="resource_use">
......@@ -82,7 +80,7 @@
></el-date-picker> -->
<el-time-picker
is-range
style="width:100%"
style="width: 100%"
value-format="HH:mm:ss"
v-model="timer"
range-separator="至"
......@@ -144,6 +142,7 @@
</template>
<script>
import { algorTypeList } from "@/enum/index";
export default {
data() {
var checkStore = (rule, value, callback) => {
......@@ -157,44 +156,45 @@ export default {
setvisible: false,
timer: ["00:00:00", "23:59:59"],
backpdata: "",
headertitle:"添加任务",
headertitle: "添加任务",
formData: {
task_name: "",
task_algo_type: 0,
is_send: 0,
store_conf: {
unid: ""
unid: "",
},
priority: "normal",
period: true
period: true,
},
pedittype:"add",
pedittype: "add",
vchanAry: [],
platT: [],
sessionData: {},
store_confs: [],
algorTypeList: algorTypeList,
rules: {
task_algo_type: [
{ required: true, message: "请选择算法类型", trigger: "change" }
{ required: true, message: "请选择算法类型", trigger: "change" },
],
stores: [
{ required: true, message: "存储配置不能为空!", trigger: "change" }
{ required: true, message: "存储配置不能为空!", trigger: "change" },
],
resource_use: [
{ required: true, message: "场景占用不能为空!", trigger: "change" }
{ required: true, message: "场景占用不能为空!", trigger: "change" },
],
store_conf_unid: [
{ required: true, validator: checkStore, trigger: "change" }
]
}
{ required: true, validator: checkStore, trigger: "change" },
],
},
};
},
props: {
freeList: {
type: Array,
// eslint-disable-next-line vue/require-valid-default-prop
default: []
}
default: [],
},
},
watch: {},
mounted() {},
......@@ -203,7 +203,7 @@ export default {
if (this.freeList && this.freeList.length > 0) {
var freeArr = [];
let that = this;
this.freeList.forEach(ele => {
this.freeList.forEach((ele) => {
if (ele.license_info && ele.license_info.platType) {
if (that.platT.length == 0) {
that.platT.push(ele.license_info.platType);
......@@ -228,23 +228,23 @@ export default {
this.platT = [];
this.setvisible = true;
if (type == "add") {
this.headertitle = "新建任务"
this.headertitle = "新建任务";
//timer单独拿到form外层是因为element一个bug放到内层后不能修改时间
this.timer = ["00:00:00", "23:59:59"];
this.formData = {
task_name: "",
task_algo_type: "0",
store_conf: {
unid: ""
unid: "",
},
priority: "normal",
plate_type: "",
plate_time: "",
period: true
period: true,
};
}
if (type == "edit") {
this.headertitle = "修改任务"
this.headertitle = "修改任务";
this.pedittype = type;
if (pdata.start_time) {
let startT = pdata.start_time;
......@@ -255,7 +255,7 @@ export default {
}
this.formData = JSON.parse(JSON.stringify(pdata));
this.backpdata = JSON.parse(JSON.stringify(pdata));
this.$api.task.getSubTask(pdata.task_id).then(res => {
this.$api.task.getSubTask(pdata.task_id).then((res) => {
let ary = [];
let data = res.list_data;
for (let i in data) {
......@@ -266,7 +266,7 @@ export default {
data.vchan = {
subtask_id: data[i].subtask_id,
refid: "",
vchan_name: data[i].subtask_name
vchan_name: data[i].subtask_name,
};
}
ary.push(data[i].vchan);
......@@ -305,7 +305,7 @@ export default {
plate_type: this.formData.plate_type,
resource_use: this.formData.resource_use,
task_type: "normal",
enable_status: true
enable_status: true,
// algo_comb_unid: this.formData.store_conf,
};
......@@ -321,24 +321,28 @@ export default {
}
},
addTask(data) {
this.$refs["taskForm"].validate(valid => {
this.$refs["taskForm"].validate((valid) => {
if (valid) {
this.$api.task
.addTask(data, {
"content-type": "multipart/form-data"
"content-type": "multipart/form-data",
})
.then(res => {
.then((res) => {
if (res.ecode && res.ecode != 500) {
this.setvisible = false;
this.$emit("refresh");
} else {
this.$message({
message: res.enote,
type: "error"
type: "error",
});
}
debugger
this.$logs.oplogs(res,'serv_task',`添加任务${this.formData.task_name}`);
debugger;
this.$logs.oplogs(
res,
"serv_task",
`添加任务${this.formData.task_name}`
);
});
} else {
console.log("error submit!!");
......@@ -347,21 +351,21 @@ export default {
},
editTask(data) {
data.is_send = this.sendstatus(data);
this.$api.task.editTask(data, this.formData.task_id).then(res => {
this.$api.task.editTask(data, this.formData.task_id).then((res) => {
if (res.ecode == "200") {
this.setvisible = false;
this.$emit("refresh");
this.$message({
message: res.enote,
type: "success"
type: "success",
});
} else {
this.$message({
message: res.enote,
type: "error"
type: "error",
});
}
this.$logs.oplogs(res,'serv_task',`修改了任务${data.task_name}`);
this.$logs.oplogs(res, "serv_task", `修改了任务${data.task_name}`);
});
},
sendstatus(data) {
......@@ -382,22 +386,21 @@ export default {
getStore() {
let params = {
offset: 0,
limit: ""
limit: "",
};
this.$api.device.getStore(params).then(res => {
this.$api.device.getStore(params).then((res) => {
this.store_confs = res.list_data;
});
},
},
created() {
this.getStore();
}
},
};
</script>
<style lang="stylus" scoped>
.form-item {
margin-bottom 13px
margin-bottom: 13px;
}
</style>
......@@ -156,6 +156,14 @@ export default {
tableData: [],
zNodes: [
{
name: "视频云设备",
id: "-1",
count: 500,
times: 1,
isParent: true,
dev_unid: this.dev_unid,
},
{
name: "外部设备",
id: "0",
count: 500,
......@@ -347,11 +355,26 @@ export default {
} else if (parentNode.name === "内部设备") {
let vchans = childNodes.vchan_struct || childNodes.list_data;
treenode = vchans
} else {
} else if (parentNode.name === "外部设备") {
treenode = childNodes.result.childs;
} else if (parentNode.name === "视频云设备") {
this.dealCloudTree(childNodes.data);
treenode = childNodes.data;
console.log('childNodes', childNodes);
}
return treenode;
},
dealCloudTree(list) {
list.forEach(d => {
if (d.orgName) d.name = d.orgName;
console.log('d', d)
d.vchan_type = "cloud";
if (d.child && d.child.length > 0) {
d.childs = d.child;
this.dealCloudTree(d.child);
}
});
},
showModal(val) {
this.taskData = val;
this.tableData = [];
......@@ -426,6 +449,7 @@ export default {
let status = true;
let subData = [];
this.tableData.map((e) => {
console.log(e);
let vchan = e;
let data = {
is_dome: false,
......@@ -435,10 +459,11 @@ export default {
vchan_duid: vchan.duid || vchan.vchan_duid,
vdev_unid: this.dev_unid,
vchan_name: vchan.name,
vchan_type: vchan.vchan_type || ""
},
assign_to: {
id: this.taskData.plate_type,
flag: 1,
flag: 1
},
};
subData.push(data);
......@@ -555,10 +580,18 @@ export default {
}
});
},
serchVchan(){
async serchVchan(){
if(this.searchText == '') {
var zNodes = [
{
name: "视频云设备",
id: "-1",
count: 500,
times: 1,
isParent: true,
dev_unid: this.dev_unid,
},
{
name: "外部设备",
id: "0",
count: 500,
......@@ -584,24 +617,25 @@ export default {
},
]
var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, zNodes);
return
return;
}
this.$api.resource.getcatalogs({vchan_name_like:this.searchText }).then(res => {
this.$api.device.getDevtreeLike(this.dev_unid,'内部设备',{vchan_name_like:this.searchText }).then(camerares => {
this.$api.device.getDevtreeLike(this.dev_unid,'短视频',{vchan_name_like:this.searchText }).then(vchanres => {
setTimeout(() => {
this.zNodes[0].childs = res.result?res.result.childs:[]
this.zNodes[1].childs = camerares.vchan_struct
this.zNodes[2].childs = vchanres.list_data
var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
ztree.expandAll(true)
this.checkvckan()
}, 10);
})
})
})
var params = {
vchan_name_like: this.searchText
};
const res = await this.$api.resource.getcatalogs(params);
const camerares = await this.$api.device.getDevtreeLike(this.dev_unid,'内部设备', params);
const vchanres = await this.$api.device.getDevtreeLike(this.dev_unid,'短视频', params);
const cloudres = await this.$api.device.getCloudDev(params);
this.dealCloudTree(cloudres.data);
setTimeout(() => {
this.zNodes[0].childs = cloudres?cloudres.data:[];
this.zNodes[1].childs = res.result?res.result.childs:[];
this.zNodes[2].childs = camerares.vchan_struct;
this.zNodes[3].childs = vchanres.list_data;
var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
ztree.expandAll(true);
this.checkvckan();
}, 10);
},
rowclick(row) {
//播放视频
......
......@@ -43,7 +43,7 @@
</div>
</div>
<div class="content">
<div style="padding: 20px 15px 20px 23px;">
<div style="padding: 20px 15px 20px 23px">
<span class="inputBox">
<el-input v-model="task_name" placeholder="请输入任务名称"></el-input>
</span>
......@@ -53,27 +53,31 @@
placeholder="请选择"
:popper-append-to-body="false"
>
<el-option value="" label="全部"></el-option>
<el-option value="0" label="交通"></el-option>
<el-option value="1" label="客流"></el-option>
<el-option value="12" label="行为分析"></el-option>
<el-option value="7" label="综合流量"></el-option>
<!-- <el-option value="4" label='人脸'></el-option> -->
<el-option
v-for="(item, index) in algorTypeList"
:key="index"
:value="item.value"
:label="item.name"
></el-option>
</el-select>
</span>
<el-button
type="primary"
style="position: relative;top: -2px;"
style="position: relative; top: -2px"
@click="query"
>查询</el-button
>
<span style="float: right;">
<el-button type="info" icon="el-icon-plus" style="padding: 7px 16px" @click="editTask('add')"
<span style="float: right">
<el-button
type="info"
icon="el-icon-plus"
style="padding: 7px 16px"
@click="editTask('add')"
>新建任务</el-button
>
</span>
</div>
<div style="padding: 0 23px 20px 23px;width:98%">
<div style="padding: 0 23px 20px 23px; width: 98%">
<el-table
height="59vh"
:data="tableData"
......@@ -192,7 +196,7 @@
'icon-fanxing-qidong': true,
playIcon: true,
noplayicon:
scope.row.status == 'NotInTimeOfDay' ? false : false
scope.row.status == 'NotInTimeOfDay' ? false : false,
}"
@click="setTaskStatus(scope.row, 'start')"
></span>
......@@ -209,7 +213,7 @@
:visible-arrow="false"
>
<span
class="icon-fanxing-zanting pauseIcon"
class="icon-fanxing-zanting pauseIcon"
@click="setTaskStatus(scope.row, 'stop')"
></span>
</el-tooltip>
......@@ -228,9 +232,9 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px">
<el-pagination
style="float: right;"
style="float: right"
background
prev-text="上一页"
next-text="下一页"
......@@ -243,7 +247,7 @@
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
<div style="clear: both"></div>
</div>
</div>
<editset
......@@ -253,7 +257,7 @@
@refresh="getTaskList"
></editset>
<editvideo
v-if="!isbigtree"
v-if="!isbigtree"
ref="editvideo"
:parentData="curtask"
:pedittype="pedittype"
......@@ -270,22 +274,24 @@
</div>
</template>
<script>
import { algorTypeList, algorTypeEnum } from "@/enum/index";
console.log('algorTypeEnum', algorTypeEnum);
import editset from "./editSet";
import editvideo from "./editVideo";
import editVidebigree from "./editVidebigree";
import subTaskInfo from "./subtask.vue";
import mixin from "../../assets/js/mixin";
export default {
components: {
components: {
editset,
editvideo,
editVidebigree,
subTaskInfo
subTaskInfo,
},
mixins: [mixin],
data() {
return {
isbigtree:window.config.bigtree,
isbigtree: window.config.bigtree,
task_name: "",
curtask: "",
task_algo_type: "",
......@@ -301,7 +307,8 @@ export default {
pedittype: "add",
currentRow: {},
assign_ip: "",
curscrollTop: 0
curscrollTop: 0,
algorTypeList: algorTypeList,
};
},
......@@ -310,7 +317,7 @@ export default {
if (!row.isexpand) {
//打开获取子任务
row.isexpand = true;
this.$api.task.getSubTask(row.task_id).then(res => {
this.$api.task.getSubTask(row.task_id).then((res) => {
let ary = [];
let data = res.list_data;
for (let i in data) {
......@@ -378,7 +385,7 @@ export default {
}
},
getFreelist() {
this.$api.device.getFreelist(this.dev_unid).then(res => {
this.$api.device.getFreelist(this.dev_unid).then((res) => {
this.freeList = res.list_data;
});
// /
......@@ -393,21 +400,7 @@ export default {
}
},
typeFormatter(row, column, cellValue, index) {
if (cellValue == 0) {
return "交通";
} else if (cellValue == 1) {
return "客流";
} else if (cellValue == 2) {
return "行为分析";
} else if (cellValue == 3) {
return "违停";
} else if (cellValue == 5) {
return "交通行人";
} else if (cellValue == 7) {
return "综合流量";
} else {
return "未知";
}
return algorTypeEnum[cellValue] || "未知";
},
numFormatter(row, column, cellValue, index) {
return (index + 1) * this.page;
......@@ -435,15 +428,15 @@ export default {
task_algo_type: this.task_algo_type,
source_type: "pull_video_stream",
task_type: "normal",
task_name: this.task_name
task_name: this.task_name,
})
.then(res => {
.then((res) => {
this.total = res.total_num;
if (res.list_data == null) {
this.tableData = [];
} else {
res.list_data.forEach(item => {
res.list_data.forEach((item) => {
item.subTaskData = [];
if (item.start_dt) {
//先转utc格式
......@@ -468,7 +461,7 @@ export default {
});
}
})
.catch(error => {});
.catch((error) => {});
},
editVideo(index, row) {
this.setsSrollTop();
......@@ -482,7 +475,7 @@ export default {
if (row.status == "Running") {
this.$message({
type: "info",
message: "暂停任务再尝试操作!"
message: "暂停任务再尝试操作!",
});
return;
}
......@@ -495,8 +488,8 @@ export default {
});
},
setTaskStatus(data, type) {
if(type == 'start') {
localStorage.setItem("substatus",data.task_id)
if (type == "start") {
localStorage.setItem("substatus", data.task_id);
}
this.setsSrollTop();
// if (data.status == "NotInTimeOfDay") {
......@@ -504,14 +497,18 @@ export default {
// }
this.$api.task
.setTaskStatus(data.task_id, { start_stop_status: type })
.then(res => {
.then((res) => {
this.$message({
type: res.ecode == "200" ? "success" : "error",
message: res.enote
message: res.enote,
});
if (res.ecode == "200") {
let typename = type=='start'?"启动":"暂停"
this.$logs.oplogs(res,'serv_task',`${typename}任务${data.task_name}`);
let typename = type == "start" ? "启动" : "暂停";
this.$logs.oplogs(
res,
"serv_task",
`${typename}任务${data.task_name}`
);
this.getTaskList();
}
});
......@@ -520,14 +517,14 @@ export default {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
}).then(() => {
this.$api.task.deleteTask(data.task_id).then(res => {
this.$api.task.deleteTask(data.task_id).then((res) => {
this.$message({
type: res.ecode == "200" ? "success" : "error",
message: res.enote
message: res.enote,
});
this.$logs.oplogs(res,'serv_task',`删除任务${data.task_name}`);
this.$logs.oplogs(res, "serv_task", `删除任务${data.task_name}`);
if (res.ecode == "200") {
this.getTaskList();
}
......@@ -537,7 +534,6 @@ export default {
setsSrollTop() {
this.curscrollTop = this.$refs.table.$el.children[2].scrollTop;
},
},
mounted() {
this.getTaskList();
......@@ -545,7 +541,7 @@ export default {
created() {
this.curscrollTop = 0;
this.getFreelist();
}
},
};
</script>
<style lang="scss" scoped>
......@@ -656,7 +652,7 @@ export default {
}
}
.content {
@include background_color(treeboxbg);
@include background_color(treeboxbg);
}
.inputBox {
margin-right: 20px;
......
const fs = require("fs");
const path = require("path");
const resolve = dir => {
return path.join(__dirname, dir)
}
const vinfopath = "./public/js/version.json";
const BuildInfo = require("./version.js");
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
......@@ -29,18 +33,19 @@ module.exports = {
]
},
chainWebpack: config => {
config.resolve.alias.set("@", resolve("src"));
// config.entry('main').add('babel-polyfill')
if (process.env.use_analyzer) {
// 分析
config
.plugin("webpack-bundle-analyzer")
.use(require("webpack-bundle-analyzer").BundleAnalyzerPlugin);
}
};
if (process.env.NODE_ENV === "production") {
var verinfo = fs.openSync(vinfopath, "w+");
var options = { encoding: "UTF-8", mode: 438 /*=0666*/, flag: "w" };
fs.writeFileSync(verinfo, JSON.stringify(BuildInfo), options);
}
};
},
pluginOptions: {
// 第三方插件配置
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!