algo修改

This commit is contained in:
曹前明 2022-08-18 18:10:48 +08:00
parent c57921f340
commit f27fe96fb2
9 changed files with 56 additions and 78 deletions

View File

@ -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
# 本地端口

View File

@ -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

View File

@ -117,7 +117,7 @@ export default {
},
}
,
vchannel:{
algo_vchannel:{
list: {
name: "获取",
req: async function(data){

View File

@ -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"

View File

@ -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="创建时间"

View File

@ -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();
},
},
};

View File

@ -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
);

View File

@ -44,7 +44,7 @@
v-if="mode != 'show'"
type="primary"
:loading="isSaveing"
@click="submit()"
@click="submit"
> </el-button
>
</template>
@ -93,7 +93,9 @@ export default {
},
//
getEventCate() {
this.$API.ecm.event_cate.list.req({ self_algo:true,page: 0 }).then((res) => {
this.$API.ecm.event_cate.list
.req({ self_algo: true, page: 0 })
.then((res) => {
this.algooptions = res;
});
},
@ -106,20 +108,18 @@ export default {
//
submit() {
this.$API.ecm.vchannel.creates.req(this.form).then((res) => {
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;
},
},
};

View File

@ -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() {