algo修改
This commit is contained in:
parent
c57921f340
commit
f27fe96fb2
|
@ -5,9 +5,9 @@ NODE_ENV = development
|
|||
VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||
#VUE_APP_WS_API = 'ws://localhost:8000'
|
||||
#VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
|
||||
VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
|
||||
#VUE_APP_BASEURL = http://127.0.0.1:8000
|
||||
|
||||
# 本地端口
|
||||
|
|
|
@ -5,5 +5,5 @@ NODE_ENV = production
|
|||
VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||
VUE_APP_BASEURL = http://1.203.161.103:2800
|
||||
VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
|
||||
VUE_APP_BASEURL = http://10.99.5.79:20309
|
||||
|
|
|
@ -117,7 +117,7 @@ export default {
|
|||
},
|
||||
}
|
||||
,
|
||||
vchannel:{
|
||||
algo_vchannel:{
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function(data){
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
prop="deviceCode"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
<el-table-column
|
||||
label="通道编号"
|
||||
prop="channelCode"
|
||||
min-width="150"
|
||||
|
@ -51,24 +51,20 @@
|
|||
<el-table-column
|
||||
label="通道名称"
|
||||
prop="channelName"
|
||||
min-width="150"
|
||||
min-width="250"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="通道状态"
|
||||
prop="stat"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="通道类型" min-width="100">
|
||||
<template #default="scope">{{ scope.row.channelType }}</template>
|
||||
<el-table-column label="通道状态" prop="stat" min-width="80">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.stat === 0">不启用</span>
|
||||
<span v-else>启用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备类型" min-width="100">
|
||||
<template #default="scope">{{ scope.row.cameraType }}</template>
|
||||
<el-table-column label="是否在线" prop="isOnline" min-width="180">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.isOnline === 0"><el-tag type="warning">离线</el-tag></span>
|
||||
<span v-else><el-tag type="success">在线</el-tag></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否在线"
|
||||
prop="isOnline"
|
||||
min-width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
|
|
|
@ -52,15 +52,15 @@
|
|||
<el-table-column
|
||||
label="通道名称"
|
||||
prop="channelName"
|
||||
min-width="150"
|
||||
min-width="250"
|
||||
></el-table-column>
|
||||
<el-table-column label="通道状态" prop="stat" min-width="150">
|
||||
<el-table-column label="通道状态" prop="stat" min-width="80">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.stat === 0">不启用</span>
|
||||
<span v-else>启用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="摄像头类型" min-width="100">
|
||||
<el-table-column label="类型" min-width="50">
|
||||
<template #default="scope">{{
|
||||
deviceTypes[scope.row.cameraType]
|
||||
}}</template>
|
||||
|
@ -74,7 +74,7 @@
|
|||
<el-table-column
|
||||
label="所在区域"
|
||||
prop="my_info.area_name"
|
||||
min-width="100"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="eventcateList"
|
||||
:apiObj = "apiObj1"
|
||||
:params = "params1"
|
||||
row-key="id"
|
||||
stripe
|
||||
highlightCurrentRow
|
||||
|
@ -83,8 +84,8 @@
|
|||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="tablevchannel"
|
||||
:data="vchannelList"
|
||||
ref="table2"
|
||||
:apiObj="apiObj2"
|
||||
row-key="id"
|
||||
stripe
|
||||
:hidePagination="true"
|
||||
|
@ -93,17 +94,14 @@
|
|||
<el-table-column
|
||||
label="算法名称"
|
||||
prop="algo_.name"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="视频编号"
|
||||
prop="vchannel_.code"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="视频名称"
|
||||
prop="vchannel_.name"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="right">
|
||||
<template #default="scope">
|
||||
|
@ -124,7 +122,7 @@
|
|||
<save-dialog
|
||||
v-model="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@success="handleSaveSuccessss"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
<algo-dialog
|
||||
|
@ -160,41 +158,24 @@ export default {
|
|||
},
|
||||
selection: [],
|
||||
chosen_cate: "",
|
||||
eventcateList: [],
|
||||
vchannelList: [],
|
||||
apiObj1: this.$API.ecm.event_cate.list,
|
||||
params1: { self_algo: true },
|
||||
apiObj2: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getEventCate();
|
||||
this.getVchannel();
|
||||
},
|
||||
methods: {
|
||||
//事件总类列表
|
||||
getEventCate() {
|
||||
this.$API.ecm.event_cate.list
|
||||
.req({ self_algo: true, page: 0 })
|
||||
.then((res) => {
|
||||
this.eventcateList = res;
|
||||
});
|
||||
},
|
||||
//左边列表点击,右边显示
|
||||
rowClick(row) {
|
||||
this.$API.ecm.vchannel.list.req({ algo: row.id, page: 0 }).then((res) => {
|
||||
this.vchannelList = res;
|
||||
});
|
||||
this.apiObj2 = this.$API.ecm.algo_vchannel.list
|
||||
this.$refs.table2.queryData({algo: row.id})
|
||||
|
||||
|
||||
this.chosen_cate = row.id;
|
||||
|
||||
},
|
||||
|
||||
//算法列表
|
||||
getVchannel() {
|
||||
this.$API.ecm.vchannel.list.req({ page: 0 }).then((res) => {
|
||||
this.vchannelList = res;
|
||||
});
|
||||
},
|
||||
|
||||
//批量布设添加
|
||||
adds_edit() {
|
||||
this.dialog.algos = true;
|
||||
|
@ -219,11 +200,11 @@ export default {
|
|||
});
|
||||
},
|
||||
table_del(row) {
|
||||
this.$API.ecm.vchannel.delete
|
||||
this.$API.ecm.algo_vchannel.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getVchannel();
|
||||
this.$refs.table2.refresh();
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -232,11 +213,13 @@ export default {
|
|||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess() {
|
||||
this.$refs.tablevchannel.refresh();
|
||||
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccessss() {
|
||||
this.$refs.tablevchannel.refresh();
|
||||
this.dialog.algos = false
|
||||
this.$refs.table2.refresh();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
v-if="mode != 'show'"
|
||||
type="primary"
|
||||
:loading="isSaveing"
|
||||
@click="submit()"
|
||||
@click="submit"
|
||||
>保 存</el-button
|
||||
>
|
||||
</template>
|
||||
|
@ -114,9 +114,9 @@ export default {
|
|||
try {
|
||||
var res;
|
||||
if (this.mode == "add") {
|
||||
res = await this.$API.ecm.vchannel.create.req(this.form);
|
||||
res = await this.$API.ecm.algo_vchannel.create.req(this.form);
|
||||
} else if (this.mode == "edit") {
|
||||
res = await this.$API.ecm.vchannel.update.req(
|
||||
res = await this.$API.ecm.algo_vchannel.update.req(
|
||||
this.form.id,
|
||||
this.form
|
||||
);
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
v-if="mode != 'show'"
|
||||
type="primary"
|
||||
:loading="isSaveing"
|
||||
@click="submit()"
|
||||
@click="submit"
|
||||
>保 存</el-button
|
||||
>
|
||||
</template>
|
||||
|
@ -91,11 +91,13 @@ export default {
|
|||
this.form.algo = this.$parent.chosen_cate;
|
||||
return this;
|
||||
},
|
||||
//事件列表
|
||||
//事件列表
|
||||
getEventCate() {
|
||||
this.$API.ecm.event_cate.list.req({ self_algo:true,page: 0 }).then((res) => {
|
||||
this.algooptions = res;
|
||||
});
|
||||
this.$API.ecm.event_cate.list
|
||||
.req({ self_algo: true, page: 0 })
|
||||
.then((res) => {
|
||||
this.algooptions = res;
|
||||
});
|
||||
},
|
||||
//视频列表
|
||||
getVchannel() {
|
||||
|
@ -105,21 +107,19 @@ export default {
|
|||
},
|
||||
|
||||
//表单提交方法
|
||||
submit() {
|
||||
|
||||
this.$API.ecm.vchannel.creates.req(this.form).then((res) => {
|
||||
this.$message.success("操作成功");
|
||||
this.visible=false;
|
||||
|
||||
return res;
|
||||
})
|
||||
submit() {
|
||||
this.$API.ecm.algo_vchannel.creates.req(this.form).then((res) => {
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.$message.success("操作成功");
|
||||
this.visible = false;
|
||||
|
||||
return res;
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
debugger;
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -370,8 +370,7 @@ export default {
|
|||
groupClick(data) {
|
||||
console.log(data);
|
||||
// debugger;
|
||||
let params = { belong_dept: data.id };
|
||||
this.$refs.table.reload(params);
|
||||
this.$refs.table.queryData({ belong_dept: data.id });
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
|
|
Loading…
Reference in New Issue