Commit dd88e051 by Cat

zd 教师电子档案

parent 672056b3
......@@ -164,3 +164,20 @@ export function fileSubRejected(id) {
method: "put",
});
}
//查看可添加老师列表
export function getTeaList(tId) {
return request({
url: `/teacherFiles/files/getTeacherRocer/${tId}` ,
method: "get",
});
}
//添加老师
export function addTeachaer(ids) {
return request({
url: `/teacherFiles/files/teacherAdd/${ids}` ,
method: "get",
});
}
\ No newline at end of file
......@@ -126,11 +126,11 @@
@selection-change="handleSelectionChange"
>
<el-table-column align="center" type="selection"> </el-table-column>
<el-table-column align="center" label="级部" prop="gradeName">
<el-table-column align="center" label="级部" prop="gid">
</el-table-column>
<el-table-column align="center" prop="teacherName" label="姓名">
<el-table-column align="center" prop="userName" label="姓名">
</el-table-column>
<el-table-column align="center" prop="ID" label="身份证号">
<el-table-column align="center" prop="tel" label="身份证号">
</el-table-column>
</el-table>
<span
......@@ -165,6 +165,8 @@ import {
fileSubReview, //教师档案提交审核
fileSubApproved, //教师档案提交通过
fileSubRejected, //教师档案提交驳回
getTeaList, //查看可添加老师列表
addTeachaer, //添加老师
} from "@/api/smartSchool/teacherFiles/teacherElectronicFile";
export default {
name: "dataReceiver",
......@@ -186,12 +188,67 @@ export default {
form: {},
status: this.$route.query.status,
dialogTableData: [],
selectedRows: [], //选中数组
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
selectedRows: [],
};
},
mounted() {
this.getList();
},
methods: {
// 查看可添加老师列表
handleSecher() {
const tid = this.$route.query.noticeId;
getTeaList(tid).then((res) => {
this.dialogTableData = res.data;
});
},
//弹窗确定按钮
// confirmDialog() {
// const params = {
// id: this.dialogTableData.id,
// userId: this.$store.state.user.userId,
// tid: this.dialogTableData.tid,
// gid: this.dialogTableData.gid,
// gruoName: this.dialogTableData.gruoName,
// userName: this.dialogTableData.userName,
// };
// console.log(params, "params");
// // addTeachaer(this.selectedRows).then((res) => {});
// this.dialogVisible = false;
// },
confirmDialog() {
const params = {
ids: this.selectedRows.map((row) => row.id),
// userId: this.selectedRows.map((row) => row.userId),
// tid: this.selectedRows.map((row) => row.tid),
// gid: this.selectedRows.map((row) => row.gid),
// gruoName: this.selectedRows.map((row) => row.gruoName),
// 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);
addTeachaer(params).then((res) => {
console.log(res, "ressss");
});
},
/** 查询信息列表 */
getList() {
const params = {
......@@ -225,23 +282,34 @@ export default {
// 新增按钮
handleAdd() {
this.dialogVisible = true;
this.handleSecher();
},
//弹窗确定按钮
confirmDialog() {
this.dialogVisible = false;
},
//多选按钮
handleSelectionChange(select) {
// console.log("select", select);
// handleSelectionChange(selection) {
// this.selectedRows = selection.map((item) => item.id);
// this.single = selection.length !== 1;
// this.multiple = !selection.length;
// },
handleSelectionChange(selection) {
if (selection.length > 0) {
this.selectedRows = selection.map((item) => item.id);
this.selectedRows = selection;
this.single = selection.length !== 1;
this.multiple = false;
} else {
this.selectedRows = [];
this.multiple = true;
}
},
// 删除按钮
handleDelete(row) {
const ids = row.id || this.ids;
const selectedRows = row.id || this.selectedRows;
this.$modal
.confirm("是否确认删除?")
.then(function () {
return delInfo(ids);
return delInfo(selectedRows);
})
.then(() => {
this.getList();
......
......@@ -429,8 +429,6 @@ export default {
});
},
//多选删除按钮
handleDeleteMuti() {},
//修改按钮
handleEdit(row) {
console.log(row, "row1");
......
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