Commit 64a24323 by 潘建波

提交稳定版本

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