Commit dd51de5d by 潘建波

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

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