Commit 64a24323 by 潘建波

提交稳定版本

1 parent b8787dfc
No preview for this file type
......@@ -27,6 +27,9 @@ export default {
getSubTask(taskid) {
return api.get(urls.getSubTask(taskid));
},
addSubtaskList(taskid, params) {
return api.post(urls.setSubTaskList(taskid), params);
},
getStream(devid, vrefid, params) {
return api.post(urls.getstream(devid, vrefid), params);
},
......
......@@ -22,6 +22,9 @@ export default {
setSubTask: id => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtask`;
},
setSubTaskList: id => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtask/batch`;
},
getstream: (devid, vrefid) => {
return `${baseUrl}/api/v1/devconf_fx/devs/${devid}/vchans/${vrefid}/live`;
},
......
......@@ -4,4 +4,4 @@ export default {
addRouter: [],
devList: [],
codestate: ""
}
}
\ No newline at end of file
......@@ -127,9 +127,19 @@ export default {
this.getEventList();
this.getDev();
this.getMenu(res.user_unid);
} else {
this.$message({
type: "error",
message: res.enote
});
}
})
.catch(err => {});
.catch(err => {
this.$message({
type: "error",
message: err
});
});
},
getMenu(id) {
//获取菜单
......
......@@ -31,18 +31,14 @@
<videoplay ref="video" :playurl="play_url"></videoplay>
</div>
<div class="tableBox">
<el-table
height="286"
:data="tableData"
border
@current-change="rowclick"
width="300"
>
<el-table-column
align="center"
prop="name"
label="视频源名称"
></el-table-column>
<el-table height="286" :data="tableData" border width="300">
<el-table-column align="center" prop="name" label="视频源名称">
<template slot-scope="scope">
<div @click="rowclick(scope.row)">
{{ scope.row.name }}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="视频状态">
<template slot-scope="scope">
<div v-html="statusFormatter(scope.row)"></div>
......@@ -87,7 +83,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="save">确 定</el-button>
<el-button type="primary" @click="editsubTask">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -213,7 +209,8 @@ export default {
}
}
if (data.leaf && !staus) {
this.editsubTask(data);
// this.editsubTask(data);
this.tableData.push(data);
staus = false;
}
},
......@@ -223,35 +220,42 @@ export default {
this.$emit("refresh");
});
},
editsubTask(vchan) {
editsubTask() {
let status = true;
let data = {
is_dome: false,
subtask_name: vchan.name,
vchan: {
vchan_refid: vchan.refid || vchan.vchan_refid,
vchan_duid: vchan.duid || vchan.vchan_duid,
vdev_unid: this.dev_unid,
vchan_name: vchan.name
},
assign_to: {
id: this.taskData.plate_type,
flag: 1
}
};
this.$api.task.editSubTask(this.editData.task_id, data).then(res => {
if (res && res.ecode != "500") {
this.$message({
message: "添加成功",
type: "success"
});
res.name = vchan.name;
res.subtask_id = res.id;
this.tableData.push(res);
} else {
this.$message.error(res.enote);
}
let subData = [];
this.tableData.map(e => {
let vchan = e;
let data = {
is_dome: false,
subtask_name: vchan.name,
vchan: {
vchan_refid: vchan.refid || vchan.vchan_refid,
vchan_duid: vchan.duid || vchan.vchan_duid,
vdev_unid: this.dev_unid,
vchan_name: vchan.name
},
assign_to: {
id: this.taskData.plate_type,
flag: 1
}
};
subData.push(data);
});
console.log(subData);
this.$api.task
.addSubtaskList(this.editData.task_id, subData)
.then(res => {
if (res && res.ecode != "500") {
this.$message({
message: "添加成功",
type: "success"
});
this.setvisible = false;
this.$emit("refresh");
} else {
this.$message.error(res.enote);
}
});
},
playVideo(data) {
console.log("b", data);
......@@ -314,6 +318,8 @@ export default {
this.$refs.tree.setCheckedKeys(arr);
},
rowclick(row) {
//播放视频
// this.vchanClick(row);
// console.log("row", row);
// this.play_url = {
// rtsp_url: row.play_url
......
<template>
<div class="expande-table-row">
<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="subtask-info taskstatus" v-html="formater(subTaskData)" @click="showinfo(subTaskData)"></span>
<span class="label">视频源文件</span>
<span class="subtask-info">{{ subTaskData.vchan_name }}</span>
<span class="label">任务ID</span>
......@@ -12,7 +12,9 @@
<span class="subtask-info">{{ subTaskData.video_busy }}</span>
<span class="label">设备容量</span>
<span class="subtask-info">{{ subTaskData.video_total }}</span> -->
<span class="label">分析设备</span>
<span class="label">任务信息</span>
<span class="subtask-info">{{ subTaskData.info }}</span>
<!-- <span class="label">分析设备</span>
<span class="subtask-info">
<el-select v-model="assign_id">
<el-option
......@@ -37,7 +39,7 @@
{{ item.in_ip }} {{ item.license_info.platType }}
</el-option>
</el-select>
</span>
</span> -->
<span class="label sub-btn" @click="subMove" hidden>确定</span>
</div>
</template>
......@@ -100,10 +102,13 @@ export default {
} else {
return "<span class='errorbox statusbox'>异常</span>";
}
},
showinfo(data){
console.log("任务状态信息:", data.info);
}
},
created() {
console.log(this.subTaskData);
// console.log(this.subTaskData);
},
watch: {},
mounted() {}
......@@ -120,7 +125,7 @@ export default {
overflow: hidden;
}
span:last-child{
border-bottom: 1px solid #333;
border-bottom: 1px solid #333;
}
.label {
width: 5vw;
......@@ -131,10 +136,10 @@ export default {
line-height: 40px;
}
.labelindex {
width: 3vw;
width: 4vw;
}
.taskstatus {
width: 6vw;
width: 8vw;
}
.subtask-info {
border-left: 1px solid #f0f0f0;
......@@ -144,14 +149,15 @@ export default {
line-height: 40px;
}
.subtask-info:nth-child(4) {
width: 8vw;
width: 10vw;
overflow: hidden;
}
.subtask-info:nth-child(6) {
width: 15vw;
width: 18vw;
}
.subtask-info:nth-child(8) {
width: 12vw;
width: 16vw;
border-right: 1px solid #f0f0f0;
}
.subtask-info:nth-child(10) {
width: 3vw;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!