From f27fe96fb2d205ace6772b044718065064f1dab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Thu, 18 Aug 2022 18:10:48 +0800 Subject: [PATCH] =?UTF-8?q?algo=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +-- .env.production | 4 +-- src/api/model/ecm.js | 2 +- src/views/am/em1.vue | 28 +++++++++------------ src/views/am/monitor.vue | 8 +++--- src/views/ecm/algo.vue | 49 ++++++++++++------------------------ src/views/ecm/algo_form.vue | 6 ++--- src/views/ecm/algos_form.vue | 30 +++++++++++----------- src/views/sys/user.vue | 3 +-- 9 files changed, 56 insertions(+), 78 deletions(-) diff --git a/.env.development b/.env.development index 71f440e3..4f914a5e 100644 --- a/.env.development +++ b/.env.development @@ -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 # 本地端口 diff --git a/.env.production b/.env.production index cefabfaf..e94de36f 100644 --- a/.env.production +++ b/.env.production @@ -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 diff --git a/src/api/model/ecm.js b/src/api/model/ecm.js index 2f8ee091..3bf239a3 100644 --- a/src/api/model/ecm.js +++ b/src/api/model/ecm.js @@ -117,7 +117,7 @@ export default { }, } , - vchannel:{ + algo_vchannel:{ list: { name: "获取", req: async function(data){ diff --git a/src/views/am/em1.vue b/src/views/am/em1.vue index ccc7c54e..fa75f404 100644 --- a/src/views/am/em1.vue +++ b/src/views/am/em1.vue @@ -43,7 +43,7 @@ prop="deviceCode" min-width="100" > - - - - + + - - + + - - + - + @@ -74,7 +74,7 @@ @@ -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 ); diff --git a/src/views/ecm/algos_form.vue b/src/views/ecm/algos_form.vue index 1b63a060..220daf25 100644 --- a/src/views/ecm/algos_form.vue +++ b/src/views/ecm/algos_form.vue @@ -44,7 +44,7 @@ v-if="mode != 'show'" type="primary" :loading="isSaveing" - @click="submit()" + @click="submit" >保 存 @@ -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; - }, }, }; diff --git a/src/views/sys/user.vue b/src/views/sys/user.vue index 51f8b34c..75d018ba 100644 --- a/src/views/sys/user.vue +++ b/src/views/sys/user.vue @@ -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() {