Commit dd51de5d by 潘建波

6月16提交带任务状态版本

1 parent 07463a28
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<title>fanxing</title>
<script src="<%= BASE_URL %>js/kinetic-v5.1.0.min.js"></script>
<script src="<%= BASE_URL %>js/ObjTree.js"></script>
......
......@@ -4,7 +4,7 @@ console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) {
case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = "http://192.168.9.233:20080"; // 测试环境url
baseUrl = "http://192.168.9.62:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
......
......@@ -39,7 +39,7 @@ export default {
editTrafficCode(params, cate_unid, code_unid) {
return api.post(urls.editTrafficCode(cate_unid, code_unid), params);
},
deleteTrafficCode(params, code_unid) {
deleteTrafficCode(cate_unid,code_unid,params) {
return api.delete(urls.editTrafficCode(cate_unid, code_unid), params);
}
};
......@@ -279,6 +279,11 @@ body{
color: #fff;
font-size: 14px;
}
.taskstatus .statusbox{
height: 25px;
line-height: 25px;
font-size: 12px;
}
.runningbox {
background: #36BEA6;
}
......@@ -296,4 +301,7 @@ body{
}
.el-table--small td, .el-table--small th {
height: 55px;
}
.el-radio__label{
color: #333;
}
\ No newline at end of file
......@@ -117,7 +117,15 @@ Vue.prototype.timeForm = function(obj) {
nowY + "-" + nowM + "-" + nowD + " " + nowH + ":" + nowMi + ":" + nowS;
return timeNow;
};
Vue.prototype.yesterDay = function() {
var data = new Date().getTime() - 24 * 60 * 60 * 1000;
var curdate = this.timeForm(new Date(data));
return curdate.split(" ")[0] + " " + "00:00:00";
};
Vue.prototype.nowDay = function(){
var data = new Date();
return this.timeForm(data);
};
/**
* @param {obj}
* UTC时间处理
......
......@@ -36,4 +36,3 @@ new Vue({
// window.onunload = function() {
// localStorage.clear();
// };
......@@ -174,15 +174,15 @@ export const asyncRouterMap = [
component: resolve =>
require(["../views/resource/store_confs.vue"], resolve)
},
{
path: "/resource/author",
name: "授权管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/Author/author.vue"], resolve)
},
// {
// path: "/resource/author",
// name: "授权管理",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve =>
// require(["../views/resource/Author/author.vue"], resolve)
// },
{
path: "/resource/nationalStandard",
name: "国标配置",
......@@ -244,14 +244,14 @@ export const asyncRouterMap = [
},
component: resolve => require(["../views/ops/role_manage.vue"], resolve)
},
{
path: "/ops/batch_upgrade",
name: "批量升级",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve)
},
// {
// path: "/ops/batch_upgrade",
// name: "批量升级",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve => require(["../views/ops/log_manage.vue"], resolve)
// },
{
path: "/ops/log_manage",
name: "日志管理",
......
......@@ -25,5 +25,8 @@ export default {
},
setDevList(state, data) {
state.devList = data;
},
setCodeState(state, data) {
state.codestate = data;
}
};
......@@ -2,5 +2,6 @@ export default {
ocxstate: 0,
mapopen: false,
addRouter: [],
devList: []
devList: [],
codestate: ""
}
......@@ -74,7 +74,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -7,7 +7,7 @@
<el-col :span="2" class="ml10">
<el-button type="primary">查询</el-button>
</el-col>
<el-col :span="8" style="float:right">
<el-col :span="8" style="float:right" hidden>
<span class="resource-box">
<span class="title">可用分析资源:</span>
<span class="num">{{ workers.video_free }}</span>
......
......@@ -71,7 +71,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -54,7 +54,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -63,7 +63,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -51,7 +51,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -86,14 +86,14 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px;" hidden>
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
:page-sizes="[30, 50, 100, 200]"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -170,7 +170,7 @@ export default {
return {
total: 0,
page: 1,
pageSize: 20,
pageSize: 50,
tableData: [],
detailVisible: false,
eventCateData: [],
......@@ -188,7 +188,7 @@ export default {
},
components: {},
created() {
// this.getEventList();
this.getEventList();
this.getEventCate();
},
methods: {
......@@ -197,8 +197,14 @@ export default {
this.tableData = res.list_data;
});
},
cateChange() {
this.$api.codes.eventType({}, this.curcate).then(res => {
cateChange(unid) {
let offset = (this.page - 1) * this.pageSize;
let obj = {
limit: this.pageSize,
offset: offset
};
this.tableData = [];
this.$api.codes.eventType(obj, unid).then(res => {
this.tableData = res.list_data;
});
},
......
......@@ -33,7 +33,7 @@
type="index"
align="center"
label="#"
width="40"
width="60"
></el-table-column>
<el-table-column align="center" prop="code_unid" label="code_unid">
</el-table-column>
......@@ -77,14 +77,14 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px;" hidden>
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -242,34 +242,54 @@ export default {
});
},
saveAddCode() {
this.$api.codes
.addTrafficCode(this.codeData, this.curCateUnid)
.then(res => {
console.log(res);
});
let data = {
code_unid: this.codeData.code_unid,
code: this.codeData.code,
name: this.codeData.name,
note: this.codeData.note,
active: this.codeData.active
};
this.$api.codes.addTrafficCode(data, this.curCateUnid).then(res => {
console.log(res);
this.detailVisible = false;
this.cateChange(this.curCateUnid);
});
},
saveEditCode() {
saveEditCode() {
let data = {
"code_unid": this.codeData.code_unid,
"code":this.codeData.code,
"name":this.codeData.name,
"note":this.codeData.note,
"active":this.codeData.active }
code_unid: this.codeData.code_unid,
code: this.codeData.code,
name: this.codeData.name,
note: this.codeData.note,
active: this.codeData.active
};
this.$api.codes
.editTrafficCode(
data,
this.curCateUnid,
this.codeData.code_unid
)
.editTrafficCode(data, this.curCateUnid, this.codeData.code_unid)
.then(res => {
console.log(res);
this.detailVisible = false;
this.cateChange(this.curCateUnid);
});
},
deleteCode(index, row) {
this.$api.codes
.editTrafficCode(row, this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$api.codes
.deleteTrafficCode(this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
this.cateChange(this.curCateUnid);
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
},
handleSizeChange(val) {
......
......@@ -85,7 +85,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -207,7 +207,7 @@ export default {
unid: this.addVideoParam.addr_unid
};
this.$emit("getAllData", data);
// this.$parent.$parent.$parent.submitLaterGet(data)
// this.$parent.$parent.$parent.$parent.submitLaterGet(data);
this.cameraAddVisible = false;
} else {
this.$message.error(res.enote);
......@@ -251,6 +251,11 @@ export default {
});
}
}
},
created(){
this.dirCodeList = localStorage.getItem("卡口方向")
? JSON.parse(localStorage.getItem("卡口方向"))
: [];
}
};
</script>
......
......@@ -21,14 +21,14 @@
data.vchan_name == "" ? "未命名" : data.vchan_name
}}</span>
</span>
<span class="tree-btn" v-if="data.label || data.label == ''">
<span class="tree-btn" v-if="(data.label || data.label == '') && data.vtype ? false:true" >
<i class="el-icon-plus" @click.stop="nodeAddClick(node, data)"></i>
<i
class="el-icon-edit"
@click.stop="nodeEditClick(node, data)"
v-if="data.org_type != 'root'"
></i>
<i
<i
class="el-icon-delete"
@click.stop="nodeDelClick(node, data)"
v-if="data.org_type != 'root'"
......
......@@ -135,7 +135,6 @@ export default {
console.log("error", req);
},
handleNodeClick(data) {
debugger
this.$emit("clickHandle", data, "video");
// this.$parent.$parent.getVideoTable(data,'video')
},
......
......@@ -314,8 +314,8 @@ export default {
.then(res => {
this.cameraTree = res.vchan_struct;
this.cameraArr = [];
this.cameraBuildTree(res.vchan_struct);
this.getTable(data, "camera");
this.cameraTreeData = this.cameraBuildTree(res.vchan_struct);
// this.getTable(data, "camera");
});
},
syncBuildTree(data) {
......@@ -394,6 +394,7 @@ export default {
obj["label"] =
data[i].vchan_name === "" ? "未命名" : data[i].vchan_name;
obj["type"] = data[i].vchan_type;
obj["vtype"] = "camera";
obj["root"] = "手动添加相机资源";
obj["orgNode"] = orgObject;
obj["addrNode"] = addrObject;
......@@ -459,6 +460,10 @@ export default {
vchan_type: "camera",
org_unid: data.unid
};
if (data.vtype) {
this.formattterData.push(data);
return;
}
this.$api.resource
.getCameraTable(search_params, this.dev_unid)
.then(res => {
......
......@@ -47,7 +47,7 @@
:key="subTask.subtask_id"
:class="[
{ subtaskActive: subTask.subtask_id == currentSubtaskId },
{ disabledColor: subTask.running_status != 'Running' }
{ disabledColor: subTask.enableStatus == 5 }
]"
:data-subtask="subTask.subtask_id"
:id="subTask.vchan.vdev_unid + ',' + subTask.vchan.vchan_refid"
......@@ -128,6 +128,10 @@ export default {
});
},
subTasksClick(vdata) {
//删除中的任务不能点击
if (vdata.enableStatus == 5) {
return;
}
this.$store.commit("setocxstate", 1);
this.currentSubtaskId = vdata.subtask_id;
this.subtaskdata = vdata;
......@@ -331,6 +335,11 @@ export default {
color #01ce82
}
}
.disabledColor{
color #c0c0c0!important;
text-decoration: line-through;
cursor text
}
.subtaskActive {
// background #0c3b87
}
......
......@@ -75,6 +75,7 @@
<el-select
v-if="drawState == 2 && selectedShape"
v-model="markLineDirect"
placeholder="方向选择"
>
<el-option value="0" label="去向"></el-option>
<el-option value="1" label="来向"></el-option>
......@@ -83,6 +84,7 @@
<span v-if="drawState == 2 && selectedShape">车道号</span>
<el-input
type="number"
placeholder="车道号"
v-model="lineNum"
min="1"
v-if="
......@@ -134,6 +136,7 @@
disabled="disabled"
type="text"
class="w120"
style="margin-top:10px"
placeholder="区域ID"
></el-input>
<el-input
......@@ -147,13 +150,14 @@
<div v-if="canvasState" sytle="textAlign:center">
<!-- <button>撤销</button> -->
<el-radio-group v-model="polyline" @change="polyChang">
<el-radio
class="radio"
:label="0"
:style="lineRadioStyle"
v-if="drawState == 1"
>直线</el-radio
>
<div>
<el-radio
class="radio"
:label="0"
:style="lineRadioStyle"
v-if="drawState == 1"
>直线</el-radio>
</div>
<el-radio
class="radio"
:label="1"
......@@ -2051,13 +2055,7 @@ export default {
} catch (error) {
console.log(error);
}
console.log("#######################");
console.log(lanaAry);
console.log("#######################");
this.roiBody.lanes = {
lane_count: lanaAry.length ? lanaAry.length : 0,
lane: lanaAry ? lanaAry : []
};
//对向车道
try {
this.subtendLayer.get(".rect").forEach((el, index) => {
......@@ -2094,7 +2092,13 @@ export default {
} catch (error) {
console.log(error);
}
console.log("#######################");
console.log(lanaAry);
console.log("#######################");
this.roiBody.lanes = {
lane_count: lanaAry.length ? lanaAry.length : 0,
lane: lanaAry ? lanaAry : []
};
// 红绿灯区域
let lightAry = [];
try {
......@@ -2382,6 +2386,7 @@ button {
.modal-editbox .modal-lb {
position: absolute;
bottom: 0;
width: 150px;
}
.modal-right {
position: relative;
......
......@@ -112,7 +112,6 @@ export default {
return {
dialogVisible: false,
curType: 0,
canvasState: 0,
data: {},
type: "0",
btnIsactive: false,
......@@ -287,7 +286,7 @@ export default {
this.signLayer.add(line);
}
});
changeModelData("car")
changeModelData("car");
this.initModel();
},
initModel(){
......@@ -308,9 +307,8 @@ export default {
);
this.signLayer.add(line);
this.stage.draw();
let P1 = {},
let P1 = {},
P2 = {};
P1.x = Number((po[0] / 800).toFixed(6));
P1.y = Number((po[1] / 500).toFixed(6));
P2.x = Number((po[2] / 800).toFixed(6));
......@@ -331,6 +329,7 @@ export default {
return;
}
this.changeIdnex = index;
this.modelnum = 0;
//清除之前的模型和模型线
let allLine = this.signLayer.get(".line");
let allModel = this.signLayer.get(".model");
......@@ -352,9 +351,9 @@ export default {
this.signLayer.draw();
//变换线模型
let mtype = index == 0 ? "car" : "person";
changeModelData(mtype);
this.initModel();
this.cancleSelectedGroup();
},
changeCanvasState: function() {
......@@ -386,6 +385,7 @@ export default {
makeSelectedGroup: function(shape) {
let points = shape.attrs.points;
let color = this.drawState ? "blue" : "red";
this.modelnum = 0;
for (let i = 0; i < points.length; i += 2) {
const pos = {
x: points[i],
......@@ -523,7 +523,6 @@ export default {
modelnum: this.modelnum,
// a Kinetic.Canvas renderer is passed into the drawFunc function
drawFunc: function(ctx) {
debugger;
ctx.beginPath();
ctx.lineTo(data[0].x, data[0].y);
ctx.lineTo(data[1].x, data[1].y);
......@@ -563,6 +562,7 @@ export default {
});
this.signLayer.add(customShape);
this.signLayer.draw();
this.canvasState = 0;
},
//绘制箭头
drawArrows(c1, c2) {
......@@ -657,7 +657,6 @@ export default {
points.push(ele.attrs.x);
points.push(ele.attrs.y);
});
this.selectedShape.attrs.points = points;
let curmodelnun = this.selectedShape.attrs.linenum;
//标定线变化变换模型
......@@ -675,7 +674,6 @@ export default {
},
//根据模型线改变模型改变箭头
changeModel(modelnum) {
console.log(modelnum);
let mlinepoints = this.selectedShape.attrs.points;
let curmodel = this.signLayer.get(".model");
let arrows = this.signLayer.get(".arrows");
......@@ -709,7 +707,6 @@ export default {
});
},
drawLine: function(start, end, col, types, linenum) {
debugger;
linenum = linenum ? linenum : 0;
let points = [start.x, start.y, end.x, end.y];
let line = new Kinetic.Line({
......
......@@ -23,7 +23,10 @@
<el-table-column align="center" label="预设位置配置" width="120">
<template slot-scope="scope">
<div class="yzw-setbox">
<span class="icon el-icon-delete" @click="resetRoi(scope.row)"></span>
<span
class="icon el-icon-delete"
@click="resetRoi(scope.row)"
></span>
</div>
</template>
</el-table-column>
......@@ -42,11 +45,32 @@
<el-table-column prop="address" align="center" label="参数设置">
<template slot-scope="scope">
<div class="table-set">
<span @click="setParam(scope.row, scope.$index)">参数设置</span>
<span @click="setArea(scope.row, scope.$index)">区域设置</span>
<span @click="setDemarcate(scope.row, scope.$index)"
>标定设置</span
<el-tooltip
class="item"
effect="dark"
:content="taskInfo.param_status == 0 ? '运行中' : '下发中'"
placement="top"
>
<span @click="setParam(scope.row, scope.$index)">参数设置</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
:content="taskInfo.roi_status == 0 ? '运行中' : '下发中'"
placement="top"
>
<span @click="setArea(scope.row, scope.$index)">区域设置</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
:content="taskInfo.calibration_status == 0 ? '运行中' : '下发中'"
placement="top"
>
<span @click="setDemarcate(scope.row, scope.$index)"
>标定设置</span
>
</el-tooltip>
<!-- <span @click="setTimer(scope.row, scope.$index)">时间设置</span> -->
</div>
</template>
......@@ -125,7 +149,7 @@ export default {
switchstate: false
};
},
props: ["taskid", "subtaskid", "playurl", "vchan"],
props: ["taskid", "subtaskid", "playurl", "vchan", "subtaskdata"],
components: {
areas,
demarcate,
......@@ -138,7 +162,7 @@ export default {
setParam(scenesdata, index) {
if (this.checkpollstate()) {
this.curindex = index;
this.$refs.parameter.init(scenesdata);
this.$refs.parameter.init(scenesdata, this.taskInfo);
}
},
setArea(roidata, index) {
......@@ -216,11 +240,12 @@ export default {
type: "warning"
})
.then(() => {
debugger
debugger;
that.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == row.scene_unid) {
ele.config = {};
ele.rois[0].roi = '<?xml version="1.0" encoding="UTF-8" ?><roi><flow_roi><flow_type></flow_type><flow_region><polygon_point_count>0</polygon_point_count></flow_region></flow_roi><plate_detect_region><detect_polygon><polygon_point_count>0</polygon_point_count></detect_polygon></plate_detect_region><lane_line><line_count>0</line_count></lane_line><lanes><lane_count>0</lane_count></lanes><lights><light_count>0</light_count></lights><no_stop_region><region_count>0</region_count></no_stop_region><pedestrian_detection_region><region_count>0</region_count></pedestrian_detection_region><median_lines><lane_count>0</lane_count></median_lines><pedestrian_density_region><region_count>0</region_count></pedestrian_density_region><foreign_detection_region><region_count>0</region_count></foreign_detection_region><test_result_region><region_count>0</region_count></test_result_region></roi>';
ele.rois[0].roi =
'<?xml version="1.0" encoding="UTF-8" ?><roi><flow_roi><flow_type></flow_type><flow_region><polygon_point_count>0</polygon_point_count></flow_region></flow_roi><plate_detect_region><detect_polygon><polygon_point_count>0</polygon_point_count></detect_polygon></plate_detect_region><lane_line><line_count>0</line_count></lane_line><lanes><lane_count>0</lane_count></lanes><lights><light_count>0</light_count></lights><no_stop_region><region_count>0</region_count></no_stop_region><pedestrian_detection_region><region_count>0</region_count></pedestrian_detection_region><median_lines><lane_count>0</lane_count></median_lines><pedestrian_density_region><region_count>0</region_count></pedestrian_density_region><foreign_detection_region><region_count>0</region_count></foreign_detection_region><test_result_region><region_count>0</region_count></test_result_region></roi>';
ele.runtime = 0;
}
});
......@@ -344,15 +369,18 @@ export default {
roi: xml
}
];
postObj.conf_type = "rois";
} else if (type == "config") {
postObj.mtasks[0].scenes[this.curindex].config = {
xml: xml
};
postObj.conf_type = "paramsconfig";
} else if (type == "calibration") {
console.log(xml);
postObj.mtasks[0].scenes[this.curindex].calibration = {
calibration: xml
};
postObj.conf_type = "calibration";
}
this.$api.task
.editRoi(this.taskid, this.subtaskid, postObj, {
......@@ -368,6 +396,7 @@ export default {
});
switch (type) {
case "roi":
this.taskInfo.roi_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].rois = [
{
roi: xml
......@@ -375,6 +404,13 @@ export default {
];
break;
case "calibration":
this.taskInfo.calibration_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].calibration = {
calibration: xml
};
break;
case "config":
this.taskInfo.param_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].calibration = {
calibration: xml
};
......@@ -382,11 +418,16 @@ export default {
default:
break;
}
} else {
this.$message({
message: m.enote,
type: "error"
});
}
});
}
},
created(){
created() {
this.user_unid = window.sessionStorage.getItem("user_unid");
},
watch: {
......
......@@ -121,7 +121,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -199,7 +199,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -259,9 +259,8 @@
import videoDialog from "@/components/video";
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -164,7 +164,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -260,7 +260,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -348,9 +348,8 @@
import videoDialog from "@/components/video";
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
loading: false,
playurl: "",
......
......@@ -179,7 +179,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -181,7 +181,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -114,7 +114,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -187,7 +187,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -202,9 +202,8 @@
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
loading: false,
dates: [start_dt, end_dt],
......
......@@ -189,7 +189,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -271,7 +271,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -360,9 +360,8 @@
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -267,7 +267,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -363,7 +363,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -452,9 +452,8 @@
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -130,7 +130,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -229,11 +229,11 @@
</div>
</template>
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -46,7 +46,7 @@
</el-select>
</el-form-item>
<el-form-item label="场景占用" class="form-item" prop="resource_use">
<el-select
<el-select
v-model="formData.resource_use"
placeholder="请选择"
:popper-append-to-body="false"
......@@ -64,7 +64,7 @@
</el-form-item>
<el-form-item
label="时间"
v-show="formData.plate_time != 'day'"
v-show="!formData.period"
prop="timer"
class="form-item"
>
......@@ -86,11 +86,14 @@
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
:disabled="pedittype != 'add'"
>
</el-time-picker>
</el-form-item>
<el-form-item label="存储配置" class="form-item">
<el-form-item
label="存储配置"
class="form-item"
prop="store_conf_unid"
>
<el-select
v-model="formData.store_conf.unid"
placeholder="请选择"
......@@ -105,7 +108,10 @@
</el-select>
</el-form-item>
<el-form-item label="设备类型" class="form-item">
<el-select v-model="formData.plate_type" :disabled="pedittype != 'add'">
<el-select
v-model="formData.plate_type"
:disabled="pedittype != 'add'"
>
<el-option
v-for="(item, index) in platT"
:key="index"
......@@ -139,9 +145,16 @@
<script>
export default {
data() {
var checkStore = (rule, value, callback) => {
if (!this.formData.store_conf.unid) {
return callback(new Error("存储配置不能为空"));
} else {
callback()
}
};
return {
setvisible: false,
timer:["00:00:00", "23:59:59"],
timer: ["00:00:00", "23:59:59"],
formData: {
task_name: "",
task_algo_type: "",
......@@ -162,9 +175,10 @@ export default {
stores: [
{ required: true, message: "存储配置不能为空!", trigger: "change" }
],
resource_use:[
{ required: true, message: "场景占用不能为空!", trigger: "change" }
]
resource_use: [
{ required: true, message: "场景占用不能为空!", trigger: "change" }
],
store_conf_unid: [{ required: true, validator: checkStore, trigger: "change" }]
}
};
},
......@@ -187,10 +201,9 @@ export default {
var freeArr = [];
this.freeList.forEach(ele => {
if (ele.license_info && ele.license_info.platType) {
this.platT.push(ele.license_info.platType);
this.platT.push(ele.license_info.platType);
}
});
this.platT = new Set(this.platT);
}
},
initData(type, pdata) {
......
......@@ -158,6 +158,8 @@ export default {
data[i].vchan.name = data[i].vchan.vchan_name;
data[i].vchan.running_status = data[i].running_status;
data[i].vchan.play_url = data[i].rtsp_url;
data[i].vchan.play_url = data[i].rtsp_url;
data[i].vchan.enableStatus = data[i].enableStatus;
} else {
data.vchan = {
subtask_id: data[i].subtask_id,
......@@ -165,7 +167,8 @@ export default {
vchan_name: data[i].subtask_name,
name: data[i].subtask_name,
running_status: data[i].running_status,
play_url: data[i].rtsp_url
play_url: data[i].rtsp_url,
enableStatus: data[i].enableStatus
};
}
ary.push(data[i].vchan);
......@@ -175,18 +178,26 @@ export default {
});
},
statusFormatter(row) {
if (row.running_status == "Running") {
let data = row.enableStatus;
if (data == 2) {
return "<span class='runningbox statusbox'>工作中</span>";
} else if (row.running_status == "Finished") {
return "<span class='finishedbox statusbox'>已完成</span>";
} else if (row.running_status == "Pause") {
return "<span class='pausebox statusbox'>暂停</span>";
} else if (row.running_status == "Error") {
return "<span class='errorbox statusbox'>异常</span>";
} else if (row.running_status == "Deleted") {
} else if (data == 1) {
return "<span class='nomoralbox statusbox'>部署中</span>";
} else if (data == 3) {
return "<span class='pausebox statusbox'>暂停中</span>";
} else if (data == 4) {
return "<span class='pausebox statusbox'>已暂停</span>";
} else if (data == 5) {
return "<span class='deletebox statusbox'>删除中</span>";
} else if (data == 6) {
return "<span class='deletebox statusbox'>已删除</span>";
} else {
} else if (data == 7) {
return "<span class='pausebox statusbox'>启动中</span>";
} else if (data == 0) {
return "<span class='nomoralbox statusbox'>未部署</span>";
} else {
// return "<span class='errorbox statusbox'>异常</span>";
return "<span class='nomoralbox statusbox'>部署中</span>";
}
},
handleCheckChange(data, node) {
......@@ -244,7 +255,6 @@ export default {
console.log("b", data);
},
delFun(index, data, action = "tree") {
console.log("da",data);
this.$store.commit("setocxstate", 0);
this.$confirm("删除视频源, 是否继续?", "提示", {
confirmButtonText: "确定",
......@@ -255,13 +265,20 @@ export default {
this.$api.task
.deleteSubTask(this.editData.task_id, data.subtask_id)
.then(res => {
this.$message({
type: "success",
message: "删除成功!"
});
this.tableData.splice(index, 1);
this.checkvckan();
this.$store.commit("setocxstate", 1);
if (res.ecode == "200") {
this.$message({
type: "success",
message: "删除成功!"
});
this.tableData.splice(index, 1);
this.checkvckan();
this.$store.commit("setocxstate", 1);
} else {
this.$message({
type: "error",
message: res.enote
});
}
});
if (action != "tree") {
setTimeout(() => {
......@@ -291,7 +308,7 @@ export default {
this.tableData.forEach(ele => {
arr.push(ele.vchan_refid);
});
console.log(arr)
console.log(arr);
this.$refs.tree.setCheckedKeys(arr);
},
rowclick(row) {
......@@ -357,8 +374,7 @@ export default {
if (vchan.leaf) {
vchan.childs = "";
}
vchan.vchan_refid = vchan.refid || vchan.vchan_refid
vchan.vchan_refid = vchan.refid || vchan.vchan_refid;
}
resolve(vchans);
setTimeout(() => {
......@@ -388,7 +404,7 @@ export default {
}
return resolve(node.data.childs);
},
renderContent(h, { node, data, store }){
renderContent(h, { node, data, store }) {
return (
<span class="custom-tree-node">
<el-tooltip
......@@ -399,7 +415,8 @@ export default {
>
<span>{node.label}</span>
</el-tooltip>
</span>);
</span>
);
},
vchanClick(node) {
if (!node.refid && !node.vchan_refid) {
......@@ -575,4 +592,4 @@ export default {
border: 1px solid #444444;
margin-bottom: 14px;
}
</style>
\ No newline at end of file
</style>
......@@ -99,7 +99,7 @@
<el-table-column
align="center"
prop="num"
:formatter="numFormatter"
type="index"
label="序号"
width="60"
>
......@@ -227,7 +227,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -310,6 +310,10 @@ export default {
? data[i].video_total
: "";
data[i].vchan.plate_type = row.plate_type ? row.plate_type : "";
data[i].vchan.running_status = data[i].running_status
? data[i].running_status
: "";
data[i].vchan.enableStatus = data[i].enableStatus ? data[i].enableStatus : "";
}
ary.push(data[i].vchan);
}
......@@ -473,7 +477,7 @@ export default {
}
});
});
},
}
},
mounted() {
this.getTaskList();
......@@ -551,7 +555,8 @@ export default {
height: 34px;
}
.textCon {
margin-right: 114px;
margin-right: 64px;
// margin-right: 114px;
}
}
.rightBox:nth-of-type(2) {
......@@ -561,6 +566,7 @@ export default {
width: 40px;
height: 40px;
margin-left: 1vw;
// margin-left: 3vw;
}
.textCon {
margin-right: 101px;
......
<template>
<div class="expande-table-row">
<span class="label">{{ subindex + 1 }}</span>
<span class="label labelindex">{{ subindex + 1 }}</span>
<el-tooltip class="item" effect="dark" :content="subTaskData.info" placement="top-start"><span class="subtask-info taskstatus" v-html="formater(subTaskData)"></span></el-tooltip>
<span class="label">视频源文件</span>
<span class="subtask-info">{{ subTaskData.vchan_name }}</span>
<span class="label">任务ID</span>
......@@ -19,7 +20,10 @@
:key="index"
:value="item.device_id"
:label="item.in_ip"
v-if="subTaskData.plate_type && item.license_info.platType === subTaskData.plate_type"
v-if="
subTaskData.plate_type &&
item.license_info.platType === subTaskData.plate_type
"
>
{{ item.in_ip }} {{ item.license_info.platType }}
</el-option>
......@@ -75,6 +79,27 @@ export default {
});
}
});
},
formater(data) {
if (data.enableStatus == 2) {
return "<span class='runningbox statusbox'>工作中</span>";
} else if (data.enableStatus == 1) {
return "<span class='nomoralbox statusbox'>部署中</span>";
} else if (data.enableStatus == 3) {
return "<span class='pausebox statusbox'>暂停中</span>";
} else if (data.enableStatus == 4) {
return "<span class='pausebox statusbox'>已暂停</span>";
} else if (data.enableStatus == 5) {
return "<span class='deletebox statusbox'>删除中</span>";
} else if (data.enableStatus == 6) {
return "<span class='deletebox statusbox'>已删除</span>";
} else if (data.enableStatus == 7) {
return "<span class='pausebox statusbox'>启动中</span>";
} else if (data.enableStatus == 0) {
return "<span class='nomoralbox statusbox'>未部署</span>";
} else {
return "<span class='errorbox statusbox'>异常</span>";
}
}
},
created() {
......@@ -98,6 +123,7 @@ export default {
border-bottom: 1px solid #ccc;
overflow: hidden;
}
.label {
width: 5vw;
text-align: center;
......@@ -106,6 +132,12 @@ export default {
height: 40px;
line-height: 40px;
}
.labelindex {
width: 3vw;
}
.taskstatus {
width: 5vw;
}
.subtask-info {
border-left: 1px solid #f0f0f0;
text-align: center;
......@@ -113,24 +145,24 @@ export default {
height: 40px;
line-height: 40px;
}
.subtask-info:nth-child(3) {
.subtask-info:nth-child(4) {
width: 7vw;
overflow: hidden;
}
.subtask-info:nth-child(5) {
.subtask-info:nth-child(6) {
width: 8vw;
}
.subtask-info:nth-child(7) {
.subtask-info:nth-child(8) {
width: 6vw;
}
.subtask-info:nth-child(9) {
width: 4vw;
.subtask-info:nth-child(10) {
width: 3vw;
}
.subtask-info:nth-child(11) {
width: 4vw;
.subtask-info:nth-child(12) {
width: 3vw;
}
.subtask-info:nth-child(13) {
width: 9vw;
.subtask-info:nth-child(14) {
width: 7vw;
}
.sub-btn {
cursor: pointer;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!