Commit 84835baa by 潘建波

fix🐛 实事展示字段显示错误,新建任务,设备管理增加设备类型

1 parent 23fbe983
No preview for this file type
{"commit":"5acf284075d646461f9a782829fe9d471c4c8fb0","commitDate":"2020-7-7 18:29","buildDate":"2020-7-8 10:39","version":"2.0.4","info":"feat✨ 任务设置增加10条分页,增加滚动控制修改任务后滚动条还在当前的位置"}
\ No newline at end of file \ No newline at end of file
{"commit":"23fbe983f7a7521c94ee2cde07c7494eae55502a","commitDate":"2020-7-9 14:59","buildDate":"2020-7-14 11:35","version":"2.0.5","info":"删除测试文件"}
\ No newline at end of file \ No newline at end of file
...@@ -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.149:20080"; // 测试环境url baseUrl = "http://192.168.9.233: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';
......
import api from '../index' import api from "../index";
import urls from './urls' import urls from "./urls";
export default { export default {
tableList(params) { tableList(params) {
return api.get(urls.tableList, params) return api.get(urls.tableList, params);
}, },
detailImg(params,id) { detailImg(params, id) {
return api.get(urls.detailImg+id, params) return api.get(urls.detailImg + id, params);
}, },
delVehicle(params,id) { delVehicle(params, id) {
// return出去了一个promise // return出去了一个promise
return api.delete(urls.delVehicle+id,params) return api.delete(urls.delVehicle + id, params);
}, },
patchdel(params,id) { patchdel(params, id) {
// return出去了一个promise // return出去了一个promise
return api.delete(urls.patchdel,params) return api.delete(urls.patchdel, params);
}, },
eventTypes(params,id) { eventTypes(params, id) {
return api.get(urls.eventTypes, params) return api.get(urls.eventTypes, params);
}, },
eventTableList(params,id) { eventTableList(params, id) {
return api.get(urls.eventTableList, params) return api.get(urls.eventTableList, params);
}, },
traficflow(params,id) { traficflow(params, id) {
return api.get(urls.traficflow, params) return api.get(urls.traficflow, params);
}, },
}
\ No newline at end of file \ No newline at end of file
delEvents(params, id) {
return api.delete(urls.eventTableList + "/" + id, params);
}
};
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div style="padding:0 10px 10px 10px"> <div style="padding:0 10px 10px 10px">
<div class="textDiv"> <div class="textDiv">
<div v-if="resultData[0]"> <div v-if="resultData[0]">
<p>抓拍时间:{{ resultData[0].shoot_dt }}</p> <p>抓拍时间:{{ resultData[0].shoot_time }}</p>
<p>抓拍地点:{{ resultData[0].location_name }}</p> <p>抓拍地点:{{ resultData[0].location_name }}</p>
<p>车牌号码:{{ resultData[0].vehicle_plate_text }}</p> <p>车牌号码:{{ resultData[0].vehicle_plate_text }}</p>
<p> <p>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<p> <p>
车身颜色:{{ resultData[0].vehicle_body_color_text }} 车身颜色:{{ resultData[0].vehicle_body_color_text }}
</p> </p>
<p>违法类型:{{ resultData[0].illegal_text }}</p> <p>违法类型:{{ resultData[0].illegalType }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -53,12 +53,12 @@ ...@@ -53,12 +53,12 @@
</div> </div>
<div class="rightDiv"> <div class="rightDiv">
<div v-if="resultData[1]"> <div v-if="resultData[1]">
<p>抓拍时间:{{ resultData[1].shoot_dt }}</p> <p>抓拍时间:{{ resultData[1].shoot_time }}</p>
<p>抓拍地点:{{ resultData[1].location_name }}</p> <p>抓拍地点:{{ resultData[1].location_name }}</p>
<p>车牌号码:{{ resultData[1].vehicle_plate_text }}</p> <p>车牌号码:{{ resultData[1].vehicle_plate_text }}</p>
<p>车辆类型:{{ resultData[1].vehicle_body_type_text }}</p> <p>车辆类型:{{ resultData[1].vehicle_body_type_text }}</p>
<p>车身颜色:{{ resultData[1].vehicle_body_color_text }}</p> <p>车身颜色:{{ resultData[1].vehicle_body_color_text }}</p>
<p>违法类型:{{ resultData[1].illegal_text }}</p> <p>违法类型:{{ resultData[1].illegalType }}</p>
</div> </div>
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
...@@ -73,12 +73,12 @@ ...@@ -73,12 +73,12 @@
</div> </div>
<div class="rightDiv"> <div class="rightDiv">
<div v-if="resultData[2]"> <div v-if="resultData[2]">
<p>抓拍时间:{{ resultData[2].shoot_dt }}</p> <p>抓拍时间:{{ resultData[2].shoot_time }}</p>
<p>抓拍地点:{{ resultData[2].location_name }}</p> <p>抓拍地点:{{ resultData[2].location_name }}</p>
<p>车牌号码:{{ resultData[2].vehicle_plate_text }}</p> <p>车牌号码:{{ resultData[2].vehicle_plate_text }}</p>
<p>车辆类型:{{ resultData[2].vehicle_body_type_text }}</p> <p>车辆类型:{{ resultData[2].vehicle_body_type_text }}</p>
<p>车身颜色:{{ resultData[2].vehicle_body_color_text }}</p> <p>车身颜色:{{ resultData[2].vehicle_body_color_text }}</p>
<p>违法类型:{{ resultData[2].illegal_text }}</p> <p>违法类型:{{ resultData[2].illegalType }}</p>
</div> </div>
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
...@@ -93,12 +93,12 @@ ...@@ -93,12 +93,12 @@
</div> </div>
<div class="rightDiv"> <div class="rightDiv">
<div v-if="resultData[3]"> <div v-if="resultData[3]">
<p>抓拍时间:{{ resultData[3].shoot_dt }}</p> <p>抓拍时间:{{ resultData[3].shoot_time }}</p>
<p>抓拍地点:{{ resultData[3].location_name }}</p> <p>抓拍地点:{{ resultData[3].location_name }}</p>
<p>车牌号码:{{ resultData[3].vehicle_plate_text }}</p> <p>车牌号码:{{ resultData[3].vehicle_plate_text }}</p>
<p>车辆类型:{{ resultData[3].vehicle_body_type_text }}</p> <p>车辆类型:{{ resultData[3].vehicle_body_type_text }}</p>
<p>车身颜色:{{ resultData[3].vehicle_body_color_text }}</p> <p>车身颜色:{{ resultData[3].vehicle_body_color_text }}</p>
<p>违法类型:{{ resultData[3].illegal_text }}</p> <p>违法类型:{{ resultData[3].illegalType }}</p>
</div> </div>
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
......
...@@ -31,13 +31,13 @@ ...@@ -31,13 +31,13 @@
</div> </div>
<div class="info-content"> <div class="info-content">
<div class="con-item"> <div class="con-item">
<span class="con-label">平台类型:</span> <span class="con-label">设备类型:</span>
<span class="con-text"></span> <span class="con-text">{{curDevData.license_info.platType}}</span>
</div> </div>
<div class="con-item"> <!-- <div class="con-item">
<span class="con-label">设备类型:</span> <span class="con-label">设备类型:</span>
<span class="con-text"></span> <span class="con-text"></span>
</div> </div> -->
<div class="con-item"> <div class="con-item">
<span class="con-label">设备名称:</span> <span class="con-label">设备名称:</span>
<span class="con-text">{{ curDevData.device_name }}</span> <span class="con-text">{{ curDevData.device_name }}</span>
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
beforeup(file) { beforeup(file) {
this.updata.name = file.name; this.updata.name = file.name;
this.updata.vchan_type = "vfile"; this.updata.vchan_type = "vfile";
this.updata.vchan_refid = new Date().getTime(); // this.updata.vchan_refid = new Date().getTime();
}, },
upsuccess(req) { upsuccess(req) {
if (req.ecode == 200) { if (req.ecode == 200) {
......
...@@ -505,13 +505,8 @@ export default { ...@@ -505,13 +505,8 @@ export default {
//测试验证 //测试验证
let data = CalcCarOutline(P1, P2, [{}, {}, {}, {}, {}, {}, {}, {}]); let data = CalcCarOutline(P1, P2, [{}, {}, {}, {}, {}, {}, {}, {}]);
this.drawModel(data);
this.drawArrows(P1, P2); this.drawArrows(P1, P2);
if (this.startTimer == null) {
this.startTimer = setTimeout(() => {
this.startTimer = null;
this.drawModel(data);
}, 100);
}
}, },
//绘制模型线 //绘制模型线
drawModel(data) { drawModel(data) {
...@@ -671,14 +666,42 @@ export default { ...@@ -671,14 +666,42 @@ export default {
this.selectedShape.attrs.linetype == 8 || this.selectedShape.attrs.linetype == 8 ||
this.selectedShape.attrs.linetype == 6 this.selectedShape.attrs.linetype == 6
) { ) {
this.setChangeModel(); if (this.startTimer == null) {
this.startTimer = setTimeout(() => {
this.startTimer = null;
this.setChangeModel();
}, 500);
}
} }
//模型线变化变换模型 //模型线变化变换模型
if (this.selectedShape.attrs.linetype == 11) { if (this.selectedShape.attrs.linetype == 11) {
this.changeModel(curmodelnun); this.ModelChangedrawArrows(curmodelnun);
if (this.startTimer == null) {
this.startTimer = setTimeout(() => {
this.startTimer = null;
this.changeModel(curmodelnun);
}, 100);
}
} }
this.signLayer.draw(); this.signLayer.draw();
}, },
ModelChangedrawArrows(curmodelnun) {
//重绘箭头
let arrows = this.signLayer.get(".arrows");
arrows.map(e => {
this.editIndex = curmodelnun;
if (e.attrs.arrowsnum == curmodelnun) {
e.destroy();
}
});
let P1 = {},
P2 = {};
P1.x = Number((curmodelnun[0] / 800).toFixed(6));
P1.y = Number((curmodelnun[1] / 500).toFixed(6));
P2.x = Number((curmodelnun[2] / 800).toFixed(6));
P2.y = Number((curmodelnun[3] / 500).toFixed(6));
this.drawArrows(P1, P2);
},
//根据模型线改变模型改变箭头 //根据模型线改变模型改变箭头
changeModel(modelnum) { changeModel(modelnum) {
let mlinepoints = this.selectedShape.attrs.points; let mlinepoints = this.selectedShape.attrs.points;
...@@ -690,12 +713,7 @@ export default { ...@@ -690,12 +713,7 @@ export default {
e.destroy(); e.destroy();
} }
}); });
arrows.map(e => {
this.editIndex = modelnum;
if (e.attrs.arrowsnum == modelnum) {
e.destroy();
}
});
this.getModelData(mlinepoints); this.getModelData(mlinepoints);
}, },
//根据设置参数改变模型 //根据设置参数改变模型
...@@ -817,6 +835,10 @@ export default { ...@@ -817,6 +835,10 @@ export default {
handleClose(done) { handleClose(done) {
this.dialogVisible = false; this.dialogVisible = false;
this.$store.commit("setocxstate", 1); this.$store.commit("setocxstate", 1);
setTimeout(() => {
this.curType = 0;
this.changeState(0);
}, 300);
} }
} }
}; };
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</el-col> </el-col>
<div style=""> <div style="">
<el-table <el-table
:data="formattterData" :data="formatterData"
:height="tableHeight" :height="tableHeight"
stripe stripe
v-loading="loading" v-loading="loading"
...@@ -189,6 +189,18 @@ ...@@ -189,6 +189,18 @@
@click="detailFun(scope.$index, scope.row)" @click="detailFun(scope.$index, scope.row)"
></span> ></span>
</el-tooltip> </el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -247,6 +259,9 @@ ...@@ -247,6 +259,9 @@
<!-- <div class="rightArrow" @click="rightFun"><i class="el-icon-d-arrow-right"></i></div> --> <!-- <div class="rightArrow" @click="rightFun"><i class="el-icon-d-arrow-right"></i></div> -->
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="danger" @click="detailDel" class="leftButton"
>删 除</el-button
>
<el-button type="primary" @click="leftFun">上一条</el-button> <el-button type="primary" @click="leftFun">上一条</el-button>
<el-button type="primary" @click="rightFun">下一条</el-button> <el-button type="primary" @click="rightFun">下一条</el-button>
<el-button @click="detailVisible = false">关 闭</el-button> <el-button @click="detailVisible = false">关 闭</el-button>
...@@ -276,9 +291,9 @@ export default { ...@@ -276,9 +291,9 @@ export default {
location_code: "", location_code: "",
event_cate: "安防事件" event_cate: "安防事件"
}, },
tableData: [], formatterData: [],
loading: false, loading: false,
formattterData: [], formatterData: [],
total: 0, total: 0,
page: 1, page: 1,
pageSize: 30, pageSize: 30,
...@@ -351,6 +366,31 @@ export default { ...@@ -351,6 +366,31 @@ export default {
this.type = ""; this.type = "";
this.eventList = JSON.parse(window.localStorage.getItem(name)); this.eventList = JSON.parse(window.localStorage.getItem(name));
}, },
delFun(index, row) {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$api.search
.delEvents({}, row.event_unid)
.then(res => {
if (res.ecode == 200) {
this.formatterData.splice(index);
this.$message({
type: "success",
message: "删除成功!"
});
this.getData();
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
this.$message.error("删除失败!");
});
});
},
exportFun() { exportFun() {
let cate = ""; let cate = "";
if (this.conditions.event_cate != "安防事件") { if (this.conditions.event_cate != "安防事件") {
...@@ -390,19 +430,19 @@ export default { ...@@ -390,19 +430,19 @@ export default {
}); });
return false; return false;
} }
this.detailObj = this.formattterData[this.currentIndex - 1]; this.detailObj = this.formatterData[this.currentIndex - 1];
this.currentIndex -= 1; this.currentIndex -= 1;
this.getImg(this.detailObj.pics[0].pic_unid); this.getImg(this.detailObj.pics[0].pic_unid);
}, },
rightFun() { rightFun() {
if (this.currentIndex == this.formattterData.length - 1) { if (this.currentIndex == this.formatterData.length - 1) {
this.$message({ this.$message({
message: "目前为最后一条", message: "目前为最后一条",
type: "warning" type: "warning"
}); });
return false; return false;
} }
this.detailObj = this.formattterData[this.currentIndex + 1]; this.detailObj = this.formatterData[this.currentIndex + 1];
this.currentIndex += 1; this.currentIndex += 1;
this.getImg(this.detailObj.pics[0].pic_unid); this.getImg(this.detailObj.pics[0].pic_unid);
}, },
...@@ -425,7 +465,7 @@ export default { ...@@ -425,7 +465,7 @@ export default {
}, },
getData() { getData() {
this.loading = true; this.loading = true;
this.formattterData = []; this.formatterData = [];
let offset = (this.page - 1) * this.pageSize; let offset = (this.page - 1) * this.pageSize;
let search_params = { let search_params = {
limit: this.pageSize, limit: this.pageSize,
...@@ -453,7 +493,7 @@ export default { ...@@ -453,7 +493,7 @@ export default {
.then(res => { .then(res => {
this.total = res.total_num; this.total = res.total_num;
res.list_data.forEach((item, index) => { res.list_data.forEach((item, index) => {
this.formattterData.push(this.$buildCode.init(item)); this.formatterData.push(this.$buildCode.init(item));
}); });
this.loading = false; this.loading = false;
}) })
...@@ -484,6 +524,37 @@ export default { ...@@ -484,6 +524,37 @@ export default {
this.getImg(row.pics[0].pic_unid); this.getImg(row.pics[0].pic_unid);
} }
this.detailVisible = true; this.detailVisible = true;
},
detailDel() {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$api.search
.delEvents({}, this.detailObj.event_unid)
.then(res => {
if (res.ecode == 200) {
this.formatterData.splice(this.currentIndex, 1);
this.detailObj = Object.assign(
{},
this.formatterData[this.currentIndex]
);
this.getImg(
this.formatterData[this.currentIndex].pics[0].pic_unid
);
this.$message({
type: "success",
message: "删除成功!"
});
} else {
this.$message.error("删除失败!");
}
})
.catch(e => {
this.$message.error("删除失败!");
});
});
} }
} }
}; };
......
...@@ -202,7 +202,7 @@ export default { ...@@ -202,7 +202,7 @@ export default {
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].vchan_refid == data.vchan_refid) { if (this.tableData[i].vchan_refid == data.vchan_refid) {
this.delFun(i, this.tableData[i], "tree"); this.delFun(i, this.tableData[i], "tree");
staus = true; staus = true;
break; break;
} }
...@@ -268,15 +268,6 @@ export default { ...@@ -268,15 +268,6 @@ export default {
if (data.enableStatus == 5) { if (data.enableStatus == 5) {
return; return;
} }
if (!data.subtask_id) {
this.tableData.forEach((ele, i) => {
if (ele.vchan_refid == data.vchan_refid) {
this.tableData.splice(i, 1);
this.checkvckan();
}
});
return;
}
this.$store.commit("setocxstate", 0); this.$store.commit("setocxstate", 0);
this.$confirm("删除视频源, 是否继续?", "提示", { this.$confirm("删除视频源, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
...@@ -284,6 +275,15 @@ export default { ...@@ -284,6 +275,15 @@ export default {
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
if (!data.subtask_id) {
this.tableData.forEach((ele, i) => {
if (ele.vchan_refid == data.vchan_refid) {
this.tableData.splice(i, 1);
this.checkvckan();
}
});
return;
}
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 => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!