epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

763 lines
33 KiB

<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.OrganizationName" size="small" class="item_width_1" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="发布时间">
<el-select v-model="formData.Organizationaltype" placeholder="请选择" clearable>
<el-option v-for="item in formData.optionstype" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="formData.Organizationaltype" placeholder="请选择" clearable>
<el-option v-for="item in formData.optionstype" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属栏目">
<el-select v-model="formData.Organizationaltype" placeholder="请选择" clearable>
<el-option v-for="item in formData.optionstype" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</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 class="diy-button--white" size="small">
<el-upload :headers="$getElUploadHeaders()" ref="upload" class="upload-btn" action="uploadUlr"
:limit="1" :accept="'.xls,.xlsx'" :with-credentials="true" :show-file-list="false"
:auto-upload="true" :on-progress="handleProgress" :on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload" :http-request="uploadHttpRequest">
导入
</el-upload>
</el-button> -->
<el-table class="table" :data="tableData" border style="width: 100%">
<el-table-column label="序号" header-align="center" align="center" type="index"
width="80"></el-table-column>
<el-table-column prop="agencyName" header-align="center" align="center" label="发布时间"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="OrganizationName" header-align="center" align="center" label="所属栏目"
:show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span>{{ scope.row.enabled === 1 ? '关闭' : '显示' }}</span>
</template> -->
</el-table-column>
<el-table-column prop="Servicetype" header-align="center" align="center" label="标题"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="Organizationaltype" header-align="center" align="center" label="状态"
:show-overflow-tooltip="true">
</el-table-column>
<!-- <el-table-column prop="AdministratorName" header-align="center" align="center" label="级别"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="Administratorphone" header-align="center" align="center" label="承接单位"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="Administratorphone" header-align="center" align="center" label="状态"
:show-overflow-tooltip="true">
</el-table-column> -->
<!-- <el-table-column prop="createdTime" header-align="center" align="center" label="注册时间" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="points" header-align="center" align="center" label="积分":show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="actNum" header-align="center" align="center" label="活动次数":show-overflow-tooltip="true">
</el-table-column> -->
<el-table-column label="操作" fixed="right" width="350" 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="handleupOnline(scope.row)">下线</el-button>
<el-button type="text"
style="color:#1C6AFD;" size="small" @click="handleupOnline(scope.row)">上线</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handledelete(scope.row)">删除</el-button>
<!-- <el-button type="text" style="color:#1C6AFD;" size="small"
@click="handlerecruit(scope.row)">招募</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleprocessl(scope.row)">审核</el-button>
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handlerecord(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="showAdd" :close-on-click-modal="false" :close-on-press-escape="false" title="新增"
width="850px" top="10vh" class="dialog-h" @closed="showAddClose">
<add v-if="showAdd" @showAddClose="showAddClose" />
</el-dialog>
<el-dialog :visible.sync="showInfo" :close-on-click-modal="false" :close-on-press-escape="false" title="查看"
width="850px" top="10vh" class="dialog-h" @closed="showInfoClose">
<info v-if="showInfo" :VolunteerList="infoList" @showInfoClose="showInfoClose" />
</el-dialog>
<el-dialog :visible.sync="showEdit" :close-on-click-modal="false" :close-on-press-escape="false" title="修改"
width="850px" top="10vh" class="dialog-h" @closed="showEditClose">
<edit v-if="showEdit" :VolunteerList="EditList" @showEditClose="showEditClose" />
</el-dialog>
<el-dialog :visible.sync="showrecruit" :close-on-click-modal="false" :close-on-press-escape="false"
title="招募" width="1000px" top="10vh" class="dialog-h" @closed="handlerecruitClose">
<recruit v-if="showrecruit" :list="fmData" @handlerecruitClose="handlerecruitClose" />
</el-dialog>
<el-dialog :visible.sync="showprocess" :close-on-click-modal="false" :close-on-press-escape="false"
title="审查" width="850px" top="10vh" class="dialog-h" @closed="handleprocesslClose">
<process v-if="showprocess" @handleprocesslClose="handleprocesslClose" :VolunteerList="EditList" />
</el-dialog>
<el-dialog :visible.sync="showrecord" :close-on-click-modal="false" :close-on-press-escape="false"
title="查看记录" width="850px" top="10vh" class="dialog-h" @closed="handleprocesslClose">
<process v-if="showrecord" @handleprocesslClose="handleprocesslClose" :VolunteerList="EditList" />
</el-dialog>
</div>
</div>
</template>
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
// import add from "./add.vue"
// import info from "./info.vue"
// import edit from "./edit.vue"
// import recruit from "./recruit"
// import process from "./process.vue"
// import Record from "./activeRecord"
// import integral from "./integral"
// // import projectInfo from "./cpts/project-info";
import axios from "axios";
export default {
components: {
// add,info,edit,recruit,process
},
data() {
return {
formData: {
organization: "",
service_type: "",
optionstype: [
{ value: "1", label: "志愿者服务组织" },
{ value: "2", label: "志愿者服务团队" },
]
},
showrecord:false,
infoList:{},
showrecruit:false,
showprocess:false,
EditList:{},
showAdd: false,
showMember: false,
showEdit: false,
// pageType: "list", // 列表list 处理dispose 详情info 议题详情issue-info
pageNo: 1,
pageSize: 20,
total: 1,
tableData: [
{
VolunteerPic: "https://example.com/path/to/volunteer_pic.jpg",
Volunteerbrand: "阳光志愿者",
Organizational: "致力于社区服务和环境保护的非营利组织。",
fileList: [
"https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/dev/20240902/afc68283a231434aa8b83ec9d9be762e.jpg",
],
AdministratorIDCard: "11010519800101001X",
Administratorphone: "13800138000",
AdministratorName: "张三",
Organizationaltype: "非营利组织",
Servicetype: "教育支持、环境保护",
OrganizationName: "绿意志愿服务中心",
agencyName: "城市志愿服务联盟",
longitude: 120.37280504155444 ,
latitude: 36.098042952884704,
searchValue:"山东省青岛市市北区南宁路79-7号",
Servicetype:1,
searchOptions:[]
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic1.jpg",
Volunteerbrand: "爱心行动",
Organizational: "专注于儿童教育和社区发展的慈善组织。",
fileList: [
"https://example.com/path/to/cover_pic3.jpg",
"https://example.com/path/to/cover_pic4.jpg"
],
AdministratorIDCard: "220202199003070029",
Administratorphone: "13911112222",
AdministratorName: "李四",
Organizationaltype: "慈善机构",
Servicetype: "儿童教育、社区发展",
OrganizationName: "希望之光慈善会",
agencyName: "慈善联盟"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic2.jpg",
Volunteerbrand: "绿色地球",
Organizational: "致力于环境保护和生态平衡的非政府组织。",
fileList: [
"https://example.com/path/to/cover_pic5.jpg",
"https://example.com/path/to/cover_pic6.jpg"
],
AdministratorIDCard: "330106199101090033",
Administratorphone: "13722222333",
AdministratorName: "王五",
Organizationaltype: "非政府组织",
Servicetype: "环境保护、生态平衡",
OrganizationName: "自然之友环保协会",
agencyName: "环保行动网络"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic3.jpg",
Volunteerbrand: "文化传承",
Organizational: "专注于文化遗产保护和传统艺术推广的组织。",
fileList: [
"https://example.com/path/to/cover_pic7.jpg",
"https://example.com/path/to/cover_pic8.jpg"
],
AdministratorIDCard: "440301199201100025",
Administratorphone: "13533333444",
AdministratorName: "赵六",
Organizationaltype: "文化保护",
Servicetype: "文化遗产、传统艺术",
OrganizationName: "文化遗产保护协会",
agencyName: "文化传承联盟"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic3.jpg",
Volunteerbrand: "文化传承",
Organizational: "专注于文化遗产保护和传统艺术推广的组织。",
fileList: [
"https://example.com/path/to/cover_pic7.jpg",
"https://example.com/path/to/cover_pic8.jpg"
],
AdministratorIDCard: "440301199201100025",
Administratorphone: "13533333444",
AdministratorName: "赵六",
Organizationaltype: "文化保护",
Servicetype: "文化遗产、传统艺术",
OrganizationName: "文化遗产保护协会",
agencyName: "文化传承联盟"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic4.jpg",
Volunteerbrand: "科技先锋",
Organizational: "推动科技创新和教育的组织。",
fileList: [
"https://example.com/path/to/cover_pic9.jpg",
"https://example.com/path/to/cover_pic10.jpg"
],
AdministratorIDCard: "510107199205070012",
Administratorphone: "13666666777",
AdministratorName: "钱七",
Organizationaltype: "科技教育",
Servicetype: "科技创新、教育普及",
OrganizationName: "科技创新中心",
agencyName: "科技教育促进会"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic5.jpg",
Volunteerbrand: "健康使者",
Organizational: "致力于公共健康和医疗援助的组织。",
fileList: [
"https://example.com/path/to/cover_pic11.jpg",
"https://example.com/path/to/cover_pic12.jpg"
],
AdministratorIDCard: "320106199301080018",
Administratorphone: "13877777888",
AdministratorName: "孙八",
Organizationaltype: "公共健康",
Servicetype: "健康教育、医疗援助",
OrganizationName: "健康促进基金会",
agencyName: "医疗援助网络"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic6.jpg",
Volunteerbrand: "法律援助",
Organizational: "提供法律咨询和援助服务的组织。",
fileList: [
"https://example.com/path/to/cover_pic13.jpg",
"https://example.com/path/to/cover_pic14.jpg"
],
AdministratorIDCard: "370102199401090039",
Administratorphone: "13988888999",
AdministratorName: "李九",
Organizationaltype: "法律服务",
Servicetype: "法律咨询、权益保护",
OrganizationName: "法律援助中心",
agencyName: "法律服务联盟"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic7.jpg",
Volunteerbrand: "动物之友",
Organizational: "关注动物福利和野生动物保护的组织。",
fileList: [
"https://example.com/path/to/cover_pic15.jpg",
"https://example.com/path/to/cover_pic16.jpg"
],
AdministratorIDCard: "21010219950109003X",
Administratorphone: "13500001111",
AdministratorName: "周十",
Organizationaltype: "动物保护",
Servicetype: "动物福利、野生动物保护",
OrganizationName: "动物保护协会",
agencyName: "动物福利网络"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic8.jpg",
Volunteerbrand: "城市绿化",
Organizational: "致力于城市绿化和公园维护的组织。",
fileList: [
"https://example.com/path/to/cover_pic17.jpg",
"https://example.com/path/to/cover_pic18.jpg"
],
AdministratorIDCard: "120101199601090011",
Administratorphone: "13600002222",
AdministratorName: "吴十一",
Organizationaltype: "环境保护",
Servicetype: "城市绿化、公园维护",
OrganizationName: "城市绿化促进会",
agencyName: "绿化行动联盟"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic9.jpg",
Volunteerbrand: "艺术之声",
Organizational: "推广艺术文化和支持艺术家的组织。",
fileList: [
"https://example.com/path/to/cover_pic19.jpg",
"https://example.com/path/to/cover_pic20.jpg"
],
AdministratorIDCard: "420107199701100027",
Administratorphone: "13711112233",
AdministratorName: "郑十二",
Organizationaltype: "文化艺术",
Servicetype: "艺术推广、文化活动",
OrganizationName: "艺术文化中心",
agencyName: "艺术支持网络"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic10.jpg",
Volunteerbrand: "青年力量",
Organizational: "支持青年发展和创业的组织。",
fileList: [
"https://example.com/path/to/cover_pic21.jpg",
"https://example.com/path/to/cover_pic22.jpg"
],
AdministratorIDCard: "330106199801100012",
Administratorphone: "13822224444",
AdministratorName: "王十三",
Organizationaltype: "青年发展",
Servicetype: "青年培训、创业支持",
OrganizationName: "青年发展基金会",
agencyName: "青年创业促进会"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic11.jpg",
Volunteerbrand: "教育之光",
Organizational: "致力于改善教育质量和提供教育资源的组织。",
fileList: [
"https://example.com/path/to/cover_pic23.jpg",
"https://example.com/path/to/cover_pic24.jpg"
],
AdministratorIDCard: "510107199901200015",
Administratorphone: "13933335555",
AdministratorName: "冯十四",
Organizationaltype: "教育支持",
Servicetype: "教育质量提升、资源提供",
OrganizationName: "教育发展基金会",
agencyName: "教育支持联盟"
},
{
VolunteerPic: "https://example.com/path/to/volunteer_pic12.jpg",
Volunteerbrand: "社区伙伴",
Organizational: "促进社区发展和邻里互助的组织。",
fileList: [
"https://example.com/path/to/cover_pic25.jpg",
"https://example.com/path/to/cover_pic26.jpg"
],
AdministratorIDCard: "32010620000109003X",
Administratorphone: "13500006666",
AdministratorName: "陈十五",
Organizationaltype: "社区发展",
Servicetype: "社区建设、邻里互助",
OrganizationName: "社区发展协会",
agencyName: "社区互助网络"
}
],
showInfo:false,
};
},
computed: {
maxTableHeight() {
return this.$store.state.inIframe
? this.clientHeight - 400 + this.iframeHeigh
: this.clientHeight - 400;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
},
mounted() {
this.getTableData();
},
methods: {
//记录
handlerecord(row){
this.showrecord=true
this.EditList=row
console.log(row,this.fmData,"row");
},
handlerecordClose(){
this.showrecord=false
},
//删除活动
handledelete(row){
console.log(row,"删除活动");
let url=`/voluntary/activityInfo/delete/${row.id}`
requestGet(url).then((res)=>{
if(res.code==0){
this.$message.success("删除成功")
this.getTableData()
}else{
this.$message.error(res.msg)
}
})
},
//活动上下线
handleupOnline(row){
console.log(row,"row");
if (row.online==1) {
row.online=0
}else{
row.online=1
}
let url="/voluntary/activityInfo/online",
params={
id:row.id,
online:row.online
}
requestPost(url,params).then(res=>{
console.log(res);
this.getTableData()
})
},
//招募
handlerecruit(row){
this.showrecruit=true
this.EditList=row
console.log(row,this.fmData,"row");
},
//关闭招募
handlerecruitClose(){
this.showrecruit=false
},
//审查
handleprocessl(row){
this.showprocess=true
this.EditList=row
console.log(row,this.fmData,"row");
},
//关闭审查
handleprocesslClose(){
this.showprocess=false
},
//成员管理
handleshowMember(){
this.showMember=true
},
//关闭成员管理
MemberManagementClose(){
this.showMember=false
},
//修改
handleEdit(row){
this.showEdit=true,
this.EditList=row
console.log(row,this.EditList,"row");
},
//关闭修改
showEditClose(){
this.showEdit=false
},
//新增
handleAdd(){
this.showAdd=true
},
//关闭新增
showAddClose(){
console.log("sdlkfjklsdf1");
this.showAdd=false
},
//关闭查看
showInfoClose(){
this.showEdit=false
},
//查询列表
async getTableData() {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
const url = "/voluntary/volunteerInfo/page";
let params={
pageSize:this.pageSize,
pageNo:this.pageNo,
mobile:this.formData.mobile,
name:this.formData.name
}
const { data, code, msg } = await requestPost(url,params);
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
// this.tableData = data.list
} else {
}
},
//模板
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(); //FormData对象,添加参数只能通过append('key', value)的形式添加
formData.append('file', file.file); //添加文件对象
formData.append('code', ''); //添加文件对象
let url = '/governance/icEvent/importEvent'
if (this.importType == 2) {
url = '/governance/icEvent/importAwo'
}
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
...Object.keys(data.option.exist).map(k => {
return {
index: k,
srcField: data.option.exist[k],
exist: true,
field: data.option.exist[k]
};
}),
...Object.keys(data.option.notExist).map(k => {
return {
index: k,
srcField: data.option.notExist[k],
exist: false,
field: ''
};
})
];
this.importOption = data.option;
this.importCode = data.code;
this.fileData = file;
} else this.$message.error(res.data.msg);
})
.catch(err => {
console.log('失败', err);
file.onError(); //上传失败的文件会从文件列表中删除
});
this.importLoading = false;
this.importBtnTitle = '导入';
this.$refs.upload.clearFiles();
this.getTableData();
},
handleExcelSuccess(res, file) {
if (!res.code === 0 && !res.msg === 'success') {
this.$message.error(res.msg);
}
},
beforeExcelUpload(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;
},
handleintegral(row){
this.fmData=row
this.integral=true
console.log(row,"row");
},
diaClose(){
this.formShow=false
},
resetSearch(){
this.formData=[]
},
handleDetail(row){
this.showInfo=true
this.infoList=row
console.log( this.infoList,"fmData");
},
summDetailClose(){
this.showAdd=false
this.getTableData()
},
async handleExportModule() {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
await this.$http({
method: "POST",
url,
responseType: "blob",
data: params,
})
.then((res) => {
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("网络错误");
});
},
handleProgress(event, file, fileList) {
console.log("percentage", file.percentage);
},
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();
},
handleClose() {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess() {
this.handleClose();
this.getTableData();
},
},
};
</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>