Commit a6bb6ef0 by Cat

zd 社团

parent 9d2af5d4
{ {
"name": "smart_campus", "lockfileVersion": 1
"lockfileVersion": 2,
"requires": true,
"packages": {}
} }
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
"axios": "0.24.0", "axios": "0.24.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"core-js": "3.25.2", "core-js": "3.25.2",
"dingtalk-h5-remote-debug": "^0.1.3",
"dingtalk-jsapi": "^3.0.28",
"echarts": "^4.9.0", "echarts": "^4.9.0",
"element-ui": "2.15.10", "element-ui": "2.15.10",
"exceljs": "^4.3.0", "exceljs": "^4.3.0",
......
// 社团活动记录
import request from '@/utils/request';
// 查询社团活动记录列表
export function getClubInfo(data) {
return request({
url: '/record/list',
method: 'get',
params: data
})
}
// 查询社团活动记录列表
export function listClubInfo(id) {
return request({
url: '/record/'+ id,
method: 'get',
})
}
// 修改社团活动记录
export function editClubInfo(data) {
return request({
url: '/record',
method: 'put',
data: data
})
}
// 新增社团活动记录
export function addClubInfo(data) {
return request({
url: '/record',
method: 'post',
data: data
})
}
// 删除社团活动记录
export function delClubInfo(id) {
return request({
url: '/record/'+ id,
method: 'delete'
})
}
// 获取全校教师(不分页)
export function getTeachers(data) {
return request({
url: '/school/teacher/getTeachers',
method: 'get',
params: data
})
}
\ No newline at end of file
// 社团成员管理
import request from '@/utils/request';
// 查询社团成员管理
export function getMemberInfo(query) {
return request({
url: '/member/list',
method: 'get',
params: query
})
}
// 查询社团成员管理信息列表
export function listMemberInfo(id) {
return request({
url: '/member/'+ id,
method: 'get',
})
}
// 修改社团成员管理
export function editMemberInfo(data) {
return request({
url: '/member',
method: 'put',
data: data
})
}
// 新增社团成员管理
export function addMemberInfo(data) {
return request({
url: '/member',
method: 'post',
data: data
})
}
// 删除社团成员管理
export function delMemberInfo(id) {
return request({
url: '/member/'+ id,
method: 'delete'
})
}
// 获取全校教师(不分页)
export function getTeachers(data) {
return request({
url: '/school/teacher/getTeachers',
method: 'get',
params: data
})
}
\ No newline at end of file
// 社团报名审核列表
import request from '@/utils/request';
// 查询社团报名审核列表
export function getsigninInfo(query) {
return request({
url: '/signin/list',
method: 'get',
params: query
})
}
// 获取社团报名审核详细信息
export function listsigninInfo(id) {
return request({
url: '/signin/'+ id,
method: 'get',
})
}
// 同意社团申请审批
export function allowsignin(data) {
return request({
url: '/signin/approve',
method: 'post',
data: data
})
}
...@@ -8,10 +8,7 @@ ...@@ -8,10 +8,7 @@
label-width="80px" label-width="80px"
> >
<el-form-item prop="name" label="社团名称"> <el-form-item prop="name" label="社团名称">
<el-input <el-input v-model="queryForm.name" placeholder="社团名称"></el-input>
v-model="queryForm.name"
placeholder="社团名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="teachers" label="指导教师"> <el-form-item prop="teachers" label="指导教师">
<el-input <el-input
...@@ -27,10 +24,7 @@ ...@@ -27,10 +24,7 @@
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
...@@ -60,7 +54,7 @@ ...@@ -60,7 +54,7 @@
<!-- 任务详细信息 --> <!-- 任务详细信息 -->
<div class="task-info"> <div class="task-info">
<div class="task-name"> <div class="task-name">
{{ task.intro }} {{ task.name }}
</div> </div>
</div> </div>
<div class="task-level"> <div class="task-level">
...@@ -76,7 +70,6 @@ ...@@ -76,7 +70,6 @@
<!-- 成员人数 --> <!-- 成员人数 -->
<div class="task-count"> <div class="task-count">
<div class="count">{{ task.num }}</div> <div class="count">{{ task.num }}</div>
<div class="sun">成员人数</div> <div class="sun">成员人数</div>
</div> </div>
</div> </div>
...@@ -103,14 +96,14 @@ ...@@ -103,14 +96,14 @@
type="info" type="info"
size="small" size="small"
round round
@click="clubActivityRecord(task.id, task.teachers)" @click="clubActivityRecord(task.id)"
>社团活动记录</el-button >社团活动记录</el-button
> >
<el-button <el-button
type="warning" type="warning"
size="small" size="small"
round round
@click="memberManagement(task.id, task.teachers)" @click="memberManagement(task.id)"
>成员管理 >成员管理
</el-button> </el-button>
<el-button <el-button
...@@ -132,18 +125,8 @@ ...@@ -132,18 +125,8 @@
</div> </div>
</div> </div>
<!-- 新增/修改弹窗 --> <!-- 新增/修改弹窗 -->
<el-dialog <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
:title="title" <el-form ref="form" :model="form" :rules="rules" label-width="110px">
:visible.sync="open"
width="50%"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="110px"
>
<div> <div>
<el-form-item label="社团名称" prop="name"> <el-form-item label="社团名称" prop="name">
<el-input <el-input
...@@ -155,9 +138,10 @@ ...@@ -155,9 +138,10 @@
<el-select <el-select
style="width: 100%" style="width: 100%"
multiple multiple
v-model="form.teachersId" v-model="form.teachers"
filterable filterable
placeholder="请选择指导教师" placeholder="请选择指导教师"
@change="changeTeacher"
> >
<el-option <el-option
v-for="item in teacherInfo" v-for="item in teacherInfo"
...@@ -168,6 +152,7 @@ ...@@ -168,6 +152,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="社团宗旨" prop="aim"> <el-form-item label="社团宗旨" prop="aim">
<el-input <el-input
type="textarea" type="textarea"
...@@ -201,33 +186,33 @@ import { ...@@ -201,33 +186,33 @@ import {
editCommunityInfo, // 修改社团信息 editCommunityInfo, // 修改社团信息
addCommunityInfo, // 新增社团信息 addCommunityInfo, // 新增社团信息
delCommunityInfo, // 删除社团信息 delCommunityInfo, // 删除社团信息
getTeachers //获取全校教师 getTeachers, //获取全校教师
} from '@/api/smartSchool/MassOrganization/basicInfo' } from "@/api/smartSchool/MassOrganization/basicInfo";
export default { export default {
name: 'basicInformationManagement', name: "basicInformationManagement",
data() { data() {
return { return {
tasks: [1, 2, 3], tasks: [],
queryForm: { queryForm: {
name: '', name: "",
teachers: '' teachers: "",
}, },
form: { form: {
params: {}, params: {},
id: '', id: "",
createBy: '', createBy: "",
createTime: '', createTime: "",
updateBy: '', updateBy: "",
updateTime: '', updateTime: "",
delFlag: '', delFlag: "",
name: '', name: "",
teachers: [], teachers: [],
teachersId: '', teachersId: [],
aim: '', aim: "",
intro: '', intro: "",
num: null num: null,
}, },
//新增弹窗 //新增弹窗
open: false, open: false,
...@@ -236,198 +221,202 @@ export default { ...@@ -236,198 +221,202 @@ export default {
loading: true, loading: true,
// 记录条数 // 记录条数
total: 0, total: 0,
title: '', title: "",
// 详情 // 详情
look: false, look: false,
// 日期范围 // 日期范围
dateRange: [], dateRange: [],
teacherInfo: [] //教师下拉列表 teacherInfo: [], //教师下拉列表
} };
}, },
created() { created() {
this.getList(), //查询列表 this.getList(), //查询列表
this.getTeachersInfo() //教师下拉列表 this.getTeachersInfo(); //教师下拉列表
}, },
methods: { methods: {
/** 获取列表数据 */ /** 获取列表数据 */
getList() { getList() {
getCommunityInfo(this.form) getCommunityInfo(this.queryForm)
.then((response) => { .then((response) => {
this.tasks = response.rows // console.log("response", response);
this.total = response.total this.tasks = response.rows;
this.total = response.total;
}) })
.catch((err) => { .catch((err) => {
this.loading = false this.loading = false;
}) });
}, },
// 教师下拉列表 // 教师下拉列表
getTeachersInfo() { getTeachersInfo() {
getTeachers({}).then((res) => { getTeachers({}).then((res) => {
this.teacherInfo = res.rows // console.log("教师", res);
}) this.teacherInfo = res.rows;
});
},
// 查询教师姓名、id
changeTeacher(value) {
// console.log("value", value);
this.teachersId = []; //初始化数据
this.teachers = []; //初始化数据
for (let i = 0; i <= value.length - 1; i++) {
this.teacherInfo.find((item) => {
//这里的options就是数据源
if (item.teacherCode == value[i]) {
this.teachersId.push(item.teacherCode); //这里的value我改成了id
this.teachers.push(item.teacherName); //这里的label我改成了roleName
}
});
}
// console.log("this.teachersId ", this.teachersId);
// console.log("this.teachers ", this.teachers);
}, },
//基础信息管理 //基础信息管理
basicInformation(row) { basicInformation(row) {
// console.log('bbb', row) // console.log('bbb', row)
this.reset() this.reset();
listCommunityInfo(row).then((response) => { listCommunityInfo(row).then((response) => {
// console.log(response, '基础信息管理') // console.log(response, '基础信息管理')
this.form = response.data this.form = response.data;
// this.form.teachers = response.data.teachers // this.form.teachers = response.data.teachers
this.form.teachers = this.form.teachers.split(',') this.form.teachers = this.form.teachers.split(",");
// console.log(this.form.teachers, 'this.form.teachers') // console.log(this.form.teachers, 'this.form.teachers')
// console.log(this.form, 'this.form') // console.log(this.form, 'this.form')
this.open = true this.open = true;
this.title = '社团基础信息管理' this.title = "社团基础信息管理";
}) });
}, },
//新增按钮操作 //新增按钮操作
handleAdd() { handleAdd() {
this.reset() this.reset();
this.open = true this.open = true;
this.title = '新增社团基础信息' this.title = "新增社团基础信息";
}, },
// 社团报名审核 // 社团报名审核
clubRegistrationReview(id, teachers) { clubRegistrationReview(id) {
this.$router.push({ this.$router.push({
path: '/massOrganization/clubRegistrationReview', path: "/massOrganization/clubRegistrationReview",
query: { query: {
id, id,
teachers },
} });
})
}, },
// 社团活动记录 // 社团活动记录
clubActivityRecord(id, teachers) { clubActivityRecord(id) {
this.$router.push({ this.$router.push({
path: '/massOrganization/clubActivityRecord', path: "/massOrganization/clubActivityRecord",
query: { query: {
id, id,
teachers },
} });
})
}, },
//成员管理 //成员管理
memberManagement(id, teachers) { memberManagement(id) {
this.$router.push({ this.$router.push({
path: '/massOrganization/memberManagement', path: "/massOrganization/memberManagement",
query: { query: {
id, id,
teachers },
} });
})
}, },
//社团风采 //社团风采
communityStyle(id, teachers) { communityStyle(id, teachers) {
// console.log("id, teachers", id, teachers);
this.$router.push({ this.$router.push({
path: '/massOrganization/communityStyle', path: "/massOrganization/communityStyle",
query: { query: {
id, id,
teachers teachers,
} },
}) });
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false this.open = false;
// this.resetQuery(); this.reset();
this.reset()
}, },
// 搜索按钮 // 搜索按钮
handleQuery() { handleQuery() {
this.throttle(() => { this.throttle(() => {
this.queryForm.pageNum = 1 this.queryForm.pageNum = 1;
this.getList() this.getList();
}) });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = [] this.dateRange = [];
this.resetForm('queryForm') this.resetForm("queryForm");
this.handleQuery() this.handleQuery();
}, },
// 提交表单 // 提交表单
submitForm() { submitForm() {
// const teachersId = this.form.teachersId this.$refs["form"].validate((valid) => {
const teachersId = this.form.teachersId
this.form.teachers =
teachersId == ''
? ''
: this.teacherInfo.find(
(item) => item.teacherCode == teachersId
).teacherName
this.throttle(() => {
this.$refs['form'].validate((valid) => {
const techs = this.form.teachers.join(',')
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
// 修改 // 修改
const params = { const params = {
id: this.form.id,
name: this.form.name, name: this.form.name,
teachers: techs, teachers: this.teachers.toString(),
teachersId: this.form.teachersId, teachersId: this.teachersId.toString(),
aim: this.form.aim, aim: this.form.aim,
intro: this.form.intro intro: this.form.intro,
} };
console.log(params, 'params') console.log(params, "params");
editCommunityInfo(params) editCommunityInfo(params)
.then((response) => { .then((response) => {
this.getList() this.getList();
this.$message.success('修改成功') this.$message.success("修改成功");
this.open = false this.open = false;
}) })
.catch((err) => {}) .catch((err) => {});
} else { } else {
// 新增 // 新增
const params = { const params = {
name: this.form.name, name: this.form.name,
teachers: techs, teachers: this.teachers.toString(),
teachersId: this.form.teachersId, teachersId: this.teachersId.toString(),
aim: this.form.aim, aim: this.form.aim,
intro: this.form.intro intro: this.form.intro,
} };
console.log(params, 'params') // console.log(params, "params");
addCommunityInfo(params) addCommunityInfo(params)
.then((response) => { .then((response) => {
this.getList() this.getList();
this.$message.success('新增成功') this.$message.success("新增成功");
this.open = false this.open = false;
})
.catch((err) => {
// Handle error if necessary
}) })
.catch((err) => {});
} }
} }
}) });
})
}, },
// 删除按钮 // 删除按钮
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.idEas const ids = row.id || this.idEas;
this.$modal this.$modal
.confirm('是否确认删除?') .confirm("是否确认删除?")
.then(function () { .then(function () {
return delCommunityInfo(ids) return delCommunityInfo(ids);
}) })
.then(() => { .then(() => {
this.getList() this.getList();
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess("删除成功");
}) })
.catch(() => {}) .catch(() => {});
}, },
// 重置表单 // 重置表单
reset() { reset() {
// 重置对话框表单 // 重置对话框表单
this.form = { this.form = {
name: '', name: "",
teachers: '' teachers: "",
} };
this.dateRange = [] this.dateRange = [];
this.resetForm('form') this.resetForm("form");
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -529,4 +518,3 @@ export default { ...@@ -529,4 +518,3 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
</style> </style>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
<el-form-item label="标题" prop="picName"> :model="queryParams"
<el-input v-model="queryParams.picName" placeholder="请输入标题" clearable/> ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="标题" prop="theme">
<el-input
v-model="queryParams.theme"
placeholder="请输入标题"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增 <el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">修改 <el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"-->
<!-- v-hasPermi="['system:pic:export']">导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>-->
</el-row> </el-row>
<el-table v-loading="loading" ref="table" :data="picList" @selection-change="handleSelectionChange"> <el-table
<el-table-column type="selection" width="55" align="center"/> v-loading="loading"
<el-table-column label="序号" align="center" prop="seqencing" width="80"/> ref="table"
<el-table-column label="活动主题" align="center" prop="picName"/> :data="picList"
<el-table-column label="活动开始时间" align="center" prop="picName"/> @selection-change="handleSelectionChange"
<el-table-column label="活动结束时间" align="center" prop="picName"/> >
<el-table-column label="活动负责人" align="center" prop="picName"/> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属社团" align="center" prop="picName"/> <el-table-column label="序号" align="center" type="index" width="80" />
<el-table-column label="备注" align="center" prop="picName"/> <el-table-column label="活动主题" align="center" prop="theme" />
<el-table-column label="附件" align="center" prop="picName"> <el-table-column label="活动开始时间" align="center" prop="beginTime" />
<el-table-column label="活动结束时间" align="center" prop="endTime" />
<el-table-column label="活动负责人" align="center" prop="fzr" />
<el-table-column label="所属社团" align="center" prop="orgName" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="附件" align="center" prop="file">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <ListImage :image-url="pev+scope.row.picUrl"></ListImage>--> <el-image style="width: 100px; height: 100px" :src="scope.row.file">
<!-- previewSrcList 开启预览大图的功能。-->
<el-image
style="width: 100px; height: 100px"
:src="scope.row.url"
:preview-src-list="srcList">
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="是否发布" align="center" prop="isfb">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isShow"
active-value="1"
inactive-value="0"
@change="handleIsShow(scope.row)"
></el-switch>
</template>
</el-table-column> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑 <div>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>编辑
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)">查看 <el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除 </div>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleCheck(scope.row)"
>查看
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination
@pagination="getList"/> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改社团主题对话框 --> <!-- 添加或编辑社团主题对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="90px" style="width: 80%; margin: auto"> <el-form
<el-form-item label="活动主题"> ref="form"
<el-input v-model="form.name"></el-input> :model="form"
:rules="rules"
label-width="120px"
style="width: 80%; margin: auto"
>
<el-row>
<el-col :span="24">
<el-form-item label="风采主题:" prop="theme">
<el-input
v-model="form.theme"
placeholder="请输入"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="活动开始时间"> </el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="活动开始时间:" prop="beginTime">
<el-date-picker <el-date-picker
v-model="form.value1" v-model="form.beginTime"
type="datetime" type="date"
placeholder="选择活动开始时间"> placeholder="选择活动开始时间"
style="width: 100%"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="活动结束时间"> </el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="活动结束时间:" prop="endTime">
<el-date-picker <el-date-picker
v-model="form.value1" v-model="form.endTime"
type="datetime" type="date"
placeholder="选择活动结束时间"> placeholder="选择活动结束时间"
style="width: 100%"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="活动负责人"> </el-col>
<el-select v-model="value" filterable placeholder="请选择活动负责人"> </el-row>
<el-option <el-row>
v-for="item in activeOptions" <el-col :span="24">
:key="item.value" <el-form-item label="活动负责人:" prop="fzr">
:label="item.label" <el-input
:value="item.value"> v-model="form.fzr"
</el-option> placeholder="请输入"
</el-select> style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="所属社团:" prop="orgName">
<el-input
v-model="form.orgName"
placeholder="请输入"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="所属社团"> </el-col>
<el-input v-model="form.name"></el-input> </el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注:" prop="remark">
<el-input
v-model="form.remark"
placeholder="请输入"
style="width: 100%"
type="textarea"
/>
</el-form-item> </el-form-item>
<el-form-item prop="gardenEmblem" </el-col>
style="display: flex; text-align: center; justify-content: center; transform: translateX(-30px)"> </el-row>
<!-- <el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"--> <el-row>
<!-- :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-remove="handleRemove"--> <el-col :span="24">
<!-- :http-request="uploadImage" :limit="1" >--> <el-form-item
<el-upload :disabled="check == true ? true : false" v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*" prop="file"
:show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-remove="handleRemove" style="
:limit="1" > display: flex;
<img v-if="imageUrl" :src="imageUrl" class="avatar"/> text-align: center;
justify-content: center;
transform: translateX(-30px);
"
>
<el-upload
v-loading="uploadLoading"
class="avatar-uploader"
action="#"
accept="image/*"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:http-request="uploadImage"
>
<img v-if="form.file" :src="form.file" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="风采主题:" prop="picName">
<el-input :readonly="check == true ? true : false" v-model="form.picName" placeholder="请输入风采主题" style="width: 100%"/>
</el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="排序:" prop="seqencing">-->
<!-- <el-input-number v-model="form.seqencing" controls-position="right" style="width: 100%"-->
<!-- :min="1"></el-input-number>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -135,32 +239,40 @@ ...@@ -135,32 +239,40 @@
</template> </template>
<script> <script>
import {listPic, getPic, delPic, addPic, updatePic, updateState} from '@/api/smartSchool/schoolManage/introduce/pic' import picAvatar from "@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar";
import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar' import { changeUserStatus } from "@/api/system/user";
import {changeUserStatus} from '@/api/system/user' import { uploadImage as commonUpload } from "@/api/common";
import {uploadImage as commonUpload} from '@/api/common' import { ExportType, TEXT_SIZE } from "@/enums/common";
import {ExportType, TEXT_SIZE} from '@/enums/common'
import {
getClubInfo, // 查询社团活动记录列表
listClubInfo, // 查询社团活动记录列表
editClubInfo, // 编辑社团活动记录
addClubInfo, // 新增社团活动记录
delClubInfo, // 删除社团活动记录
} from "@/api/smartSchool/MassOrganization/clubActivities";
export default { export default {
name: 'clubActivityRecord', name: "communityStyle",
components: {picAvatar}, components: { picAvatar },
data() { data() {
return { return {
pev: process.env.VUE_APP_BASE_API, pev: process.env.VUE_APP_BASE_API,
// 输入框字数限制 // 输入框字数限制
TEXT_SIZE, TEXT_SIZE,
srcList: [],
//是否上传的院徽 //是否上传的院徽
isUploadPic: false, isUploadPic: false,
//照片是否删除 //照片是否删除
options: [ options: [
{ {
value: 0, value: 0,
label: '否' label: "否",
}, },
{ {
value: 1, value: 1,
label: '是' label: "是",
} },
], ],
//获取子组件传来的信息 //获取子组件传来的信息
pic: [], pic: [],
...@@ -183,97 +295,111 @@ export default { ...@@ -183,97 +295,111 @@ export default {
// 园区照片表格数据 // 园区照片表格数据
picList: [], picList: [],
// 弹出层标题 // 弹出层标题
title: '', title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
picName: null cis: "",
theme: "",
}, },
// 表单参数 // 表单参数
form: {}, form: {
theme: "",
beginTime: "",
endTime: "",
fzr: "",
id: "",
orgName: "",
file: "",
remark: "",
},
// 表单校验 // 表单校验
rules: { rules: {
picName: [{required: true, message: '请输入相片名称', trigger: 'blur'}], theme: [
seqencing: [{required: true, message: '请输入排序', trigger: 'blur'}], {
remark: [{max: TEXT_SIZE, message: '备注信息在0到200字之间', trigger: 'blur'}] required: true,
message: "请输入相片名称",
trigger: "blur",
},
],
seqencing: [{ required: true, message: "请输入排序", trigger: "blur" }],
remark: [
{
max: TEXT_SIZE,
message: "备注信息在0到200字之间",
trigger: "blur",
},
],
}, },
//设置table列隐藏与显示 //设置table列隐藏与显示
columns: [ columns: [
{key: 0, label: `园区照片`, visible: true}, { key: 0, label: `园区照片`, visible: true },
{key: 1, label: `相片名称`, visible: true}, { key: 1, label: `相片名称`, visible: true },
// {key: 2, label: `相片路径`, visible: true}, // {key: 2, label: `相片路径`, visible: true},
{key: 2, label: `排序`, visible: true}, { key: 2, label: `排序`, visible: true },
{key: 3, label: `备注`, visible: true}, { key: 3, label: `备注`, visible: true },
{key: 4, label: `创建者`, visible: true}, { key: 4, label: `创建者`, visible: true },
{key: 5, label: `创建时间`, visible: true}, { key: 5, label: `创建时间`, visible: true },
{key: 6, label: `操作`, visible: true} { key: 6, label: `操作`, visible: true },
], ],
// 作为临时图片展示 // 作为临时图片展示
tempImage: '', tempImage: "",
// 导出选项 // 导出选项
exportOptions: { exportOptions: {
title: '选择导出类别', title: "选择导出类别",
open: false open: false,
}, },
//查看状态 //查看状态
check:false, check: false,
//活动负责人下拉框 file: "",
activeOptions:[{ };
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}]
}
}, },
created() { created() {
this.getList() this.getList();
}, },
watch: { watch: {
pic: { pic: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
console.log('watch----oldValue', oldValue) console.log("watch----oldValue", oldValue);
console.log('watch----newValue', newValue) console.log("watch----newValue", newValue);
this.isUploadPic = newValue[3] this.isUploadPic = newValue[3];
} },
} },
}, },
methods: { methods: {
//是否删除 选中值发生变化时id处理函数 //是否删除 选中值发生变化时id处理函数
selectChangeHandler(value) { selectChangeHandler(value) {
this.form.isShow = value this.form.isShow = value;
}, },
/** 查询园区照片列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true this.loading = true;
this.picList = [] this.picList = [];
listPic(this.queryParams).then(response => { const params = {
this.picList = response.rows cid: this.$route.query.id,
this.total = response.total theme: this.queryParams.theme,
this.loading = false };
}) getClubInfo(params).then((response) => {
// console.log("response", response);
this.picList = response.rows;
this.picList.file = response.rows.file;
// console.log(this.picList.file);
this.total = response.total;
this.loading = false;
});
}, },
//获取图片信息 //获取图片信息
getSchoolInfoPic(val) { getSchoolInfoPic(val) {
this.pic = val this.pic = val;
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false this.open = false;
this.reset() this.reset();
}, },
// 表单重置 // 表单重置
reset() { reset() {
...@@ -285,177 +411,204 @@ export default { ...@@ -285,177 +411,204 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
delFlag: null, delFlag: null,
picName: null, theme: null,
picUrl: null, picUrl: null,
seqencing: null, seqencing: null,
isShow: 0 isShow: 0,
} };
this.imageUrl = '' this.imageUrl = "";
this.resetForm('form') this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.throttle(() => { this.throttle(() => {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1;
this.getList() this.getList();
}) });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm("queryForm");
this.handleQuery() this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.check = false this.check = false;
this.reset() this.reset();
this.open = true this.open = true;
this.title = '新增社团风采' this.title = "新增社团活动记录";
}, },
/** 修改按钮操作 */ /** 编辑按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset();
const ids = row.id || this.ids const ids = row.id || this.ids;
listClubInfo(ids).then((response) => {
getPic(ids).then(response => { this.form = response.data;
this.form = response.data this.imageUrl = this.pev + this.form.picUrl;
this.imageUrl = this.pev + this.form.picUrl console.log(this.imageUrl, "this.imageUrl");
this.open = true this.open = true;
this.title = '修改园区照片' this.title = "编辑社团活动记录";
}) });
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCheck(row){ handleCheck(row) {
this.check = true this.check = true;
this.open = true this.open = true;
this.title = '查看社团风采' const ids = row.id || this.ids;
listClubInfo(ids).then((response) => {
this.form = response.data;
this.form.file = response.data.file;
// console.log(this.form.file);
this.open = true;
});
this.title = "查看社团活动记录";
}, },
// 上传成功回调 // 上传成功回调
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.imageUrl = res.data.url this.imageUrl = res.data.url;
console.log(file) console.log(file);
this.commonUpload(file) this.commonUpload(file);
}, },
// 上传前格式和图片大小限制 // 上传前格式和图片大小限制
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const type = file.type === 'image/jpeg' || 'image/jpg' || 'image/webp' || 'image/png' const type =
const isLt2M = file.size / 1024 / 1024 < 2 file.type === "image/jpeg" ||
"image/jpg" ||
"image/webp" ||
"image/png";
const isLt2M = file.size / 1024 / 1024 < 2;
if (!type) { if (!type) {
this.$message.error('图片格式不正确!(只能包含jpg,png,webp,JPEG)') this.$message.error("图片格式不正确!(只能包含jpg,png,webp,JPEG)");
} }
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传图片大小不能超过 2MB!') this.$message.error("上传图片大小不能超过 2MB!");
} }
return type && isLt2M return type && isLt2M;
}, },
//删除图片 //删除图片
handleRemove(file, fileList){ handleRemove(file, fileList) {
this.imageUrl = '' this.imageUrl = "";
}, },
// 上传图片 // 上传图片
uploadImage(file) { uploadImage(file) {
const fileData = file.file const fileData = file.file;
const formData = new FormData() const formData = new FormData();
formData.append('file', fileData) formData.append("file", fileData);
this.uploadLoading = true this.uploadLoading = true;
commonUpload(formData) commonUpload(formData)
.then(response => { .then((response) => {
this.uploadLoading = false this.uploadLoading = false;
this.$modal.msgSuccess('上传成功') this.$modal.msgSuccess("上传成功");
this.imageUrl = this.pev + response.url this.imageUrl = this.pev + response.url;
// this.form.picUrl = process.env.VUE_APP_BASE_API + response.url // this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
this.form.picUrl = response.url this.form.file = this.pev + response.url;
}) console.log(this.form.picUrl, "this.form.picUrl");
.catch(error => {
this.uploadLoading = false
}) })
.catch((error) => {
this.uploadLoading = false;
});
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs['form'].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.$modal.loading('正在上传数据,请稍等...')
if (this.form.id != null) { if (this.form.id != null) {
updatePic({ // 编辑
...this.form const params = {
}) id: this.form.id,
.then(response => { theme: this.form.theme,
this.$modal.closeLoading() file: this.form.file,
this.$modal.msgSuccess('修改成功') };
this.open = false console.log(params, "params");
this.getList() editClubInfo(params)
}) .then((response) => {
.catch(error => { this.getList();
this.$modal.closeLoading() this.$message.success("编辑成功");
this.open = false;
}) })
.catch((err) => {});
} else { } else {
addPic({ // 新增
...this.form, const params = {
isShow: '0' cid: this.$route.query.id,
}) theme: this.form.theme,
.then(response => { beginTime: this.form.beginTime,
this.$modal.closeLoading() endTime: this.form.endTime,
this.$modal.msgSuccess('新增成功') fzr: this.form.fzr,
this.open = false orgName: this.form.orgName,
this.getList() file: this.form.file,
}) remark: this.form.remark,
.catch(error => { };
this.$modal.closeLoading() console.log(params, "params");
addClubInfo(params)
.then((response) => {
this.getList();
this.$message.success("新增成功");
this.open = false;
}) })
.catch((err) => {});
} }
} }
}) });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids;
if (ids) { if (ids) {
this.$modal this.$modal
.confirm(`是否确认删除选中的${Object.hasOwnProperty.call(ids, 'length') ? ids.length : 1}条数据?`) .confirm(
`是否确认删除选中的${
Object.hasOwnProperty.call(ids, "length") ? ids.length : 1
}条数据?`
)
.then(() => { .then(() => {
this.$modal.loading('正在处理数据,请稍等...') this.$modal.loading("正在处理数据,请稍等...");
return delPic(ids) return delClubInfo(ids);
}) })
.then(() => { .then(() => {
this.$modal.closeLoading() this.$modal.closeLoading();
this.getList() this.getList();
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess("删除成功");
}) })
.catch(() => { .catch(() => {
this.$modal.closeLoading() this.$modal.closeLoading();
}) });
} }
}, },
/** 是否发布 */ /** 是否发布 */
handleIsShow(row) { handleIsShow(row) {
console.log(row);
const data = {
id: row.id,
};
this.$modal this.$modal
.confirm(row.isShow === '1' ? '是否确认显示为轮播图?' : '是否取消显示为轮播图?') .confirm()
.then(() => { .then(() => {
this.$modal.loading('正在修改状态,请稍等...') this.$modal.loading("正在编辑状态,请稍等...");
updateState(row.id, row.isShow) isCommunityFb(data)
.then(response => { .then((response) => {
this.$modal.closeLoading() this.$modal.closeLoading();
this.$modal.msgSuccess('修改成功') this.$modal.msgSuccess("编辑成功");
})
.catch(error => {
this.$modal.closeLoading()
row.isShow = row.isShow === '0' ? '1' : '0'
}) })
.catch((error) => {
this.$modal.closeLoading();
});
}) })
.catch(() => { .catch(() => {
row.isShow = row.isShow === '0' ? '1' : '0' // 取消操作时的逻辑
}) });
} },
} },
} };
</script> </script>
<style scoped> <style scoped>
.avatar, .avatar,
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div> <div>
<!-- 搜索条件 --> <!-- 搜索条件 -->
<el-form <el-form
:model="queryForm" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
:inline="true" :inline="true"
label-width="68px" label-width="68px"
> >
<el-form-item label="标题"> <el-form-item label="姓名">
<el-input <el-input
v-model="queryForm.name" v-model="queryParams.name"
placeholder="请输入" placeholder="请输入"
clearable clearable
></el-input> ></el-input>
...@@ -21,54 +21,52 @@ ...@@ -21,54 +21,52 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="getList" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 表格 --> <!-- 表格 -->
<el-table border ref="table" :data="tableData"> <el-table border ref="table" :data="tableData">
<el-table-column <el-table-column align="center" type="index" label="序号" width="55" />
align="center"
type="index"
label="序号"
width="55"
/>
<el-table-column align="center" prop="name" label="姓名" /> <el-table-column align="center" prop="name" label="姓名" />
<el-table-column align="center" prop="name" label="性别" /> <el-table-column align="center" prop="sex" label="性别" />
<el-table-column align="center" prop="name" label="级别" /> <el-table-column align="center" prop="grade" label="年级" />
<el-table-column align="center" prop="name" label="班级" /> <el-table-column align="center" prop="classes" label="班级" />
<el-table-column align="center" prop="name" label="兴趣爱好" /> <el-table-column align="center" prop="hobby" label="兴趣爱好" />
<el-table-column align="center" prop="name" label="联系电话" /> <el-table-column align="center" prop="phone" label="联系电话" />
<el-table-column align="center" prop="name" label="申请理由" /> <el-table-column align="center" prop="reason" label="申请理由" />
<el-table-column align="center" prop="name" label="审核状态" /> <el-table-column align="center" prop="status" label="审核状态">
<template slot-scope="{ row }">
{{
row.status == 1
? "未审核"
: row.flg == 2
? "同意"
: row.status == 3
? "不同意"
: ""
}}
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作"> <el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <div v-if="scope.row.status === '1'">
@click="handleAgree(scope.row)" <el-button @click="handleAgree(scope.row)" type="text" size="small"
type="text"
size="small"
>同意</el-button >同意</el-button
> >
<el-button <el-button
@click="handleDisagree(scope.row)" @click="handleDisagree(scope.row)"
type="text" type="text"
size="small" size="small"
>不同意</el-button >不同意</el-button
> >
<el-button </div>
@click="handleDelete(scope.row)" <el-button @click="handleDelete(scope.row)" type="text" size="small"
type="text"
size="small"
>查看</el-button >查看</el-button
> >
</template> </template>
...@@ -91,43 +89,43 @@ ...@@ -91,43 +89,43 @@
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="性别"> <el-form-item label="性别">
<el-input v-model="form.name"></el-input> <el-input v-model="form.sex"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="级部"> <el-form-item label="级部">
<el-input v-model="form.name"></el-input> <el-input v-model="form.grade"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="班级"> <el-form-item label="班级">
<el-input v-model="form.name"></el-input> <el-input v-model="form.classes"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="兴趣爱好"> <el-form-item label="兴趣爱好">
<el-input v-model="form.name"></el-input> <el-input v-model="form.hobby"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="联系电话"> <el-form-item label="联系电话">
<el-input v-model="form.name"></el-input> <el-input v-model="form.phone"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="申请理由"> <el-form-item label="申请理由">
<el-input v-model="form.name"></el-input> <el-input v-model="form.reason"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="审核状态"> <el-form-item label="审核状态">
<el-input v-model="form.name"></el-input> <el-input v-model="form.status"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -138,72 +136,152 @@ ...@@ -138,72 +136,152 @@
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryForm.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryForm.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
<script> <script>
import {
getsigninInfo, // 查询社团报名审核列表
listsigninInfo, // 获取社团报名审核详细信息
allowsignin, // 同意社团申请审批
} from "@/api/smartSchool/MassOrganization/singninInfo";
export default { export default {
name: 'clubRegistrationReview', name: "clubRegistrationReview",
data() { data() {
return { return {
queryForm: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: '' name: "",
classes: "",
grade: "",
}, },
//表格数据 //表格数据
tableData: [ tableData: [],
{ title: "",
name: '1'
},
{
name: '2222'
},
{
name: '33',
hasChildren: true
},
{
name: '444'
}
],
title: '',
// 弹窗 // 弹窗
form: {}, form: {
id: "",
name: "",
sex: "",
cardid: "",
grade: "",
classes: "",
orgName: "",
orgPosition: "",
phone: "",
status: "",
},
// 总计 // 总计
total: 0, total: 0,
single: false, // 添加 single 属性并设置初始值 single: false, // 添加 single 属性并设置初始值
multiple: false, multiple: false,
dialogTableVisible: false dialogTableVisible: false,
} };
},
mounted() {
this.getList();
}, },
methods: { methods: {
// 搜索 // 搜索
getList() {}, getList() {
// 重置 const params = {
resetQuery() {}, cid: this.$route.query.id,
name: this.queryParams.name,
grade: this.queryParams.grade,
classes: this.queryParams.classes,
};
getsigninInfo(params).then((response) => {
this.tableData = response.rows;
this.total = response.total;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.throttle(() => {
this.queryParams.pageNum = 1;
this.getList();
});
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
name: "",
};
this.resetForm("queryForm");
this.handleQuery();
},
// 表单重置
reset() {
this.form = {};
this.resetForm("form");
},
// 查看 // 查看
handleDelete() { handleDelete(row) {
this.dialogTableVisible = true this.reset();
this.title = '社团报名审核' const ids = row.id || this.ids;
listsigninInfo(ids).then((response) => {
// console.log("response", response);
this.form = response.data;
this.dialogTableVisible = true;
this.title = "社团报名审核";
});
}, },
// 同意 // 同意
handleAgree() {}, handleAgree(row) {
// 同意 this.$confirm("确定同意吗?", "提示", {
handleDisagree() {}, confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.reset();
const params = {
id: row.id,
status: "2",
};
console.log(params);
allowsignin(params).then((response) => {
console.log("response", response);
this.$modal.msgSuccess("操作成功");
this.getList();
this.title = "社团申请审批";
});
});
},
// 不同意
handleDisagree(row) {
this.$confirm("确定不同意吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.reset();
const params = {
id: row.id,
status: "3",
};
console.log(params);
allowsignin(params).then((response) => {
console.log("response", response);
this.$modal.msgSuccess("操作成功");
this.getList();
this.title = "社团申请审批";
});
});
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -211,6 +289,7 @@ export default { ...@@ -211,6 +289,7 @@ export default {
margin-top: 15px; margin-top: 15px;
margin-left: 10px; margin-left: 10px;
} }
.el-table { .el-table {
margin-left: 10px; margin-left: 10px;
} }
......
...@@ -23,10 +23,7 @@ ...@@ -23,10 +23,7 @@
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
...@@ -61,24 +58,15 @@ ...@@ -61,24 +58,15 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column <el-table-column label="序号" align="center" type="index" width="80" />
label="序号"
align="center"
prop="seqencing"
width="80"
/>
<el-table-column label="风采主题" align="center" prop="theme" /> <el-table-column label="风采主题" align="center" prop="theme" />
<el-table-column label="附件" align="center" prop="theme"> <el-table-column label="附件" align="center" prop="file">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image style="width: 100px; height: 100px" :src="scope.row.file">
style="width: 100px; height: 100px"
:src="scope.row.url"
:preview-src-list="srcList"
>
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否发布" align="center" prop="isShow"> <el-table-column label="是否发布" align="center" prop="isfb">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isShow" v-model="scope.row.isShow"
...@@ -92,7 +80,6 @@ ...@@ -92,7 +80,6 @@
label="操作" label="操作"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
v-if="columns[6].visible"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 未发布可以修改删除 --> <!-- 未发布可以修改删除 -->
...@@ -132,12 +119,7 @@ ...@@ -132,12 +119,7 @@
/> />
<!-- 添加或修改社团主题对话框 --> <!-- 添加或修改社团主题对话框 -->
<el-dialog <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
:title="title"
:visible.sync="open"
width="900px"
append-to-body
>
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
...@@ -146,7 +128,7 @@ ...@@ -146,7 +128,7 @@
style="width: 80%; margin: auto" style="width: 80%; margin: auto"
> >
<el-form-item <el-form-item
prop="gardenEmblem" prop="file"
style=" style="
display: flex; display: flex;
text-align: center; text-align: center;
...@@ -154,11 +136,7 @@ ...@@ -154,11 +136,7 @@
transform: translateX(-30px); transform: translateX(-30px);
" "
> >
<!-- <el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"-->
<!-- :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-remove="handleRemove"-->
<!-- :http-request="uploadImage" :limit="1" >-->
<el-upload <el-upload
:disabled="check == true ? true : false"
v-loading="uploadLoading" v-loading="uploadLoading"
class="avatar-uploader" class="avatar-uploader"
action="#" action="#"
...@@ -166,10 +144,9 @@ ...@@ -166,10 +144,9 @@
:show-file-list="false" :show-file-list="false"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
:on-remove="handleRemove" :http-request="uploadImage"
:limit="1"
> >
<img v-if="imageUrl" :src="imageUrl" class="avatar" /> <img v-if="form.file" :src="form.file" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
...@@ -196,47 +173,40 @@ ...@@ -196,47 +173,40 @@
</template> </template>
<script> <script>
import { import picAvatar from "@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar";
listPic, import { changeUserStatus } from "@/api/system/user";
getPic, import { uploadImage as commonUpload } from "@/api/common";
delPic, import { ExportType, TEXT_SIZE } from "@/enums/common";
addPic,
updatePic,
updateState
} from '@/api/smartSchool/schoolManage/introduce/pic'
import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
import { changeUserStatus } from '@/api/system/user'
import { uploadImage as commonUpload } from '@/api/common'
import { ExportType, TEXT_SIZE } from '@/enums/common'
import { import {
getCommunityInfo, // 查询社团信息列表 getCommunityInfo, // 查询社团信息列表
listCommunityInfo, // 查询社团详细信息列表 listCommunityInfo, // 查询社团详细信息列表
editCommunityInfo, // 修改社团信息 editCommunityInfo, // 修改社团信息
isCommunityFb, // 新增社团信息 isCommunityFb, // 新增社团信息
delCommunityInfo, // 删除社团信息 delCommunityInfo, // 删除社团信息
addCommunityInfo //新增社团信息 addCommunityInfo, //新增社团信息
} from '@/api/smartSchool/MassOrganization/communityStyle' } from "@/api/smartSchool/MassOrganization/communityStyle";
export default { export default {
name: 'communityStyle', name: "communityStyle",
components: { picAvatar }, components: { picAvatar },
data() { data() {
return { return {
pev: process.env.VUE_APP_BASE_API, pev: process.env.VUE_APP_BASE_API,
// 输入框字数限制 // 输入框字数限制
TEXT_SIZE, TEXT_SIZE,
srcList: [],
//是否上传的院徽 //是否上传的院徽
isUploadPic: false, isUploadPic: false,
//照片是否删除 //照片是否删除
options: [ options: [
{ {
value: 0, value: 0,
label: '否' label: "否",
}, },
{ {
value: 1, value: 1,
label: '是' label: "是",
} },
], ],
//获取子组件传来的信息 //获取子组件传来的信息
pic: [], pic: [],
...@@ -259,36 +229,39 @@ export default { ...@@ -259,36 +229,39 @@ export default {
// 园区照片表格数据 // 园区照片表格数据
picList: [], picList: [],
// 弹出层标题 // 弹出层标题
title: '', title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
theme: null cis: "",
theme: "",
}, },
// 表单参数 // 表单参数
form: {}, form: {
id: "",
theme: "",
file: "",
},
// 表单校验 // 表单校验
rules: { rules: {
theme: [ theme: [
{ {
required: true, required: true,
message: '请输入相片名称', message: "请输入相片名称",
trigger: 'blur' trigger: "blur",
} },
],
seqencing: [
{ required: true, message: '请输入排序', trigger: 'blur' }
], ],
seqencing: [{ required: true, message: "请输入排序", trigger: "blur" }],
remark: [ remark: [
{ {
max: TEXT_SIZE, max: TEXT_SIZE,
message: '备注信息在0到200字之间', message: "备注信息在0到200字之间",
trigger: 'blur' trigger: "blur",
} },
] ],
}, },
//设置table列隐藏与显示 //设置table列隐藏与显示
columns: [ columns: [
...@@ -299,54 +272,64 @@ export default { ...@@ -299,54 +272,64 @@ export default {
{ key: 3, label: `备注`, visible: true }, { key: 3, label: `备注`, visible: true },
{ key: 4, label: `创建者`, visible: true }, { key: 4, label: `创建者`, visible: true },
{ key: 5, label: `创建时间`, visible: true }, { key: 5, label: `创建时间`, visible: true },
{ key: 6, label: `操作`, visible: true } { key: 6, label: `操作`, visible: true },
], ],
// 作为临时图片展示 // 作为临时图片展示
tempImage: '', tempImage: "",
// 导出选项 // 导出选项
exportOptions: { exportOptions: {
title: '选择导出类别', title: "选择导出类别",
open: false open: false,
}, },
//查看状态 //查看状态
check: false check: false,
} file: "",
};
}, },
created() { created() {
this.getList() this.getList();
}, },
watch: { watch: {
pic: { pic: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
console.log('watch----oldValue', oldValue) console.log("watch----oldValue", oldValue);
console.log('watch----newValue', newValue) console.log("watch----newValue", newValue);
this.isUploadPic = newValue[3] this.isUploadPic = newValue[3];
} },
} },
}, },
methods: { methods: {
//是否删除 选中值发生变化时id处理函数 //是否删除 选中值发生变化时id处理函数
selectChangeHandler(value) { selectChangeHandler(value) {
this.form.isShow = value this.form.isShow = value;
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true this.loading = true;
this.picList = [] this.picList = [];
getCommunityInfo(this.queryParams).then((response) => { const params = {
this.picList = response.rows cid: this.$route.query.id,
this.total = response.total theme: this.queryParams.theme,
this.loading = false };
}) // console.log(params);
getCommunityInfo(params).then((response) => {
// console.log("response", response);
this.picList = response.rows;
this.picList.file = response.rows.file;
// console.log(this.picList.file);
this.total = response.total;
this.loading = false;
});
}, },
//获取图片信息 //获取图片信息
getSchoolInfoPic(val) { getSchoolInfoPic(val) {
this.pic = val this.pic = val;
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false this.open = false;
this.reset() this.reset();
}, },
// 表单重置 // 表单重置
reset() { reset() {
...@@ -361,189 +344,196 @@ export default { ...@@ -361,189 +344,196 @@ export default {
theme: null, theme: null,
picUrl: null, picUrl: null,
seqencing: null, seqencing: null,
isShow: 0 isShow: 0,
} };
this.imageUrl = '' this.imageUrl = "";
this.resetForm('form') this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.throttle(() => { this.throttle(() => {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1;
this.getList() this.getList();
}) });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm("queryForm");
this.handleQuery() this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.check = false this.check = false;
this.reset() this.reset();
this.open = true this.open = true;
this.title = '新增社团风采' this.title = "新增社团风采";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset();
const ids = row.id || this.ids const ids = row.id || this.ids;
listCommunityInfo(ids).then((response) => {
// getPic(ids).then((response) => { this.form = response.data;
// this.form = response.data this.imageUrl = this.pev + this.form.picUrl;
// this.imageUrl = this.pev + this.form.picUrl console.log(this.imageUrl, "this.imageUrl");
// this.open = true this.open = true;
// this.title = '修改园区照片' this.title = "修改园区照片";
// }) });
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCheck(row) { handleCheck(row) {
this.check = true this.check = true;
this.open = true this.open = true;
this.title = '查看社团风采' const ids = row.id || this.ids;
listCommunityInfo(ids).then((response) => {
this.form = response.data;
this.form.file = response.data.file;
console.log(this.form.file);
this.open = true;
});
this.title = "查看社团风采";
}, },
// 上传成功回调 // 上传成功回调
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.imageUrl = res.data.url this.imageUrl = res.data.url;
console.log(file) console.log(file);
this.commonUpload(file) this.commonUpload(file);
}, },
// 上传前格式和图片大小限制 // 上传前格式和图片大小限制
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const type = const type =
file.type === 'image/jpeg' || file.type === "image/jpeg" ||
'image/jpg' || "image/jpg" ||
'image/webp' || "image/webp" ||
'image/png' "image/png";
const isLt2M = file.size / 1024 / 1024 < 2 const isLt2M = file.size / 1024 / 1024 < 2;
if (!type) { if (!type) {
this.$message.error( this.$message.error("图片格式不正确!(只能包含jpg,png,webp,JPEG)");
'图片格式不正确!(只能包含jpg,png,webp,JPEG)'
)
} }
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传图片大小不能超过 2MB!') this.$message.error("上传图片大小不能超过 2MB!");
} }
return type && isLt2M return type && isLt2M;
}, },
//删除图片 //删除图片
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.imageUrl = '' this.imageUrl = "";
}, },
// 上传图片 // 上传图片
uploadImage(file) { uploadImage(file) {
const fileData = file.file const fileData = file.file;
const formData = new FormData() const formData = new FormData();
formData.append('file', fileData) formData.append("file", fileData);
this.uploadLoading = true this.uploadLoading = true;
commonUpload(formData) commonUpload(formData)
.then((response) => { .then((response) => {
this.uploadLoading = false this.uploadLoading = false;
this.$modal.msgSuccess('上传成功') this.$modal.msgSuccess("上传成功");
this.imageUrl = this.pev + response.url this.imageUrl = this.pev + response.url;
// this.form.picUrl = process.env.VUE_APP_BASE_API + response.url // this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
this.form.picUrl = response.url this.form.file = this.pev + response.url;
console.log(this.form.picUrl, "this.form.picUrl");
}) })
.catch((error) => { .catch((error) => {
this.uploadLoading = false this.uploadLoading = false;
}) });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs['form'].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.$modal.loading('正在上传数据,请稍等...')
if (this.form.id != null) { if (this.form.id != null) {
editCommunityInfo({ // 修改
...this.form const params = {
}) id: this.form.id,
theme: this.form.theme,
file: this.form.file,
};
console.log(params, "params");
editCommunityInfo(params)
.then((response) => { .then((response) => {
this.$modal.closeLoading() this.getList();
this.$modal.msgSuccess('修改成功') this.$message.success("修改成功");
this.open = false this.open = false;
this.getList()
})
.catch((error) => {
this.$modal.closeLoading()
}) })
.catch((err) => {});
} else { } else {
addCommunityInfo({ // 新增
...this.form, const params = {
isShow: '0' cid: this.$route.query.id,
}) theme: this.form.theme,
file: this.form.file,
};
console.log(params, "params");
addCommunityInfo(params)
.then((response) => { .then((response) => {
this.$modal.closeLoading() this.getList();
this.$modal.msgSuccess('新增成功') this.$message.success("新增成功");
this.open = false this.open = false;
this.getList()
})
.catch((error) => {
this.$modal.closeLoading()
}) })
.catch((err) => {});
} }
} }
}) });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids;
if (ids) { if (ids) {
this.$modal this.$modal
.confirm( .confirm(
`是否确认删除选中的${ `是否确认删除选中的${
Object.hasOwnProperty.call(ids, 'length') Object.hasOwnProperty.call(ids, "length") ? ids.length : 1
? ids.length
: 1
}条数据?` }条数据?`
) )
.then(() => { .then(() => {
this.$modal.loading('正在处理数据,请稍等...') this.$modal.loading("正在处理数据,请稍等...");
return delCommunityInfo(ids) return delCommunityInfo(ids);
}) })
.then(() => { .then(() => {
this.$modal.closeLoading() this.$modal.closeLoading();
this.getList() this.getList();
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess("删除成功");
}) })
.catch(() => { .catch(() => {
this.$modal.closeLoading() this.$modal.closeLoading();
}) });
} }
}, },
/** 是否发布 */ /** 是否发布 */
handleIsShow(row) { handleIsShow(row) {
// this.$modal console.log(row);
// .confirm( const data = {
// row.isShow === '1' id: row.id,
// ? '是否确认显示为轮播图?' };
// : '是否取消显示为轮播图?'
// ) this.$modal
// .then(() => { .confirm()
// this.$modal.loading('正在修改状态,请稍等...') .then(() => {
// updateState(row.id, row.isShow) this.$modal.loading("正在修改状态,请稍等...");
// .then((response) => { isCommunityFb(data)
// this.$modal.closeLoading() .then((response) => {
// this.$modal.msgSuccess('修改成功') this.$modal.closeLoading();
// }) this.$modal.msgSuccess("修改成功");
// .catch((error) => { })
// this.$modal.closeLoading() .catch((error) => {
// row.isShow = row.isShow === '0' ? '1' : '0' this.$modal.closeLoading();
// }) });
// }) })
// .catch(() => { .catch(() => {
// row.isShow = row.isShow === '0' ? '1' : '0' // 取消操作时的逻辑
// }) });
} },
} },
} };
</script> </script>
<style scoped> <style scoped>
.avatar, .avatar,
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item label="年级:" prop="picName"> <el-form-item label="年级:" prop="grade">
<el-input <el-input
v-model="queryParams.picName" v-model="queryParams.grade"
placeholder="请输入年级" placeholder="请输入年级"
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="班级:" prop="picName"> <el-form-item label="班级:" prop="classes">
<el-input <el-input
v-model="queryParams.picName" v-model="queryParams.classes"
placeholder="请输入班级" placeholder="请输入班级"
clearable clearable
/> />
...@@ -30,10 +30,7 @@ ...@@ -30,10 +30,7 @@
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
...@@ -62,26 +59,25 @@ ...@@ -62,26 +59,25 @@
</el-row> </el-row>
<el-table <el-table
v-loading="loading"
ref="table" ref="table"
:data="picList" :data="memberList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column <!-- <el-table-column label="序号" align="center" prop="id" width="80" /> -->
label="序号" <el-table-column label="序号" align="center" type="index" width="80" />
align="center" <el-table-column label="姓名" align="center" prop="name" />
prop="seqencing" <el-table-column label="性别" align="center" prop="sex">
width="80" <template slot-scope="scope">
/> <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
<el-table-column label="姓名" align="center" prop="picName" /> </template>
<el-table-column label="性别" align="center" prop="picName" /> </el-table-column>
<el-table-column label="身份证号" align="center" prop="picName" /> <el-table-column label="身份证号" align="center" prop="cardid" />
<el-table-column label="年级" align="center" prop="picName" /> <el-table-column label="年级" align="center" prop="grade" />
<el-table-column label="班级" align="center" prop="picName" /> <el-table-column label="班级" align="center" prop="classes" />
<el-table-column label="社团部门" align="center" prop="picName" /> <el-table-column label="社团部门" align="center" prop="orgName" />
<el-table-column label="社团职位" align="center" prop="picName" /> <el-table-column label="社团职位" align="center" prop="orgPosition" />
<el-table-column label="联系方式" align="center" prop="picName" /> <el-table-column label="联系方式" align="center" prop="phone" />
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
...@@ -116,73 +112,48 @@ ...@@ -116,73 +112,48 @@
<!-- 添加或修改社团主题对话框 --> <!-- 添加或修改社团主题对话框 -->
<el-dialog <el-dialog
center
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
width="30%" width="45%"
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="姓名:" prop="picName"> <el-form-item label="姓名:" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名:" />
</el-form-item>
<el-form-item label="性别:" prop="sex">
<el-select <el-select
v-model="form.value" v-model="form.sex"
placeholder="请输入性别"
style="width: 100%" style="width: 100%"
filterable
placeholder="请选择姓名"
> >
<el-option <el-option
v-for="item in options" v-for="dict in dict.type.sys_user_sex"
:key="item.value" :key="dict.value"
:label="item.label" :label="dict.label"
:value="item.value" :value="dict.value"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="性别:" prop="picName"> <el-form-item label="身份证号:" prop="cardid">
<el-input <el-input v-model="form.cardid" placeholder="请输入身份证号" />
readonly
v-model="form.picName"
placeholder="请输入性别:"
/>
</el-form-item>
<el-form-item label="身份证号:" prop="picName">
<el-input
readonly
v-model="form.picName"
placeholder="请输入身份证号"
/>
</el-form-item> </el-form-item>
<el-form-item label="年级:" prop="picName"> <el-form-item label="年级:" prop="grade">
<el-input <el-input v-model="form.grade" placeholder="请输入年级" />
readonly
v-model="form.picName"
placeholder="请输入年级"
/>
</el-form-item> </el-form-item>
<el-form-item label="班级:" prop="picName"> <el-form-item label="班级:" prop="classes">
<el-input <el-input v-model="form.classes" placeholder="请输入班级" />
readonly
v-model="form.picName"
placeholder="请输入班级"
/>
</el-form-item> </el-form-item>
<el-form-item label="联系方式:" prop="picName"> <el-form-item label="联系方式:" prop="phone">
<el-input <el-input v-model="form.phone" placeholder="请输入联系方式" />
v-model="form.picName"
placeholder="请输入联系方式"
/>
</el-form-item> </el-form-item>
<el-form-item label="社团部门:" prop="picName"> <el-form-item label="社团部门:" prop="orgName">
<el-input <el-input v-model="form.orgName" placeholder="请输入社团部门" />
v-model="form.picName"
placeholder="请输入社团部门"
/>
</el-form-item> </el-form-item>
<el-form-item label="社团职位:" prop="picName"> <el-form-item label="社团职位:" prop="orgPosition">
<el-input <el-input v-model="form.orgPosition" placeholder="请输入社团职位" />
v-model="form.picName"
placeholder="请输入社团职位"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -195,28 +166,24 @@ ...@@ -195,28 +166,24 @@
<script> <script>
import { import {
listPic, getMemberInfo, // 查询社团信息列表
getPic, listMemberInfo, // 查询社团详细信息列表
delPic, editMemberInfo, // 修改社团信息
addPic, addMemberInfo, // 新增社团信息
updatePic, delMemberInfo, // 删除社团信息
updateState } from "@/api/smartSchool/MassOrganization/memberManagement";
} from '@/api/smartSchool/schoolManage/introduce/pic'
import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
import { changeUserStatus } from '@/api/system/user'
import { uploadImage as commonUpload } from '@/api/common'
import { ExportType, TEXT_SIZE } from '@/enums/common'
export default { export default {
name: 'communityStyle', name: "communityStyle",
components: { picAvatar }, dicts: ["sys_user_sex"],
// components: { picAvatar },
data() { data() {
return { return {
memberList: [],
pev: process.env.VUE_APP_BASE_API, pev: process.env.VUE_APP_BASE_API,
// 输入框字数限制
TEXT_SIZE,
// 遮罩层 // 遮罩层
loading: true, loading: false,
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
...@@ -228,187 +195,174 @@ export default { ...@@ -228,187 +195,174 @@ export default {
// 总条数 // 总条数
total: 0, total: 0,
// 弹出层标题 // 弹出层标题
title: '', title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
picName: null classes: "",
grade: "",
}, },
// 表单参数 // 表单参数
form: {}, form: {
// 表单校验 id: "",
rules: { name: "",
// picName: [ sex: "",
// { cardid: "",
// required: true, grade: "",
// message: '请输入相片名称', classes: "",
// trigger: 'blur' orgName: "",
// } orgPosition: "",
// ], phone: "",
}, userid: "",
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
}, },
{ // 表单校验
value: '选项3', rules: {},
label: '蚵仔煎' options: [],
}, };
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
]
}
}, },
created() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true const params = {
this.picList = [] cid: this.$route.query.id,
listPic(this.queryParams).then((response) => { name: this.queryParams.name,
this.picList = response.rows grade: this.queryParams.grade,
this.total = response.total classes: this.queryParams.classes,
this.loading = false };
}) getMemberInfo(params).then((response) => {
// console.log("response111", response);
this.memberList = response.rows;
// console.log("this.memberList", this.memberList);
this.total = response.total;
});
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false this.open = false;
this.reset() this.reset();
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {};
params: {}, this.queryParams = {};
id: null, this.imageUrl = "";
createBy: null, this.resetForm("form");
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null,
picName: null,
picUrl: null,
seqencing: null,
isShow: 0
}
this.imageUrl = ''
this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.throttle(() => { this.throttle(() => {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1;
this.getList() this.getList();
}) });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm("queryForm");
this.handleQuery() this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset();
this.open = true this.open = true;
this.title = '新增社团成员' this.title = "新增社团成员";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset();
const ids = row.id || this.ids const ids = row.id || this.ids;
getPic(ids).then((response) => { listMemberInfo(ids).then((response) => {
this.form = response.data // console.log("response", response);
this.form = response.data;
this.open = true this.open = true;
this.title = '修改社团成员信息' this.title = "修改社团成员信息";
}) });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs['form'].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
this.$modal.loading('正在上传数据,请稍等...') // this.$modal.loading("正在上传数据,请稍等...");
if (this.form.id != null) { if (this.form.id != null) {
updatePic({ // 修改
...this.form const paramsedit = {
}) id: this.form.id,
name: this.form.name,
sex: this.form.sex,
cardid: this.form.cardid,
grade: this.form.grade,
classes: this.form.classes,
orgPosition: this.form.orgPosition,
phone: this.form.phone,
};
editMemberInfo(paramsedit)
.then((response) => { .then((response) => {
this.$modal.closeLoading() // this.$modal.closeLoading();
this.$modal.msgSuccess('修改成功') this.$modal.msgSuccess("修改成功");
this.open = false this.open = false;
this.getList() this.getList();
})
.catch((error) => {
this.$modal.closeLoading()
}) })
.catch((error) => {});
} else { } else {
addPic({ // 新增
...this.form, // 获取当前登录人userId
isShow: '0' const userName = this.$store.state.user.userId;
}) const params = {
cid: this.$route.query.id,
orgName: this.form.orgName,
name: this.form.name,
sex: this.form.sex,
cardid: this.form.cardid,
grade: this.form.grade,
classes: this.form.classes,
orgPosition: this.form.orgPosition,
phone: this.form.phone,
userId: userName,
};
addMemberInfo(params)
.then((response) => { .then((response) => {
this.$modal.closeLoading() this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess('新增成功') this.open = false;
this.open = false this.getList();
this.getList()
})
.catch((error) => {
this.$modal.closeLoading()
}) })
.catch((error) => {});
} }
} }
}) });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids;
if (ids) { if (ids) {
this.$modal this.$modal
.confirm( .confirm(
`是否确认删除选中的${ `是否确认删除选中的${
Object.hasOwnProperty.call(ids, 'length') Object.hasOwnProperty.call(ids, "length") ? ids.length : 1
? ids.length
: 1
}条数据?` }条数据?`
) )
.then(() => { .then(() => {
this.$modal.loading('正在处理数据,请稍等...') return delMemberInfo(ids);
return delPic(ids)
}) })
.then(() => { .then(() => {
this.$modal.closeLoading() this.getList();
this.getList() this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess('删除成功')
}) })
.catch(() => { .catch(() => {});
this.$modal.closeLoading()
})
}
}
} }
} },
},
};
</script> </script>
<style scoped> <style scoped>
.avatar, .avatar,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment