diff --git a/package.json b/package.json index 8c568e1..8905c08 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "vue": "~2.6.14", "vue-clipboard2": "^0.3.1", "vue-cropper": "^0.6.5", + "vue-qr": "^4.0.9", "vue-router": "^3.5.1", "vuex": "^3.6.2", "vuex-router-sync": "^5.0.0" diff --git a/src/pages/activity/activity_index.vue b/src/pages/activity/activity_index.vue index 79eeb20..326abeb 100644 --- a/src/pages/activity/activity_index.vue +++ b/src/pages/activity/activity_index.vue @@ -29,8 +29,24 @@ + + + @@ -358,19 +440,21 @@ import store from "@/store"; import {Editor, Toolbar} from '@wangeditor/editor-for-vue'; import {CloudDownloadIcon} from "tdesign-icons-vue"; +import VueQr from 'vue-qr' import axios from "axios"; export default { - components: {Editor, Toolbar,CloudDownloadIcon}, + components: {Editor, Toolbar,CloudDownloadIcon,VueQr}, data() { return { questionnaireData: [{ type: 1, title: '', wight:0,option: [{name: 'A', val: ""}, {name: 'B', val: ""}] }], + InfotabIndex:'2', tabIndex: '1', visible: false, infoMode: false, addForm: { - weigh:0, + // weigh:0, money:'0', activity_name: '', activity_desc: '', @@ -382,6 +466,13 @@ export default { activity_location: '', activity_type: null, if_display_registrants:null, + signup_start_time:'', + signup_end_time:'', + if_auditing:'1', + range:'3', + number:'', + if_sign:'1', + custom_points:'' }, activity_video:'', activity_video_show:[], @@ -396,6 +487,8 @@ export default { {colKey: 'phone', title: '手机号', align: 'center'}, {colKey: 'position_name', title: '职位', align: 'center'}, {colKey: 'application_time', title: '报名时间', align: 'center'}, + {colKey: 'sign', title: '是否签到', align: 'center'}, + {colKey: 'select', title: '操作', width: 200, align: 'center'}, ], info_pagination: { page: 1, @@ -404,12 +497,12 @@ export default { }, list: [], columns: [ - {colKey: 'weigh', title: '排序', align: 'center',width: 80,}, - {colKey: 'activity_name', title: '活动标题', align: 'center',width: 300,}, + {colKey: 'activity_name', title: '活动标题', align: 'center',width: 150,}, {colKey: 'activity_type', title: '活动类别', width: 200, align: 'center'}, + {colKey: 'qr_code', title: '签到二维码', width: 200, align: 'center'}, + {colKey: 'start', title: '活动时间', align: 'center'}, + {colKey: 'sign', title: '报名时间', align: 'center'}, {colKey: 'money', title: '付费金额', align: 'center'}, - {colKey: 'activity_start_time', title: '活动开始时间', align: 'center'}, - {colKey: 'activity_end_time', title: '活动结束时间', align: 'center'}, {colKey: 'activity_location', title: '活动地点', align: 'center'}, {colKey: 'top', title: '置顶', align: 'center'}, {colKey: 'select', title: '操作', width: 200, align: 'center'}, @@ -468,7 +561,8 @@ export default { JuanTotal:0, JuanId:0, getType:3, - association:{} + infoIfAuditing:1,//否 + association:{}, } }, beforeDestroy() { @@ -486,6 +580,23 @@ export default { this.getList(); }, methods: { + updateType(d,type){ + this.$request + .post('/application/updateType', {id: d.id,type:type}) + .then((res) => { + if (res.code == 1) { + this.$message.success('审核成功'); + this.info_pagination.page = 1; + this.openInfoDo(); + } else { + this.$message.error(res.msg); + } + console.log(res); + }) + .catch((e) => { + console.log(e); + }); + }, openJuanMode(d){ this.JuanModeList=[]; this.JuanMode=true; @@ -495,6 +606,23 @@ export default { this.getType=d.activity_type; this.openJuanModeList(); }, + topNewsDel(row){ + console.log(row); + this.$request + .post('/common/listcancel', {id: row.id,type:'activity'}) + .then((res) => { + if (res.code == 1) { + this.$message.success('取消置顶成功'); + this.getList(); + } else { + this.$message.error(res.msg); + } + console.log(res); + }) + .catch((e) => { + console.log(e); + }); + }, topNews(row){ console.log(row); this.$request @@ -701,7 +829,8 @@ export default { .post("/application/getList", { activity_id: this.infoId, page: this.info_pagination.page, - size: this.info_pagination.size + size: this.info_pagination.size, + type:this.InfotabIndex }) .then((res) => { console.log(res); @@ -716,11 +845,31 @@ export default { }); }, openInfo(d) { + console.log(d); this.info_list=[]; this.info_pagination.page=1; this.info_pagination.total=0; this.infoMode = true; this.infoId = d.id; + this.infoIfAuditing=d.if_auditing; + // if(d.if_auditing==1){ + // this.InfotabIndex='2'; + // }else{ + // this.InfotabIndex='1'; + // } + if(d.if_auditing!=2){ + this.info_columns = this.info_columns.filter(column => column.colKey !== 'sign'); + }else{ + this.info_columns= [ + {colKey: 'photo_image', title: '形象照', align: 'center'}, + {colKey: 'nikename', title: '姓名', align: 'center'}, + {colKey: 'phone', title: '手机号', align: 'center'}, + {colKey: 'position_name', title: '职位', align: 'center'}, + {colKey: 'application_time', title: '报名时间', align: 'center'}, + {colKey: 'sign', title: '是否签到', align: 'center'}, + {colKey: 'select', title: '操作', width: 200, align: 'center'}, + ]; + } this.openInfoDo(); }, formatResponseVideo(res){ @@ -757,7 +906,7 @@ export default { this.addMode = true; this.isEdit = false; this.addForm = { - weigh:0, + // weigh:0, money:0, activity_name: '', activity_desc: '', @@ -769,6 +918,13 @@ export default { activity_location: '', activity_type: null, if_display_registrants:null, + signup_start_time:'', + signup_end_time:'', + if_auditing:'1', + range:'3', + number:'', + if_sign:'1', + custom_points:'' }; }, edit(d) { @@ -779,7 +935,7 @@ export default { }else{ this.activity_video_show = [{url: store.state.user.apiUrl + d.video,name:d.video}]; } - this.addForm.weigh = d.weigh; + // this.addForm.weigh = d.weigh; this.addForm.activity_name = d.activity_name; this.addForm.activity_desc = d.activity_desc; this.addForm.activity_image_show = [{url: store.state.user.apiUrl + d.activity_image}]; @@ -791,9 +947,23 @@ export default { this.addForm.activity_type = d.activity_type; this.addForm.if_display_registrants = d.if_display_registrants; this.addForm.money = d.money; + this.addForm.signup_start_time= d.signup_start_time; + this.addForm.signup_end_time=d.signup_end_time; + + this.addForm.if_auditing=String(d.if_auditing); + this.addForm.range=String(d.range); + this.addForm.number=String(d.number); + this.addForm.if_sign=String(d.if_sign); + this.addForm.custom_points=String(d.custom_points); this.addMode = true; this.isEdit = true; }, + InfotabIndexChange(d){ + this.info_list=[]; + this.info_pagination.page=1; + this.info_pagination.total=0; + this.openInfoDo(); + }, tabIndexChange(d) { console.log(d); this.pagination.page = 1; @@ -844,10 +1014,24 @@ export default { this.$message.error('活动结束时间不能为空'); return; } + if(this.addForm.activity_type==1||this.addForm.activity_type==4){ + if (this.addForm.signup_start_time == '') { + this.$message.error('报名开始时间不能为空'); + return; + } + if (this.addForm.signup_end_time == '') { + this.$message.error('报名结束时间不能为空'); + return; + } + } if (this.addForm.activity_location == '') { this.$message.error('活动地址不能为空'); return; } + if(this.addForm.activity_type==2||this.addForm.activity_type==3){ + this.addForm.signup_start_time=this.addForm.activity_start_time; + this.addForm.signup_end_time=this.addForm.activity_end_time; + } console.log(this.addForm); var url = '/activity/add'; if (this.isEdit) { diff --git a/src/pages/activity/activity_top.vue b/src/pages/activity/activity_top.vue new file mode 100644 index 0000000..d38d2f0 --- /dev/null +++ b/src/pages/activity/activity_top.vue @@ -0,0 +1,160 @@ + + + diff --git a/src/pages/news/news_index.vue b/src/pages/news/news_index.vue index cb73c38..d4bb065 100644 --- a/src/pages/news/news_index.vue +++ b/src/pages/news/news_index.vue @@ -23,7 +23,8 @@
@@ -234,6 +235,23 @@ export default { console.log(e); }); }, + topNewsDel(row){ + console.log(row); + this.$request + .post('/common/listcancel', {id: row.news_id,type:'news'}) + .then((res) => { + if (res.code == 1) { + this.$message.success('取消置顶成功'); + this.getList(); + } else { + this.$message.error(res.msg); + } + console.log(res); + }) + .catch((e) => { + console.log(e); + }); + }, del(d) { console.log(d); this.$request diff --git a/src/pages/user/user_edit_shen.vue b/src/pages/user/user_edit_shen.vue index 1b1c8bb..2b1af59 100644 --- a/src/pages/user/user_edit_shen.vue +++ b/src/pages/user/user_edit_shen.vue @@ -215,12 +215,15 @@ export default { } if (dis == 1) { this.content = '您提交的信息修改已通过审核!'; + }else{ + } this.$request .post("/member_log/update", { member_id: this.member_id, id: this.id, if_xianshi: dis, + if_member: dis, content: this.content, member_log: JSON.stringify(this.updateInfo.member_log) }) diff --git a/src/router/modules/components.ts b/src/router/modules/components.ts index 32bf505..edacf68 100644 --- a/src/router/modules/components.ts +++ b/src/router/modules/components.ts @@ -66,6 +66,12 @@ export default [ name: 'activityIndex', component: () => import('@/pages/activity/activity_index.vue'), meta: { title: '活动列表' }, + }, + { + path: 'activity_top', + name: 'activityTop', + component: () => import('@/pages/activity/activity_top.vue'), + meta: { title: '活动首页置顶' }, } ], },