From 6865c67dc56ad869026947e93347e8037d6d8e6e Mon Sep 17 00:00:00 2001 From: "2309368887@qq.com" <2309368887@qq.com> Date: Thu, 7 Jul 2022 14:26:19 +0800 Subject: [PATCH] xiala --- src/config/route.js | 1 + src/layout/components/userselect.vue | 358 +++++++++++++++++++++++++++ src/views/ecm/algo.vue | 127 ++++++---- src/views/ecm/algo_form.vue | 1 + src/views/ecm/algos_form.vue | 42 +--- src/views/ecm/event_cate_form.vue | 34 ++- src/views/ecm/event_handlefrom.vue | 5 +- src/views/ecm/notify_setting.vue | 27 +- src/views/vm/visit_form.vue | 25 +- 9 files changed, 535 insertions(+), 85 deletions(-) create mode 100644 src/layout/components/userselect.vue diff --git a/src/config/route.js b/src/config/route.js index 14b4f10b..bba75fa5 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -471,6 +471,7 @@ const routes = [ "type": "menu" }, "children": [ + { "name": "employee", "path": "/hrm/employee", diff --git a/src/layout/components/userselect.vue b/src/layout/components/userselect.vue new file mode 100644 index 00000000..e24ee7bd --- /dev/null +++ b/src/layout/components/userselect.vue @@ -0,0 +1,358 @@ + + diff --git a/src/views/ecm/algo.vue b/src/views/ecm/algo.vue index c8c93796..99d47410 100644 --- a/src/views/ecm/algo.vue +++ b/src/views/ecm/algo.vue @@ -4,7 +4,6 @@
-
@@ -26,7 +25,7 @@ + + + @@ -82,18 +88,34 @@ :hidePagination="true" > - - - + + + + + @@ -106,7 +128,7 @@ @success="handleSaveSuccess" @closed="dialog.save = false" > - { - this.eventcateList = res; - }); + 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.$API.ecm.vchannel.list.req({algo:row.id,page: 0 }).then((res) => { + this.chosen_cate = row.id; + + }, + + //算法列表 + getVchannel() { + this.$API.ecm.vchannel.list.req({ page: 0 }).then((res) => { this.vchannelList = res; }); }, - //算法列表 - getVchannel() { - this.$API.ecm.vchannel.list.req({page: 0 }).then((res) => { - this.vchannelList = res; - }); - }, - - //批量布设添加 + //批量布设添加 adds_edit() { this.dialog.algos = true; this.$nextTick(() => { @@ -180,7 +211,7 @@ export default { this.$refs.saveDialog.open(); }); }, - + //窗口编辑 table_edit(row) { this.dialog.save = true; @@ -189,19 +220,25 @@ export default { }); }, table_del(row) { - - this.$API.ecm.vchannel.delete.req(row.id).then((res) => { - this.$refs.tablevchannel.refresh(); - this.$message.success("删除成功"); - - }); + this.$API.ecm.vchannel.delete + .req(row.id) + .then((res) => { + this.$message.success("删除成功"); + this.getVchannel(); + return res; + }) + .catch((err) => { + return err; + }); }, //本地更新数据 handleSaveSuccess() { - this.$refs.tablevchannel.refresh(); }, - + //本地更新数据 + handleSaveSuccessss() { + this.$refs.tablevchannel.refresh(); + }, }, }; diff --git a/src/views/ecm/algo_form.vue b/src/views/ecm/algo_form.vue index 35ebeed4..bb46883d 100644 --- a/src/views/ecm/algo_form.vue +++ b/src/views/ecm/algo_form.vue @@ -88,6 +88,7 @@ export default { //显示 open(mode = "add") { this.mode = mode; + this.form.algo = this.$parent.chosen_cate; this.visible = true; return this; }, diff --git a/src/views/ecm/algos_form.vue b/src/views/ecm/algos_form.vue index dcd12e03..ed34c788 100644 --- a/src/views/ecm/algos_form.vue +++ b/src/views/ecm/algos_form.vue @@ -25,7 +25,7 @@ - + {}); - if (!valid) { - return false; - } - this.isSaveing = true; - try { - var res; - if (this.mode == "add") { - res = await this.$API.ecm.vchannel.creates.req(this.form); - } else if (this.mode == "edit") { - res = await this.$API.ecm.vchannel.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; - } catch (err) { - //可以处理校验错误 - this.isSaveing = false; - return err; - } + submit() { + + this.$API.ecm.vchannel.creates.req(this.form).then((res) => { + this.$message.success("操作成功"); + this.visible=false; + + return res; + }) + }, //表单注入数据 setData(data) { diff --git a/src/views/ecm/event_cate_form.vue b/src/views/ecm/event_cate_form.vue index 6537d000..266ccdc0 100644 --- a/src/views/ecm/event_cate_form.vue +++ b/src/views/ecm/event_cate_form.vue @@ -43,7 +43,7 @@ > - + + + + + + + + @@ -97,7 +109,7 @@ export default { form: { speaker_on: true, self_algo: false, - speakers:[] + speakers: [], }, //验证规则 rules: { @@ -127,7 +139,17 @@ export default { label: "定位", }, ], - speakersptions:[], + voiceoptions:[ + { + value: 3, + label: "男生", + }, + { + value: 0, + label: "女生", + }, + ], + speakersptions: [], //所需数据选项 groups: [], groupsProps: { @@ -149,11 +171,11 @@ export default { }, //固定喇叭列表 getSpeakers() { - this.$API.third.tdevice.list.req({type:50, page: 0 }).then((res) => { + 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(() => {}); @@ -186,7 +208,7 @@ export default { setData(data) { Object.assign(this.form, data); debugger; - console.log(this.form) + console.log(this.form); }, }, }; diff --git a/src/views/ecm/event_handlefrom.vue b/src/views/ecm/event_handlefrom.vue index 656df4b0..6786cbf0 100644 --- a/src/views/ecm/event_handlefrom.vue +++ b/src/views/ecm/event_handlefrom.vue @@ -199,9 +199,8 @@ export default { this.$API.ecm.event.handle.req(this.form.id, this.form) .then((res) => { - this.isSaveing = false; - this.visible = false; - this.$emit("success", this.form, this.mode); + + this.$router.go(-1) this.$message.success("操作成功"); return res; }) diff --git a/src/views/ecm/notify_setting.vue b/src/views/ecm/notify_setting.vue index 48df20b6..b2f59c74 100644 --- a/src/views/ecm/notify_setting.vue +++ b/src/views/ecm/notify_setting.vue @@ -27,11 +27,13 @@ label="#" type="index" width="50" + fixed="left" > 定位 - + + + + + + +