Compare commits
No commits in common. "c66ef64b908d6e51a719a4d200336041fb6057e6" and "f29c76ba849e8a52c2766b7df93e9770a0441321" have entirely different histories.
c66ef64b90
...
f29c76ba84
|
|
@ -72,13 +72,3 @@ export function PageList(data) {
|
||||||
export function StudentInfo(uid) {
|
export function StudentInfo(uid) {
|
||||||
return http.request<Res<any>>("get", `Student/Info?uid=${uid}`);
|
return http.request<Res<any>>("get", `Student/Info?uid=${uid}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 通过职位信息获取职位id
|
|
||||||
* @return {object}
|
|
||||||
*/
|
|
||||||
export function PosititonIds(data:any[]) {
|
|
||||||
return http.request<Res<number[]>>("post", `Student/PosititonIds`, {
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,20 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="职务:" prop="studentId">
|
||||||
|
<el-input
|
||||||
|
type="text"
|
||||||
|
v-model="form.studentId"
|
||||||
|
autocomplete="off"
|
||||||
|
maxlength="16"
|
||||||
|
:show-word-limit="true"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="入班时间:" prop="joinTime">
|
<el-form-item label="入班时间:" prop="joinTime">
|
||||||
|
|
@ -184,15 +198,15 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="pt-4">
|
<el-row class="pt-4">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="就读班级:" prop="positionList" :rules="ruleRequired">
|
<el-form-item label="就读班级:" prop="positionIds" :rules="ruleRequired">
|
||||||
<el-button type="success" @click="AddPosition()">添加就读班级</el-button>
|
<el-button type="success" @click="AddPosition()">添加就读班级</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="max-h-[300px] overflow-auto pb-1">
|
<div class="max-h-[300px] overflow-auto pb-1">
|
||||||
<span class="pl-[120px]"
|
<span class="pl-[120px]"
|
||||||
>提示:就读信息所有项值<span class="text-red-500">必填</span>,
|
>提示:任职信息所有项值<span class="text-red-500">必填</span>,
|
||||||
如若查询不到对应班级,请先添加
|
非常规任教信息录入到职位里即可.
|
||||||
</span>
|
</span>
|
||||||
<el-form :model="positionList" inline ref="positionEditForm">
|
<el-form :model="positionList" inline ref="positionEditForm">
|
||||||
<div
|
<div
|
||||||
|
|
@ -300,8 +314,6 @@ import { ElMessage, FormInstance } from "element-plus";
|
||||||
import { ComboModel, gradeComboModel } from "@/components/hTable/hTable";
|
import { ComboModel, gradeComboModel } from "@/components/hTable/hTable";
|
||||||
import { Check, Delete, Edit, Message, Search, Star } from "@element-plus/icons-vue";
|
import { Check, Delete, Edit, Message, Search, Star } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
import { PosititonIds } from "@/api/student";
|
|
||||||
|
|
||||||
interface FormData {
|
interface FormData {
|
||||||
id: number;
|
id: number;
|
||||||
uId?: number;
|
uId?: number;
|
||||||
|
|
@ -331,7 +343,7 @@ interface FormData {
|
||||||
amountRelief?: number;
|
amountRelief?: number;
|
||||||
reliefSubTime?: number;
|
reliefSubTime?: number;
|
||||||
reliefType?: number;
|
reliefType?: number;
|
||||||
reliefApplication?: boolean;
|
reliefApplication?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DialogConfig {
|
interface DialogConfig {
|
||||||
|
|
@ -472,14 +484,12 @@ function AddPosition() {
|
||||||
gradeLevel: "",
|
gradeLevel: "",
|
||||||
classId: null,
|
classId: null,
|
||||||
subjectId: null,
|
subjectId: null,
|
||||||
positionType: 1,
|
positionType: 2,
|
||||||
positionLevel: 4,
|
positionLevel: null,
|
||||||
status: true,
|
status: true,
|
||||||
};
|
};
|
||||||
let p1 = (p as unknown) as Position;
|
AddPositionArr.push((p as unknown) as Position);
|
||||||
form.value.positionList.push(p1);
|
positionList.value.push((p as unknown) as Position);
|
||||||
AddPositionArr.push(p1);
|
|
||||||
positionList.value.push(p1);
|
|
||||||
}
|
}
|
||||||
const emit = defineEmits(["handlePagedCallback"]);
|
const emit = defineEmits(["handlePagedCallback"]);
|
||||||
const handlePagedCallback = () => {
|
const handlePagedCallback = () => {
|
||||||
|
|
@ -498,34 +508,6 @@ const handleSubmitForm = async () => {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
const postIdArr = positionList.value.map((s) => s.id).filter((s) => s != null);
|
|
||||||
const addPArr = positionList.value
|
|
||||||
.filter((s) => s.id == null)
|
|
||||||
.map((s) => {
|
|
||||||
return {
|
|
||||||
positionType: 1,
|
|
||||||
positionLevel: 4,
|
|
||||||
subjectId: s.subjectId,
|
|
||||||
schoolId: s.schoolId,
|
|
||||||
classId: s.classId,
|
|
||||||
gradeLevel: s.grade[0],
|
|
||||||
graduationYear: parseInt(s.grade.slice(1, 5)),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
if (addPArr.length > 0) {
|
|
||||||
const resPId = await PosititonIds(addPArr);
|
|
||||||
if (
|
|
||||||
resPId.code != 200 ||
|
|
||||||
resPId.data.length == 0 ||
|
|
||||||
resPId.data.length != addPArr.length
|
|
||||||
) {
|
|
||||||
ElMessage.warning("校验添加的职位数据异常,请删除后重新选择!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
postIdArr.push(...resPId.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
const formData = {
|
const formData = {
|
||||||
id: form.value.uId || 0,
|
id: form.value.uId || 0,
|
||||||
userType: form.value.userType || 1,
|
userType: form.value.userType || 1,
|
||||||
|
|
@ -537,13 +519,13 @@ const handleSubmitForm = async () => {
|
||||||
templateId: form.value.templateId || 0,
|
templateId: form.value.templateId || 0,
|
||||||
subjectLevels: form.value.subjectLevels || [],
|
subjectLevels: form.value.subjectLevels || [],
|
||||||
subjectLevel: form.value.subjectLevel || { ...defaultSubjectLevel },
|
subjectLevel: form.value.subjectLevel || { ...defaultSubjectLevel },
|
||||||
|
positionIds: form.value.positionIds || [],
|
||||||
gLSubject: form.value.gLSubject,
|
gLSubject: form.value.gLSubject,
|
||||||
gSubject1: form.value.gSubject1,
|
gSubject1: form.value.gSubject1,
|
||||||
gSubject2: form.value.gSubject2,
|
gSubject2: form.value.gSubject2,
|
||||||
idCard: form.value.idCard,
|
idCard: form.value.idCard,
|
||||||
cloudSchoolId: form.value.cloudSchoolId,
|
cloudSchoolId: form.value.cloudSchoolId,
|
||||||
phone: form.value.phone,
|
phone: form.value.phone,
|
||||||
positionIds: postIdArr,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let res = await editUser(formData);
|
let res = await editUser(formData);
|
||||||
|
|
@ -596,7 +578,7 @@ const handleResetForm = () => {
|
||||||
amountRelief: null,
|
amountRelief: null,
|
||||||
reliefSubTime: null,
|
reliefSubTime: null,
|
||||||
reliefType: null,
|
reliefType: null,
|
||||||
reliefApplication: false,
|
reliefApplication: null,
|
||||||
};
|
};
|
||||||
positionList.value = [];
|
positionList.value = [];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
<div class="max-h-[400px] overflow-auto pb-1">
|
<div class="max-h-[400px] overflow-auto pb-1">
|
||||||
<span class="pl-[120px]"
|
<span class="pl-[120px]"
|
||||||
>提示:任职信息所有项值<span class="text-red-500">必填</span>,
|
>提示:任职信息所有项值<span class="text-red-500">必填</span>,
|
||||||
如若查询不到对应班级,请先添加
|
非常规任教信息录入到职位里即可.
|
||||||
</span>
|
</span>
|
||||||
<el-form :model="positionList" inline ref="positionEditForm">
|
<el-form :model="positionList" inline ref="positionEditForm">
|
||||||
<div
|
<div
|
||||||
|
|
@ -191,12 +191,10 @@ import {
|
||||||
} from "@/api/userCenter";
|
} from "@/api/userCenter";
|
||||||
import PositionForm from "./positionForm.vue";
|
import PositionForm from "./positionForm.vue";
|
||||||
import { getenum, getenumDic } from "@/api/enum";
|
import { getenum, getenumDic } from "@/api/enum";
|
||||||
import { PosititonIds } from "@/api/student";
|
|
||||||
import { ruleRequired, rulePhone } from "@/utils/rules";
|
import { ruleRequired, rulePhone } from "@/utils/rules";
|
||||||
import { ElMessage, FormInstance } from "element-plus";
|
import { ElMessage, FormInstance } from "element-plus";
|
||||||
import { ComboModel, gradeComboModel } from "@/components/hTable/hTable";
|
import { ComboModel, gradeComboModel } from "@/components/hTable/hTable";
|
||||||
import { Check, Delete, Edit, Message, Search, Star } from "@element-plus/icons-vue";
|
import { Check, Delete, Edit, Message, Search, Star } from "@element-plus/icons-vue";
|
||||||
import { de } from "element-plus/es/locales.mjs";
|
|
||||||
|
|
||||||
interface FormData {
|
interface FormData {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
@ -365,10 +363,8 @@ function AddPosition() {
|
||||||
positionLevel: null,
|
positionLevel: null,
|
||||||
status: true,
|
status: true,
|
||||||
};
|
};
|
||||||
let p1 = (p as unknown) as Position;
|
AddPositionArr.push((p as unknown) as Position);
|
||||||
form.value.positionList.push(p1);
|
positionList.value.push((p as unknown) as Position);
|
||||||
AddPositionArr.push(p1);
|
|
||||||
positionList.value.push(p1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePagedCallback = () => {
|
const handlePagedCallback = () => {
|
||||||
|
|
@ -386,39 +382,10 @@ const handleSubmitForm = async () => {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
debugger;
|
|
||||||
const postIdArr = positionList.value.map((s) => s.id).filter((s) => s != null);
|
|
||||||
|
|
||||||
const addPArr = positionList.value
|
|
||||||
.filter((s) => s.id == null)
|
|
||||||
.map((s) => {
|
|
||||||
return {
|
|
||||||
positionLevel: s.positionLevel,
|
|
||||||
subjectId: s.subjectId,
|
|
||||||
schoolId: s.schoolId,
|
|
||||||
classId: s.classId,
|
|
||||||
positionType: 2,
|
|
||||||
gradeLevel: s.grade[0],
|
|
||||||
graduationYear: parseInt(s.grade.slice(1, 5)),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
if (addPArr.length > 0) {
|
|
||||||
const resPId = await PosititonIds(addPArr);
|
|
||||||
if (
|
|
||||||
resPId.code != 200 ||
|
|
||||||
resPId.data.length == 0 ||
|
|
||||||
resPId.data.length != addPArr.length
|
|
||||||
) {
|
|
||||||
ElMessage.warning("校验添加的职位数据异常,请删除后重新选择!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
postIdArr.push(...resPId.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
const formData = {
|
const formData = {
|
||||||
...form.value,
|
...form.value,
|
||||||
account: form.value.phone || "",
|
account: form.value.phone || "",
|
||||||
positionIds: postIdArr,
|
positionIds: positionList.value.map((s) => s.id),
|
||||||
};
|
};
|
||||||
|
|
||||||
const res = await editUser(formData);
|
const res = await editUser(formData);
|
||||||
|
|
@ -430,7 +397,7 @@ const handleSubmitForm = async () => {
|
||||||
ElMessage.error(res.message);
|
ElMessage.error(res.message);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error("请求失败!" + (error.message ?? JSON.stringify(error)));
|
ElMessage.error("请求失败!" + JSON.stringify(error));
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -463,7 +430,7 @@ const fetchInitData = async () => {
|
||||||
userTypeList.value = typeRes.data;
|
userTypeList.value = typeRes.data;
|
||||||
|
|
||||||
schoolList.value = (await getSchoolData()).data;
|
schoolList.value = (await getSchoolData()).data;
|
||||||
subjectList.value = (await getenum("SubjectEnum")).data.filter((s) => s.value < 10);
|
subjectList.value = (await getenum("SubjectEnum")).data;
|
||||||
|
|
||||||
// // 云校
|
// // 云校
|
||||||
// const schoolRes = await cloudSchoolCombo();
|
// const schoolRes = await cloudSchoolCombo();
|
||||||
|
|
@ -512,7 +479,7 @@ const fetchFormData = () => {
|
||||||
phone: res.data.phone,
|
phone: res.data.phone,
|
||||||
cloudSchoolId: res.data.cloudSchoolId,
|
cloudSchoolId: res.data.cloudSchoolId,
|
||||||
pointPenSN: res.data.pointPenSN,
|
pointPenSN: res.data.pointPenSN,
|
||||||
positionList: positionList.value ?? [],
|
positionList: positionList.value,
|
||||||
});
|
});
|
||||||
positionList.value = res.data.positions
|
positionList.value = res.data.positions
|
||||||
.filter((s: Position) => s.enable)
|
.filter((s: Position) => s.enable)
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,7 @@
|
||||||
:value="g.value"
|
:value="g.value"
|
||||||
/>
|
/>
|
||||||
</el-select >
|
</el-select >
|
||||||
<el-input-number
|
<el-input-number v-show="query.grade" v-model="query.gradeYear" :min="2020" :max="2100"/>
|
||||||
v-show="query.grade"
|
|
||||||
v-model="query.gradeYear"
|
|
||||||
:min="2020"
|
|
||||||
:max="2100"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="赴校人员">
|
<el-form-item label="赴校人员">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -139,7 +134,9 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="年级" min-width="100" >
|
<el-table-column label="年级" min-width="100" >
|
||||||
<template #default="{ row }"> {{ row.gradeLevel + row.gradeYear }}届 </template>
|
<template #default="{ row }">
|
||||||
|
{{ row.gradeLevel+row.gradeYear }}届
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="people" label="赴校人员" min-width="120" />
|
<el-table-column prop="people" label="赴校人员" min-width="120" />
|
||||||
<el-table-column label="赴校时间/解决时间" min-width="140">
|
<el-table-column label="赴校时间/解决时间" min-width="140">
|
||||||
|
|
@ -203,8 +200,6 @@ interface TableItem {
|
||||||
school: string;
|
school: string;
|
||||||
grade: string;
|
grade: string;
|
||||||
people: string;
|
people: string;
|
||||||
gradeLevel?: string;
|
|
||||||
gradeYear?: number;
|
|
||||||
canOperate: boolean; // 是否可以跟进
|
canOperate: boolean; // 是否可以跟进
|
||||||
times: string; // YYYY-MM-DD
|
times: string; // YYYY-MM-DD
|
||||||
endTime: string; //预计解决时间
|
endTime: string; //预计解决时间
|
||||||
|
|
@ -218,19 +213,15 @@ const schoolOptions = ref([]);
|
||||||
const peopleOptions = ref([]);
|
const peopleOptions = ref([]);
|
||||||
const isDetail = ref(false);
|
const isDetail = ref(false);
|
||||||
|
|
||||||
const tableRowClassName = ({ row, rowIndex }: { row: TableItem; rowIndex: number }) => {
|
const tableRowClassName = ({ row, rowIndex }: { row: any; rowIndex: number }) => {
|
||||||
if (row.endTime == null || row.endTime == "" || row.solutionEnd) return "";
|
if (row.endTime == null || row.endTime == "" || row.solutionEnd) return "";
|
||||||
const nD = new Date();
|
const nD = new Date();
|
||||||
const d = new Date(row.endTime + " ");
|
const d = new Date(row.endTime + " ");
|
||||||
const startTime = new Date(row.times + " ");
|
|
||||||
const daysDiff1 = Math.floor(
|
|
||||||
(nD.getTime() - startTime.getTime()) / (1000 * 60 * 60 * 24)
|
|
||||||
);
|
|
||||||
const daysDiff = Math.floor((d.getTime() - nD.getTime()) / (1000 * 60 * 60 * 24));
|
const daysDiff = Math.floor((d.getTime() - nD.getTime()) / (1000 * 60 * 60 * 24));
|
||||||
if (daysDiff < -1) {
|
if (daysDiff >= 2) {
|
||||||
return "error-row";
|
|
||||||
} else if (daysDiff1 > 7) {
|
|
||||||
return "warning-row";
|
return "warning-row";
|
||||||
|
} else if (daysDiff < 2) {
|
||||||
|
return "error-row";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue