Commit f413c471 by 潘建波

【NEW】添加预置位控制

1 parent c533eb6e
{"commit":"890a941be8cc7203b9ed0ea9b763bafc3455cb5b","commitDate":"2021-7-2 10:32","buildDate":"2021-7-2 10:56","version":"2.1.0","info":"【BUG】修改删除判定线导致车道消失问题"}
\ No newline at end of file
{"commit":"c533eb6ed3919268281435bd464f69d2b2aecf11","commitDate":"2021-7-2 11:21","buildDate":"2021-7-2 16:47","version":"2.1.0","info":"【BUG】修改判定线删除导致车道线消失问题"}
\ No newline at end of file
......@@ -210,16 +210,18 @@ export default {
addsounces(){
let scensinit = JSON.parse(JSON.stringify(this.taskInfo.mtasks[0].scenes[0]));
scensinit.config = {}
scensinit.rois = "";
scensinit.rois = null;
scensinit.runtime = -1
scensinit.scene_unid = this.uuid()
scensinit.position_name = 1
scensinit.position_num = -1
scensinit.position_name = "1"
scensinit.position_num = "1"
this.taskInfo.mtasks[0].scenes.push(scensinit)
this.subRoi(this.taskInfo.mtasks,`增加场景${this.uuid()}`);
},
//删除场景
delsounces(row,index){
this.taskInfo.mtasks[0].scenes.splice(index,1)
this.subRoi(this.taskInfo.mtasks,`删除场景${index}`);
},
getSipSetting: function() {
if (this.dev_unid) {
......@@ -337,6 +339,18 @@ export default {
return state;
},
submitPosion(positionnum) {
let postions = []
this.taskInfo.mtasks[0].scenes.map(ele => {
postions.push(ele.position_num)
});
debugger
if(postions.indexOf(positionnum) > 0) {
this.$message({
message: "预置位已经存在请重新设置!",
type: "error"
});
return
}
this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) {
ele.position_num = positionnum;
......@@ -348,7 +362,7 @@ export default {
deleteytconfig(positionnum) {
this.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == this.currentRow.scene_unid) {
ele.position_num = 0;
ele.position_num = "0";
}
});
let sunbtaskname = this.subtaskdata.subtask_name;
......@@ -479,15 +493,7 @@ export default {
this.user_unid = window.sessionStorage.getItem("user_unid");
},
watch: {
// subtaskid(val) {
// this.loading = true;
// this.$api.task.getTaskParams(this.taskid, val).then(res => {
// this.taskInfo = res;
// this.switchstate = res.alternate_status == 1 ? true : false;
// this.loading = false;
// this.$forceUpdate();
// });
// }
}
};
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!