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