Commit c9d607c2 by Cat

zd 社团 教师电子档案

parent 0ef44e50
...@@ -93,11 +93,12 @@ export function getNoticeInfo(query) { ...@@ -93,11 +93,12 @@ export function getNoticeInfo(query) {
} }
//老师查看列表 //老师查看列表
export function getTeacherTnfo(query) { export function getTeacherTnfo(userId,query) {
return request({ return request({
url: '/teacherFiles/files/getTeachList', url: `/teacherFiles/files/getTeachList/${userId}`,
// url: `/teacherFiles/files/getTeachList/${userId}`,
method: 'get', method: 'get',
params: query params:query
}) })
} }
......
<!--社团风采--> <!--社团风采-->
<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
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="标题" prop="theme"> <el-form-item label="标题" prop="theme">
<el-input v-model="queryParams.theme" placeholder="请输入标题" clearable /> <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="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除 <el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table v-loading="loading" ref="table" :data="picList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
ref="table"
:data="picList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="80" /> <el-table-column label="序号" align="center" type="index" 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="file"> <el-table-column label="附件" align="center" prop="file">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image v-for="(item,index) in scope.row.file.split(',')" :key="index" style="width: 100px; height: 100px" :src="item" :preview-src-list="[item]"> <el-image
v-for="(item, index) in scope.row.file.split(',')"
:key="index"
style="width: 100px; height: 100px"
:src="item"
:preview-src-list="[item]"
>
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否发布" align="center" prop="isfb"> <el-table-column label="是否发布" align="center" prop="isfb">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isShow" active-value="1" inactive-value="0" <el-switch
@change="handleIsShow(scope.row)"></el-switch> v-model="scope.row.isfb"
active-value="1"
inactive-value="2"
@change="handleIsShow(scope.row)"
></el-switch>
</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"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 未发布可以修改删除 --> <!-- 未发布可以修改删除 -->
<div> <div>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改 <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-delete" @click="handleDelete(scope.row)">删除 <el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button> </el-button>
</div> </div>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)">查看 <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 prop="file" style=" ref="form"
:model="form"
:rules="rules"
label-width="90px"
style="width: 80%; margin: auto"
>
<el-form-item
prop="file"
style="
display: flex; display: flex;
text-align: center; text-align: center;
justify-content: center; justify-content: center;
...@@ -76,20 +153,28 @@ ...@@ -76,20 +153,28 @@
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
> >
<!-- <img v-for="(item,index) in form.file" :key="index" v-if="form.file" :src="item" class="avatar" />--> <!-- <img v-for="(item,index) in form.file" :key="index" v-if="form.file" :src="item" class="avatar" />-->
<div v-if="form.file"> <div v-if="form.file">
<img v-for="(item,index) in form.file" :key="index" :src="item" class="avatar" /> <img
v-for="(item, index) in form.file"
:key="index"
:src="item"
class="avatar"
/>
</div> </div>
<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-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="风采主题:" prop="theme"> <el-form-item label="活动主题:" prop="theme">
<el-input :readonly="check == true ? true : false" v-model="form.theme" placeholder="请输入风采主题" <el-input
style="width: 100%" /> :readonly="check == true ? true : false"
v-model="form.theme"
placeholder="请输入活动主题"
style="width: 100%"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -301,10 +386,10 @@ export default { ...@@ -301,10 +386,10 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.uploadList = [] this.uploadList = [];
this.check = false; this.check = false;
this.reset(); this.reset();
console.log('form.file',this.form.file) console.log("form.file", this.form.file);
this.open = true; this.open = true;
this.title = "新增社团风采"; this.title = "新增社团风采";
}, },
...@@ -312,14 +397,11 @@ export default { ...@@ -312,14 +397,11 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.uploadList = [] this.uploadList = [];
this.form.file = [] this.form.file = [];
listCommunityInfo(ids).then((response) => { listCommunityInfo(ids).then((response) => {
console.log('修改',response)
this.form = response.data; this.form = response.data;
this.form.file = response.data.file.split(',') this.form.file = response.data.file.split(",");
console.log("this.form.file", this.form.file);
this.imageUrl = this.pev + this.form.picUrl; this.imageUrl = this.pev + this.form.picUrl;
this.open = true; this.open = true;
this.title = "修改园区照片"; this.title = "修改园区照片";
...@@ -327,31 +409,23 @@ export default { ...@@ -327,31 +409,23 @@ export default {
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCheck(row) { handleCheck(row) {
this.uploadList = [] this.uploadList = [];
this.form.file = [] this.form.file = [];
this.check = true; this.check = true;
this.open = true; this.open = true;
const ids = row.id || this.ids; const ids = row.id || this.ids;
listCommunityInfo(ids).then((response) => { listCommunityInfo(ids).then((response) => {
console.log('查看',response)
this.form = response.data; this.form = response.data;
console.log('this.form.file',this.form.file) this.form.file = response.data.file.split(",");
this.form.file = response.data.file.split(',');
console.log(this.form.file);
this.open = true; this.open = true;
}); });
this.title = "查看社团风采"; this.title = "查看社团风采";
}, },
// 上传成功回调 // 上传成功回调
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
if (res.code == 200) {
console.log('Success res',res) this.uploadList.push(this.pev + res.fileName);
console.log('Success file',file) this.form.file = this.uploadList;
if(res.code == 200){
this.uploadList.push( this.pev + res.fileName );
this.form.file = this.uploadList
console.log('this.uploadList',this.uploadList)
console.log('this.form.file',this.form.file)
} }
// this.imageUrl = res.data.url; // this.imageUrl = res.data.url;
...@@ -380,7 +454,6 @@ export default { ...@@ -380,7 +454,6 @@ export default {
}, },
// 上传图片 // 上传图片
uploadImage(file) { uploadImage(file) {
console.log('file',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);
...@@ -392,7 +465,7 @@ export default { ...@@ -392,7 +465,7 @@ export default {
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.file = this.pev + response.url; this.form.file = this.pev + response.url;
console.log(this.form.picUrl, "this.form.picUrl"); this.form.picUrl = response.url;
}) })
.catch((error) => { .catch((error) => {
this.uploadLoading = false; this.uploadLoading = false;
...@@ -409,7 +482,7 @@ export default { ...@@ -409,7 +482,7 @@ export default {
id: this.form.id, id: this.form.id,
theme: this.form.theme, theme: this.form.theme,
// file: this.form.file, // file: this.form.file,
file:this.uploadList.toString() file: this.uploadList.toString(),
}; };
console.log(params, "params"); console.log(params, "params");
editCommunityInfo(params) editCommunityInfo(params)
...@@ -418,13 +491,13 @@ export default { ...@@ -418,13 +491,13 @@ export default {
this.$message.success("修改成功"); this.$message.success("修改成功");
this.open = false; this.open = false;
}) })
.catch((err) => { }); .catch((err) => {});
} else { } else {
// 新增 // 新增
const params = { const params = {
cid: this.$route.query.id, cid: this.$route.query.id,
theme: this.form.theme, theme: this.form.theme,
file:this.uploadList.toString() file: this.uploadList.toString(),
}; };
console.log(params, "params"); console.log(params, "params");
addCommunityInfo(params) addCommunityInfo(params)
...@@ -433,7 +506,7 @@ export default { ...@@ -433,7 +506,7 @@ export default {
this.$message.success("新增成功"); this.$message.success("新增成功");
this.open = false; this.open = false;
}) })
.catch((err) => { }); .catch((err) => {});
} }
} }
}); });
...@@ -444,7 +517,8 @@ export default { ...@@ -444,7 +517,8 @@ export default {
if (ids) { if (ids) {
this.$modal this.$modal
.confirm( .confirm(
`是否确认删除选中的${Object.hasOwnProperty.call(ids, "length") ? ids.length : 1 `是否确认删除选中的${
Object.hasOwnProperty.call(ids, "length") ? ids.length : 1
}条数据?` }条数据?`
) )
.then(() => { .then(() => {
...@@ -464,29 +538,50 @@ export default { ...@@ -464,29 +538,50 @@ export default {
/** 是否发布 */ /** 是否发布 */
handleIsShow(row) { handleIsShow(row) {
console.log(row); // console.log(row);
// const data = {
// id: row.id,
// };
// this.$modal
// .confirm("是否发布此信息?")
// .then(() => {
// this.$modal.loading("正在修改状态,请稍等...");
// isCommunityFb(data)
// .then((response) => {
// this.$modal.closeLoading();
// this.$message.success("修改成功");
// this.getList();
// })
// .catch((error) => {
// this.$modal.closeLoading();
// });
// })
// .catch(() => {
// // 取消操作时的逻辑
// });
const data = { const data = {
id: row.id, id: row.id,
}; };
this.$modal this.$modal
.confirm() .confirm(row.isShow === "1" ? "是否确认发布?" : "是否取消发布?")
.then(() => { .then(() => {
this.$modal.loading("正在修改状态,请稍等..."); this.$modal.loading("正在修改状态,请稍等...");
isCommunityFb(data) isCommunityFb(data, row.isShow)
.then((response) => { .then((response) => {
this.$modal.closeLoading(); this.$modal.closeLoading();
this.$message.success("修改成功"); this.$modal.msgSuccess("修改成功");
// this.getList();
}) })
.catch((error) => { .catch((error) => {
this.$modal.closeLoading(); this.$modal.closeLoading();
row.isShow = row.isShow === "2" ? "1" : "2";
}); });
}) })
.catch(() => { .catch(() => {
// 取消操作时的逻辑 row.isShow = row.isShow === "2" ? "1" : "2";
}); });
}, },
}, },
}; };
</script> </script>
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
@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 label="序号" align="center" prop="id" width="80" /> -->
<el-table-column label="序号" align="center" type="index" width="80" /> <el-table-column label="序号" align="center" type="index" width="80" />
<el-table-column label="姓名" align="center" prop="name" /> <el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="性别" align="center" prop="sex"> <el-table-column label="性别" align="center" prop="sex">
...@@ -173,60 +172,6 @@ ...@@ -173,60 +172,6 @@
@getStudentList="getStudentList" @getStudentList="getStudentList"
@setStudentInfo="setStudentInfo" @setStudentInfo="setStudentInfo"
></StudentInfoSelect> ></StudentInfoSelect>
<!-- 学生选择
<el-dialog title="学生选择" :visible="dialogVisible" width="45%">
<el-form ref="formStu" :model="formStu" :rules="rules" label-width="68px">
<el-row>
<el-col :span="12">
<el-form-item label="姓名:" prop="name">
<el-input v-model="formStu.name" placeholder="请选择学生姓名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<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-col>
</el-row>
<el-table
ref="tableStu"
:data="atuList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="35" align="center" />
<el-table-column
label="序号"
align="center"
type="index"
width="80"
/>
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="性别" align="center" prop="name" />
<el-table-column label="级部" align="center" prop="name" />
<el-table-column label="班级" align="center" prop="name" />
<el-table-column label="身份证号" align="center" prop="name" />
</el-table>
</el-form>
<div slot="footer" class="dialog-footer" center>
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog> -->
</div> </div>
</template> </template>
...@@ -319,6 +264,8 @@ export default { ...@@ -319,6 +264,8 @@ export default {
}, },
/** 设置学生信息 */ /** 设置学生信息 */
setStudentInfo(item) { setStudentInfo(item) {
this.form.ids = item.id;
console.log(this.form.ids, "this.form.ids11111");
console.log(item, "item"); console.log(item, "item");
this.$set(this.form, "name", item.studentName); this.$set(this.form, "name", item.studentName);
this.$set(this.form, "sex", item.sex); this.$set(this.form, "sex", item.sex);
...@@ -397,7 +344,7 @@ export default { ...@@ -397,7 +344,7 @@ export default {
if (this.form.id != null) { if (this.form.id != null) {
// 修改 // 修改
const paramsedit = { const paramsedit = {
id: this.form.id, id: this.form.ids,
name: this.form.name, name: this.form.name,
sex: this.form.sex, sex: this.form.sex,
cardid: this.form.cardid, cardid: this.form.cardid,
...@@ -418,7 +365,7 @@ export default { ...@@ -418,7 +365,7 @@ export default {
} else { } else {
// 新增 // 新增
// 获取当前登录人userId // 获取当前登录人userId
const userName = this.$store.state.user.userId; // const userName = this.$store.state.user.userId;
const params = { const params = {
cid: this.$route.query.id, cid: this.$route.query.id,
orgName: this.form.orgName, orgName: this.form.orgName,
...@@ -429,7 +376,7 @@ export default { ...@@ -429,7 +376,7 @@ export default {
classes: this.form.classes, classes: this.form.classes,
orgPosition: this.form.orgPosition, orgPosition: this.form.orgPosition,
phone: this.form.phone, phone: this.form.phone,
userId: userName, userId: this.form.ids,
}; };
addMemberInfo(params) addMemberInfo(params)
.then((response) => { .then((response) => {
......
...@@ -593,11 +593,11 @@ export default { ...@@ -593,11 +593,11 @@ export default {
/** 查询信息列表 */ /** 查询信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// const userName = this.$store.state.user; // const noticeName = this.queryForm.noticeName;
// const userId = this.$store.state.user.userId; const userId = this.$store.state.user.userId;
// queryForm.noticeName // queryForm.noticeName
const params = { const params = {
userId: this.$store.state.user.userId, // userId: this.$store.state.user.userId,
noticeName: this.queryForm.noticeName, noticeName: this.queryForm.noticeName,
}; };
// const params = { // const params = {
...@@ -605,20 +605,11 @@ export default { ...@@ -605,20 +605,11 @@ export default {
// pageSize: this.queryForm.pageSize, // pageSize: this.queryForm.pageSize,
// teacherId: this.$store.state.user.userId, // teacherId: this.$store.state.user.userId,
// }; // };
getTeacherTnfo(params).then((res) => { getTeacherTnfo(userId, params).then((res) => {
this.tableData = res.rows; this.tableData = res.rows;
console.log(params, "params"); console.log(params, "params");
console.log(res, "res"); console.log(res, "res");
this.total = res.total; this.total = res.total;
// =======
// const userId = this.$store.state.user.userId;
// const noticeName = this.queryForm.noticeName;
// console.log(userId, 'userId');
// console.log(noticeName, 'noticeName');
// getTeacherTnfo(userId, noticeName).then((res) => {
// this.tableData = res.rows;
// console.log(res, "res");
// >>>>>>> 026f530da388d11c389acb34cb726a7be3a375cf
}); });
}, },
......
...@@ -610,11 +610,26 @@ export default { ...@@ -610,11 +610,26 @@ export default {
syncNotice(id).then((res) => { syncNotice(id).then((res) => {
console.log(id, "id"); console.log(id, "id");
console.log("res提取", res); console.log("res提取", res);
this.tableFirstData = res; this.$modal.msgSuccess("提取成功");
this.tableSecondData = res; // this.tableFirstData = res;
this.tableThirdData = res; // this.tableSecondData = res;
this.tableForthData = res; // this.tableThirdData = res;
// this.tableForthData = res;
}); });
// const id = this.form.id;
// this.$modal
// .confirm("是否提取信息?")
// .then(function () {
// return syncNotice(id);
// })
// .then(() => {
// this.$modal.msgSuccess("提取成功");
// this.tableFirstData = res;
// this.tableSecondData = res;
// this.tableThirdData = res;
// this.tableForthData = res;
// })
// .catch(() => {});
}, },
//修改按钮 //修改按钮
handleEdit(row) { handleEdit(row) {
......
...@@ -225,26 +225,17 @@ export default { ...@@ -225,26 +225,17 @@ export default {
confirmDialog() { confirmDialog() {
const params = { const params = {
ids: this.selectedRows.map((row) => row.id), ids: this.selectedRows.map((row) => row.id), //查看数据的id
// userId: this.selectedRows.map((row) => row.userId), userId: this.selectedRows.map((row) => row.userId),
// tid: this.selectedRows.map((row) => row.tid), tid: this.selectedRows.map((row) => row.tid),
// gid: this.selectedRows.map((row) => row.gid), gid: this.selectedRows.map((row) => row.gid),
// gruoName: this.selectedRows.map((row) => row.gruoName), gruoName: this.selectedRows.map((row) => row.gruoName),
// userName: this.selectedRows.map((row) => row.userName), userName: this.selectedRows.map((row) => row.userName),
}; };
// this.$refs["tab"].validate((valid) => {
// if (valid) {
// addTeachaer(params)
// .then((response) => {
// this.getList();
// this.$message.success("新增成功");
// this.tableadd = false;
// })
// .catch((err) => {});
// }
// });
// const ids = this.selectedRows.map((row) => row.id); // const ids = this.selectedRows.map((row) => row.id);
addTeachaer(params).then((res) => { let data = [];
data.push(params);
addTeachaer(data).then((res) => {
console.log(res, "ressss"); console.log(res, "ressss");
}); });
}, },
......
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