Commit 614844c3 by 潘建波

设置算法类型

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