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 \ No newline at end of file
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
<script src="<%= BASE_URL %>js/keymaster.js"></script> <script src="<%= BASE_URL %>js/keymaster.js"></script>
<script src="<%= BASE_URL %>js/config.js"></script> <script src="<%= BASE_URL %>js/config.js"></script>
<script src="<%= BASE_URL %>js/flv.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> --> <!-- <script src="<%= BASE_URL %>js/NodePlayer-full.min.js"></script> -->
</head> </head>
<body id="theme-name"> <body id="theme-name">
......
...@@ -19,9 +19,10 @@ window.config = { ...@@ -19,9 +19,10 @@ window.config = {
"huasanDD": 'http://aaa.zzgx.gov.cn/oauth/authorize?response_type=code&scope=read&client_id=KLjmdAH0', "huasanDD": 'http://aaa.zzgx.gov.cn/oauth/authorize?response_type=code&scope=read&client_id=KLjmdAH0',
"ddwsurl":"123.6.38.39:29090", "ddwsurl":"123.6.38.39:29090",
"isdd":false, //是否开启钉钉登录 "isdd":false, //是否开启钉钉登录
"version":"2.1.0", "version":"2.1.1",
"encrypt":false,//是否加密true采用sha1加密,false不加密 "encrypt":false,//是否加密true采用sha1加密,false不加密
"nvsUrl":'http://47.94.37.10:8888', "nvsUrl":'http://47.94.37.10:8888',
"nvsRegex":'rtsp://47.94.37.10/lskjapp/', "nvsRegex":'rtsp://47.94.37.10/lskjapp/',
"isNvs3000":true,//是否开启nvs3000拉取功能 "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 \ No newline at end of file
...@@ -30,10 +30,10 @@ export default { ...@@ -30,10 +30,10 @@ export default {
window.opsTableHeight = document.body.clientHeight - 260 + "px"; window.opsTableHeight = document.body.clientHeight - 260 + "px";
if (document.body.clientWidth > 1366) { if (document.body.clientWidth > 1366) {
window.oneSearchTableHeight = document.body.clientHeight - 280 + "px"; window.oneSearchTableHeight = document.body.clientHeight - 280 + "px";
window.twoSearchTableHeight = document.body.clientHeight - 320 + "px"; window.twoSearchTableHeight = document.body.clientHeight - 330 + "px";
} else { } else {
window.oneSearchTableHeight = document.body.clientHeight - 280 + "px"; 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 = ""; ...@@ -21,7 +21,7 @@ let wsIP = "";
let flvIP = ""; let flvIP = "";
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": 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"; flvIP = window.config.https?"192.168.9.233":"192.168.9.233";
break; break;
case "pre": case "pre":
......
...@@ -9,21 +9,21 @@ ...@@ -9,21 +9,21 @@
let baseUrl = "/api"; // 本地代理 let baseUrl = "/api"; // 本地代理
import axios from "axios"; import axios from "axios";
switch (process.env.NODE_ENV) { switch (process.env.NODE_ENV) {
case "development": case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url // 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 = 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://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086"; baseUrl = "http://123.6.38.39:20080";
// baseUrl = 'http://vion-panda.51vip.biz:52510'; // baseUrl = 'http://vion-panda.51vip.biz:52510';
break; break;
case "pre": case "pre":
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
break; break;
case "production": case "production":
baseUrl = window.config.https?`https://${location.host}`:`http://${location.host}`; // 生产环境url baseUrl = window.config.https ? `https://${location.host}` : `http://${location.host}`; // 生产环境url
break; break;
} }
export default baseUrl; export default baseUrl;
\ No newline at end of file \ No newline at end of file
...@@ -25,15 +25,26 @@ export default { ...@@ -25,15 +25,26 @@ export default {
case "短视频": case "短视频":
url = "/vchans?vchan_type=vfile"; url = "/vchans?vchan_type=vfile";
break; break;
case "视频云设备":
url = "/video_cloud?vchan_type=cloud";
break;
} }
if(window.config.bigtree && devname == "外部设备") { if (window.config.bigtree) {
return `${baseUrl}/api/v1/devconf_fx${url}` //ztree版本 if(devname == "外部设备") {
} else if(devname == "外部设备"){ return `${baseUrl}/api/v1/devconf_fx${url}`; //ztree版本
return api.get(`${baseUrl}/api/v1/devconf_fx/${url}`, params); } else if (devname == "视频云设备") {
} else if(window.config.bigtree){ return `${baseUrl}/api/v1/devconf_fx${url}`; //ztree版本
return `${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}` } else {
}else { return `${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`;
return api.get(`${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 { ...@@ -99,5 +110,11 @@ export default {
}, },
saveConfig:(id,params) => { saveConfig:(id,params) => {
return api.post(`${baseUrl}/api/v1/devconf_fx/content/${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 { ...@@ -136,7 +136,7 @@ export default {
}, },
getcatalogs(params){ getcatalogs(params){
return api.get( return api.get(
`${baseUrl}/api/v1/devconf_fx/device_catalogs`,params `${baseUrl}/api/v1/devconf_fx/device_catalogs`, params
); );
}, },
refreshcatlog(){ refreshcatlog(){
......
...@@ -8,6 +8,9 @@ export default { ...@@ -8,6 +8,9 @@ export default {
detailImg(params, id) { detailImg(params, id) {
return api.get(urls.detailImg + id, params); return api.get(urls.detailImg + id, params);
}, },
detailImgBatch(params) {
return api.post(urls.detailImgBatch, params);
},
detailVideo(params, id) { detailVideo(params, id) {
return api.get(urls.detailvideo + id, params); return api.get(urls.detailvideo + id, params);
}, },
......
import baseUrl from '../baseUrl' import baseUrl from '../baseUrl'
export default { export default {
// 交通方面表格 // 交通方面表格
tableList: baseUrl + '/api/v1/traffic/events', tableList: baseUrl + '/api/v1/traffic/events',
// 事件查询表格 // 事件查询表格
eventTableList: baseUrl + '/api/v1/behavior/events', eventTableList: baseUrl + '/api/v1/behavior/events',
// 获取详情图片 // 获取详情图片
detailImg: baseUrl + '/api/v1/web/pics/', detailImg: baseUrl + '/api/v1/web/pics/',
//批量获取照片
detailImgBatch: baseUrl + '/api/v1/web/pics/batch_get',
// 删除 // 删除
delVehicle: baseUrl + '/api/v1/traffic/events/', delVehicle: baseUrl + '/api/v1/traffic/events/',
// 批量删除 // 批量删除
......
...@@ -56,9 +56,8 @@ class Codes { ...@@ -56,9 +56,8 @@ class Codes {
publicCode() { publicCode() {
try { try {
// eslint-disable-next-line camelcase // 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_date = shoot_dt[0];
this.result.shoot_time = shoot_dt[1]; this.result.shoot_time = shoot_dt[1];
} catch (error) { } catch (error) {
...@@ -144,17 +143,17 @@ class Codes { ...@@ -144,17 +143,17 @@ class Codes {
try { try {
this.result.illegalTypestate = parseInt(this.allData.event_data.illegal.state); this.result.illegalTypestate = parseInt(this.allData.event_data.illegal.state);
this.result.illegalType = this.result.illegalType =
parseInt(this.allData.event_data.illegal.state) === 1 parseInt(this.allData.event_data.illegal.state) === 1 ?
? this.getCode("违法类型", this.allData.event_data.illegal.code) this.getCode("违法类型", this.allData.event_data.illegal.code) :
: "正常"; "正常";
} catch (err) { } catch (err) {
this.result.illegalType = "未识别"; this.result.illegalType = "未识别";
} }
try { try {
this.result.location_name = 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) { } catch (e) {
this.result.location_name = "未识别"; this.result.location_name = "未识别";
} }
...@@ -182,14 +181,14 @@ class Codes { ...@@ -182,14 +181,14 @@ class Codes {
} catch (err) { } catch (err) {
this.result.plate_type_text = "未识别"; this.result.plate_type_text = "未识别";
} }
try { try {
this.result.plate_color_text = this.getCode( this.result.plate_color_text = this.getCode(
"号牌颜色", "号牌颜色",
this.allData.event_data.vehicle.plate.color_code this.allData.event_data.vehicle.plate.color_code
); );
} catch (err) { } catch (err) {
this.result.plate_color_text = "未识别"; this.result.plate_color_text = "未识别";
} }
try { try {
this.result.vehicle_body_color_text = this.getCode( this.result.vehicle_body_color_text = this.getCode(
"车身颜色", "车身颜色",
...@@ -227,7 +226,7 @@ class Codes { ...@@ -227,7 +226,7 @@ class Codes {
} catch (e) { } catch (e) {
// console.log("遮阳板无"); // console.log("遮阳板无");
} }
if (ary.length) { if (ary.length) {
this.result.RefinedFeature_text = ary.join(""); this.result.RefinedFeature_text = ary.join("");
} else { } else {
...@@ -290,9 +289,9 @@ class Codes { ...@@ -290,9 +289,9 @@ class Codes {
// 违法类型 // 违法类型
try { try {
this.result.illegalType = this.result.illegalType =
parseInt(this.allData.event_data.illegal.state) === 1 parseInt(this.allData.event_data.illegal.state) === 1 ?
? this.getCode("违法类型", this.allData.event_data.illegal.code) this.getCode("违法类型", this.allData.event_data.illegal.code) :
: "正常"; "正常";
} catch (err) { } catch (err) {
this.result.illegalType = "未识别"; this.result.illegalType = "未识别";
} }
...@@ -334,9 +333,9 @@ class Codes { ...@@ -334,9 +333,9 @@ class Codes {
// 地点名称 // 地点名称
try { try {
this.result.location_name = 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) { } catch (e) {
this.result.location_name = "未识别"; this.result.location_name = "未识别";
} }
...@@ -347,7 +346,7 @@ class Codes { ...@@ -347,7 +346,7 @@ class Codes {
} catch (error) { } catch (error) {
this.result.xcycle_plate_text = "未识别"; this.result.xcycle_plate_text = "未识别";
} }
// 骑车类型 // 骑车类型
// console.log(this.allData.event_data.xcycle_type) // console.log(this.allData.event_data.xcycle_type)
if (!this.allData.event_data.xcycle_type) { if (!this.allData.event_data.xcycle_type) {
...@@ -371,27 +370,37 @@ class Codes { ...@@ -371,27 +370,37 @@ class Codes {
this.result.xcycle_type_text = "未识别"; this.result.xcycle_type_text = "未识别";
} }
} }
console.log('company',this.allData.event_data.xcycle.company.code)
try { try {
if (this.result.xcycle_type_text === "自行车") { if (this.event_type === 'xcycle') {
this.result.company = this.allData.event_data.xcycle.company.name; this.result.company = this.getCode(
} else if (this.result.xcycle_type_text === "摩托车") { "运营公司",
this.result.company = this.getCode( this.allData.event_data.xcycle.company.code
"外卖公司", );
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 { } else {
this.result.company = ""; this.result.company = "未识别";
} }
} catch (error) { } catch (error) {
this.result.company = "未识别"; 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() {} pflow() {}
...@@ -403,7 +412,7 @@ class Codes { ...@@ -403,7 +412,7 @@ class Codes {
} }
getCode(codeName, code) { getCode(codeName, code) {
var name = window.localStorage.getItem(codeName + "-" + code); var name = window.localStorage.getItem(codeName + "-" + code);
name = name || ""; name = name || "未识别";
return name; return name;
} }
/** /**
...@@ -451,13 +460,13 @@ class Codes { ...@@ -451,13 +460,13 @@ class Codes {
bjTime = new Date(time); bjTime = new Date(time);
} }
var standardTime = [ var standardTime = [
[bjTime.getFullYear(), bjTime.getMonth() + 1, bjTime.getDate()].join("-"), [bjTime.getFullYear(), bjTime.getMonth() + 1, bjTime.getDate()].join("-"),
[bjTime.getHours(), bjTime.getMinutes(), bjTime.getSeconds()].join(":") [bjTime.getHours(), bjTime.getMinutes(), bjTime.getSeconds()].join(":")
] ]
.join(" ") .join(" ")
.replace(/(?=\b\d\b)/g, "0"); .replace(/(?=\b\d\b)/g, "0");
return standardTime; return standardTime;
} }
} }
export let buildCode = new Codes(); export let buildCode = new Codes();
\ No newline at end of file \ No newline at end of file
import Vue from "vue"; import Vue from "vue";
import { buildImgurl } from "@/libs/utils";
Vue.prototype.dev_unid = "2cb6e39adc5176b81879f6c22f1d9e1c"; Vue.prototype.dev_unid = "2cb6e39adc5176b81879f6c22f1d9e1c";
/** /**
* @param {unid} 设备id * @param {unid} 设备id
*/ */
Vue.prototype.setDevunid = function(devuid) { Vue.prototype.setDevunid = function (devuid) {
Vue.prototype.dev_unid = devuid; Vue.prototype.dev_unid = devuid;
}; };
/** /**
* tar文件上传设置 * tar文件上传设置
*/ */
Vue.prototype.uploadFile = function(file, type, size) { Vue.prototype.uploadFile = function (file, type, size) {
const isType = file.raw.type === type; const isType = file.raw.type === type;
let isSize = true; let isSize = true;
if (size) { if (size) {
...@@ -27,7 +28,7 @@ Vue.prototype.uploadFile = function(file, type, size) { ...@@ -27,7 +28,7 @@ Vue.prototype.uploadFile = function(file, type, size) {
}; };
Vue.prototype.globalWs = null; Vue.prototype.globalWs = null;
Vue.prototype.getCode = function(codeName, code) { Vue.prototype.getCode = function (codeName, code) {
var name = window.localStorage.getItem(codeName + "-" + code); var name = window.localStorage.getItem(codeName + "-" + code);
name = name ? name : ""; name = name ? name : "";
return name; return name;
...@@ -36,10 +37,10 @@ Vue.prototype.getCode = function(codeName, code) { ...@@ -36,10 +37,10 @@ Vue.prototype.getCode = function(codeName, code) {
* @param {src} 图片路径 * @param {src} 图片路径
* 图片放大 * 图片放大
*/ */
Vue.prototype.zoomImg = function(data) { Vue.prototype.zoomImg = function (data) {
store.commit("setImgsrc", data); store.commit("setImgsrc", data);
}; };
Vue.filter("sexfn", function(value) { Vue.filter("sexfn", function (value) {
if (!value) return; if (!value) return;
var str = ""; var str = "";
if (value == 1) str = "男"; if (value == 1) str = "男";
...@@ -47,7 +48,7 @@ Vue.filter("sexfn", function(value) { ...@@ -47,7 +48,7 @@ Vue.filter("sexfn", function(value) {
return str; return str;
}); });
Vue.filter("dbnamefn", function(value) { Vue.filter("dbnamefn", function (value) {
let dbData = store.state.initinfo.facedbdata, let dbData = store.state.initinfo.facedbdata,
dbname = ""; dbname = "";
dbData.forEach(ele => { dbData.forEach(ele => {
...@@ -58,7 +59,7 @@ Vue.filter("dbnamefn", function(value) { ...@@ -58,7 +59,7 @@ Vue.filter("dbnamefn", function(value) {
return dbname; return dbname;
}); });
Vue.filter("filterDeployType", function(value) { Vue.filter("filterDeployType", function (value) {
let dbData = store.state.alarmtype, let dbData = store.state.alarmtype,
dbname = ""; dbname = "";
dbData.forEach(ele => { dbData.forEach(ele => {
...@@ -73,7 +74,7 @@ Vue.filter("filterDeployType", function(value) { ...@@ -73,7 +74,7 @@ Vue.filter("filterDeployType", function(value) {
* @param {provenceid} 省份id * @param {provenceid} 省份id
* @param {cityid} 城市id * @param {cityid} 城市id
*/ */
Vue.prototype.showCity = function(provenceid, cityid) { Vue.prototype.showCity = function (provenceid, cityid) {
this.cData = this.$store.state.initinfo.province; this.cData = this.$store.state.initinfo.province;
var province = provenceid; var province = provenceid;
var provinceNmae = ""; var provinceNmae = "";
...@@ -81,7 +82,7 @@ Vue.prototype.showCity = function(provenceid, cityid) { ...@@ -81,7 +82,7 @@ Vue.prototype.showCity = function(provenceid, cityid) {
var curProvince = ""; var curProvince = "";
var city = cityid; var city = cityid;
if (province) { if (province) {
this.cData.forEach(function(ele) { this.cData.forEach(function (ele) {
if (ele.code == province) { if (ele.code == province) {
if (ele.cities) curProvince = ele.cities; if (ele.cities) curProvince = ele.cities;
provinceNmae = ele.name; provinceNmae = ele.name;
...@@ -89,7 +90,7 @@ Vue.prototype.showCity = function(provenceid, cityid) { ...@@ -89,7 +90,7 @@ Vue.prototype.showCity = function(provenceid, cityid) {
}, this); }, this);
if (city) { if (city) {
if (curProvince) if (curProvince)
curProvince.list_data.forEach(function(ele) { curProvince.list_data.forEach(function (ele) {
if (ele.code == city) { if (ele.code == city) {
cityName = ele.name; cityName = ele.name;
} }
...@@ -105,7 +106,7 @@ Vue.prototype.showCity = function(provenceid, cityid) { ...@@ -105,7 +106,7 @@ Vue.prototype.showCity = function(provenceid, cityid) {
* @param {obj} * @param {obj}
* 格式化时间 * 格式化时间
*/ */
Vue.prototype.timeForm = function(obj) { Vue.prototype.timeForm = function (obj) {
var nowY = obj.getFullYear(); var nowY = obj.getFullYear();
var nowM = var nowM =
obj.getMonth() + 1 < 10 ? "0" + (obj.getMonth() + 1) : obj.getMonth() + 1; obj.getMonth() + 1 < 10 ? "0" + (obj.getMonth() + 1) : obj.getMonth() + 1;
...@@ -117,12 +118,12 @@ Vue.prototype.timeForm = function(obj) { ...@@ -117,12 +118,12 @@ Vue.prototype.timeForm = function(obj) {
nowY + "-" + nowM + "-" + nowD + " " + nowH + ":" + nowMi + ":" + nowS; nowY + "-" + nowM + "-" + nowD + " " + nowH + ":" + nowMi + ":" + nowS;
return timeNow; return timeNow;
}; };
Vue.prototype.yesterDay = function() { Vue.prototype.yesterDay = function () {
var data = new Date().getTime() - 24 * 60 * 60 * 1000; var data = new Date().getTime() - 24 * 60 * 60 * 1000;
var curdate = this.timeForm(new Date(data)); var curdate = this.timeForm(new Date(data));
return curdate.split(" ")[0] + " " + "00:00:00"; return curdate.split(" ")[0] + " " + "00:00:00";
}; };
Vue.prototype.nowDay = function(){ Vue.prototype.nowDay = function () {
var data = new Date(); var data = new Date();
return this.timeForm(data); return this.timeForm(data);
}; };
...@@ -130,7 +131,7 @@ Vue.prototype.nowDay = function(){ ...@@ -130,7 +131,7 @@ Vue.prototype.nowDay = function(){
* @param {obj} * @param {obj}
* UTC时间处理 * UTC时间处理
*/ */
Vue.prototype.setUtcTime = function(obj) { Vue.prototype.setUtcTime = function (obj) {
if (obj && obj != "") { if (obj && obj != "") {
let num = new Date(obj).getTime(); let num = new Date(obj).getTime();
let offset = Math.abs(new Date().getTimezoneOffset()); let offset = Math.abs(new Date().getTimezoneOffset());
...@@ -168,7 +169,7 @@ function checkIE() { ...@@ -168,7 +169,7 @@ function checkIE() {
} }
} }
let sha1 = require('js-sha1') let sha1 = require('js-sha1')
Vue.prototype.baseencode = function(str){ Vue.prototype.baseencode = function (str) {
// return str // return str
// let base = ""; // let base = "";
// let version = window.config.version // let version = window.config.version
...@@ -178,7 +179,7 @@ Vue.prototype.baseencode = function(str){ ...@@ -178,7 +179,7 @@ Vue.prototype.baseencode = function(str){
// if(vs > 210) { // if(vs > 210) {
// base = str; // base = str;
// } else { // } else {
// } // }
// } else { // } else {
// base = sha1(str); // base = sha1(str);
...@@ -190,7 +191,7 @@ Vue.prototype.baseencode = function(str){ ...@@ -190,7 +191,7 @@ Vue.prototype.baseencode = function(str){
return base return base
// return sha1(str); // return sha1(str);
} }
Vue.prototype.showLocalTime = function(obj) { Vue.prototype.showLocalTime = function (obj) {
if (obj == undefined) return; if (obj == undefined) return;
let dt = "", let dt = "",
ndt = ""; ndt = "";
...@@ -223,11 +224,11 @@ Vue.prototype.showLocalTime = function(obj) { ...@@ -223,11 +224,11 @@ Vue.prototype.showLocalTime = function(obj) {
* @param {*} key * @param {*} key
* @param {*} val * @param {*} val
*/ */
Vue.prototype.uuid = function() { Vue.prototype.uuid = function () {
var s = []; var s = [];
var hexDigits = "0123456789abcdef"; var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) { 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[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 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() { ...@@ -239,7 +240,7 @@ Vue.prototype.uuid = function() {
/** /**
* 本地存储相机信息 * 本地存储相机信息
*/ */
Vue.prototype.setCameralocalStor = function(key, val) { Vue.prototype.setCameralocalStor = function (key, val) {
if (window.localStorage) { if (window.localStorage) {
localStorage[key] = val; localStorage[key] = val;
} else { } else {
...@@ -251,7 +252,7 @@ Vue.prototype.setCameralocalStor = function(key, val) { ...@@ -251,7 +252,7 @@ Vue.prototype.setCameralocalStor = function(key, val) {
* @param {key} * @param {key}
* 获取本地存储相机信息 * 获取本地存储相机信息
*/ */
Vue.prototype.getCameralocalStor = function(key) { Vue.prototype.getCameralocalStor = function (key) {
var val = ""; var val = "";
if (window.localStorage) { if (window.localStorage) {
val = localStorage[key]; val = localStorage[key];
...@@ -264,7 +265,7 @@ Vue.prototype.getCameralocalStor = function(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 isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 2;
...@@ -280,7 +281,7 @@ Vue.prototype.uploadImgCondition = function(file) { ...@@ -280,7 +281,7 @@ Vue.prototype.uploadImgCondition = function(file) {
/** /**
* base64图片 * base64图片
*/ */
Vue.prototype.base64Img = function(file) { Vue.prototype.base64Img = function (file) {
// eslint-disable-next-line no-redeclare // eslint-disable-next-line no-redeclare
var file = file.file; var file = file.file;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -289,7 +290,7 @@ Vue.prototype.base64Img = function(file) { ...@@ -289,7 +290,7 @@ Vue.prototype.base64Img = function(file) {
if (file) { if (file) {
reader.readAsDataURL(file); reader.readAsDataURL(file);
} }
reader.onloadend = function(evt) { reader.onloadend = function (evt) {
srcs = reader.result.split(",")[1]; srcs = reader.result.split(",")[1];
let data = { let data = {
pic_base64: srcs, pic_base64: srcs,
...@@ -305,18 +306,14 @@ Vue.prototype.base64Img = function(file) { ...@@ -305,18 +306,14 @@ Vue.prototype.base64Img = function(file) {
/** /**
* 判断是否是chrome浏览器 * 判断是否是chrome浏览器
*/ */
Vue.prototype.checkchrome = function() { Vue.prototype.checkchrome = function () {
var isWebKit = navigator.userAgent.indexOf('WebKit') > -1 // var isWebKit = navigator.userAgent.indexOf('WebKit') > -1 //
return isWebKit return isWebKit
}; };
/** /**
* https路径处理 * https路径处理
*/ */
Vue.prototype.buildImgurl = function(url){ Vue.prototype.buildImgurl = buildImgurl;
let uri = window.config.https? url.replace('http','https'):url;
let result = window.config.https? uri.replace('20080','20070'):uri;
return result
}
/** /**
* code操作 * code操作
...@@ -337,4 +334,4 @@ Vue.prototype.getCode = (codeName, code) => { ...@@ -337,4 +334,4 @@ Vue.prototype.getCode = (codeName, code) => {
var name = localStorage.getItem(codeName + "-" + code); var name = localStorage.getItem(codeName + "-" + code);
name = name ? name : ""; name = name ? name : "";
return name; return name;
}; };
\ No newline at end of file \ No newline at end of file
...@@ -182,6 +182,9 @@ ...@@ -182,6 +182,9 @@
.el-table--small td, .el-table--small th{ .el-table--small td, .el-table--small th{
padding: 8px 0; 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{ .el-table--border::after, .el-table--group::after, .el-table::before{
// background-color: rgba(0,0,0,0); // background-color: rgba(0,0,0,0);
} }
...@@ -267,6 +270,9 @@ display: table-cell!important; ...@@ -267,6 +270,9 @@ display: table-cell!important;
.el-dialog .el-select--small{ .el-dialog .el-select--small{
width: 100%; 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{ /* .el-dialog .el-form-item--small .el-form-item__content,.el-dialog .el-form-item--small .el-form-item__label{
line-height: 26px; line-height: 26px;
} */ } */
...@@ -285,7 +291,7 @@ display: table-cell!important; ...@@ -285,7 +291,7 @@ display: table-cell!important;
margin-left: -10px; margin-left: -10px;
} }
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item { .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
margin-bottom: 4px; margin-bottom: 15px;
line-height: 32px; line-height: 32px;
} }
/* 切换 */ /* 切换 */
......
...@@ -566,6 +566,9 @@ a:active{ ...@@ -566,6 +566,9 @@ a:active{
transform:none; transform:none;
left: 0; left: 0;
} }
.el-image-viewer__wrapper {
z-index: 3600 !important;
}
.detailDialog .el-icon-circle-close{ .detailDialog .el-icon-circle-close{
color: #fff; color: #fff;
} }
...@@ -649,7 +652,7 @@ a:active{ ...@@ -649,7 +652,7 @@ a:active{
} }
.listboxitem .el-form-item--small .el-form-item__content, .el-form-item--small .el-form-item__label { .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; padding-left: 5px;
} }
.displaybtn-box { .displaybtn-box {
......
<template> <template>
<div style="width: 100%;height: 100%;position: relative;"> <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> <p
<object v-show="videoShow" id="nvrTotalOcx" name="nvrTotalOcx" style="
classid="CLSID:96DFBBAF-4220-4978-9681-4ABA534A7718" position: absolute;
codebase="./static/OcxInstall/VionNvrVideoInstall.exe#version=1,0,24" top: 113px;
style="width: 100%; height:100%;"> z-index: 99;
<param name="BorderStyle" value="1" /> text-align: center;
<param name="MousePointer" value="0" /> width: 100%;
<param name="Enabled" value="1" /> "
<param name="Min" value="0" /> v-if="noIE"
<param name="Max" value="10" /> >
<embed wmode="opaque"/> 请选择IE9以上版本查看视频!
<param name="wmode" value="transparent"/> </p>
</object> <object
<!--安装弹框--> v-show="videoShow"
<el-dialog title="提示" :visible.sync="stepDialogVisible" width='252px' :close-on-click-modal='false' @close="stepClose"> id="nvrTotalOcx"
<span>本网站需要安装视频插件才可正常使用,请安装完成后请手动重启浏览器</span> name="nvrTotalOcx"
<div slot="footer" class="dialog-footer"> classid="CLSID:96DFBBAF-4220-4978-9681-4ABA534A7718"
<el-button @click="stepDialogVisible = false">关闭</el-button> codebase="./static/OcxInstall/VionNvrVideoInstall.exe#version=1,0,24"
</div> style="width: 100%; height: 100%"
</el-dialog> >
<!--更新弹框--> <param name="BorderStyle" value="1" />
<el-dialog title="提示" :visible.sync="updateDialogVisible" width='252px' :close-on-click-modal='false' @close="stepClose"> <param name="MousePointer" value="0" />
<span>该网站当前视频插件版本为{{currentVersion}},可能导致部分功能不完善,请更新到最新版本1.0.33</span> <param name="Enabled" value="1" />
<div slot="footer" class="dialog-footer"> <param name="Min" value="0" />
<el-button @click="updateDialogVisible = false">关闭</el-button> <param name="Max" value="10" />
</div> <embed wmode="opaque" />
</el-dialog> <param name="wmode" value="transparent" />
</div> </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> </template>
<script> <script>
export default{ export default {
data(){ data() {
return{ return {
videoShow:true, videoShow: true,
noIE:false, noIE: false,
currentVersion:0, currentVersion: 0,
updateDialogVisible:false, updateDialogVisible: false,
stepDialogVisible:false stepDialogVisible: false,
} };
}, },
mounted(){ mounted() {
setTimeout(()=>{ setTimeout(() => {
this.initVideo(); this.initVideo();
},300) }, 300);
}, },
methods:{ methods: {
stepClose(){ stepClose() {
this.videoShow=true; this.videoShow = true;
}, },
initVideo(){ initVideo() {
var ieVer=this.IEVersion(); var ieVer = this.IEVersion();
if(ieVer==7||ieVer==8||ieVer==6||ieVer=='-1'){ if (ieVer == 7 || ieVer == 8 || ieVer == 6 || ieVer == "-1") {
this.noIE=true this.noIE = true;
}else{ } else {
this.noIE=false this.noIE = false;
try{ try {
this.currentVersion=document.getElementById('nvrTotalOcx').GetOcxVersion(); this.currentVersion = document
var versionArr=this.currentVersion.split('.'); .getElementById("nvrTotalOcx")
var versionNum=0; .GetOcxVersion();
versionArr.forEach((item,index,arr)=>{ var versionArr = this.currentVersion.split(".");
versionNum=versionNum+Number(item); var versionNum = 0;
}) versionArr.forEach((item, index, arr) => {
if(versionNum<34){ versionNum = versionNum + Number(item);
this.videoShow=false; });
this.updateDialogVisible=true; if (versionNum < 34) {
window.open('./OcxInstall/NvrVideoInstall_1.0.33.exe') this.videoShow = false;
} this.updateDialogVisible = true;
}catch(e){ window.open("./OcxInstall/NvrVideoInstall_1.0.33.exe");
this.videoShow=false; }
this.stepDialogVisible=true; } catch (e) {
window.open('./OcxInstall/NvrVideoInstall_1.0.33.exe') this.videoShow = false;
return 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); if (typeof nvrTotalOcx != "undefined") {
nvrTotalOcx.SetSingleWindow(true); var testStr = "Null";
nvrTotalOcx.SetParam("VideoSize", 0); nvrTotalOcx.Init(0, testStr, 1);
var medianame = '视频0'; nvrTotalOcx.SetSingleWindow(true);
// var hostname = window.location.hostname; nvrTotalOcx.SetParam("VideoSize", 0);
var hostname = '192.168.9.120'; var medianame = "视频0";
var port=8554; // var hostname = window.location.hostname;
var url = "rtsp://"+hostname+":"+port+"/ch0"; var hostname = "192.168.9.120";
nvrTotalOcx.PlayRealVideo(url,1,'video',hostname,0); var port = 8554;
window.onbeforeunload=function(){ var url = "rtsp://" + hostname + ":" + port + "/ch0";
nvrTotalOcx.CloseVideoByChannelnum(1) nvrTotalOcx.PlayRealVideo(url, 1, "video", hostname, 0);
} window.onbeforeunload = function () {
nvrTotalOcx.CloseVideoByChannelnum(1);
} };
}, }
IEVersion() { },
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 IEVersion() {
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 var isIE =
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
if(isIE) { var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); var isIE11 =
reIE.test(userAgent); userAgent.indexOf("Trident") > -1 && userAgent.indexOf("rv:11.0") > -1;
var fIEVersion = parseFloat(RegExp["$1"]); if (isIE) {
if(fIEVersion == 7) { var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
return 7; reIE.test(userAgent);
} else if(fIEVersion == 8) { var fIEVersion = parseFloat(RegExp["$1"]);
return 8; if (fIEVersion == 7) {
} else if(fIEVersion == 9) { return 7;
return 9; } else if (fIEVersion == 8) {
} else if(fIEVersion == 10) { return 8;
return 10; } else if (fIEVersion == 9) {
} else { return 9;
return 6;//IE版本<=7 } else if (fIEVersion == 10) {
} return 10;
} else if(isEdge) { } else {
return 'edge';//edge return 6; //IE版本<=7
} else if(isIE11) { }
return 11; //IE11 } else if (isEdge) {
}else{ return "edge"; //edge
return -1;//不是ie浏览器 } else if (isIE11) {
} return 11; //IE11
}, } else {
hideHanlde(){ return -1; //不是ie浏览器
this.videoShow=false; }
}, },
showHanlde(){ hideHanlde() {
this.videoShow=true; this.videoShow = false;
} },
} showHanlde() {
} this.videoShow = true;
},
},
};
</script> </script>
<style> <style>
......
<template> <template>
<div class="video-box"> <div class="video-box">
<el-dialog title="录像" :visible.sync="videoDialogVisible"> <el-dialog title="录像" :visible.sync="videoDialogVisible">
<video id="playerVideo" class="dom-video" controls muted></video> <video id="playerVideo" class="dom-video" controls muted></video>
<div slot="footer" class="player-footer"> <div slot="footer" class="player-footer">
<button @click="closeVideoDialog">关闭</button> <button @click="closeVideoDialog">关闭</button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import {config} from '../../public/js/config' // import {config} from '../../public/js/config'
export default { export default {
data () { data() {
return { return {
videoDialogVisible: false, videoDialogVisible: false,
domTimer: null, domTimer: null,
player: '' player: "",
} };
}, },
methods: { methods: {
playvideos: function (play_url) { playvideos: function (play_url) {
let _this = this; let _this = this;
this.videoDialogVisible = true; this.videoDialogVisible = true;
this.domTimer = setTimeout(() => { this.domTimer = setTimeout(() => {
this.player = document.getElementById('playerVideo'); this.player = document.getElementById("playerVideo");
this.player.loop = true; this.player.loop = true;
if(window.config.https) { if (window.config.https) {
let loc = location.host let loc = location.host;
this.player.src = `https://${loc}/${play_url.split(":20080")[1]}` this.player.src = `https://${loc}/${play_url.split(":20080")[1]}`;
} else { } else {
this.player.src = play_url; 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;
}
} }
} 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> </script>
<style scoped> <style scoped>
.dom-video { .dom-video {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 5px; border-radius: 5px;
} }
.player-footer button { .player-footer button {
padding: 0 2%; padding: 0 2%;
} }
</style> </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 \ 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 \ No newline at end of file
...@@ -23,6 +23,8 @@ Vue.prototype.$moment = moment; ...@@ -23,6 +23,8 @@ Vue.prototype.$moment = moment;
Vue.prototype.$buildCode = buildCode; Vue.prototype.$buildCode = buildCode;
Vue.prototype.oParse = new XML.ObjTree(); Vue.prototype.oParse = new XML.ObjTree();
Vue.prototype.axios = axios; Vue.prototype.axios = axios;
Vue.prototype.$pageSizeOpts = [10, 30, 50, 100];
Vue.prototype.$pageSize = 10;
// import VueParticles from "vue-particles"; // import VueParticles from "vue-particles";
Vue.use(api); Vue.use(api);
Vue.use(log); Vue.use(log);
......
<template> <template>
<div> <div></div>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {};
},
} created() {},
}, };
created(){
}
}
</script> </script>
<style> <style>
</style>> </style>>
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,16 @@ ...@@ -12,6 +12,16 @@
}" }"
@click="openmenu" @click="openmenu"
></span> ></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"> <div class="headRight">
<span class="timerbox">{{ curdate }}</span> <span class="timerbox">{{ curdate }}</span>
<el-dropdown class="zt-box" @command="handleCommand"> <el-dropdown class="zt-box" @command="handleCommand">
...@@ -70,9 +80,17 @@ export default { ...@@ -70,9 +80,17 @@ export default {
headertitle: "", headertitle: "",
topbarArr: [], topbarArr: [],
uname: "", uname: "",
jumpSanList: []
}; };
}, },
methods: { methods: {
jumpHandler(item) {
if(item.ddPath && location.href.includes('code')) {
window.open(item.ddPath);
} else {
window.open(item.path);
}
},
setTopBar(data) { setTopBar(data) {
if (this.topbarArr.length < 1) { if (this.topbarArr.length < 1) {
this.topbarArr.push(data); this.topbarArr.push(data);
...@@ -177,6 +195,20 @@ export default { ...@@ -177,6 +195,20 @@ export default {
}, },
}, },
created() { 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.headertitle = window.config.hadertitle;
this.uname = localStorage.getItem("uname"); this.uname = localStorage.getItem("uname");
this.$api.device.getDev().then((m) => { this.$api.device.getDev().then((m) => {
...@@ -308,7 +340,7 @@ export default { ...@@ -308,7 +340,7 @@ export default {
color: #fff; color: #fff;
font-size: 25px; font-size: 25px;
margin-left: 25px; margin-left: 25px;
margin-top: 20px; vertical-align: -4px;
} }
.headRight img { .headRight img {
...@@ -352,4 +384,21 @@ export default { ...@@ -352,4 +384,21 @@ export default {
.uname-box { .uname-box {
padding-right: 10px; 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> </style>
...@@ -71,8 +71,14 @@ ...@@ -71,8 +71,14 @@
</template> </template>
<script> <script>
import moment from "moment";
let particlesConfig = require("../assets/js/particles.json"); 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"); let sha1 = require("js-sha1");
import types from "../store/types.js"; import types from "../store/types.js";
export default { export default {
...@@ -143,15 +149,15 @@ export default { ...@@ -143,15 +149,15 @@ export default {
}) })
.then((res) => { .then((res) => {
if (!res.ecode) { if (!res.ecode) {
if(res.user_name !== this.ruleForm.username){ if (res.user_name !== this.ruleForm.username) {
return false; return false;
} }
this.loginMount(res, "user"); this.loginMount(res, "user");
} else { } else {
if (res.ecode == "1000") { if (res.ecode == "1000") {
localStorage.setItem("user_unid", res.user_unid); localStorage.setItem("user_unid", res.user_unid);
localStorage.setItem("atoken", res.atoken); localStorage.setItem("atoken", res.atoken);
this.$router.push("/resetpass") this.$router.push("/resetpass");
} else { } else {
this.$logs.oplogs(res, "serv_login", res.enote); this.$logs.oplogs(res, "serv_login", res.enote);
this.$message({ this.$message({
...@@ -341,9 +347,9 @@ export default { ...@@ -341,9 +347,9 @@ export default {
particlesJS("login", particlesConfig); particlesJS("login", particlesConfig);
document.body.style.overflow = "hidden"; document.body.style.overflow = "hidden";
let { href } = window.location, let { href } = window.location,
code = ""; code = "";
if (href.includes("code")) { if (href.includes("code")) {
this.$router.push('/ddlogin') this.$router.push("/ddlogin");
} }
}, },
created() { created() {
......
<template> <template>
<div class="passform-box"> <div class="passform-container">
<div class="re-header">重置密码</div> <div class="passform-box">
<el-form <div class="re-header">重置密码</div>
:model="ruleForm" <el-form
:rules="rules" :model="ruleForm"
ref="ruleForm" :rules="rules"
label-width="100px" ref="ruleForm"
class="passform" label-width="100px"
> class="passform"
<div class="passformitem"> >
<el-form-item label="旧密码" prop="oldpassword"> <div class="passformitem">
<el-input v-model="ruleForm.oldpassword" type="password"></el-input> <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> </el-form-item>
</div> </el-form>
<div class="passformitem"> </div>
<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>
</div> </div>
</template> </template>
<script> <script>
let sha1 = require('js-sha1') let sha1 = require("js-sha1");
export default { export default {
data() { data() {
var validatePass = (rule, value, callback) => { var validatePass = (rule, value, callback) => {
if (value === "") { if (value === "") {
callback(new Error("请输入密码")); callback(new Error("请输入密码"));
} else { } else {
if(value == this.ruleForm.oldpassword) { if (value == this.ruleForm.oldpassword) {
callback(new Error("新旧密码不能重复!")); callback(new Error("新旧密码不能重复!"));
return 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)) { if (!pwdRegex.test(value)) {
callback(new Error("您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!")) callback(
new Error(
"您的密码复杂度太低(密码中必须包含大写和小写字母、数字、特殊字符长度大于8位),请及时修改密码!"
)
);
} }
if (this.ruleForm.checkPass !== "") { if (this.ruleForm.checkPass !== "") {
this.$refs.ruleForm.validateField("checkPass"); this.$refs.ruleForm.validateField("checkPass");
...@@ -71,57 +79,63 @@ export default { ...@@ -71,57 +79,63 @@ export default {
ruleForm: { ruleForm: {
oldpassword: "", oldpassword: "",
newpassword: "", newpassword: "",
checknewpassword: "" checknewpassword: "",
}, },
rules: { rules: {
oldpassword: [ oldpassword: [
{ required: true, message: "请输入旧密码", trigger: "blur" } { required: true, message: "请输入旧密码", trigger: "blur" },
], ],
newpassword: [ newpassword: [
{ validator: validatePass, trigger: "blur" }, { validator: validatePass, trigger: "blur" },
{ required: true, message: "", trigger: "blur" } { required: true, message: "", trigger: "blur" },
], ],
checknewpassword: [ checknewpassword: [
{ validator: validatePass2, trigger: "blur" }, { validator: validatePass2, trigger: "blur" },
{ required: true, message: "", trigger: "blur" } { required: true, message: "", trigger: "blur" },
] ],
} },
}; };
}, },
methods: { methods: {
submitForm(formName) { submitForm(formName) {
let data = { let data = {
old_pwd: window.config.encrypt?sha1(this.ruleForm.oldpassword):this.baseencode(this.ruleForm.oldpassword), old_pwd: window.config.encrypt
new_pwd: window.config.encrypt?sha1(this.ruleForm.newpassword):this.baseencode(this.ruleForm.newpassword), ? 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) { if (valid) {
let user_unid = localStorage.getItem("user_unid"); let user_unid = localStorage.getItem("user_unid");
this.$api.ops.resetPwd(data, user_unid).then(res => { this.$api.ops
if(res.ecode == 200){ .resetPwd(data, user_unid)
this.$logs.oplogs(res, "serv_login", `修改密码`); .then((res) => {
this.$router.push("/login"); if (res.ecode == 200) {
this.$message({ this.$logs.oplogs(res, "serv_login", `修改密码`);
type: "success", this.$router.push("/login");
message: res.enote this.$message({
}); type: "success",
} else { message: res.enote,
this.$logs.oplogs(res, "serv_login", `修改密码${res.enote}`); });
this.$message({ } else {
type: "error", this.$logs.oplogs(res, "serv_login", `修改密码${res.enote}`);
message: res.enote this.$message({
}); type: "error",
} message: res.enote,
});
}).catch(err => { }
if (err.response) { })
this.$message({ .catch((err) => {
type: "error", if (err.response) {
message: err.response.data.enote this.$message({
}); type: "error",
} message: err.response.data.enote,
}); });
}
});
} else { } else {
console.log("error submit!!"); console.log("error submit!!");
return false; return false;
...@@ -133,12 +147,18 @@ export default { ...@@ -133,12 +147,18 @@ export default {
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
} },
} },
}; };
</script> </script>
<style> <style>
.passform-container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
}
.passform { .passform {
margin: 20px; margin: 20px;
width: 400px; width: 400px;
...@@ -146,10 +166,11 @@ export default { ...@@ -146,10 +166,11 @@ export default {
.passformitem { .passformitem {
margin-bottom: 20px; margin-bottom: 20px;
} }
.passform-box{ .passform-box {
width: 400px; width: 400px;
margin-top: 10%;
} }
.re-header{ .re-header {
margin-left: 60px; margin-left: 60px;
margin-top: 20px; margin-top: 20px;
} }
......
<template> <template>
<div class="info-dialog" v-if="infoDialogShow"> <div class="info-dialog" v-if="infoDialogShow">
<iframe :src="iframeSrc" ref="infoIframe" frameborder="0" class="info-iframe"></iframe> <iframe
</div> :src="iframeSrc"
ref="infoIframe"
frameborder="0"
class="info-iframe"
></iframe>
</div>
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from "vue";
export default { export default {
data () { data() {
return { return {
infoDialogShow: false, infoDialogShow: false,
iframeSrc: '', iframeSrc: "",
visiableTimer: null visiableTimer: null,
} };
}, },
methods: { methods: {
showInfo(info, isVisible, type) { showInfo(info, isVisible, type) {
this.infoDialogShow = true; this.infoDialogShow = true;
window.infoDialogVm = this; window.infoDialogVm = this;
if(arguments.length > 1) { if (arguments.length > 1) {
this.infoDialogShow = isVisible; this.infoDialogShow = isVisible;
switch (type) { switch (type) {
case 'info': case "info":
this.iframeSrc = 'static/infoDialog.html'; this.iframeSrc = "static/infoDialog.html";
break; break;
case 'picDetail': case "picDetail":
this.iframeSrc = 'static/picDetailDialog.html'; this.iframeSrc = "static/picDetailDialog.html";
break; break;
case 'paramSetting': case "paramSetting":
this.iframeSrc = 'static/paramSettingDialog.html'; this.iframeSrc = "static/paramSettingDialog.html";
break; break;
default: default:
break; break;
} }
} else if(arguments.length == 1) { } else if (arguments.length == 1) {
this.iframeSrc = 'static/infoDialog.html'; this.iframeSrc = "static/infoDialog.html";
} else { } else {
return; 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) { } catch (err) {
let self = this; this.infoDialogShow = false;
if(self && !self._isDestroyed) { eval("console.log('自定义弹窗changeText异常:', err.message)");
self.visiableTimer = setTimeout(() => { }
try { } else {
this.$refs.infoIframe.contentWindow.globalVm = this; try {
} catch (error) { } if (this.$refs.infoIframe.contentWindow) {
if(type == undefined) { this.$refs.infoIframe.contentWindow.filterType(info);
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) {
hide() {
this.infoDialogShow = false; this.infoDialogShow = false;
window.clearTimeout(this.visiableTimer); eval("console.log('自定义弹窗filterType异常:', err.message)");
}
} }
}, 500);
} }
} }
},
hide() {
this.infoDialogShow = false;
window.clearTimeout(this.visiableTimer);
},
},
};
</script> </script>
<style scoped> <style scoped>
.info-dialog { .info-dialog {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
z-index: 99990; z-index: 99990;
} }
.info-iframe { .info-iframe {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
/* z-index: 99990; */ /* z-index: 99990; */
} }
</style> </style>
...@@ -9,115 +9,125 @@ ...@@ -9,115 +9,125 @@
<template> <template>
<div class="config-box"> <div class="config-box">
<div class="switch-box"> <div class="switch-box">
<el-radio v-model="radio" label="defaultConfig">正常配置</el-radio> <el-radio v-model="radio" label="defaultConfigTemplate"
<el-radio v-model="radio" label="illegalStopDefaultConfig">违停配置</el-radio> >正常配置</el-radio
>
<el-radio v-model="radio" label="illegalStopDefaultConfigTemplate"
>违停配置</el-radio
>
</div> </div>
<el-row> <el-row>
<el-col :span="3" class="search-box"> <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 <el-button
slot="append" slot="append"
icon="el-icon-search" icon="el-icon-search"
@click="$refs.iframeconfig.contentWindow.clickButton(paramsval)" @click="$refs.iframeconfig.contentWindow.clickButton(paramsval)"
></el-button> ></el-button>
</el-input> </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>
</el-col> </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> </div>
</template> </template>
<script> <script>
import xml from './baseConfig.js' import xml from "./baseConfig.js";
export default { export default {
data() { data() {
return { return {
paramsval:'', paramsval: "",
radio: 'defaultConfig', radio: "defaultConfigTemplate",
config:'', config: "",
configid:'' configid: "",
} };
}, },
watch:{ watch: {
radio(val){ radio(val) {
this.getbaseConf(val) this.getbaseConf(val);
} },
}, },
methods:{ methods: {
xmlInit: function(obj) { xmlInit: function (obj) {
this.$refs.iframeconfig.contentWindow.loadParameterTree( this.$refs.iframeconfig.contentWindow.loadParameterTree(
obj.content, obj.content,
'<?xml version="1.0" encoding="GBK"?><root></root>' '<?xml version="1.0" encoding="GBK"?><root></root>'
); );
}, },
getbaseConf(type){ getbaseConf(type) {
this.$api.device.getConfig(type).then(res => { this.$api.device.getConfig(type).then((res) => {
this.config = res.data.content this.config = res.data.content;
this.configid = res.data.id this.configid = res.data.id;
this.xmlInit(res.data) this.xmlInit(res.data);
}) });
}, },
saveConfig(){ saveConfig() {
this.$refs.iframeconfig.contentWindow.submit(); this.$refs.iframeconfig.contentWindow.submit();
//ifram 传递回来的饿xml //ifram 传递回来的饿xml
let XMLStr = this.$refs.iframeconfig.contentWindow.xmlStr; let XMLStr = this.$refs.iframeconfig.contentWindow.xmlStr;
if(!XMLStr) { if (!XMLStr) {
XMLStr = this.config XMLStr = this.config;
} }
this.$api.device.saveConfig(this.configid,{content:XMLStr}).then(res => { this.$api.device
if(res.ecode == 200) { .saveConfig(this.configid, { content: XMLStr })
this.$message({ .then((res) => {
type: "success", if (res.ecode == 200) {
message: '保存成功!' this.$message({
}); type: "success",
} else { message: "保存成功!",
this.$message({ });
type: "error", } else {
message: '保存失败!' this.$message({
}); type: "error",
} message: "保存失败!",
}) });
}
});
}, },
}, },
mounted(){ mounted() {
setTimeout(() => { setTimeout(() => {
this.getbaseConf('defaultConfig') this.getbaseConf("defaultConfig");
}, 2000); }, 2000);
} },
} };
</script> </script>
<style> <style>
.config-box{ .config-box {
margin:10px; margin: 10px;
background: #fff; background: #fff;
overflow: hidden; overflow: hidden;
} }
.switch-box{ .switch-box {
margin:10px 0 0 10px margin: 10px 0 0 10px;
} }
.search-box,.content-box{ .search-box,
margin:10px; .content-box {
margin: 10px;
} }
.save-btn{ .save-btn {
float: right; float: right;
margin-bottom: 20px; margin-bottom: 20px;
} }
......
<template> <template>
<div class="contentBox"> <div class="contentBox">
<div class="content"> <div class="content">
<div style="padding:8px 20px;"> <div style="padding: 8px 20px">
<span class="inputBox"> <span class="inputBox">
<el-input <el-input
v-model="storename" v-model="storename"
...@@ -10,17 +10,17 @@ ...@@ -10,17 +10,17 @@
</span> </span>
<el-button <el-button
type="primary" type="primary"
style="position: relative;top: -2px;" style="position: relative; top: -2px"
@click="query" @click="query"
>查询</el-button >查询</el-button
> >
<span style="float: right;"> <span style="float: right">
<el-button type="info" icon="el-icon-search" @click="add" <el-button type="info" icon="el-icon-search" @click="add"
>添加</el-button >添加</el-button
> >
</span> </span>
</div> </div>
<div style="padding: 0 15px 20px 23px;"> <div style="padding: 0 15px 20px 23px">
<el-table <el-table
:height="tableHeight" :height="tableHeight"
:data="tableData" :data="tableData"
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
> >
<el-table-column align="center" prop="name" label="名称"> <el-table-column align="center" prop="name" label="名称">
</el-table-column> </el-table-column>
<el-table-column align="center" label="上传时间"> <el-table-column align="center" label="上传时间">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
{{showLocalTime(scope.row.create_dt,'local')}} {{ showLocalTime(scope.row.create_dt, "local") }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -75,11 +75,11 @@ ...@@ -75,11 +75,11 @@
:visible-arrow="false" :visible-arrow="false"
> >
<span <span
class="el-icon-delete delIcon" class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)" @click="delFun(scope.$index, scope.row)"
></span> ></span>
</el-tooltip> </el-tooltip>
<span class="tableSpanBorder"></span> <span class="tableSpanBorder"></span>
<el-tooltip <el-tooltip
content="导出" content="导出"
placement="bottom" placement="bottom"
...@@ -87,16 +87,16 @@ ...@@ -87,16 +87,16 @@
:visible-arrow="false" :visible-arrow="false"
> >
<span <span
class="el-icon-upload editIcon" class="el-icon-upload editIcon"
@click="exportFun(scope.$index, scope.row)" @click="exportFun(scope.$index, scope.row)"
></span> ></span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top: 28px;"> <div style="margin-top: 28px">
<el-pagination <el-pagination
style="float: right;" style="float: right"
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
:total="total" :total="total"
> >
</el-pagination> </el-pagination>
<div style="clear: both;"></div> <div style="clear: both"></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -125,15 +125,17 @@ ...@@ -125,15 +125,17 @@
action="uploadUrl" action="uploadUrl"
:http-request="httpRequest" :http-request="httpRequest"
:on-success="uploadsuccess" :on-success="uploadsuccess"
:before-upload="beforeUpload"
multiple multiple
name="file" name="file"
:auto-upload="false" :auto-upload="true"
> >
<el-button slot="trigger" size="small" type="primary" <el-button slot="trigger" size="small" type="primary"
>选取文件</el-button >选取文件</el-button
> >
<!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> --> <!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> -->
</el-upload> </el-upload>
<div>提示:上传文件仅支持xml格式!</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -162,7 +164,7 @@ export default { ...@@ -162,7 +164,7 @@ export default {
props: { props: {
label: "name", label: "name",
children: "child", children: "child",
isLeaf: "leaf" isLeaf: "leaf",
}, },
detailData: [], detailData: [],
dev_unid: localStorage.getItem("dev_unid"), dev_unid: localStorage.getItem("dev_unid"),
...@@ -170,7 +172,7 @@ export default { ...@@ -170,7 +172,7 @@ export default {
picture_busy: 0, picture_busy: 0,
picture_free: 0, picture_free: 0,
video_busy: 0, video_busy: 0,
video_free: 0 video_free: 0,
}, },
total: 0, total: 0,
page: 1, page: 1,
...@@ -181,7 +183,7 @@ export default { ...@@ -181,7 +183,7 @@ export default {
detailVisible: false, detailVisible: false,
storename: "", storename: "",
curentSubList: [], curentSubList: [],
tableHeight: window.opsTableHeight tableHeight: window.opsTableHeight,
}; };
}, },
components: {}, components: {},
...@@ -189,6 +191,13 @@ export default { ...@@ -189,6 +191,13 @@ export default {
this.query(); this.query();
}, },
methods: { methods: {
beforeUpload(file) {
let isXML = file.type == "text/xml";
if (!isXML) {
this.$message.error("上传文件只能是 XML 格式!");
}
return isXML;
},
// 自定义的上传函数 // 自定义的上传函数
httpRequest(param) { httpRequest(param) {
this.file = []; this.file = [];
...@@ -196,27 +205,27 @@ export default { ...@@ -196,27 +205,27 @@ export default {
this.file.push(param.file); this.file.push(param.file);
}, },
save() { save() {
this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件 // this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件
// 最重要的就是这段代码 // 最重要的就是这段代码
var upData = new FormData(); // 首先创建FormData对象 var upData = new FormData(); // 首先创建FormData对象
this.file.forEach(file => { this.file.forEach((file) => {
upData.append("file", file); // 因为要上传多个文件,所以需要遍历一下才行 upData.append("file", file); // 因为要上传多个文件,所以需要遍历一下才行
upData.append("name", this.names); upData.append("name", this.names);
upData.append("is_temp", 0); upData.append("is_temp", 0);
}); });
this.$api.resource.uploadStore(upData).then(res => { this.$api.resource.uploadStore(upData).then((res) => {
if (res.unid) { if (res.unid) {
this.addVisible = false; this.addVisible = false;
this.query(); this.query();
this.$logs.oplogs(res,'serv_store',`上传配置:${ this.names}`); this.$logs.oplogs(res, "serv_store", `上传配置:${this.names}`);
this.$message({ this.$message({
type: "success", type: "success",
message: "上传成功!" message: "上传成功!",
}); });
} else { } else {
this.$message({ this.$message({
type: "error", type: "error",
message: res.enote message: res.enote,
}); });
} }
}); });
...@@ -230,11 +239,11 @@ export default { ...@@ -230,11 +239,11 @@ export default {
} }
if (node.level > 1) return resolve([]); 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) { if (res.list_data == null) {
res.list_data = []; res.list_data = [];
} }
res.list_data.forEach(item => { res.list_data.forEach((item) => {
item.name = item.subtask_name; item.name = item.subtask_name;
item["leaf"] = true; item["leaf"] = true;
}); });
...@@ -249,20 +258,20 @@ export default { ...@@ -249,20 +258,20 @@ export default {
{ {
limit: this.pageSize, limit: this.pageSize,
offset: offset, offset: offset,
name__like: this.storename name__like: this.storename,
}, },
this.dev_unid this.dev_unid
) )
.then(res => { .then((res) => {
this.total = res.total_num; this.total = res.total_num;
if (res.list_data == null) { if (res.list_data == null) {
this.tableData = []; this.tableData = [];
} else { } else {
this.tableData = res.list_data; this.tableData = res.list_data;
} }
this.tableData.forEach(list => { this.tableData.forEach((list) => {
let ellipsisText = ""; let ellipsisText = "";
list.task_list.forEach(item => { list.task_list.forEach((item) => {
ellipsisText += item.name + ","; ellipsisText += item.name + ",";
}); });
ellipsisText = ellipsisText.substring(0, ellipsisText.length - 1); ellipsisText = ellipsisText.substring(0, ellipsisText.length - 1);
...@@ -272,14 +281,14 @@ export default { ...@@ -272,14 +281,14 @@ export default {
}); });
console.log(this.tableData); console.log(this.tableData);
}) })
.catch(error => {}); .catch((error) => {});
}, },
add() { add() {
this.addVisible = true; this.addVisible = true;
}, },
taskFormatter(row, column, cellValue, index) { taskFormatter(row, column, cellValue, index) {
let columnText = ""; let columnText = "";
row.task_list.forEach(item => { row.task_list.forEach((item) => {
columnText += item.name + ","; columnText += item.name + ",";
}); });
columnText = columnText.substring(0, columnText.length - 1); columnText = columnText.substring(0, columnText.length - 1);
...@@ -302,16 +311,16 @@ export default { ...@@ -302,16 +311,16 @@ export default {
this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", { this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
this.$api.resource.delStore({}, row.unid).then(res => { this.$api.resource.delStore({}, row.unid).then((res) => {
if (res.ecode == 200) { if (res.ecode == 200) {
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!" message: "删除成功!",
}); });
this.$logs.oplogs(res,'serv_store',`删除配置:${ row.name}`); this.$logs.oplogs(res, "serv_store", `删除配置:${row.name}`);
this.query(); this.query();
} }
}); });
...@@ -319,15 +328,15 @@ export default { ...@@ -319,15 +328,15 @@ export default {
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "已取消删除" message: "已取消删除",
}); });
}); });
}, },
exportFun(index, row){ exportFun(index, row) {
let url = location.origin; 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -11,13 +11,20 @@ ...@@ -11,13 +11,20 @@
@node-click="handleNodeClick" @node-click="handleNodeClick"
> >
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span> <span>
<span class="tree-label">{{ <span class="tree-label">{{ data.label }}</span>
data.label
}}</span>
</span> </span>
<span class="tree-btn" v-if="node.label=='平台同步资源'"> <span class="tree-btn" v-if="node.label == '平台同步资源'">
<i :class="{'el-icon-refresh':true,'animterefresh':refreshload}" @click.stop="nodeRefreshClick(node, data)"></i> <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>
</span> </span>
</el-tree> </el-tree>
...@@ -30,31 +37,39 @@ export default { ...@@ -30,31 +37,39 @@ export default {
data() { data() {
return { return {
isLoadingTree: false, isLoadingTree: false,
refreshload:false, refreshload: false,
cloudRefreshload: false,
syncTreeData: [ syncTreeData: [
{ {
id: "0", id: "0",
unid: "0", unid: "0",
label: "平台同步资源", label: "平台同步资源",
root: "平台同步资源", root: "平台同步资源",
children: [] children: [],
} },
{
id: "-1",
unid: "-1",
label: "视频云平台同步资源",
root: "视频云平台同步资源",
children: [],
},
], ],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label",
} },
}; };
}, },
props: { props: {
filterText: { filterText: {
type: String, type: String,
default: "" default: "",
}, },
treeDatas: { treeDatas: {
type: Array, type: Array,
defalut: [] defalut: [],
} },
}, },
components: {}, components: {},
watch: { watch: {
...@@ -66,7 +81,7 @@ export default { ...@@ -66,7 +81,7 @@ export default {
}, },
treeDatas(val) { treeDatas(val) {
this.treeData[0].childs = val; this.treeData[0].childs = val;
} },
}, },
methods: { methods: {
initTree(data) { initTree(data) {
...@@ -74,15 +89,20 @@ export default { ...@@ -74,15 +89,20 @@ export default {
this.refreshload = false; this.refreshload = false;
this.isLoadingTree = true; this.isLoadingTree = true;
}, },
initCloudTree(data) {
this.syncTreeData[1].children = data;
this.cloudRefreshload = false;
this.isLoadingTree = true;
},
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}, },
handleNodeClick(data) { handleNodeClick(data) {
debugger debugger;
if (data.label !== "平台同步资源" && data.is_leaf) { if (data.label !== "平台同步资源" && data.is_leaf) {
this.$emit("syncTable", data); this.$emit("syncTable", data);
}; }
}, },
handleRefresh(s, d, n) { handleRefresh(s, d, n) {
// console.log(s, d, n) // console.log(s, d, n)
...@@ -92,16 +112,26 @@ export default { ...@@ -92,16 +112,26 @@ export default {
id: "1", id: "1",
label: "平台同步资源", label: "平台同步资源",
root: "平台同步资源", root: "平台同步资源",
children: [] children: [],
} },
{
id: "2",
label: "视频云平台同步资源",
root: "视频云平台同步资源",
children: [],
},
]; ];
this.$parent.getSyncTree(); this.$parent.getSyncTree();
}, },
nodeRefreshClick(){ nodeRefreshClick() {
this.refreshload = true; this.refreshload = true;
this.$emit('refreshData') this.$emit("refreshData");
} },
} cloudNodeRefreshClick() {
this.cloudRefreshload = true;
this.$emit("cloudRefreshData");
},
},
}; };
</script> </script>
...@@ -110,14 +140,30 @@ export default { ...@@ -110,14 +140,30 @@ export default {
/* max-height: 216px; */ /* max-height: 216px; */
/* overflow: hidden; */ /* 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{ </style>
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>
\ No newline at end of file \ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
:class="{ :class="{
'task-lsit': true, 'task-lsit': true,
runningtask: item.status == 'Running', runningtask: item.status == 'Running',
stoptask: item.status != 'Running' stoptask: item.status != 'Running',
}" }"
> >
<!-- <i <!-- <i
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
v-show="subTask.enableStatus != 1" v-show="subTask.enableStatus != 1"
:class="[ :class="[
{ subtaskActive: subTask.subtask_id == currentSubtaskId }, { subtaskActive: subTask.subtask_id == currentSubtaskId },
{ disabledColor: subTask.enableStatus == 5 } { disabledColor: subTask.enableStatus == 5 },
]" ]"
:data-subtask="subTask.subtask_id" :data-subtask="subTask.subtask_id"
:id="subTask.vchan.vdev_unid + ',' + subTask.vchan.vchan_refid" :id="subTask.vchan.vdev_unid + ',' + subTask.vchan.vchan_refid"
...@@ -63,8 +63,12 @@ ...@@ -63,8 +63,12 @@
<el-col :span="15" class="ht100"> <el-col :span="15" class="ht100">
<div class="video-box"> <div class="video-box">
<div class="play-box"> <div class="play-box">
<videoplay ref="videoplay" :playurl="playurl" v-if="!ischrome"></videoplay> <videoplay
<flvvideo ref="flvideo" v-if="ischrome"></flvvideo> ref="videoplay"
:playurl="playurl"
v-if="!ischrome"
></videoplay>
<flvvideo ref="flvideo" v-if="ischrome"></flvvideo>
</div> </div>
<div class> <div class>
<setting <setting
...@@ -90,7 +94,7 @@ ...@@ -90,7 +94,7 @@
</template> </template>
<script> <script>
import videoplay from "../public/videoPlay"; import videoplay from "../public/videoPlay";
import flvvideo from "../public/flvvideo" import flvvideo from "../public/flvvideo";
import InfoDialog from "../public/infodialog"; import InfoDialog from "../public/infodialog";
import setting from "./setting"; import setting from "./setting";
import eventtab from "./eventTab"; import eventtab from "./eventTab";
...@@ -100,7 +104,7 @@ export default { ...@@ -100,7 +104,7 @@ export default {
InfoDialog, InfoDialog,
setting, setting,
flvvideo, flvvideo,
eventtab eventtab,
}, },
data() { data() {
return { return {
...@@ -112,21 +116,21 @@ export default { ...@@ -112,21 +116,21 @@ export default {
subindex: -1, subindex: -1,
playurl: "", playurl: "",
taskID: "", taskID: "",
streamclock:null, streamclock: null,
currentSubtaskId: "", currentSubtaskId: "",
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label",
}, },
timer: null, timer: null,
searchstate: null searchstate: null,
}; };
}, },
methods: { methods: {
selecttask(data, index) { selecttask(data, index) {
this.subTasks = []; this.subTasks = [];
this.subindex = index; 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.subTasks = res.list_data;
this.taskID = data.task_id; this.taskID = data.task_id;
}); });
...@@ -143,120 +147,119 @@ export default { ...@@ -143,120 +147,119 @@ export default {
if (vdata.running_status != "Running") { if (vdata.running_status != "Running") {
this.$message({ this.$message({
message: "该任务没有运行,无法获取分析视频和抓拍信息", message: "该任务没有运行,无法获取分析视频和抓拍信息",
type: "error" type: "error",
}); });
return; return;
} }
this.pushSteam(vdata); this.pushSteam(vdata);
this.$refs.event.dataInit(this.currentSubtaskId, vdata.task_type); this.$refs.event.dataInit(this.currentSubtaskId, vdata.task_type);
}, },
getTask(data) { getTask(data) {
let that = this; let that = this;
this.$api.task this.$api.task
.getTask({ .getTask({
task_name: this.searchInfo task_name: this.searchInfo,
}) })
.then(res => { .then((res) => {
that.taskdata = res.list_data; that.taskdata = res.list_data;
console.log(res); console.log(res);
}); });
}, },
//发送推流请求 //发送推流请求
pushSteam(vdata) { pushSteam(vdata) {
this.steam(vdata).then(m => { this.steam(vdata).then((m) => {
if (m.ecode) { if (m.ecode) {
this.$message({ this.$message({
message: "发送推流请求失败:" + m.enote, message: "发送推流请求失败:" + m.enote,
type: "error" type: "error",
}); });
} else { } else {
this.vchandata = vdata.vchan; this.vchandata = vdata.vchan;
clearInterval(this.streamclock) clearInterval(this.streamclock);
this.streamclock = null; this.streamclock = null;
this.getPlayUrl(); this.getPlayUrl();
} }
}) });
}, },
steam(vdata){ steam(vdata) {
return new Promise((resolve, reject) =>{ return new Promise((resolve, reject) => {
let data = { let data = {
send_stream: true, send_stream: true,
task_id: this.currentSubtaskId, task_id: this.currentSubtaskId,
is_analyse: true is_analyse: true,
}; };
this.$api.task this.$api.task
.getStream(this.dev_unid, vdata.vchan.vchan_refid, data) .getStream(this.dev_unid, vdata.vchan.vchan_refid, data)
.then(m => { .then((m) => {
resolve(m); resolve(m);
}); });
}) });
}, },
getPlayUrl: function() { getPlayUrl: function () {
if(this.ischrome) { if (this.ischrome) {
let ip = this.$api.flvIP; let ip = this.$api.flvIP;
let url = `${window.config.https?'https':'http'}://${ip}:${window.config.https?'20070':'8080'}/live/${this.currentSubtaskId}.flv` let url = `${window.config.https ? "https" : "http"}://${ip}:${
console.log("FLV播放地址:", url) window.config.https ? "20070" : "20080"
debugger }/live/${this.currentSubtaskId}.flv`;
console.log("FLV播放地址:", url);
debugger;
this.$refs.flvideo.startFunc(url); this.$refs.flvideo.startFunc(url);
this.streamclock = setInterval(()=> { this.streamclock = setInterval(() => {
this.steam(this.subtaskdata) this.steam(this.subtaskdata);
},9000) }, 9000);
} }
if(this.subtaskdata.task_algo_type == '12') { if (this.subtaskdata.task_algo_type == "12") {
console.log(this.subtaskdata) console.log(this.subtaskdata);
this.playurl = {rtsp_url:this.subtaskdata.vchan.url}; this.playurl = { rtsp_url: this.subtaskdata.vchan.url };
console.log("bkurl",this.playurl) console.log("bkurl", this.playurl);
setTimeout(() => { setTimeout(() => {
this.$refs.videoplay.videoPlay(); this.$refs.videoplay.videoPlay();
}, 2000); }, 2000);
return false; return false;
} }
this.$api.task.getPlayUrl(this.currentSubtaskId).then(res => { this.$api.task.getPlayUrl(this.currentSubtaskId).then((res) => {
this.playurl = res; this.playurl = res;
if (this.playurl.rtsp_url) { if (this.playurl.rtsp_url) {
this.$message({ this.$message({
message: "获取播放地址成功,请耐心等待视频加载", message: "获取播放地址成功,请耐心等待视频加载",
type: "success" type: "success",
}); });
setTimeout(() => { setTimeout(() => {
!this.ischrome?this.$refs.videoplay.videoPlay():null; !this.ischrome ? this.$refs.videoplay.videoPlay() : null;
}, 2000); }, 2000);
console.info("视频播放地址:", this.playurl.rtsp_url); console.info("视频播放地址:", this.playurl.rtsp_url);
} else { } else {
this.$message({ this.$message({
message: "获取rtsp播放地址失败!请重试!", message: "获取rtsp播放地址失败!请重试!",
type: "error" type: "error",
}); });
} }
}); });
}, },
getVchansIsSending() { getVchansIsSending() {
this.axios.get(this.API.task.getstream()).then(res => {}); this.axios.get(this.API.task.getstream()).then((res) => {});
}, },
debounce(fn, wait) { debounce(fn, wait) {
clearTimeout(this.timer); clearTimeout(this.timer);
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
fn; fn;
}, wait); }, wait);
} },
}, },
watch: { watch: {
searchInfo(val) { searchInfo(val) {
this.debounce(this.getTask(), 800); this.debounce(this.getTask(), 800);
} },
}, },
created() { created() {
this.getTask(); this.getTask();
this.ischrome = this.checkchrome(); this.ischrome = this.checkchrome();
}, },
mounted() { mounted() {},
beforeDestroy() {
},
beforeDestroy(){
clearInterval(this.streamclock); clearInterval(this.streamclock);
this.streamclock = null; this.streamclock = null;
} },
}; };
</script> </script>
...@@ -352,7 +355,6 @@ export default { ...@@ -352,7 +355,6 @@ export default {
.runningtask { .runningtask {
// color rgba(1, 206, 184, 0.56); // color rgba(1, 206, 184, 0.56);
@include font-colr(runtask_color); @include font-colr(runtask_color);
} }
.stoptask { .stoptask {
...@@ -405,7 +407,7 @@ export default { ...@@ -405,7 +407,7 @@ export default {
.subtaskActive { .subtaskActive {
position: relative; position: relative;
color: #333; color: #333;
padding-right:10px; padding-right: 10px;
} }
.subtaskActive::before { .subtaskActive::before {
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[30, 50, 100, 200]" :page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -297,7 +297,7 @@ export default { ...@@ -297,7 +297,7 @@ export default {
formattterData: [], formattterData: [],
total: 0, total: 0,
page: 1, page: 1,
pageSize: 30, pageSize: this.$pageSize,
selectcheck: [], selectcheck: [],
currentIndex: 0, currentIndex: 0,
taskList: [], taskList: [],
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[30, 50, 100, 200]" :page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -300,7 +300,7 @@ export default { ...@@ -300,7 +300,7 @@ export default {
formatterData: [], formatterData: [],
total: 0, total: 0,
page: 1, page: 1,
pageSize: 30, pageSize: this.$pageSize,
selectcheck: [], selectcheck: [],
currentIndex: 0, currentIndex: 0,
taskList: [], taskList: [],
......
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
stripe stripe
v-loading="loading" v-loading="loading"
border border
:class="$pageSizeOpts[0] === 10 ? 'ten-table-wrapper' : ''"
> >
<el-table-column <el-table-column
prop="index" prop="index"
...@@ -200,7 +201,7 @@ ...@@ -200,7 +201,7 @@
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[30, 50, 100, 200]" :page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -232,7 +233,7 @@ export default { ...@@ -232,7 +233,7 @@ export default {
formatterData: [], formatterData: [],
total: 0, total: 0,
page: 1, page: 1,
pageSize: 30, pageSize: this.$pageSize,
taskList: [], taskList: [],
subTaskList: [], subTaskList: [],
tableHeight: window.oneSearchTableHeight tableHeight: window.oneSearchTableHeight
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
:page-sizes="[30, 50, 100, 200]" :page-sizes="$pageSizeOpts"
layout="total, prev, pager, next,sizes, jumper" layout="total, prev, pager, next,sizes, jumper"
:current-page="page" :current-page="page"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
formattterData: [], formattterData: [],
total: 0, total: 0,
page: 1, page: 1,
pageSize: 30, pageSize: this.$pageSize,
selectcheck: [], selectcheck: [],
currentIndex: 0 currentIndex: 0
}; };
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
prop="task_name" prop="task_name"
class="form-item" class="form-item"
:rules="[ :rules="[
{ required: true, message: '请输入任务名称', trigger: 'blur' } { required: true, message: '请输入任务名称', trigger: 'blur' },
]" ]"
> >
<el-input <el-input
...@@ -38,14 +38,12 @@ ...@@ -38,14 +38,12 @@
:popper-append-to-body="false" :popper-append-to-body="false"
:disabled="pedittype == 'edit'" :disabled="pedittype == 'edit'"
> >
<el-option value="" label="--"></el-option> <el-option
<el-option value="0" label="交通"></el-option> v-for="(item, index) in algorTypeList"
<el-option value="1" label="客流"></el-option> :key="index"
<el-option value="2" label="安防"></el-option> :value="item.value"
<el-option value="2" label="行为分析"></el-option> :label="item.name"
<el-option value="12" label="行为分析_BG"></el-option> ></el-option>
<el-option value="3" label="违停"></el-option>
<el-option value="5" label="交通行人"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="场景占用" class="form-item" prop="resource_use"> <el-form-item label="场景占用" class="form-item" prop="resource_use">
...@@ -82,7 +80,7 @@ ...@@ -82,7 +80,7 @@
></el-date-picker> --> ></el-date-picker> -->
<el-time-picker <el-time-picker
is-range is-range
style="width:100%" style="width: 100%"
value-format="HH:mm:ss" value-format="HH:mm:ss"
v-model="timer" v-model="timer"
range-separator="至" range-separator="至"
...@@ -144,6 +142,7 @@ ...@@ -144,6 +142,7 @@
</template> </template>
<script> <script>
import { algorTypeList } from "@/enum/index";
export default { export default {
data() { data() {
var checkStore = (rule, value, callback) => { var checkStore = (rule, value, callback) => {
...@@ -157,44 +156,45 @@ export default { ...@@ -157,44 +156,45 @@ export default {
setvisible: false, setvisible: false,
timer: ["00:00:00", "23:59:59"], timer: ["00:00:00", "23:59:59"],
backpdata: "", backpdata: "",
headertitle:"添加任务", headertitle: "添加任务",
formData: { formData: {
task_name: "", task_name: "",
task_algo_type: 0, task_algo_type: 0,
is_send: 0, is_send: 0,
store_conf: { store_conf: {
unid: "" unid: "",
}, },
priority: "normal", priority: "normal",
period: true period: true,
}, },
pedittype:"add", pedittype: "add",
vchanAry: [], vchanAry: [],
platT: [], platT: [],
sessionData: {}, sessionData: {},
store_confs: [], store_confs: [],
algorTypeList: algorTypeList,
rules: { rules: {
task_algo_type: [ task_algo_type: [
{ required: true, message: "请选择算法类型", trigger: "change" } { required: true, message: "请选择算法类型", trigger: "change" },
], ],
stores: [ stores: [
{ required: true, message: "存储配置不能为空!", trigger: "change" } { required: true, message: "存储配置不能为空!", trigger: "change" },
], ],
resource_use: [ resource_use: [
{ required: true, message: "场景占用不能为空!", trigger: "change" } { required: true, message: "场景占用不能为空!", trigger: "change" },
], ],
store_conf_unid: [ store_conf_unid: [
{ required: true, validator: checkStore, trigger: "change" } { required: true, validator: checkStore, trigger: "change" },
] ],
} },
}; };
}, },
props: { props: {
freeList: { freeList: {
type: Array, type: Array,
// eslint-disable-next-line vue/require-valid-default-prop // eslint-disable-next-line vue/require-valid-default-prop
default: [] default: [],
} },
}, },
watch: {}, watch: {},
mounted() {}, mounted() {},
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
if (this.freeList && this.freeList.length > 0) { if (this.freeList && this.freeList.length > 0) {
var freeArr = []; var freeArr = [];
let that = this; let that = this;
this.freeList.forEach(ele => { this.freeList.forEach((ele) => {
if (ele.license_info && ele.license_info.platType) { if (ele.license_info && ele.license_info.platType) {
if (that.platT.length == 0) { if (that.platT.length == 0) {
that.platT.push(ele.license_info.platType); that.platT.push(ele.license_info.platType);
...@@ -228,23 +228,23 @@ export default { ...@@ -228,23 +228,23 @@ export default {
this.platT = []; this.platT = [];
this.setvisible = true; this.setvisible = true;
if (type == "add") { if (type == "add") {
this.headertitle = "新建任务" this.headertitle = "新建任务";
//timer单独拿到form外层是因为element一个bug放到内层后不能修改时间 //timer单独拿到form外层是因为element一个bug放到内层后不能修改时间
this.timer = ["00:00:00", "23:59:59"]; this.timer = ["00:00:00", "23:59:59"];
this.formData = { this.formData = {
task_name: "", task_name: "",
task_algo_type: "0", task_algo_type: "0",
store_conf: { store_conf: {
unid: "" unid: "",
}, },
priority: "normal", priority: "normal",
plate_type: "", plate_type: "",
plate_time: "", plate_time: "",
period: true period: true,
}; };
} }
if (type == "edit") { if (type == "edit") {
this.headertitle = "修改任务" this.headertitle = "修改任务";
this.pedittype = type; this.pedittype = type;
if (pdata.start_time) { if (pdata.start_time) {
let startT = pdata.start_time; let startT = pdata.start_time;
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
} }
this.formData = JSON.parse(JSON.stringify(pdata)); this.formData = JSON.parse(JSON.stringify(pdata));
this.backpdata = 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 ary = [];
let data = res.list_data; let data = res.list_data;
for (let i in data) { for (let i in data) {
...@@ -266,7 +266,7 @@ export default { ...@@ -266,7 +266,7 @@ export default {
data.vchan = { data.vchan = {
subtask_id: data[i].subtask_id, subtask_id: data[i].subtask_id,
refid: "", refid: "",
vchan_name: data[i].subtask_name vchan_name: data[i].subtask_name,
}; };
} }
ary.push(data[i].vchan); ary.push(data[i].vchan);
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
plate_type: this.formData.plate_type, plate_type: this.formData.plate_type,
resource_use: this.formData.resource_use, resource_use: this.formData.resource_use,
task_type: "normal", task_type: "normal",
enable_status: true enable_status: true,
// algo_comb_unid: this.formData.store_conf, // algo_comb_unid: this.formData.store_conf,
}; };
...@@ -321,24 +321,28 @@ export default { ...@@ -321,24 +321,28 @@ export default {
} }
}, },
addTask(data) { addTask(data) {
this.$refs["taskForm"].validate(valid => { this.$refs["taskForm"].validate((valid) => {
if (valid) { if (valid) {
this.$api.task this.$api.task
.addTask(data, { .addTask(data, {
"content-type": "multipart/form-data" "content-type": "multipart/form-data",
}) })
.then(res => { .then((res) => {
if (res.ecode && res.ecode != 500) { if (res.ecode && res.ecode != 500) {
this.setvisible = false; this.setvisible = false;
this.$emit("refresh"); this.$emit("refresh");
} else { } else {
this.$message({ this.$message({
message: res.enote, message: res.enote,
type: "error" type: "error",
}); });
} }
debugger debugger;
this.$logs.oplogs(res,'serv_task',`添加任务${this.formData.task_name}`); this.$logs.oplogs(
res,
"serv_task",
`添加任务${this.formData.task_name}`
);
}); });
} else { } else {
console.log("error submit!!"); console.log("error submit!!");
...@@ -347,21 +351,21 @@ export default { ...@@ -347,21 +351,21 @@ export default {
}, },
editTask(data) { editTask(data) {
data.is_send = this.sendstatus(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") { if (res.ecode == "200") {
this.setvisible = false; this.setvisible = false;
this.$emit("refresh"); this.$emit("refresh");
this.$message({ this.$message({
message: res.enote, message: res.enote,
type: "success" type: "success",
}); });
} else { } else {
this.$message({ this.$message({
message: res.enote, 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) { sendstatus(data) {
...@@ -382,22 +386,21 @@ export default { ...@@ -382,22 +386,21 @@ export default {
getStore() { getStore() {
let params = { let params = {
offset: 0, offset: 0,
limit: "" limit: "",
}; };
this.$api.device.getStore(params).then(res => { this.$api.device.getStore(params).then((res) => {
this.store_confs = res.list_data; this.store_confs = res.list_data;
}); });
}, },
}, },
created() { created() {
this.getStore(); this.getStore();
},
}
}; };
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.form-item { .form-item {
margin-bottom 13px margin-bottom: 13px;
} }
</style> </style>
...@@ -156,6 +156,14 @@ export default { ...@@ -156,6 +156,14 @@ export default {
tableData: [], tableData: [],
zNodes: [ zNodes: [
{ {
name: "视频云设备",
id: "-1",
count: 500,
times: 1,
isParent: true,
dev_unid: this.dev_unid,
},
{
name: "外部设备", name: "外部设备",
id: "0", id: "0",
count: 500, count: 500,
...@@ -347,11 +355,26 @@ export default { ...@@ -347,11 +355,26 @@ export default {
} else if (parentNode.name === "内部设备") { } else if (parentNode.name === "内部设备") {
let vchans = childNodes.vchan_struct || childNodes.list_data; let vchans = childNodes.vchan_struct || childNodes.list_data;
treenode = vchans treenode = vchans
} else { } else if (parentNode.name === "外部设备") {
treenode = childNodes.result.childs; treenode = childNodes.result.childs;
} else if (parentNode.name === "视频云设备") {
this.dealCloudTree(childNodes.data);
treenode = childNodes.data;
console.log('childNodes', childNodes);
} }
return treenode; 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) { showModal(val) {
this.taskData = val; this.taskData = val;
this.tableData = []; this.tableData = [];
...@@ -426,6 +449,7 @@ export default { ...@@ -426,6 +449,7 @@ export default {
let status = true; let status = true;
let subData = []; let subData = [];
this.tableData.map((e) => { this.tableData.map((e) => {
console.log(e);
let vchan = e; let vchan = e;
let data = { let data = {
is_dome: false, is_dome: false,
...@@ -435,10 +459,11 @@ export default { ...@@ -435,10 +459,11 @@ export default {
vchan_duid: vchan.duid || vchan.vchan_duid, vchan_duid: vchan.duid || vchan.vchan_duid,
vdev_unid: this.dev_unid, vdev_unid: this.dev_unid,
vchan_name: vchan.name, vchan_name: vchan.name,
vchan_type: vchan.vchan_type || ""
}, },
assign_to: { assign_to: {
id: this.taskData.plate_type, id: this.taskData.plate_type,
flag: 1, flag: 1
}, },
}; };
subData.push(data); subData.push(data);
...@@ -555,10 +580,18 @@ export default { ...@@ -555,10 +580,18 @@ export default {
} }
}); });
}, },
serchVchan(){ async serchVchan(){
if(this.searchText == '') { if(this.searchText == '') {
var zNodes = [ var zNodes = [
{ {
name: "视频云设备",
id: "-1",
count: 500,
times: 1,
isParent: true,
dev_unid: this.dev_unid,
},
{
name: "外部设备", name: "外部设备",
id: "0", id: "0",
count: 500, count: 500,
...@@ -584,24 +617,25 @@ export default { ...@@ -584,24 +617,25 @@ export default {
}, },
] ]
var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, zNodes); var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, zNodes);
return return;
} }
this.$api.resource.getcatalogs({vchan_name_like:this.searchText }).then(res => { var params = {
this.$api.device.getDevtreeLike(this.dev_unid,'内部设备',{vchan_name_like:this.searchText }).then(camerares => { vchan_name_like: this.searchText
this.$api.device.getDevtreeLike(this.dev_unid,'短视频',{vchan_name_like:this.searchText }).then(vchanres => { };
setTimeout(() => { const res = await this.$api.resource.getcatalogs(params);
this.zNodes[0].childs = res.result?res.result.childs:[] const camerares = await this.$api.device.getDevtreeLike(this.dev_unid,'内部设备', params);
this.zNodes[1].childs = camerares.vchan_struct const vchanres = await this.$api.device.getDevtreeLike(this.dev_unid,'短视频', params);
this.zNodes[2].childs = vchanres.list_data const cloudres = await this.$api.device.getCloudDev(params);
var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes); this.dealCloudTree(cloudres.data);
ztree.expandAll(true) setTimeout(() => {
this.checkvckan() this.zNodes[0].childs = cloudres?cloudres.data:[];
}, 10); 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) { rowclick(row) {
//播放视频 //播放视频
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div style="padding: 20px 15px 20px 23px;"> <div style="padding: 20px 15px 20px 23px">
<span class="inputBox"> <span class="inputBox">
<el-input v-model="task_name" placeholder="请输入任务名称"></el-input> <el-input v-model="task_name" placeholder="请输入任务名称"></el-input>
</span> </span>
...@@ -53,27 +53,31 @@ ...@@ -53,27 +53,31 @@
placeholder="请选择" placeholder="请选择"
:popper-append-to-body="false" :popper-append-to-body="false"
> >
<el-option value="" label="全部"></el-option> <el-option
<el-option value="0" label="交通"></el-option> v-for="(item, index) in algorTypeList"
<el-option value="1" label="客流"></el-option> :key="index"
<el-option value="12" label="行为分析"></el-option> :value="item.value"
<el-option value="7" label="综合流量"></el-option> :label="item.name"
<!-- <el-option value="4" label='人脸'></el-option> --> ></el-option>
</el-select> </el-select>
</span> </span>
<el-button <el-button
type="primary" type="primary"
style="position: relative;top: -2px;" style="position: relative; top: -2px"
@click="query" @click="query"
>查询</el-button >查询</el-button
> >
<span style="float: right;"> <span style="float: right">
<el-button type="info" icon="el-icon-plus" style="padding: 7px 16px" @click="editTask('add')" <el-button
type="info"
icon="el-icon-plus"
style="padding: 7px 16px"
@click="editTask('add')"
>新建任务</el-button >新建任务</el-button
> >
</span> </span>
</div> </div>
<div style="padding: 0 23px 20px 23px;width:98%"> <div style="padding: 0 23px 20px 23px; width: 98%">
<el-table <el-table
height="59vh" height="59vh"
:data="tableData" :data="tableData"
...@@ -192,7 +196,7 @@ ...@@ -192,7 +196,7 @@
'icon-fanxing-qidong': true, 'icon-fanxing-qidong': true,
playIcon: true, playIcon: true,
noplayicon: noplayicon:
scope.row.status == 'NotInTimeOfDay' ? false : false scope.row.status == 'NotInTimeOfDay' ? false : false,
}" }"
@click="setTaskStatus(scope.row, 'start')" @click="setTaskStatus(scope.row, 'start')"
></span> ></span>
...@@ -209,7 +213,7 @@ ...@@ -209,7 +213,7 @@
:visible-arrow="false" :visible-arrow="false"
> >
<span <span
class="icon-fanxing-zanting pauseIcon" class="icon-fanxing-zanting pauseIcon"
@click="setTaskStatus(scope.row, 'stop')" @click="setTaskStatus(scope.row, 'stop')"
></span> ></span>
</el-tooltip> </el-tooltip>
...@@ -228,9 +232,9 @@ ...@@ -228,9 +232,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top: 28px;"> <div style="margin-top: 28px">
<el-pagination <el-pagination
style="float: right;" style="float: right"
background background
prev-text="上一页" prev-text="上一页"
next-text="下一页" next-text="下一页"
...@@ -243,7 +247,7 @@ ...@@ -243,7 +247,7 @@
:total="total" :total="total"
> >
</el-pagination> </el-pagination>
<div style="clear: both;"></div> <div style="clear: both"></div>
</div> </div>
</div> </div>
<editset <editset
...@@ -253,7 +257,7 @@ ...@@ -253,7 +257,7 @@
@refresh="getTaskList" @refresh="getTaskList"
></editset> ></editset>
<editvideo <editvideo
v-if="!isbigtree" v-if="!isbigtree"
ref="editvideo" ref="editvideo"
:parentData="curtask" :parentData="curtask"
:pedittype="pedittype" :pedittype="pedittype"
...@@ -270,22 +274,24 @@ ...@@ -270,22 +274,24 @@
</div> </div>
</template> </template>
<script> <script>
import { algorTypeList, algorTypeEnum } from "@/enum/index";
console.log('algorTypeEnum', algorTypeEnum);
import editset from "./editSet"; import editset from "./editSet";
import editvideo from "./editVideo"; import editvideo from "./editVideo";
import editVidebigree from "./editVidebigree"; import editVidebigree from "./editVidebigree";
import subTaskInfo from "./subtask.vue"; import subTaskInfo from "./subtask.vue";
import mixin from "../../assets/js/mixin"; import mixin from "../../assets/js/mixin";
export default { export default {
components: { components: {
editset, editset,
editvideo, editvideo,
editVidebigree, editVidebigree,
subTaskInfo subTaskInfo,
}, },
mixins: [mixin], mixins: [mixin],
data() { data() {
return { return {
isbigtree:window.config.bigtree, isbigtree: window.config.bigtree,
task_name: "", task_name: "",
curtask: "", curtask: "",
task_algo_type: "", task_algo_type: "",
...@@ -301,7 +307,8 @@ export default { ...@@ -301,7 +307,8 @@ export default {
pedittype: "add", pedittype: "add",
currentRow: {}, currentRow: {},
assign_ip: "", assign_ip: "",
curscrollTop: 0 curscrollTop: 0,
algorTypeList: algorTypeList,
}; };
}, },
...@@ -310,7 +317,7 @@ export default { ...@@ -310,7 +317,7 @@ export default {
if (!row.isexpand) { if (!row.isexpand) {
//打开获取子任务 //打开获取子任务
row.isexpand = true; row.isexpand = true;
this.$api.task.getSubTask(row.task_id).then(res => { this.$api.task.getSubTask(row.task_id).then((res) => {
let ary = []; let ary = [];
let data = res.list_data; let data = res.list_data;
for (let i in data) { for (let i in data) {
...@@ -378,7 +385,7 @@ export default { ...@@ -378,7 +385,7 @@ export default {
} }
}, },
getFreelist() { getFreelist() {
this.$api.device.getFreelist(this.dev_unid).then(res => { this.$api.device.getFreelist(this.dev_unid).then((res) => {
this.freeList = res.list_data; this.freeList = res.list_data;
}); });
// / // /
...@@ -393,21 +400,7 @@ export default { ...@@ -393,21 +400,7 @@ export default {
} }
}, },
typeFormatter(row, column, cellValue, index) { typeFormatter(row, column, cellValue, index) {
if (cellValue == 0) { return algorTypeEnum[cellValue] || "未知";
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 "未知";
}
}, },
numFormatter(row, column, cellValue, index) { numFormatter(row, column, cellValue, index) {
return (index + 1) * this.page; return (index + 1) * this.page;
...@@ -435,15 +428,15 @@ export default { ...@@ -435,15 +428,15 @@ export default {
task_algo_type: this.task_algo_type, task_algo_type: this.task_algo_type,
source_type: "pull_video_stream", source_type: "pull_video_stream",
task_type: "normal", task_type: "normal",
task_name: this.task_name task_name: this.task_name,
}) })
.then(res => { .then((res) => {
this.total = res.total_num; this.total = res.total_num;
if (res.list_data == null) { if (res.list_data == null) {
this.tableData = []; this.tableData = [];
} else { } else {
res.list_data.forEach(item => { res.list_data.forEach((item) => {
item.subTaskData = []; item.subTaskData = [];
if (item.start_dt) { if (item.start_dt) {
//先转utc格式 //先转utc格式
...@@ -468,7 +461,7 @@ export default { ...@@ -468,7 +461,7 @@ export default {
}); });
} }
}) })
.catch(error => {}); .catch((error) => {});
}, },
editVideo(index, row) { editVideo(index, row) {
this.setsSrollTop(); this.setsSrollTop();
...@@ -482,7 +475,7 @@ export default { ...@@ -482,7 +475,7 @@ export default {
if (row.status == "Running") { if (row.status == "Running") {
this.$message({ this.$message({
type: "info", type: "info",
message: "暂停任务再尝试操作!" message: "暂停任务再尝试操作!",
}); });
return; return;
} }
...@@ -495,8 +488,8 @@ export default { ...@@ -495,8 +488,8 @@ export default {
}); });
}, },
setTaskStatus(data, type) { setTaskStatus(data, type) {
if(type == 'start') { if (type == "start") {
localStorage.setItem("substatus",data.task_id) localStorage.setItem("substatus", data.task_id);
} }
this.setsSrollTop(); this.setsSrollTop();
// if (data.status == "NotInTimeOfDay") { // if (data.status == "NotInTimeOfDay") {
...@@ -504,14 +497,18 @@ export default { ...@@ -504,14 +497,18 @@ export default {
// } // }
this.$api.task this.$api.task
.setTaskStatus(data.task_id, { start_stop_status: type }) .setTaskStatus(data.task_id, { start_stop_status: type })
.then(res => { .then((res) => {
this.$message({ this.$message({
type: res.ecode == "200" ? "success" : "error", type: res.ecode == "200" ? "success" : "error",
message: res.enote message: res.enote,
}); });
if (res.ecode == "200") { if (res.ecode == "200") {
let typename = type=='start'?"启动":"暂停" let typename = type == "start" ? "启动" : "暂停";
this.$logs.oplogs(res,'serv_task',`${typename}任务${data.task_name}`); this.$logs.oplogs(
res,
"serv_task",
`${typename}任务${data.task_name}`
);
this.getTaskList(); this.getTaskList();
} }
}); });
...@@ -520,14 +517,14 @@ export default { ...@@ -520,14 +517,14 @@ export default {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", { this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(() => { }).then(() => {
this.$api.task.deleteTask(data.task_id).then(res => { this.$api.task.deleteTask(data.task_id).then((res) => {
this.$message({ this.$message({
type: res.ecode == "200" ? "success" : "error", 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") { if (res.ecode == "200") {
this.getTaskList(); this.getTaskList();
} }
...@@ -537,7 +534,6 @@ export default { ...@@ -537,7 +534,6 @@ export default {
setsSrollTop() { setsSrollTop() {
this.curscrollTop = this.$refs.table.$el.children[2].scrollTop; this.curscrollTop = this.$refs.table.$el.children[2].scrollTop;
}, },
}, },
mounted() { mounted() {
this.getTaskList(); this.getTaskList();
...@@ -545,7 +541,7 @@ export default { ...@@ -545,7 +541,7 @@ export default {
created() { created() {
this.curscrollTop = 0; this.curscrollTop = 0;
this.getFreelist(); this.getFreelist();
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -656,7 +652,7 @@ export default { ...@@ -656,7 +652,7 @@ export default {
} }
} }
.content { .content {
@include background_color(treeboxbg); @include background_color(treeboxbg);
} }
.inputBox { .inputBox {
margin-right: 20px; margin-right: 20px;
......
const fs = require("fs"); const fs = require("fs");
const path = require("path");
const resolve = dir => {
return path.join(__dirname, dir)
}
const vinfopath = "./public/js/version.json"; const vinfopath = "./public/js/version.json";
const BuildInfo = require("./version.js"); const BuildInfo = require("./version.js");
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
...@@ -29,18 +33,19 @@ module.exports = { ...@@ -29,18 +33,19 @@ module.exports = {
] ]
}, },
chainWebpack: config => { chainWebpack: config => {
config.resolve.alias.set("@", resolve("src"));
// config.entry('main').add('babel-polyfill') // config.entry('main').add('babel-polyfill')
if (process.env.use_analyzer) { if (process.env.use_analyzer) {
// 分析 // 分析
config config
.plugin("webpack-bundle-analyzer") .plugin("webpack-bundle-analyzer")
.use(require("webpack-bundle-analyzer").BundleAnalyzerPlugin); .use(require("webpack-bundle-analyzer").BundleAnalyzerPlugin);
} };
if (process.env.NODE_ENV === "production") { if (process.env.NODE_ENV === "production") {
var verinfo = fs.openSync(vinfopath, "w+"); var verinfo = fs.openSync(vinfopath, "w+");
var options = { encoding: "UTF-8", mode: 438 /*=0666*/, flag: "w" }; var options = { encoding: "UTF-8", mode: 438 /*=0666*/, flag: "w" };
fs.writeFileSync(verinfo, JSON.stringify(BuildInfo), options); fs.writeFileSync(verinfo, JSON.stringify(BuildInfo), options);
} };
}, },
pluginOptions: { pluginOptions: {
// 第三方插件配置 // 第三方插件配置
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!