diff --git a/src/api/model/am.js b/src/api/model/am.js index 96159891..a7bb9273 100644 --- a/src/api/model/am.js +++ b/src/api/model/am.js @@ -61,6 +61,41 @@ export default { } } }, + access: { + list: { + name: "出入权限列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/am/access/`, + data + ); + } + }, + update: { + name: "更新出入权限", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/am/access/${id}/`, + data); + } + }, + create: { + name: "创建出入权限", + req: async function(data){ + return await http.post( + `${config.API_URL}/am/access/`, + data); + } + } + , + delete: { + name: "删除出入权限", + req: async function(id){ + return await http.delete( + `${config.API_URL}/am/access/${id}/`); + } + } + }, video: { list: { name: "获取视频设备列表", diff --git a/src/api/model/ecm.js b/src/api/model/ecm.js index 4dc3b15a..15841e4d 100644 --- a/src/api/model/ecm.js +++ b/src/api/model/ecm.js @@ -67,4 +67,43 @@ export default { } }, } + , + vchannel:{ + list: { + name: "获取", + req: async function(data){ + return await http.get( + `${config.API_URL}/ecm/algo_vchannel/`, + data + ); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/ecm/algo_vchannel/`, + data); + } + } + , + creates: { + name: "批量创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/ecm/algo_vchannel/creates/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id, data){ + return await http.delete( + `${config.API_URL}/ecm/algo_vchannel/${id}/`, + data); + } + }, + } + + } \ No newline at end of file diff --git a/src/api/model/third.js b/src/api/model/third.js new file mode 100644 index 00000000..0ee19e60 --- /dev/null +++ b/src/api/model/third.js @@ -0,0 +1,17 @@ +import config from "@/config" +import http from "@/utils/request" + +export default { + tdevice: { + list: { + name: "三方喇叭接口", + req: async function(data){ + return await http.get( + `${config.API_URL}/third/tdevice/`, + data + ); + } + }, + + }, +} diff --git a/src/config/route.js b/src/config/route.js index 90807ab5..8bf74806 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -94,6 +94,16 @@ const routes = [ }, "component": "ecm/notify_setting" }, + + { + "name": "algo", + "path": "/ecm/algo", + "meta": { + "title": "算法配置", + "icon": "el-icon-menu", + }, + "component": "ecm/algo" + } ] }, { diff --git a/src/views/am/access_form.vue b/src/views/am/access_form.vue new file mode 100644 index 00000000..485d66a2 --- /dev/null +++ b/src/views/am/access_form.vue @@ -0,0 +1,262 @@ + + + + + diff --git a/src/views/am/area.vue b/src/views/am/area.vue index 8794fbd6..9fa8dc9e 100644 --- a/src/views/am/area.vue +++ b/src/views/am/area.vue @@ -1,205 +1,487 @@ diff --git a/src/views/am/area_form.vue b/src/views/am/area_form.vue index e10661b7..4696a889 100644 --- a/src/views/am/area_form.vue +++ b/src/views/am/area_form.vue @@ -1,234 +1,266 @@ diff --git a/src/views/ecm/algo_form.vue b/src/views/ecm/algo_form.vue new file mode 100644 index 00000000..35ebeed4 --- /dev/null +++ b/src/views/ecm/algo_form.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/views/ecm/algos_form.vue b/src/views/ecm/algos_form.vue new file mode 100644 index 00000000..8a6cd1c8 --- /dev/null +++ b/src/views/ecm/algos_form.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/views/ecm/event.vue b/src/views/ecm/event.vue index e09b0f44..5bf1bb11 100644 --- a/src/views/ecm/event.vue +++ b/src/views/ecm/event.vue @@ -1,6 +1,6 @@ + + + + + + + + \ No newline at end of file +import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue"; +import saveDialog from "./event_from.vue"; +export default { + name: "event", + components: { + CircleCheckFilled, + CircleCloseFilled, + saveDialog + }, + data() { + return { + dialog: { + save: false, + permission: false, + }, + apiObj: this.$API.ecm.event.list, + query: {}, + selection: [], + search: { + keyword: null, + }, + }; + }, + methods: { + //查看 + table_show(row) { + this.dialog.save = true; + this.$nextTick(() => { + this.$refs.saveDialog.open("show").setData(row); + }); + }, + //搜索 + upsearch() {}, + //本地更新数据 + + resetQuery() { + this.query = {}; + }, + }, +}; + \ No newline at end of file diff --git a/src/views/ecm/event_cate_form.vue b/src/views/ecm/event_cate_form.vue index 5c68d53d..6537d000 100644 --- a/src/views/ecm/event_cate_form.vue +++ b/src/views/ecm/event_cate_form.vue @@ -30,8 +30,30 @@ /> + + + + + + - + + + + + + @@ -73,7 +95,9 @@ export default { isSaveing: false, //表单数据 form: { - speaker_on: true + speaker_on: true, + self_algo: false, + speakers:[] }, //验证规则 rules: { @@ -103,6 +127,7 @@ export default { label: "定位", }, ], + speakersptions:[], //所需数据选项 groups: [], groupsProps: { @@ -112,7 +137,9 @@ export default { }, }; }, - mounted() {}, + mounted() { + this.getSpeakers(); + }, methods: { //显示 open(mode = "add") { @@ -120,6 +147,13 @@ export default { this.visible = true; return this; }, + //固定喇叭列表 + getSpeakers() { + this.$API.third.tdevice.list.req({type:50, page: 0 }).then((res) => { + this.speakersptions = res; + }); + }, + //表单提交方法 async submit() { var valid = await this.$refs.dialogForm.validate().catch(() => {}); @@ -132,13 +166,16 @@ export default { if (this.mode == "add") { res = await this.$API.ecm.event_cate.create.req(this.form); } else if (this.mode == "edit") { - res = await this.$API.ecm.event_cate.update.req(this.form.id, this.form); + res = await this.$API.ecm.event_cate.update.req( + this.form.id, + this.form + ); } this.isSaveing = false; this.$emit("success", this.form, this.mode); this.visible = false; this.$message.success("操作成功"); - return res + return res; } catch (err) { //可以处理校验错误 this.isSaveing = false; @@ -148,6 +185,8 @@ export default { //表单注入数据 setData(data) { Object.assign(this.form, data); + debugger; + console.log(this.form) }, }, }; diff --git a/src/views/ecm/event_from.vue b/src/views/ecm/event_from.vue new file mode 100644 index 00000000..2dbf95e6 --- /dev/null +++ b/src/views/ecm/event_from.vue @@ -0,0 +1,192 @@ + + + + + diff --git a/src/views/ecm/notify_setting.vue b/src/views/ecm/notify_setting.vue index fa685e8a..48df20b6 100644 --- a/src/views/ecm/notify_setting.vue +++ b/src/views/ecm/notify_setting.vue @@ -86,19 +86,50 @@ stripe :hidePagination="true" > - - + + + + + + + + + + > + width="100" + >