From 2d2824c6759cc56ff2f8664fac20af3e8ebcc52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Thu, 30 May 2024 15:46:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E5=AE=A3=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityParty/comPromotion/add.vue | 281 +++++------------- .../communityParty/comPromotion/index.vue | 117 +++++--- src/views/modules/cpts/base/cpts/edit.vue | 2 +- 3 files changed, 151 insertions(+), 249 deletions(-) diff --git a/src/views/modules/communityParty/comPromotion/add.vue b/src/views/modules/communityParty/comPromotion/add.vue index a71b858c1..f842f340c 100644 --- a/src/views/modules/communityParty/comPromotion/add.vue +++ b/src/views/modules/communityParty/comPromotion/add.vue @@ -1,215 +1,80 @@ - - - - - - - - \ No newline at end of file +}; + + + \ No newline at end of file diff --git a/src/views/modules/communityParty/comPromotion/index.vue b/src/views/modules/communityParty/comPromotion/index.vue index cf0389f63..44e70b4e0 100644 --- a/src/views/modules/communityParty/comPromotion/index.vue +++ b/src/views/modules/communityParty/comPromotion/index.vue @@ -7,46 +7,21 @@ - - - - -
- 带快捷选项 - - - - - - -
+
查询 新增
- @@ -110,13 +85,13 @@ - - +
@@ -125,28 +100,22 @@ import { Loading } from 'element-ui' // 引入Loading服务 import { requestPost, requestGet } from '@/js/dai/request'; import add from "./add.vue"; - export default { + export default { data () { return { + tableData:[], loading: false, total: 0, pageSize: 10, pageNo: 0, tableLoading: false, agencyId: '', - gridList: [],//所属网格 typeName:'', enabled:'', //form相关 formShow: false, formTitle: '新增活动', detailShow: false, - endPickerOptions: { - disabledDate: endDisabledDate - }, - startPickerOptions: { - disabledDate: startDisabledDate - }, } }, components: { @@ -191,6 +160,7 @@ if (code === 0) { this.total = data.total this.tableData = data.list + console.log( this.tableData ) } else { this.$message.error(msg) } @@ -220,7 +190,6 @@ handleDetail (row) { this.detailShow = true this.formTitle = '详情' - this.$nextTick(() => { this.$refs.ref_detail.initForm(row) // this.$refs.ref_form.initForm('detail', row.id) @@ -256,7 +225,6 @@ }, async handleDelete (row) { - this.$confirm("确认删除?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -272,10 +240,79 @@ }); }, + async handleOnline (row) { + this.$confirm("确认上线?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.OnhandleOnline(row) + }) + .catch(err => { + if (err == "cancel") { + + } + }); + }, + async OnhandleOnline(row){ + console.log(row) + const url = "/actual/base/communityPublicity/updateStatus" + let params={ + status:0, + id:row.id + } + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.$message({ + type: "success", + message: "一发布" + }); + this.loadTable() + } else { + this.$message.error(msg) + } + }, + async handleOffline (row) { + this.$confirm("确认下线?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.OnhandleOffline(row) + }) + .catch(err => { + if (err == "cancel") { + + } + }); + }, + async OnhandleOffline(row){ + console.log(row) + const url = "/actual/base/communityPublicity/updateStatus" + let params={ + status:1, + id:row.id + } + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.$message({ + type: "success", + message: "已发布" + }); + + this.loadTable() + } else { + this.$message.error(msg) + } + }, async deleteActivity (row) { console.log(row) - const url = "/actual/base/advertisingTag/delete" + const url = "/actual/base/communityPublicity/delete" // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete" let idArr=[row.id] const { data, code, msg } = await requestPost(url, idArr) diff --git a/src/views/modules/cpts/base/cpts/edit.vue b/src/views/modules/cpts/base/cpts/edit.vue index 005a4dd68..87cf46354 100644 --- a/src/views/modules/cpts/base/cpts/edit.vue +++ b/src/views/modules/cpts/base/cpts/edit.vue @@ -1,6 +1,6 @@