Browse Source

志愿者管理页面

feature
是小王呀\24601 1 year ago
parent
commit
e6dfaa53f8
  1. 84
      src/views/modules/volunteer/VolManage/activeRecord.vue
  2. 574
      src/views/modules/volunteer/VolManage/index.vue
  3. 84
      src/views/modules/volunteer/VolManage/integral.vue
  4. 64
      src/views/modules/volunteer/VolManage/see.vue
  5. 7
      src/views/modules/volunteer/activityArchive/index.vue
  6. 7
      src/views/modules/volunteer/pointsRedemption/index.vue

84
src/views/modules/volunteer/VolManage/activeRecord.vue

@ -0,0 +1,84 @@
<template>
<div class="g-main" style="margin: 30px;">
<div class="f-flex" >
<div class="f-flex" style="align-items: center;">
<div>活动查询</div>
<el-input placeholder="请输入内容" v-model="input" style="width: 200px" clearable>
</el-input>
</div>
<div class="f-flex" style="align-items: center;">
<div>状态</div>
<el-input placeholder="请输入内容" v-model="input" style="width: 200px" clearable>
</el-input>
</div>
<div>
<el-button type="primary">查询</el-button>
</div>
</div>
<div >
<el-table :data="tableData" border style="width: 700px" >
<el-table-column label="序号" width="80" header-align="center" align="center" type="index" ></el-table-column>
<el-table-column prop="Community" header-align="center" align="center" label="主办方" >
</el-table-column>
<el-table-column prop="ActivityCount" header-align="center" align="center" label="活动地点" >
</el-table-column>
<el-table-column prop="ActivityCount" header-align="center" align="center" label="活动标题" >
</el-table-column>
. <el-table-column prop="ActivityCount" header-align="center" align="center" label="活动时间" >
</el-table-column>
<el-table-column prop="ActivityCount" header-align="center" align="center" label="状态" >
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="250" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleEdit(scope.row)">活动记录</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleDelete(scope.row)">积分调整</el-button>
</template>
</el-table-column> -->
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
<el-dialog :visible.sync="Record" :close-on-click-modal="false" :close-on-press-escape="false" title="活动记录"
width="750px" top="10vh" class="dialog-h" @closed="diaClose">
<Record :list="fmData"/>
</el-dialog>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" title="查看"
width="750px" top="10vh" class="dialog-h" @closed="diaClose">
<see :list="fmData"/>
</el-dialog>
</div>
</div>
</template>
<script>
export default {
name: "see",
data() {
return {
labelPosition: 'right',
tableData: [],
};
},
props:{
list:{
type: Object,
default: () => {}
}
},
methods: {},
created() {
console.log(this.list,"list");
this.tableData=this.list
},
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
</style>

574
src/views/modules/volunteer/VolManage/index.vue

@ -0,0 +1,574 @@
<template>
<div class="g-main">
<div class="m-search">
<el-form :inline="true" ref="ref_searchform" :label-width="'100px'">
<div>
<el-form-item label="姓名">
<el-input v-model.trim="formData.name" size="small" class="item_width_1" clearable placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="手机号">
<el-input v-model.trim="formData.phone" size="small" class="item_width_1" clearable placeholder="请输入"></el-input>
</el-form-item>
</div>
<div class="block">
<div style="display: flex; justify-content: flex-end;">
<el-button style="margin-left:10px" class="diy-button--blue" size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px" class="diy-button--white" size="small"
@click="resetSearch">重置</el-button>
</div>
</div>
</el-form>
</div>
<div class="m-table">
<el-button style="" class="diy-button--add" size="small" @click="handleAdd">下载模板</el-button>
<el-button style="" class="diy-button--add" size="small" @click="handleAdd">导入</el-button>
<el-table class="table" :data="tableData" border v-loading="tableLoading" style="width: 100%">
<el-table-column label="序号" header-align="center" align="center" type="index" ></el-table-column>
<el-table-column prop="Community" header-align="center" align="center" label="所属社区" >
</el-table-column>
<el-table-column prop="Nickname" header-align="center" align="center" label="昵称" >
<!-- <template slot-scope="scope">
<span>{{ scope.row.enabled === 1 ? '关闭' : '显示' }}</span>
</template> -->
</el-table-column>
<el-table-column prop="Name" header-align="center" align="center" label="姓名" >
<template slot-scope="scope">
<span>{{ scope.row.status === 0 ? '已下线' : '已发布' }}</span>
</template>
</el-table-column>
<el-table-column prop="Identity" header-align="center" align="center" label="身份信息" >
<template slot-scope="scope">
<span>{{ scope.row.status === 0 ? '已下线' : '已发布' }}</span>
</template>
</el-table-column>
<el-table-column prop="PhoneNumber" header-align="center" align="center" label="手机号" >
</el-table-column>
<el-table-column prop="IDNumber" header-align="center" align="center" label="身份证号" >
</el-table-column>
<el-table-column prop="RegistrationTime" header-align="center" align="center" label="注册时间" >
</el-table-column>
<el-table-column prop="Points" header-align="center" align="center" label="积分" >
</el-table-column>
<el-table-column prop="ActivityCount" header-align="center" align="center" label="活动次数" >
</el-table-column>
<el-table-column label="操作" fixed="right" width="250" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleEdit(scope.row)">活动记录</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleintegral(scope.row)">积分调整</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
<el-dialog :visible.sync="Record" :close-on-click-modal="false" :close-on-press-escape="false" title="活动记录"
width="750px" top="10vh" class="dialog-h" @closed="diaClose">
<Record :list="fmData"/>
</el-dialog>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" title="查看"
width="750px" top="10vh" class="dialog-h" @closed="diaClose">
<see :list="fmData"/>
</el-dialog>
<el-dialog :visible.sync="integral" :close-on-click-modal="false" :close-on-press-escape="false" title="积分调整"
width="750px" top="10vh" class="dialog-h" @closed="diaClose">
<integral :list="fmData"/>
</el-dialog>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import see from "./see.vue"
import Record from "./activeRecord"
import integral from "./integral"
// // import projectInfo from "./cpts/project-info";
import axios from "axios";
export default {
components: { see,Record,integral },
data() {
return {
formData:{
name:"",
phone:""
},
integral:false,
tableLoading: false,
formShow:false,
// pageType: "list", // list dispose info issue-info
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
tableData: [
{
Community: "Stellar Community",
Nickname: "Dawn",
Name: "Li Xiaoming",
Identity: "Regular Member",
PhoneNumber: "13800138000",
IDNumber: "420123198901011234",
RegistrationTime: "2024-01-15T08:30:00Z",
Points: 1250,
ActivityCount: 15
},
{
Community: "Stellar Community",
Nickname: "Dawn",
Name: "Li Xiaoming",
Identity: "Regular Member",
PhoneNumber: "13800138000",
IDNumber: "420123198901011234",
RegistrationTime: "2024-01-15T08:30:00Z",
Points: 1250,
ActivityCount: 15
},
{
Community: "Stellar Community",
Nickname: "Dawn",
Name: "Li Xiaoming",
Identity: "Regular Member",
PhoneNumber: "13800138000",
IDNumber: "420123198901011234",
RegistrationTime: "2024-01-15T08:30:00Z",
Points: 1250,
ActivityCount: 15
},
{
Community: "Stellar Community",
Nickname: "Dawn",
Name: "Li Xiaoming",
Identity: "Regular Member",
PhoneNumber: "13800138000",
IDNumber: "420123198901011234",
RegistrationTime: "2024-01-15T08:30:00Z",
Points: 1250,
ActivityCount: 15
},
{
Community: "Stellar Community",
Nickname: "Dawn",
Name: "Li Xiaoming",
Identity: "Regular Member",
PhoneNumber: "13800138000",
IDNumber: "420123198901011234",
RegistrationTime: "2024-01-15T08:30:00Z",
Points: 1250,
ActivityCount: 15
},
{
Community: "Stellar Community",
Nickname: "Dawn",
Name: "Li Xiaoming",
Identity: "Regular Member",
PhoneNumber: "13800138000",
IDNumber: "420123198901011234",
RegistrationTime: "2024-01-15T08:30:00Z",
Points: 1250,
ActivityCount: 15
},
],
Record:false,
fmData:[],
// optionsStatus: [
// {
// value: "pending",
// label: "",
// },
// {
// value: "closed",
// label: "",
// },
// ],
// fmData: {
// title: "",
// status: "",
// startDate: "",
// endDate: "",
// },
// importBtnTitle: "",
// importLoading: false,
// startPickerOptions: {
// disabledDate: startDisabledDate,
// },
// currentProject: {
// projectId: "",
// userId: "",
// categoryCodes: [],
// },
};
},
computed: {
maxTableHeight() {
return this.$store.state.inIframe
? this.clientHeight - 400 + this.iframeHeigh
: this.clientHeight - 400;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"fmData.endDate": function (val) {
if (val && val != "") {
console.log(val);
let arrayTemp = val.split(" ");
this.fmData.endDate = arrayTemp[0] + " 23:59:59";
}
},
},
mounted() {
// this.getTableData();
},
methods: {
handleintegral(row){
this.integral=true
console.log(row,"row");
},
diaClose(){
this.formShow=false
},
resetSearch(){
this.formData=[]
},
handleDetail(row){
console.log(row,"row");
this.formShow=true
this.fmData=row
},
async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
await this.$http({
method: "POST",
url,
responseType: "blob",
data: params,
})
.then((res) => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
//
handleExcelSuccess(res, file) {
if (res.code === 0 && res.msg === "success") {
console.log("resss---ppp", res);
} else {
this.$message.error(res.msg);
}
},
handleProgress(event, file, fileList) {
console.log("percentage", file.percentage);
},
beforeExcelUpload(file) {
console.log("file", file);
const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error("上传文件只能是xls/xlsx格式!");
}
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return fileType && isLt1M;
},
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = "正在上传中...";
this.$message({
showClose: true,
dangerouslyUseHTMLString: true,
message: "导入中,请到系统管理-<a id='clickA' style='cursor: pointer;'>导入记录</a>中查看进度",
duration: 3000
});
let than = this
document.getElementById('clickA').addEventListener('click',function(){
than.$router.replace('/main/importRecord-index');
})
const formData = new FormData(); //FormDataappend('key', value)
formData.append("file", file.file); //
await this.$http
.post(
"/heart/iccommunityselforganization/importcommunityselforganization",
formData
)
.then((res) => {
console.log("res-up", res);
if (res.data.code == 0 && res.data.msg == "success") {
// this.$message.success('')
this.getTableData();
} else this.$message.error(res.data.msg);
})
.catch((err) => {
console.log("失败", err);
file.onError(); //
// this.$message.error('')
});
// axios({
// url:
// window.SITE_CONFIG["apiURL"] +
// "/heart/iccommunityselforganization/importcommunityselforganization",
// method: "post",
// data: formData,
// // responseType: "blob",
// })
// .then((res) => {
// this.importLoading = false;
// this.importBtnTitle = "";
// console.log("resresresresresresres", res);
// this.getTableData();
// if (res.data.code == 0) {
// return this.$message.success(res.data.data || "");
// } else {
// return this.$message.error(res.data.msg);
// }
// })
// .catch((err) => {
// console.log("", err);
// });
this.importLoading = false;
this.importBtnTitle = "导入";
this.$refs.upload.clearFiles();
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
//
handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1;
this.getTableData();
},
resetForm(formName) {
(this.fmData = {
title: "",
status: "",
startDate: "",
endDate: "",
date: ["", ""],
}),
this.handleSearch();
},
async handleChu() {
const url = "/governance/project/project-list-export";
const { pageSize, pageNo, fmData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...fmData,
},
responseType: "blob",
})
.then((res) => {
console.log(res);
// content-dispositionres,
// let fileName = window.decodeURI(
// res.headers["content-disposition"].split(";")[1].split("=")[1]
// );
let yy = new Date().getFullYear();
var mm =
new Date().getMonth() > 9
? new Date().getMonth() + 1
: new Date().getMonth() == 9
? new Date().getMonth() + 1
: "0" + (new Date().getMonth() + 1);
var dd =
new Date().getDate() < 10
? "0" + new Date().getDate()
: new Date().getDate();
let time = `${yy}-${mm}-${dd} `;
let fileName = `项目管理${time}`;
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleAdd() {},
async handleWatch(rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
projectId: item.projectId,
};
this.pageType = "info";
},
async handleEdit(row) {
// let item = this.tableData[rowIndex];
// this.currentProject = {
// projectId: item.projectId,
// };
// this.pageType = "edit";
this.Record=true
},
handleClose() {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
async handleDel(rowData, rowIndex) {
console.log(rowData, rowIndex);
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
const { tableData } = this;
const { data, code, msg } = await requestPost(url, {
orgId: tableData[rowIndex].orgId,
});
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.success("操作失败!");
}
},
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/governance/project/project-list";
const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...fmData,
});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return item;
})
: [];
this.tableData.forEach((item) => {
if (item.origin === "issue") {
item.originName = "议题 ";
} else if (item.origin === "agency") {
item.originName = "项目立项";
} else if (item.origin === "resi_event") {
item.originName = "旧版事件上报";
} else if (item.origin === "work_event") {
item.originName = "巡查上报";
} else if (item.origin === "ic_event") {
item.originName = "事件";
} else {
item.sourceTypeName = "--";
}
});
} else {
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
.g-main {
width: 100%;
}
.m-search {
background: #ffffff;
border-radius: 4px;
padding: 30px 20px 5px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
}
.item_width_1 {
width: 260px;
}
.item_width_2 {
width: 495px;
}
.m-table {
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
margin-top: 15px;
padding: 23px 30px 10px;
.table {
margin-top: 20px;
}
}
.div_btn {
display: flex;
justify-content: space-between;
}
.el-row {
/* margin-bottom: 20px; */
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-right: 50px;
}
</style>

84
src/views/modules/volunteer/VolManage/integral.vue

@ -0,0 +1,84 @@
<template>
<div class="g-main" style="margin: 30px;">
<div class="f-flex" >
<div class="f-flex" style="align-items: center;">
<div>活动查询</div>
<el-input placeholder="请输入内容" v-model="input" style="width: 200px" clearable>
</el-input>
</div>
<div class="f-flex" style="align-items: center;">
<div>状态</div>
<el-input placeholder="请输入内容" v-model="input" style="width: 200px" clearable>
</el-input>
</div>
<div>
<el-button type="primary">查询</el-button>
</div>
</div>
<div >
<el-table :data="tableData" border style="width: 700px" >
<el-table-column label="序号" width="80" header-align="center" align="center" type="index" ></el-table-column>
<el-table-column prop="Community" header-align="center" align="center" label="主办方" >
</el-table-column>
<el-table-column prop="ActivityCount" header-align="center" align="center" label="活动地点" >
</el-table-column>
<el-table-column prop="ActivityCount" header-align="center" align="center" label="活动标题" >
</el-table-column>
. <el-table-column prop="ActivityCount" header-align="center" align="center" label="活动时间" >
</el-table-column>
<el-table-column prop="ActivityCount" header-align="center" align="center" label="状态" >
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="250" header-align="center" align="center" class="operate">
<template slot-scope="scope">
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleEdit(scope.row)">活动记录</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleDelete(scope.row)">积分调整</el-button>
</template>
</el-table-column> -->
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
<el-dialog :visible.sync="Record" :close-on-click-modal="false" :close-on-press-escape="false" title="活动记录"
width="750px" top="10vh" class="dialog-h" @closed="diaClose">
<Record :list="fmData"/>
</el-dialog>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" title="查看"
width="750px" top="10vh" class="dialog-h" @closed="diaClose">
<see :list="fmData"/>
</el-dialog>
</div>
</div>
</template>
<script>
export default {
name: "see",
data() {
return {
labelPosition: 'right',
tableData: [],
};
},
props:{
list:{
type: Object,
default: () => {}
}
},
methods: {},
created() {
console.log(this.list,"list");
this.tableData=this.list
},
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
</style>

64
src/views/modules/volunteer/VolManage/see.vue

@ -0,0 +1,64 @@
<template>
<div style="display: flex; justify-content: center;white-space: nowrap;" >
<el-form :label-position="labelPosition" :model="tableData">
<el-form-item label="姓名">
{{ tableData.name }}
</el-form-item>
<el-form-item label="昵称">
{{ tableData.nickname }}
</el-form-item>
<el-form-item label="身份信息">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="手机号">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="身份证号">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="所属社区">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="注册时间">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="加入的志愿者组织">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="积分">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="活动次数">
{{ tableData.Nickname}}
</el-form-item>
<el-form-item label="星级">
{{ tableData.Nickname}}
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: "see",
data() {
return {
labelPosition: 'right',
tableData: [],
};
},
props:{
list:{
type: Object,
default: () => {}
}
},
methods: {},
created() {
console.log(this.list,"list");
this.tableData=this.list
},
}
</script>
<style lang="scss" scoped>
</style>

7
src/views/modules/volunteer/activityArchive/index.vue

@ -0,0 +1,7 @@
<template>
<div>
fdlkgjfdl655515
</div>
</template>
<script></script>
<style lang="scss" scoped></style>

7
src/views/modules/volunteer/pointsRedemption/index.vue

@ -0,0 +1,7 @@
<template>
<div>
fdlkgjfdl
</div>
</template>
<script></script>
<style lang="scss" scoped></style>
Loading…
Cancel
Save