From 7dca4813ed3fc78b2d31c134fffa805c766023a9 Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 16 Mar 2023 10:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=BB=E9=87=8C=E4=BA=92=E5=8A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/fengdu/app/AppHelp/components/Add.vue | 46 +++- .../fengdu/app/AppHelp/components/Detail.vue | 245 +++++++++++++++--- .../fengdu/app/AppHelp/components/List.vue | 39 +-- 3 files changed, 258 insertions(+), 72 deletions(-) diff --git a/project/fengdu/app/AppHelp/components/Add.vue b/project/fengdu/app/AppHelp/components/Add.vue index 17e25450..d8a7bf49 100644 --- a/project/fengdu/app/AppHelp/components/Add.vue +++ b/project/fengdu/app/AppHelp/components/Add.vue @@ -8,8 +8,8 @@ @@ -54,14 +54,15 @@ return { info: {}, form: { - title: '', + themeId: '', content: '', files: [], - departmentName: '', - departmentIds: [], + publishDepartName: '', + publishDepartIdList: [], }, id: '', department: [], + talkList: [] } }, @@ -74,13 +75,15 @@ this.id = this.params.id this.getInfo(this.params.id) } + this.getTalkList() }, methods: { getInfo (id) { - this.instance.post(`/app/appactivityinfo/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { this.form = res.data + this.form.publishDepartIdList = this.form.publishDepartId.split(',') } }) }, @@ -88,8 +91,9 @@ confirm () { this.$refs.form.validate((valid) => { if (valid) { - this.instance.post(`/app/appactivityinfo/addOrUpdate`, { - ...this.form + this.instance.post(`/app/appneighborhoodassistance/addOrUpdate`, { + ...this.form, + publishDepartId: this.form.publishDepartIdList.join(',') }).then(res => { if (res.code == 0) { this.$message.success('提交成功') @@ -111,13 +115,27 @@ onChange (e) { if (e.length) { - this.form.departmentIds = e.map(v => v.id) - this.form.departmentName = e.map(v => v.name).join(',') + this.form.publishDepartIdList = e.map(v => v.id) + this.form.publishDepartName = e.map(v => v.name).join(',') } else { - this.form.departmentIds = '' - this.form.departmentName = '' + this.form.publishDepartIdList = '' + this.form.publishDepartName = '' } }, + + getTalkList() { + this.instance.post(`/app/appneighborhoodassistancetheme/list?size=100`).then(res => { + if (res.code == 0) { + this.talkList = [] + res.data.records.map((item) => { + this.talkList.push({ + dictName: item.title, + dictValue: item.id + }) + }) + } + }) + }, } } diff --git a/project/fengdu/app/AppHelp/components/Detail.vue b/project/fengdu/app/AppHelp/components/Detail.vue index 6ed4b6f7..f16cb405 100644 --- a/project/fengdu/app/AppHelp/components/Detail.vue +++ b/project/fengdu/app/AppHelp/components/Detail.vue @@ -1,42 +1,68 @@