Commit 614844c3 by 潘建波

设置算法类型

1 parent e95272b2
......@@ -180,7 +180,7 @@ export default {
.then(res => {
res.list_data.forEach(item => {
this.$api.codes
.codes({}, item.cate_unid)
.codes({active:true}, item.cate_unid)
.then(res => {
// 存储code列表
window.localStorage.setItem(
......@@ -237,7 +237,7 @@ export default {
});
},
getEventList() {
this.$api.search.eventTypes({}).then(res => {
this.$api.search.eventTypes({active:true}).then(res => {
// 存储code列表
window.localStorage.setItem("安防事件", JSON.stringify(res.list_data));
// 存储单独code
......
......@@ -42,13 +42,22 @@
</el-table-column>
<el-table-column
align="center"
prop="note"
label="备用名称"
></el-table-column>
<el-table-column
align="center"
prop="event_cate_unid"
label="类型"
:formatter="cateFormatter"
>
</el-table-column>
<el-table-column align="center" prop="active" label="状态"
:formatter="activeFormatter">
<el-table-column
align="center"
prop="active"
label="状态"
:formatter="activeFormatter"
>
</el-table-column>
<el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope">
......@@ -129,6 +138,9 @@
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
<el-form-item label="备注" prop="note">
<el-input v-model="codeData.note"></el-input>
</el-form-item>
<el-form-item
label="启用"
prop="active"
......@@ -137,8 +149,8 @@
]"
>
<el-select v-model="codeData.active" placeholder="请选择">
<el-option label="开启" :value="1"></el-option>
<el-option label="关闭" :value="0"></el-option>
<el-option label="开启" :value="true"></el-option>
<el-option label="关闭" :value="false"></el-option>
</el-select>
</el-form-item>
</el-form>
......@@ -168,7 +180,7 @@ export default {
name: "",
code: "",
catename: "",
active:1
active: 1
},
editStatus: 0,
event_type_unid: ""
......@@ -207,14 +219,14 @@ export default {
cateFormatter(row) {
return this.getCateName(row.event_cate_unid);
},
activeFormatter(row){
let text = "开启"
if(row.active && row.active == 0) {
text = "关闭"
activeFormatter(row) {
let text = "开启";
if (row.active) {
text = "开启";
} else {
text = "开启"
text = "关闭";
}
return text
return text;
},
editCode(index, row) {
this.event_type_unid = row.event_type_unid;
......@@ -225,7 +237,8 @@ export default {
code: row.code,
catename: this.getCateName(this.curcate),
event_cate_unid: row.event_cate_unid,
active: row.active
active: row.active,
note: row.note
};
},
deleteCode(index, row) {
......
......@@ -41,6 +41,15 @@
</el-table-column>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column align="center" prop="note" label="备用名称">
</el-table-column>
<el-table-column
align="center"
prop="active"
label="状态"
:formatter="activeFormatter"
>
</el-table-column>
<el-table-column align="center" prop="operation" label="操作">
<template slot-scope="scope">
<el-tooltip
......@@ -120,14 +129,20 @@
>
<el-input v-model="codeData.name"></el-input>
</el-form-item>
<el-form-item label="备注" prop="note">
<el-input v-model="codeData.note"></el-input>
</el-form-item>
<el-form-item
label="备注"
prop="note"
label="启用"
prop="active"
:rules="[
{ required: true, message: '备注名称不能为空!', trigger: 'blur' }
{ required: true, message: '名称不能为空!', trigger: 'blur' }
]"
>
<el-input v-model="codeData.note"></el-input>
<el-select v-model="codeData.active" placeholder="请选择">
<el-option label="开启" :value="true"></el-option>
<el-option label="关闭" :value="false"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -154,7 +169,7 @@ export default {
detailVisible: false,
codeStatus: 0,
codeData: {},
editdis:false,
editdis: false
};
},
components: {},
......@@ -202,13 +217,22 @@ export default {
this.catesData = res.list_data;
});
},
activeFormatter(row) {
let text = "开启";
if (row.active) {
text = "开启";
} else {
text = "关闭";
}
return text;
},
saveCode() {
this.$refs["trfficform"].validate(valid => {
if (valid) {
if (this.editStatus === 0) {
if (this.codeStatus === 0) {
this.saveAddCode();
}
if (this.editStatus === 1) {
if (this.codeStatus === 1) {
this.saveEditCode();
}
} else {
......
......@@ -101,8 +101,8 @@
<div class="timer-sel">
<el-select v-model="timer" placeholder="请选择">
<el-option
v-for="item in timeroptions"
:key="item"
v-for="(item, index) in timeroptions"
:key="index"
:label="item"
:value="item"
>
......@@ -150,7 +150,7 @@ export default {
timersel: 0,
timerDialog: false,
curindex: 0,
timeroptions: [30, 40, 50, 60, 100],
timeroptions: [5, 10, 15, 20, 30, 40, 50, 60],
timerscenes: null,
currentRow: null,
taskInfo: {
......@@ -208,6 +208,7 @@ export default {
this.polling_state = data.pollingState;
this.$store.commit("setocxstate", 0);
this.timerDialog = true;
this.timer = data.runtime;
},
resetRoi() {
this.taskInfo.mtasks[0].scenes.map(ele => {
......
......@@ -24,6 +24,7 @@
<el-option value="0" label="交通"></el-option>
<el-option value="1" label="客流"></el-option>
<el-option value="2" label="行为分析"></el-option>
<el-option value="3" label="违停"></el-option>
<el-option value="5" label="交通行人"></el-option>
</el-select>
</el-form-item>
......
......@@ -299,7 +299,7 @@ export default {
}
.illtrendchart {
height: 22vh;
height: 26vh;
width: 30vw;
}
......
<template>
<el-row :gutter="10" style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden">
<el-col :span="17">
<el-row
:gutter="10"
style="padding: 10px 0 10px 10px;width: 100%;overflow:hidden"
>
<el-col :span="15">
<div id="map" class="maps">
<div class="search-vchan">
<el-input placeholder="请输入内容" v-model="vchanname" class="input-with-select">
<el-button slot="append" type="primary" icon="el-icon-search" @click="searchvchan"></el-button>
<el-input
placeholder="请输入内容"
v-model="vchanname"
class="input-with-select"
>
<el-button
slot="append"
type="primary"
icon="el-icon-search"
@click="searchvchan"
></el-button>
</el-input>
</div>
<showmap ref="map"></showmap>
......@@ -22,8 +34,6 @@
</div>
</div>
<div style="clear: both;"></div>
</el-col>
<el-col :span="7">
<el-row>
<div class="collect-box card-hover">
<div class="header-title">重点车辆分布</div>
......@@ -41,13 +51,22 @@
<div>违法总量</div>
</el-col>
<el-col :span="6" class="content-item">
<div class="item-num">{{ snapData.key_vehicle_total_snap_num }}</div>
<div class="item-num">
{{ snapData.key_vehicle_total_snap_num }}
</div>
<div>特殊车辆总量</div>
</el-col>
</div>
</div>
</el-row>
<el-row :gutter="12" class="event-type-box" style="margin-top:1vh">
</el-col>
<el-col :span="9">
<el-row style="margin-top:1vh;background:#fff">
<div class="card-hover">
<illegaltrend></illegaltrend>
</div>
</el-row>
<el-row :gutter="12" class="event-type-box" style="margin-top:1.5vh">
<el-col :span="16">
<div class="right-item-box card-hover">
<eventTypedis></eventTypedis>
......@@ -61,9 +80,7 @@
<span class="icon-fanxing-zhatuchezhuapai"></span>
</div>
<div class="right-content">
<div>
<span class="car-num">10</span>
</div>
<div><span class="car-num">10</span></div>
<div>渣土车抓拍</div>
</div>
</div>
......@@ -72,9 +89,7 @@
<span class="icon-fanxing-weixianpin"></span>
</div>
<div class="right-content">
<div>
<span class="car-num">10</span>
</div>
<div><span class="car-num">10</span></div>
<div>危险品车</div>
</div>
</div>
......@@ -83,27 +98,22 @@
<span class="icon-fanxing-zhongxingguanshi"></span>
</div>
<div class="right-content">
<div class>
<span class="car-num">29</span>
</div>
<div class><span class="car-num">29</span></div>
<div>重型罐式车</div>
</div>
</div>
</div>
</el-col>
</el-row>
<el-row style="margin-top:1vh;background:#fff">
<div class="card-hover">
<illegaltrend></illegaltrend>
</div>
</el-row>
<el-row class="clearpright" style="margin-top:1vh">
<div style="clear: both;"></div>
</el-col>
<el-col :span="24">
<el-row class="clearpright" style="margin-top:2vh">
<div class="right-item-box card-hover">
<div class="title">实时数据</div>
<alarmEvent @event="alarmevent"></alarmEvent>
</div>
</el-row>
<div style="clear: both;"></div>
</el-col>
</el-row>
</template>
......@@ -128,12 +138,12 @@ export default {
keyVehicleData: [],
illageList: [],
setShow: false,
ocxstatus:true,
ocxstatus: true,
archiveUnid: 0,
snap_num: 0,
playurl: {},
vchanname:'',
playurl2:"",
vchanname: "",
playurl2: "",
audit_num: 0,
snapData: {
illega_total_snap_num: 0,
......@@ -166,19 +176,17 @@ export default {
// this.$refs.mapvideo.videoPlay();
// },100)
// })
},
methods: {
alarmevent(data) {
//移动地图
this.$refs.map.movemap(data);
},
searchvchan(){
this.$refs.map.searchvchan(this.vchanname)
searchvchan() {
this.$refs.map.searchvchan(this.vchanname);
},
closeocx(){
this.ocxstatus=false;
closeocx() {
this.ocxstatus = false;
},
getTrafficSnap() {
this.$api.show.getTrafficSnap().then(res => {
......@@ -202,7 +210,7 @@ export default {
.collect-box {
height: 11.8vh;
background: #fff;
margin-top .5vh
.header-title {
padding: 10px 0px 0 20px;
width:113px;
......@@ -341,7 +349,7 @@ export default {
}
.maps {
height: 89.3vh;
height: 45vh;
width: 100%;
margin-bottom: 8px;
position: relative;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!