Commit bfa8cec8 by Cat

zd 教师电子档案

parent c23c00b3
......@@ -93,9 +93,9 @@ export function getNoticeInfo(query) {
}
//老师查看列表
export function getTeacherTnfo(userId,query) {
export function getTeacherTnfo(query) {
return request({
url: `/teacherFiles/files/getTeachList/${userId}`,
url: `/teacherFiles/files/getTeachList`,
// url: `/teacherFiles/files/getTeachList/${userId}`,
method: 'get',
params:query
......@@ -117,6 +117,14 @@ export function getFileTnfo(id) {
method: "get",
});
}
// //查看档案详情
// export function getFileTnfo(query) {
// return request({
// url: "/teacherFiles/files",
// method: "get",
// params: query,
// });
// }
// 同步档案
export function syncNotice(id) {
return request({
......@@ -182,3 +190,11 @@ export function addTeachaer(ids) {
method: "get",
});
}
// 导出
export function exportList(id) {
return request({
url: '/teacherFiles/notice/export/' + id,
method: 'get',
})
}
......@@ -554,17 +554,16 @@ export default {
/** 查询信息列表 */
getList() {
this.loading = true;
const userId = this.$store.state.user.userId;
// const userId = this.$store.state.user.userId;
// const params = {
// // userId: this.$store.state.user.userId,
// noticeName: this.queryForm.noticeName,
// };
const params = {
// userId: this.$store.state.user.userId,
userId: this.$store.state.user.userId,
noticeName: this.queryForm.noticeName,
};
// const params = {
// pageNum: this.queryForm.pageNum,
// pageSize: this.queryForm.pageSize,
// teacherId: this.$store.state.user.userId,
// };
getTeacherTnfo(userId, params).then((res) => {
getTeacherTnfo(params).then((res) => {
this.tableData = res.rows;
console.log(params, "params");
console.log(res, "res");
......
......@@ -282,6 +282,7 @@
<script>
import {
exportList, //导出
addTeacherNotice, //添加任务
listTeacherNotice, // 任务列表
infoTeaNotice, //任务详情
......@@ -302,6 +303,8 @@ import {
fileSubRejected, //教师档案提交驳回
} from "@/api/smartSchool/teacherFiles/teacherElectronicFile";
import { format } from "@/utils/activiti/myUtil.js";
import { getToken } from "@/utils/auth";
import axios from "axios";
export default {
name: "teacherElectronicRecord",
data() {
......@@ -487,6 +490,7 @@ export default {
// 数据维护按钮
dataMaintenance(row) {
console.log(row, "数据维护按钮row");
const noticeName = row.noticeName;
const noticeId = row.id;
const pageNum = this.queryForm.pageNum;
const pageSize = this.queryForm.pageSize;
......@@ -495,6 +499,7 @@ export default {
this.$router.push({
path: "/teachAffairAdministration/smartSchool/teachAffairAdministration/electronicRecord/dataMaintenance",
query: {
noticeName,
noticeId,
pageNum,
pageSize,
......@@ -509,6 +514,7 @@ export default {
// 数据查看
dataInspection(row) {
const noticeId = row.id;
const noticeName = row.noticeName;
const pageNum = this.queryForm.pageNum;
const pageSize = this.queryForm.pageSize;
const status = row.noticeState;
......@@ -517,6 +523,7 @@ export default {
this.$router.push({
path: "/teachAffairAdministration/smartSchool/teachAffairAdministration/electronicRecord/dataMaintenance",
query: {
noticeName,
noticeId,
pageNum,
pageSize,
......@@ -526,10 +533,33 @@ export default {
},
// 导出按钮
handleExport(row) {
// this.download(`/artExam/exportAddress/${this.examId}`, {
// ...this.queryParams
// }, `教师电子档案${Date.now()}.xlsx`)
const id = row.id;
const loading = this.$loading({ target: ".loading-area" });
axios
.get(process.env.VUE_APP_BASE_API + "/teacherFiles/notice/export", {
params: { id: id }, // 将ids放入params选项中进行传递
responseType: "blob",
headers: { Authorization: "Bearer " + getToken() },
})
.then((res) => {
// 打印接口数据
console.log(res);
// 请求结束关闭loading
loading.close();
// 创建a标签
const elink = document.createElement("a");
//构建Blob对象
const blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
// 模拟下载
const objectUrl = URL.createObjectURL(blob);
elink.setAttribute("href", objectUrl);
elink.setAttribute("download", "教师电子档案" + ".xls");
elink.click();
});
},
// 撤回按钮
handleRevocation(row) {
this.$modal
......
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