Merge branch 'main' of http://47.112.118.149:10082/xgxt_sd/zhxg_pc
This commit is contained in:
@@ -58,3 +58,11 @@ export function delBasic(id) {
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function getOwnInfo(){
|
||||
return request({
|
||||
url:'/comprehensive/stuInfoView/getOwnInfo',
|
||||
method:'GET'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -25,9 +25,10 @@ export function listStudent(query) {
|
||||
})
|
||||
}
|
||||
// 新同步学生信息
|
||||
export function syncStudentInfo() {
|
||||
export function synchronousStudent(query) {
|
||||
return request({
|
||||
url: '/syncdata/synchronousStudent',
|
||||
method: 'post'
|
||||
method: 'post',
|
||||
params:query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 辅导员意见 </template>
|
||||
<div style="padding-top: 10px; line-height: 1.8;">
|
||||
{{ form.fdIdea || '暂无意见' }}
|
||||
{{ form.fdIdea || '暂无意见' }}
|
||||
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
|
||||
<span>审批结果:</span>
|
||||
<el-select v-model="form.fdStatus" placeholder="待审核" class="short-select" disabled
|
||||
@@ -538,7 +538,9 @@
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 学务意见 </template>
|
||||
<div style="padding-top: 10px; line-height: 1.8;">
|
||||
{{ form.xwIdea || '暂无意见' }}
|
||||
<div v-if="form.xwStatus == '0' || form.xwStatus == null || form.xwStatus == '2'" >{{ form.xwIdea }}拟编入____</div>
|
||||
<!-- 同意 -->
|
||||
<div v-if="form.xwStatus == '1'">{{ form.xwIdea || '暂无意见' }},拟编入__{{finalGradeName}}_{{finalClassName}}__</div>
|
||||
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
|
||||
<span>审批结果:</span>
|
||||
<el-select v-model="form.xwStatus" placeholder="待审核" class="short-select" disabled
|
||||
@@ -704,6 +706,10 @@ export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {
|
||||
// 最终班级名称
|
||||
finalClassName: null,
|
||||
// 最终年级名称
|
||||
finalGradeName:null,
|
||||
// 模型xml数据
|
||||
flowData: {},
|
||||
activeName: '1',
|
||||
@@ -860,13 +866,46 @@ export default {
|
||||
this.form = res.data
|
||||
this.getClassNameList()
|
||||
this.listGrade()
|
||||
this.getXWClassNameList()
|
||||
});
|
||||
},
|
||||
|
||||
// 获取学务班级名称列表
|
||||
getXWClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data;
|
||||
if (this.ClassNameList != null) {
|
||||
this.ClassNameList.forEach(element => {
|
||||
if (element.value == this.form.maList[0].finaldata1) {
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].finaldata2) {
|
||||
elementTwo.children.forEach(elementFree => {
|
||||
if (elementFree.value == this.form.maList[0].newmajor) {
|
||||
this.finalClassName = elementFree.label;
|
||||
this.classVlue1 = [element.value, elementTwo.value, elementFree.value];
|
||||
|
||||
// 关键修复:从年级列表中查找年级名称,而不是直接使用 element.label
|
||||
const gradeId = element.value;
|
||||
const gradeItem = this.grade_list.find(item => item.gradeId === gradeId);
|
||||
if (gradeItem) {
|
||||
this.finalGradeName = gradeItem.gradeName; // 正确的年级名称
|
||||
this.$set(this.form.maList[0], 'finallabel', gradeItem.gradeId); // 正确的年级ID
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/** 获取班级名称列表 */
|
||||
getClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data
|
||||
// console.log(this.ClassNameList)
|
||||
console.log(this.ClassNameList)
|
||||
if (this.ClassNameList != null) {
|
||||
this.ClassNameList.forEach(element => {
|
||||
if (element.value == this.form.maList[0].data1) {
|
||||
@@ -874,10 +913,13 @@ export default {
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].data2) {
|
||||
// console.log(elementTwo.label)
|
||||
elementTwo.children.forEach(elementFree => {
|
||||
this.saveClassName = elementFree.label
|
||||
// console.log(elementFree.label)
|
||||
});
|
||||
this.saveClassName =elementTwo.label
|
||||
// console.log("退伍复学",this.saveClassName)
|
||||
// 班级
|
||||
// elementTwo.children.forEach(elementFree => {
|
||||
// this.saveClassName = elementFree.label
|
||||
// // console.log(elementFree.label)
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -896,6 +938,9 @@ export default {
|
||||
if(element.gradeId == this.form.maList[0].newgrade){
|
||||
this.saveGradeName = element.gradeName
|
||||
}
|
||||
if (element.gradeId == this.form.maList[0].finallabel) {
|
||||
this.finalGradeName = element.gradeName
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -567,7 +567,42 @@
|
||||
<el-descriptions-item span="4">
|
||||
<template slot="label"> 学务意见 </template>
|
||||
<div style="padding-top: 10px; line-height: 1.8;">
|
||||
{{ form.xwIdea || '暂无意见' }}
|
||||
<!-- 不同意或者未审核 -->
|
||||
<div v-if="form.xwStatus == '0' || form.xwStatus == null || form.xwStatus == '2'" >{{ form.xwIdea }}拟编入____</div>
|
||||
<!-- 同意 -->
|
||||
<div v-if="form.xwStatus == '1'">{{ form.xwIdea || '暂无意见,' }},拟编入__{{finalGradeName}}_{{finalClassName}}__</div>
|
||||
<!-- <div >{{ form.xwIdea }}拟编入__{{finalGradeName}}_{{finalClassName}}_</div> -->
|
||||
<div id="xwinformation" v-if="category === '退伍复学' && taskName === '学务审核'">
|
||||
|
||||
<span style="color: red;"> ( 专业调整:)</span>
|
||||
<!-- 年级 -->
|
||||
<el-select
|
||||
v-model="form.maList[0].finallabel"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择年级"
|
||||
style="width: 100px; margin: 0 5px;"
|
||||
@change="handleGradeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in grade_list"
|
||||
:key="item.gradeId"
|
||||
:label="item.gradeName"
|
||||
:value="item.gradeId"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- 班级 -->
|
||||
|
||||
<el-cascader v-model="classVlue1" placeholder="请选择班级" :show-all-levels="false" :options="ClassNameList"
|
||||
clearable filterable style="width: 300px; margin: 0 5px;" @change="handleChange1">
|
||||
<template slot-scope="{ node, data }">
|
||||
<span>{{ data.label }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
|
||||
<span>审批结果:</span>
|
||||
<el-select v-model="form.xwStatus" placeholder="待审核" class="short-select" disabled
|
||||
@@ -890,6 +925,8 @@
|
||||
<el-button type="primary" @click="taskReject">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -935,6 +972,10 @@ export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
// 年级列表
|
||||
grade_list: [],
|
||||
classVlue1: [],
|
||||
ClassNameList:[],
|
||||
// 模型xml数据
|
||||
xmlData: '',
|
||||
flowData: {},
|
||||
@@ -961,6 +1002,11 @@ export default {
|
||||
saveClassName: null,
|
||||
// 年级名称
|
||||
saveGradeName: null,
|
||||
// 最终班级名称
|
||||
finalClassName: null,
|
||||
// 最终年级名称
|
||||
finalGradeName:null,
|
||||
|
||||
rules: {
|
||||
penaltyNumber: [{ required: true, message: '请输入处分文号', trigger: 'blur' }],
|
||||
letterServiceContent: [{ required: true, message: '请输入送达书', trigger: 'blur' }],
|
||||
@@ -1116,6 +1162,8 @@ export default {
|
||||
} else if (this.category == '退伍复学') {
|
||||
this.basicForm = true
|
||||
this.getBasicApplication(this.startUser)
|
||||
this.listGrade();
|
||||
this.getXWClassNameList();
|
||||
}
|
||||
// 流程任务获取变量信息
|
||||
if (this.taskForm.taskId) {
|
||||
@@ -1127,6 +1175,53 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleChange1(value) {
|
||||
if (value && value.length === 3) {
|
||||
const [gradeId, majorId, classId] = value;
|
||||
// 1. 更新存储用的ID字段
|
||||
this.$set(this.form.maList[0], 'finaldata1', gradeId);
|
||||
this.$set(this.form.maList[0], 'finaldata2', majorId);
|
||||
this.$set(this.form.maList[0], 'newmajor', classId);
|
||||
this.$set(this.form.maList[0], 'finalmajor', classId);
|
||||
|
||||
// 2. 查找班级名称
|
||||
const gradeItem = this.ClassNameList.find(item => item.value === gradeId);
|
||||
if (gradeItem) {
|
||||
const majorItem = gradeItem.children.find(item => item.value === majorId);
|
||||
if (majorItem) {
|
||||
const classItem = majorItem.children.find(item => item.value === classId);
|
||||
if (classItem) {
|
||||
this.finalClassName = classItem.label;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 关键修复:从年级列表中查找年级名称,而不是直接使用 gradeItem.label
|
||||
const selectedGrade = this.grade_list.find(item => item.gradeId === gradeId);
|
||||
if (selectedGrade) {
|
||||
this.finalGradeName = selectedGrade.gradeName; // 正确的年级名称
|
||||
this.$set(this.form.maList[0], 'finallabel', selectedGrade.gradeId); // 正确的年级ID
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleGradeChange(value) {
|
||||
const selectedGrade = this.grade_list.find(item => item.gradeId === value);
|
||||
if (selectedGrade) {
|
||||
// 1. 更新存储用的年级ID
|
||||
this.$set(this.form.maList[0], 'finallabel', value);
|
||||
// 2. 同步更新显示用的年级名称(这里必须是 selectedGrade.gradeName)
|
||||
this.finalGradeName = selectedGrade.gradeName;
|
||||
// 3. 清空班级选择,避免年级和班级不匹配
|
||||
this.classVlue1 = [];
|
||||
this.finalClassName = null;
|
||||
this.$set(this.form.maList[0], 'finaldata1', '');
|
||||
this.$set(this.form.maList[0], 'finaldata2', '');
|
||||
this.$set(this.form.maList[0], 'newmajor', '');
|
||||
this.$set(this.form.maList[0], 'finalmajor', '');
|
||||
}
|
||||
},
|
||||
penaltyTypeMethodFormat(row, column) {
|
||||
return this.selectDictLabel(this.dict.type.rt_penalty_type, row.penaltyType)
|
||||
},
|
||||
@@ -1202,13 +1297,37 @@ export default {
|
||||
|
||||
// 退伍复学申请表单数据
|
||||
getBasicApplication(startUser) {
|
||||
// let newName = this.startUser.replace(/-/g, "");
|
||||
let newName = this.startUser.split('-')[0].trim();
|
||||
getStname(newName).then((res) => {
|
||||
// console.log("后端返回原始数据:",res.data);
|
||||
this.form = res.data
|
||||
this.getClassNameList()
|
||||
this.listGrade()
|
||||
console.log("后端返回原始数据:", res.data);
|
||||
// 深拷贝确保数据不被污染
|
||||
this.form = JSON.parse(JSON.stringify(res.data));
|
||||
|
||||
// 初始化maList,防止空指针
|
||||
if (!this.form.maList || this.form.maList.length === 0) {
|
||||
this.form.maList = [{
|
||||
finalmajor: '',
|
||||
finallabel: '',
|
||||
finaldata1: '',
|
||||
finaldata2: '',
|
||||
newmajor: '',
|
||||
finalClassName: '',
|
||||
finalGradeName: ''
|
||||
}];
|
||||
}
|
||||
|
||||
// 1. 初始化选择框绑定的核心字段(finalmajor)
|
||||
this.$set(this.form.maList[0], 'finalmajor', this.form.maList[0].finallabel || '');
|
||||
|
||||
// 确保数据加载完成后再渲染下拉列表
|
||||
this.$nextTick(() => {
|
||||
this.getClassNameList();
|
||||
this.listGrade();
|
||||
this.getXWClassNameList();
|
||||
});
|
||||
}).catch(error => {
|
||||
console.error("获取退伍复学数据失败:", error);
|
||||
this.$modal.msgError("获取学生信息失败,请刷新页面重试");
|
||||
});
|
||||
},
|
||||
/** 获取班级名称列表 */
|
||||
@@ -1223,9 +1342,40 @@ export default {
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].data2) {
|
||||
// console.log(elementTwo.label)
|
||||
this.saveClassName =elementTwo.label
|
||||
// elementTwo.children.forEach(elementFree => {
|
||||
// this.finalClassName = elementFree.label
|
||||
// // console.log(elementFree.label)
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getXWClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data;
|
||||
if (this.ClassNameList != null) {
|
||||
this.ClassNameList.forEach(element => {
|
||||
if (element.value == this.form.maList[0].finaldata1) {
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].finaldata2) {
|
||||
elementTwo.children.forEach(elementFree => {
|
||||
this.saveClassName = elementFree.label
|
||||
// console.log(elementFree.label)
|
||||
if (elementFree.value == this.form.maList[0].newmajor) {
|
||||
this.finalClassName = elementFree.label;
|
||||
this.classVlue1 = [element.value, elementTwo.value, elementFree.value];
|
||||
|
||||
// 关键修复:从年级列表中查找年级名称,而不是直接使用 element.label
|
||||
const gradeId = element.value;
|
||||
const gradeItem = this.grade_list.find(item => item.gradeId === gradeId);
|
||||
if (gradeItem) {
|
||||
this.finalGradeName = gradeItem.gradeName; // 正确的年级名称
|
||||
this.$set(this.form.maList[0], 'finallabel', gradeItem.gradeId); // 正确的年级ID
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -1234,21 +1384,27 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 获取年级列表 */
|
||||
|
||||
|
||||
async listGrade() {
|
||||
try {
|
||||
let res = await listGrade()
|
||||
let res = await listGrade(); // 调用后端接口获取年级列表
|
||||
if (res.code == 200) {
|
||||
this.grade_list = [...res.rows]
|
||||
console.log(this.grade_list)
|
||||
this.grade_list = [...res.rows];
|
||||
// 打印日志,检查返回的数据结构
|
||||
console.log("年级列表:", this.grade_list);
|
||||
console.log("this.form.maList[0]",this.form.maList[0])
|
||||
this.grade_list.forEach(element => {
|
||||
if (element.gradeId == this.form.maList[0].newgrade) {
|
||||
this.saveGradeName = element.gradeName
|
||||
this.saveGradeName = element.gradeName;
|
||||
}
|
||||
if (element.gradeId == this.form.maList[0].finallabel) {
|
||||
this.finalGradeName = element.gradeName;
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取年级列表失败:', error)
|
||||
console.error('获取年级列表失败:', error);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1428,8 +1584,8 @@ export default {
|
||||
this.form.remark = this.taskForm.remark
|
||||
this.updateRtStuQuitSchool()
|
||||
} else if (this.category == 'enlistmentReserve') { // 是应征入伍保留学籍申请,才执行
|
||||
if (this.taskName == '教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:07是入伍保留学籍)
|
||||
updateStudent({ stuId: this.form.studentId, status: '07' }).then(response => { })
|
||||
if (this.taskName == '教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:30是入伍保留学籍)
|
||||
updateStudent({ stuId: this.form.studentId, status: '30' }).then(response => { })
|
||||
}
|
||||
this.$modal.msgSuccess(response.msg)
|
||||
} else if (this.category == "退伍复学") {
|
||||
@@ -1484,16 +1640,65 @@ export default {
|
||||
else if (this.taskName == "学务审核") {
|
||||
const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName);
|
||||
const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : "";
|
||||
updateBasic({
|
||||
// updateBasic({
|
||||
// id: stNameData.id,
|
||||
// xwStatus: "1",
|
||||
// xwIdea: this.taskForm.comment,
|
||||
// xwTime: new Date(),
|
||||
// xwQm: assigneeName
|
||||
// }).then(response => {
|
||||
// this.$modal.msgSuccess(response.msg)
|
||||
// })
|
||||
// // 构建要提交的参数
|
||||
// const updateParams = {
|
||||
// id: stNameData.id,
|
||||
// xwStatus: "1",
|
||||
// xwIdea: this.taskForm.comment,
|
||||
// xwTime: new Date(),
|
||||
// xwQm: assigneeName,
|
||||
// finalGradeId: this.form.maList[0].finalmajor,
|
||||
// // 其他你需要更新的字段...
|
||||
// 'maList[0].finallabel': this.form.maList[0].finalmajor,
|
||||
// 'maList[0].finaldata1': this.form.maList[0].finaldata1,
|
||||
// 'maList[0].finaldata2': this.form.maList[0].finaldata2,
|
||||
// 'maList[0].newmajor': this.form.maList[0].newmajor,
|
||||
// 'maList[0].finalGradeName': this.finalGradeName,
|
||||
// 'maList[0].finalClassName': this.finalClassName
|
||||
// };
|
||||
|
||||
// // 【关键】打印要提交的参数
|
||||
// console.log("updateBasic 提交的参数:", updateParams);
|
||||
|
||||
// // 调用更新接口
|
||||
// updateBasic(updateParams).then(response => {
|
||||
// this.$modal.msgSuccess(response.msg);
|
||||
// });
|
||||
// 1. 从 maList[0] 中提取需要更新的子表数据
|
||||
const maList0 = this.form.maList[0] || {};
|
||||
|
||||
// 2. 构建主表更新参数
|
||||
const updateParams = {
|
||||
id: stNameData.id,
|
||||
xwStatus: "1",
|
||||
xwIdea: this.taskForm.comment,
|
||||
xwTime: new Date(),
|
||||
xwQm: assigneeName
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess(response.msg)
|
||||
})
|
||||
xwQm: assigneeName,
|
||||
finalGradeId: this.form.maList[0].finallabel,
|
||||
// 3. 关键:将子表数据包装到 maList 数组中
|
||||
maList: [
|
||||
{
|
||||
...maList0, // 包含 finaldata1, finaldata2, finallabel, newmajor 等
|
||||
basicId: stNameData.id // 确保子表记录关联到正确的主表ID
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
console.log("提交给后端的参数:", updateParams);
|
||||
|
||||
// 调用更新接口
|
||||
updateBasic(updateParams).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 二级学院审核
|
||||
@@ -1532,26 +1737,125 @@ export default {
|
||||
else if (this.taskName == "教务处主管") {
|
||||
const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName);
|
||||
const assigneeName = currentFlowItem ? currentFlowItem.assigneeName : "";
|
||||
updateBasic({
|
||||
// updateBasic({
|
||||
// id: stNameData.id,
|
||||
// jwStatus: "1",
|
||||
// jwIdea: this.taskForm.comment,
|
||||
// jwTime: new Date(),
|
||||
// jwQm: assigneeName
|
||||
// }).then(response => {
|
||||
// console.log("===== updateBasic 响应结果 =====", response);
|
||||
// this.$modal.msgSuccess(response.msg)
|
||||
|
||||
// // 2. 打印updateStudent的前置条件
|
||||
// console.log("===== updateStudent 执行前置检查 =====");
|
||||
// console.log("是否转专业(conversion):", stNameData.conversion);
|
||||
// console.log("学生ID(studentId):", stNameData.studentId);
|
||||
// console.log("finaldata1(院部ID):", stNameData.maList ? stNameData.maList[0].finaldata1 : "无");
|
||||
// console.log("finaldata2(专业ID):", stNameData.maList ? stNameData.maList[0].finaldata2 : "无");
|
||||
// console.log("finalmajor(班级ID):", stNameData.maList ? stNameData.maList[0].finalmajor : "无");
|
||||
// })
|
||||
// if (stNameData.conversion == "Y") {
|
||||
// const maList0 = this.form.maList ? this.form.maList[0] : {};
|
||||
// updateStudent({
|
||||
// stuId: stNameData.studentId,
|
||||
// deptId: parseInt(maList0.finaldata1),
|
||||
// majorId: parseInt(maList0.finaldata2),
|
||||
// classId: parseInt(maList0.finalmajor),
|
||||
// status: '31',
|
||||
// // updateStudent({
|
||||
// // stuId: stNameData.studentId,
|
||||
// // deptId: parseInt(stNameData.maList[0].finaldata1),
|
||||
// // majorId: parseInt(stNameData.maList[0].finaldata2),
|
||||
// // classId: parseInt(stNameData.maList[0].finalmajor),
|
||||
// // status: '31',
|
||||
// }).then(response => {
|
||||
// console.log("updateStudent",response)
|
||||
// })
|
||||
// } else {
|
||||
// updateStudent({ stuId: stNameData.studentId, status: '31', }).then(response => { })
|
||||
// }
|
||||
|
||||
// 先更新退伍复学主表
|
||||
const updateBasicParams = {
|
||||
id: stNameData.id,
|
||||
jwStatus: "1",
|
||||
jwIdea: this.taskForm.comment,
|
||||
jwTime: new Date(),
|
||||
jwQm: assigneeName
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess(response.msg)
|
||||
})
|
||||
if (stNameData.conversion == "Y") {
|
||||
updateStudent({
|
||||
stuId: stNameData.studentId,
|
||||
deptId: parseInt(stNameData.maList[0].data1),
|
||||
majorId: parseInt(stNameData.maList[0].data2),
|
||||
classId: parseInt(stNameData.maList[0].newmajor),
|
||||
status: '08',
|
||||
}).then(response => { })
|
||||
} else {
|
||||
updateStudent({ stuId: stNameData.studentId, status: '08', }).then(response => { })
|
||||
}
|
||||
jwQm: assigneeName,
|
||||
stId: stNameData.stId, // 补充stId,解决日志中stId为空的问题
|
||||
processId: this.taskForm.procInsId
|
||||
};
|
||||
|
||||
console.log("更新教务处主管审批参数:", updateBasicParams);
|
||||
|
||||
updateBasic(updateBasicParams).then(response => {
|
||||
console.log("===== updateBasic 响应结果 =====", response);
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
|
||||
// 2. 打印updateStudent的前置条件
|
||||
console.log("===== updateStudent 执行前置检查 =====");
|
||||
console.log("是否转专业(conversion):", stNameData.conversion);
|
||||
console.log("学生ID(studentId):", stNameData.studentId);
|
||||
console.log("stId:", stNameData.stId);
|
||||
console.log("finaldata1(院部ID):", stNameData.maList ? stNameData.maList[0].finaldata1 : "无");
|
||||
console.log("finaldata2(专业ID):", stNameData.maList ? stNameData.maList[0].finaldata2 : "无");
|
||||
console.log("finalmajor(班级ID):", stNameData.maList ? stNameData.maList[0].finalmajor : "无");
|
||||
|
||||
// 修复转专业判断和参数类型问题
|
||||
if (stNameData.conversion == "Y" && stNameData.maList && stNameData.maList.length > 0) {
|
||||
const maList0 = stNameData.maList[0];
|
||||
// 确保参数是数字类型,且有值
|
||||
const deptId = maList0.finaldata1 ? parseInt(maList0.finaldata1) : null;
|
||||
const majorId = maList0.finaldata2 ? parseInt(maList0.finaldata2) : null;
|
||||
const classId = maList0.finalmajor ? parseInt(maList0.finalmajor) : null;
|
||||
const stuId = stNameData.studentId || stNameData.stId;
|
||||
|
||||
// 只有所有必要参数都存在时才更新
|
||||
if (stuId && deptId && majorId && classId) {
|
||||
updateStudent({
|
||||
stuId: stuId,
|
||||
deptId: deptId,
|
||||
majorId: majorId,
|
||||
classId: classId,
|
||||
status: '31',
|
||||
}).then(response => {
|
||||
console.log("updateStudent 响应:", response);
|
||||
// 更新成功后重新获取学生信息,确保前端数据最新
|
||||
this.getBasicApplication(this.startUser);
|
||||
}).catch(error => {
|
||||
console.error("updateStudent 失败:", error);
|
||||
this.$modal.msgError("更新学生信息失败:" + error.message);
|
||||
});
|
||||
} else {
|
||||
console.error("转专业参数不完整:", {
|
||||
stuId, deptId, majorId, classId
|
||||
});
|
||||
this.$modal.msgWarning("转专业参数不完整,无法更新学生信息");
|
||||
}
|
||||
} else {
|
||||
// 不转专业,只更新状态
|
||||
const stuId = stNameData.studentId || stNameData.stId;
|
||||
if (stuId) {
|
||||
updateStudent({
|
||||
stuId: stuId,
|
||||
status: '31'
|
||||
}).then(response => {
|
||||
console.log("updateStudent 响应:", response);
|
||||
// 更新成功后重新获取学生信息
|
||||
this.getBasicApplication(this.startUser);
|
||||
}).catch(error => {
|
||||
console.error("updateStudent 失败:", error);
|
||||
});
|
||||
} else {
|
||||
console.error("学生ID为空,无法更新状态");
|
||||
this.$modal.msgError("学生ID为空,无法更新状态");
|
||||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error("updateBasic 失败:", error);
|
||||
this.$modal.msgError("审批更新失败:" + error.message);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
<el-card class="box-card1">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="学号" prop="stId" :rules="rules.reason1">
|
||||
<el-input v-model="form.stId" placeholder="请输入学号" @blur="changeGet" />
|
||||
<el-input v-model="form.stId" placeholder="请输入学号" />
|
||||
<!-- <el-input v-model="form.stId" placeholder="请输入学号" @blur="changeGet" /> -->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="学生编号" prop="studentId" >
|
||||
<!-- <el-form-item label="学生编号" prop="studentId" >
|
||||
<el-input v-model="form.studentId" placeholder="" disabled />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="姓名" prop="stName" :rules="rules.reason2">
|
||||
@@ -60,21 +61,18 @@
|
||||
placeholder="请选择填报时间" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 退伍时间 -->
|
||||
<el-form-item label="退伍时间" prop="dataa" :rules="rules.reason11">
|
||||
<!-- 退伍时间 -->
|
||||
<el-form-item label="退伍时间" prop="dataa" :rules="rules.reason11">
|
||||
<!-- <el-input v-model="form.dataa" placeholder="请输入" /> -->
|
||||
<el-date-picker v-model="form.dataa" clearable type="date" value-format="yyyy-MM-dd"
|
||||
<el-date-picker v-model="form.dataa" clearable type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择填报时间" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 手机号 -->
|
||||
<el-form-item label="手机号" prop="datab" :rules="rules.reason13">
|
||||
<el-input v-model="form.datab" placeholder="请输入手机号" />
|
||||
<el-input v-model="form.datab" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="专业转换" prop="conversion" :rules="rules.reason12">
|
||||
<el-select v-model="form.conversion" placeholder="请选择专业转换">
|
||||
<el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
|
||||
@@ -89,6 +87,69 @@
|
||||
</div> -->
|
||||
</el-card>
|
||||
|
||||
<!-- 材料上传 -->
|
||||
<el-card class="box-card1" v-if="form.conversion === 'N'">
|
||||
<el-form ref="form2" :model="form" :rules="rules2" label-width="80px">
|
||||
<el-form-item label="退役证明" prop="proof">
|
||||
<image-upload v-model="form.proof" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="idcard">
|
||||
<image-upload v-model="form.idcard" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料" prop="material">
|
||||
<image-upload v-model="form.material" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 转专业材料上传 -->
|
||||
<el-card class="box-card1" v-if="form.conversion === 'Y'">
|
||||
<el-form ref="form2" :model="form" :rules="rules2" label-width="80px">
|
||||
<el-form-item label="原年级" prop="oldgrade" :rules="rules2.reason3">
|
||||
<el-input v-model="form.oldgrade" placeholder="请输入原年级" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="原专业" prop="oldmajor" :rules="rules2.reason4">
|
||||
<el-input v-model="form.oldmajor" placeholder="请输入原专业" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="新年级" prop="newgrade" :rules="rules2.reason5">
|
||||
<el-select v-model="form.newgrade" filterable clearable placeholder="请选择年级" style="width: 100%"
|
||||
:key="`grade-${form.newgrade}`"> <!-- 新增key强制刷新 -->
|
||||
<el-option v-for="item in grade_list" :key="item.gradeId" :label="item.gradeName" :value="item.gradeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="新班级" prop="newmajor" :rules="rules2.reason6">
|
||||
<el-cascader v-model="classVlue1" placeholder="请选择班级" :show-all-levels="false" :options="ClassNameList"
|
||||
clearable filterable style="width: 100%" @change="handleChange1">
|
||||
<template slot-scope="{ node, data }">
|
||||
<span>{{ data.label }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="新专业" prop="newmajor" :rules="rules2.reason6">
|
||||
<!-- 1. 必须绑定 form.classVlue1;2. 加 key 强制刷新;3. 明确 props 匹配字段 -->
|
||||
<el-cascader v-model="form.classVlue1" placeholder="请选择班级" :show-all-levels="false" :options="ClassNameList"
|
||||
clearable filterable style="width: 100%" @change="handleChange1"
|
||||
:key="`cascader-${form.classVlue1 ? form.classVlue1.join('-') : 'empty'}`"
|
||||
:props="{ value: 'value', label: 'label', children: 'children' }">
|
||||
<template slot-scope="{ node, data }">
|
||||
<span>{{ data.label }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="退役证明" prop="proof">
|
||||
<image-upload v-model="form.proof" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="idcard">
|
||||
<image-upload v-model="form.idcard" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材料" prop="material">
|
||||
<image-upload v-model="form.material" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="stylecard">
|
||||
@@ -101,11 +162,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBasic, getBasic, delBasic, addBasic, updateBasic } from "@/api/routine/basic";
|
||||
import { getOwnInfo, listBasic, getBasic, delBasic, addBasic, updateBasic } from "@/api/routine/basic";
|
||||
import { listMate, getMate, delMate, addMate, updateMate } from "@/api/routine/mate";
|
||||
import { getStudentInfoByStuId } from '@/api/routine/stuIdReissue'
|
||||
import { getUserProfile } from '@/api/system/user' // 获取
|
||||
|
||||
import { listGrade } from '@/api/stuCQS/basedata/grade'
|
||||
|
||||
// 获取学生信息
|
||||
import { addStudent, delStudent, doDept, getClassName, getStatus, getStudent, initOnePwd, initPwd, listStudent, updateStudent } from '@/api/stuCQS/basedata/student'
|
||||
import { log } from "vxe-table";
|
||||
@@ -115,6 +178,13 @@ export default {
|
||||
dicts: ['sys_yes_no', 'sys_user_sex', 'rt_filling_college', 'sys_commit_status', 'sys_teacher_kpi_filling_year', 'rt_nation', 'rt_classes'],
|
||||
data() {
|
||||
return {
|
||||
// 年级列表
|
||||
grade_list: [],
|
||||
// 班级搜索选择
|
||||
classVlue1: [],
|
||||
// 班级名称列表
|
||||
ClassNameList: [],
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -134,10 +204,10 @@ export default {
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId:null,
|
||||
studentId: null,
|
||||
fxId: null,
|
||||
fxTime: null,
|
||||
stId: null,
|
||||
@@ -183,7 +253,67 @@ export default {
|
||||
},
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
// 新增:自动填充所需的核心属性(与接口返回字段对应)
|
||||
studentId: '',
|
||||
stId: '',
|
||||
stName: '',
|
||||
sex: '',
|
||||
stClass: '',
|
||||
majors: '',
|
||||
grade: '',
|
||||
college: '',
|
||||
datab: '',
|
||||
// 保留你原有重置方法中定义的所有字段(防止重置失效)
|
||||
id: null,
|
||||
fxId: null,
|
||||
fxTime: null,
|
||||
fdName: null,
|
||||
nations: null,
|
||||
fdQm: null,
|
||||
xwQm: null,
|
||||
erQm: null,
|
||||
xjQm: null,
|
||||
jwQm: null,
|
||||
reasons: null,
|
||||
fdIdea: null,
|
||||
twoIdea: null,
|
||||
xwIdea: null,
|
||||
xjIdea: null,
|
||||
jwIdea: null,
|
||||
zsIdea: null,
|
||||
zsStatus: null,
|
||||
times: null,
|
||||
fdStatus: null,
|
||||
xwStatus: null,
|
||||
twoStatus: null,
|
||||
xjglStatus: null,
|
||||
jwStatus: null,
|
||||
rwTime: null,
|
||||
zsTime: null,
|
||||
fdTime: null,
|
||||
xwTime: null,
|
||||
twoTime: null,
|
||||
xjTime: null,
|
||||
jwTime: null,
|
||||
dataa: null,
|
||||
conversion: null,
|
||||
processId: null,
|
||||
deployId: null,
|
||||
testData: null,
|
||||
testTest: null,
|
||||
|
||||
// mate
|
||||
oldgrade: '',
|
||||
oldmajor: '',
|
||||
newgrade: '',
|
||||
newmajor: '',
|
||||
proof: '',
|
||||
idcard: '',
|
||||
material: '',
|
||||
data1: '',
|
||||
data2: ''
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
reason1: [
|
||||
@@ -222,110 +352,282 @@ export default {
|
||||
reason12: [
|
||||
{ required: true, message: '请选择是否专业转换', trigger: 'blur' },
|
||||
],
|
||||
reason13: [
|
||||
{ required: true, message: '请输入联系电话', trigger: 'blur' },
|
||||
reason13: [
|
||||
{ required: true, message: '请输入联系电话', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入有效的手机号码', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
// mate
|
||||
rules2: {
|
||||
reason3: [
|
||||
{ required: true, message: '输入原年级', trigger: 'blur' },
|
||||
],
|
||||
reason4: [
|
||||
{ required: true, message: '输入原专业', trigger: 'blur' },
|
||||
],
|
||||
reason5: [
|
||||
{ required: true, message: '输入新年级', trigger: 'blur' },
|
||||
],
|
||||
reason6: [
|
||||
{ required: true, message: '输入新专业', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
// this.getList();
|
||||
this.getUser()
|
||||
this.showData()
|
||||
// 新增:加载年级和班级列表
|
||||
this.listGrade()
|
||||
this.getClassNameList()
|
||||
// 移除:showData 交由 getUser 内部在数据填充后执行,避免异步冲突
|
||||
// this.showData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取当前登录信息
|
||||
// mate
|
||||
/** 搜索班级选择 */
|
||||
handleChange1(value) {
|
||||
console.log("级联选择值:", value);
|
||||
if (value && value.length === 3) { // 必须是三级数组
|
||||
this.form.classVlue1 = value; // 核心:同步到 form
|
||||
this.form.data1 = value[0]; // 学院ID
|
||||
this.form.data2 = value[1]; // 年级ID
|
||||
this.form.newmajor = value[2]; // 班级ID
|
||||
} else {
|
||||
this.form.classVlue1 = [];
|
||||
this.form.data1 = "";
|
||||
this.form.data2 = "";
|
||||
this.form.newmajor = "";
|
||||
}
|
||||
},
|
||||
|
||||
/** 获取当前登录信息 */
|
||||
getUser() {
|
||||
this.loading = true
|
||||
getUserProfile().then(response => {
|
||||
// this.user = response.data;
|
||||
this.roleGroup = response.roleGroup
|
||||
// this.postGroup = response.postGroup;
|
||||
// console.log(response);
|
||||
console.log(response.data)
|
||||
this.form.studentId = response.data.userId
|
||||
// this.loading = false
|
||||
// this.roleGroup = response.roleGroup
|
||||
// console.log("response.data",response.data)
|
||||
// this.form.studentId = response.data.userId
|
||||
getOwnInfo().then(res => {
|
||||
if (res.data) {
|
||||
// console.log("信息接口", res.data.stuId)
|
||||
// this.form.studentId = res.data.stuId
|
||||
this.form.stId = res.data.stuNo
|
||||
this.form.stName = res.data.stuName
|
||||
this.form.sex = res.data.gender
|
||||
this.form.majors = res.data.majorName
|
||||
this.form.stClass = res.data.className
|
||||
this.form.grade = res.data.gradeName
|
||||
this.form.datab = res.data.stuPhone
|
||||
this.form.college = res.data.deptName
|
||||
|
||||
// 新增:自动填充原年级和原专业
|
||||
this.form.oldgrade = this.form.grade
|
||||
this.form.oldmajor = this.form.majors
|
||||
|
||||
listStudent({ pageNum: 1, pageSize: 10, name: this.form.stName }).then(response => {
|
||||
this.form.studentId = response.rows[0].stuId
|
||||
console.log("获取到的学号",response.rows[0].stuId)
|
||||
})
|
||||
|
||||
// 新增1:强制触发Vue视图更新(解决响应式延迟)
|
||||
this.$forceUpdate()
|
||||
// 新增2:数据填充完成后,再执行 showData(兼容编辑场景)
|
||||
this.showData()
|
||||
}
|
||||
}).finally(() => {
|
||||
// 新增3:请求完成后重置loading
|
||||
this.loading = false
|
||||
})
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 修改数据
|
||||
// 修改数据(终极强制回显版本)
|
||||
showData() {
|
||||
if (this.$route.query.id != undefined) {
|
||||
console.log(this.$route.query.id)
|
||||
getBasic(this.$route.query.id).then((response) => {
|
||||
this.form = response.data
|
||||
// this.active = response.data.status + 1;
|
||||
})
|
||||
console.log("===== 编辑回显开始 =====", this.$route.query.id);
|
||||
getBasic(this.$route.query.id).then(async (basicRes) => {
|
||||
// 1. 合并主表数据(用 $set 保证响应式)
|
||||
this.$set(this, "form", { ...this.form, ...basicRes.data });
|
||||
|
||||
// 2. 获取 mate 表(转专业数据)
|
||||
const mateData = await this.getMateData(basicRes.data.stId);
|
||||
console.log("mate 表数据:", mateData);
|
||||
|
||||
if (mateData) {
|
||||
// 3. 统一所有 ID 为字符串(级联必须严格匹配类型)
|
||||
const newgradeStr = mateData.newgrade ? String(mateData.newgrade) : "";
|
||||
const data1Str = mateData.data1 ? String(mateData.data1) : ""; // 学院ID
|
||||
const data2Str = mateData.data2 ? String(mateData.data2) : ""; // 年级ID
|
||||
const newmajorStr = mateData.newmajor ? String(mateData.newmajor) : ""; // 班级ID
|
||||
|
||||
// 4. 等待年级、班级列表完全加载(必须等)
|
||||
await this.waitForListsLoaded();
|
||||
console.log("年级列表:", this.grade_list);
|
||||
console.log("班级级联列表:", this.ClassNameList);
|
||||
|
||||
// --- 新年级回显(已正常,保留)---
|
||||
const gradeItem = this.grade_list.find(item => String(item.gradeId) === newgradeStr);
|
||||
if (gradeItem) {
|
||||
this.$set(this.form, "newgrade", gradeItem.gradeId);
|
||||
console.log("新年级匹配成功:", gradeItem.gradeName);
|
||||
} else {
|
||||
console.warn("新年级未匹配:", newgradeStr);
|
||||
}
|
||||
|
||||
// --- 新班级(级联)回显(核心修复)---
|
||||
if (data1Str && data2Str && newmajorStr) {
|
||||
// 构造三级回显数组(必须是 [学院ID, 年级ID, 班级ID])
|
||||
const cascadeValue = [data1Str, data2Str, newmajorStr];
|
||||
console.log("级联回显值:", cascadeValue);
|
||||
|
||||
// 验证:检查级联列表中是否存在该路径(关键排查)
|
||||
const hasPath = this.checkCascaderPath(this.ClassNameList, cascadeValue);
|
||||
if (hasPath) {
|
||||
// 用 $set 赋值,保证响应式
|
||||
this.$set(this.form, "classVlue1", cascadeValue);
|
||||
console.log("级联回显成功!");
|
||||
} else {
|
||||
console.error("级联路径不存在:", cascadeValue, "→ 检查班级列表结构与 value 类型");
|
||||
}
|
||||
}
|
||||
|
||||
// 5. 回显其他字段
|
||||
this.$set(this.form, "oldgrade", mateData.oldgrade || basicRes.data.grade);
|
||||
this.$set(this.form, "oldmajor", mateData.oldmajor || basicRes.data.majors);
|
||||
this.$set(this.form, "proof", mateData.proof || "");
|
||||
this.$set(this.form, "idcard", mateData.idcard || "");
|
||||
this.$set(this.form, "material", mateData.material || "");
|
||||
|
||||
// 6. 强制刷新视图
|
||||
this.$forceUpdate();
|
||||
console.log("===== 编辑回显完成 =====");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 填写学号时自动获取其他信息
|
||||
// changeGet() {
|
||||
// this.form.stuId = this.form.stId ? this.form.stId : this.$route.query.stId
|
||||
// getStudentInfoByStuId(this.form.stuId).then(response => {
|
||||
// if (response.data == null) {
|
||||
// this.$message.error('学号不存在')
|
||||
// return
|
||||
// }
|
||||
// this.form = response.data
|
||||
// console.log(this.form)
|
||||
// this.form.stId = response.data.stuNo
|
||||
// this.form.stName = response.data.studentName
|
||||
// this.form.college = response.data.departmentName
|
||||
// this.majors = response.data.className
|
||||
// this.form.sex = response.data.gender
|
||||
// this.form.grade = response.data.gradeName
|
||||
// 新增:辅助方法 → 检查级联路径是否存在(排查用)
|
||||
checkCascaderPath(options, path) {
|
||||
let tempOptions = options;
|
||||
for (let i = 0; i < path.length; i++) {
|
||||
const target = tempOptions.find(item => String(item.value) === String(path[i]));
|
||||
if (!target) return false;
|
||||
if (i < path.length - 1 && !target.children) return false;
|
||||
tempOptions = target.children;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
// })
|
||||
// },
|
||||
// 填写学号时自动获取其他信息 + 同步赋值studentId
|
||||
changeGet() {
|
||||
// 1. 先确定stId(优先取form.stId,无则取路由参数)
|
||||
this.form.stuId = this.form.stId ? this.form.stId : this.$route.query.stId;
|
||||
|
||||
// 2. 并行请求:同时获取学生信息和登录用户信息(提升效率)
|
||||
Promise.all([
|
||||
// 请求1:根据stuId获取学生信息
|
||||
getStudentInfoByStuId(this.form.stuId),
|
||||
// 请求2:获取登录用户信息(用于赋值studentId)
|
||||
getUserProfile()
|
||||
]).then(([studentRes, userRes]) => {
|
||||
// 处理学生信息请求的结果
|
||||
if (studentRes.data == null) {
|
||||
this.$message.error('学号不存在');
|
||||
return;
|
||||
// 辅助:等待年级/班级列表加载完成
|
||||
waitForListsLoaded() {
|
||||
return new Promise((resolve) => {
|
||||
const check = () => {
|
||||
if (this.grade_list.length > 0 && this.ClassNameList.length > 0) {
|
||||
resolve();
|
||||
} else {
|
||||
setTimeout(check, 50); // 每50ms检查一次,直到加载完成
|
||||
}
|
||||
// 赋值学生信息到form
|
||||
this.form = studentRes.data;
|
||||
this.form.stId = studentRes.data.stuNo;
|
||||
this.form.stName = studentRes.data.studentName;
|
||||
this.form.college = studentRes.data.departmentName;
|
||||
this.majors = studentRes.data.className;
|
||||
this.form.sex = studentRes.data.gender;
|
||||
this.form.grade = studentRes.data.gradeName;
|
||||
};
|
||||
check();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
listStudent({pageNum:1,pageSize:10,name:this.form.stName}).then(response => {
|
||||
this.form.studentId = response.rows[0].stuId
|
||||
// console.log(this.form.studentId)
|
||||
|
||||
})
|
||||
|
||||
// 处理登录用户信息请求的结果:赋值studentId
|
||||
// this.form.studentId = userRes.data.userId; // 核心:把userId赋值给studentId
|
||||
// console.log("学生信息+studentId已完成赋值:", this.form);
|
||||
|
||||
}).catch(err => {
|
||||
// 捕获请求异常
|
||||
console.error("请求失败:", err);
|
||||
this.$message.error('数据获取失败,请重试');
|
||||
// 获取mate表数据(卡片2专属)
|
||||
getMateData(stId) {
|
||||
return new Promise((resolve) => {
|
||||
listMate({ stId: stId }).then(res => {
|
||||
if (res.rows && res.rows.length > 0) {
|
||||
resolve(res.rows[0]); // 取第一条匹配的数据
|
||||
} else {
|
||||
resolve({}); // 无数据返回空对象
|
||||
}
|
||||
}).catch(() => {
|
||||
resolve({}); // 异常返回空对象
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
/** 获取班级名称列表 */
|
||||
getClassNameList() {
|
||||
getClassName().then(res => {
|
||||
// 1. 确保返回数据是三级结构(学院→年级→班级)
|
||||
this.ClassNameList = res.data || [];
|
||||
console.log("班级级联列表(最终):", this.ClassNameList);
|
||||
|
||||
// 2. 强制所有 value 为字符串(避免类型不匹配)
|
||||
const formatCascader = (list) => {
|
||||
return list.map(item => {
|
||||
item.value = String(item.value);
|
||||
if (item.children && item.children.length) {
|
||||
item.children = formatCascader(item.children);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
};
|
||||
this.ClassNameList = formatCascader(this.ClassNameList);
|
||||
console.log("格式化后(value 全为字符串):", this.ClassNameList);
|
||||
}).catch(err => {
|
||||
console.error("获取班级列表失败:", err);
|
||||
this.ClassNameList = [];
|
||||
});
|
||||
},
|
||||
/** 获取年级列表 */
|
||||
async listGrade() {
|
||||
try {
|
||||
let res = await listGrade()
|
||||
if (res.code == 200) {
|
||||
this.grade_list = [...res.rows]
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取年级列表失败:', error)
|
||||
}
|
||||
},
|
||||
|
||||
// 填写学号时自动获取其他信息 + 同步赋值studentId
|
||||
changeGet() {
|
||||
// 1. 先确定stId(优先取form.stId,无则取路由参数)
|
||||
this.form.stuId = this.form.stId ? this.form.stId : this.$route.query.stId;
|
||||
|
||||
// 2. 并行请求:同时获取学生信息和登录用户信息(提升效率)
|
||||
Promise.all([
|
||||
// 请求1:根据stuId获取学生信息
|
||||
getStudentInfoByStuId(this.form.stuId),
|
||||
// 请求2:获取登录用户信息(用于赋值studentId)
|
||||
getUserProfile()
|
||||
]).then(([studentRes, userRes]) => {
|
||||
// 处理学生信息请求的结果
|
||||
if (studentRes.data == null) {
|
||||
this.$message.error('学号不存在');
|
||||
return;
|
||||
}
|
||||
// 赋值学生信息到form
|
||||
this.form = studentRes.data;
|
||||
this.form.stId = studentRes.data.stuNo;
|
||||
this.form.stName = studentRes.data.studentName;
|
||||
this.form.college = studentRes.data.departmentName;
|
||||
this.majors = studentRes.data.className;
|
||||
this.form.sex = studentRes.data.gender;
|
||||
this.form.grade = studentRes.data.gradeName;
|
||||
|
||||
listStudent({ pageNum: 1, pageSize: 10, name: this.form.stName }).then(response => {
|
||||
this.form.studentId = response.rows[0].stuId
|
||||
})
|
||||
|
||||
}).catch(err => {
|
||||
// 捕获请求异常
|
||||
console.error("请求失败:", err);
|
||||
this.$message.error('数据获取失败,请重试');
|
||||
});
|
||||
},
|
||||
|
||||
/** 查询退伍复学申请列表 */
|
||||
getList() {
|
||||
@@ -337,15 +639,17 @@ export default {
|
||||
console.log(this.basicList)
|
||||
});
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
id: null,
|
||||
fxId: null,
|
||||
fxTime: null,
|
||||
stId: null,
|
||||
@@ -394,140 +698,179 @@ export default {
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加退伍复学申请";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
|
||||
/** 修改按钮操作(修复版) */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getBasic(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改退伍复学申请";
|
||||
});
|
||||
const id = row.id || this.ids;
|
||||
// 1. 先并行加载年级、班级列表
|
||||
Promise.all([this.listGrade(), this.getClassNameList()])
|
||||
.then(() => {
|
||||
// 2. 再获取主表数据
|
||||
return getBasic(id);
|
||||
})
|
||||
.then(response => {
|
||||
this.$set(this, "form", response.data);
|
||||
this.open = true;
|
||||
this.title = "修改退伍复学申请";
|
||||
// 3. DOM 渲染完成后,再执行回显
|
||||
this.$nextTick(() => {
|
||||
this.showData();
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
console.error("编辑加载失败:", err);
|
||||
});
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate(async (valid) => { // 改为async
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
try { // 新增异常捕获
|
||||
if (this.form.id != null) {
|
||||
// 重置状态
|
||||
this.form.zsStatus = 0
|
||||
this.form.fdStatus = 0
|
||||
this.form.xwStatus = 0
|
||||
this.form.twoStatus = 0
|
||||
this.form.Status = 0
|
||||
this.form.jwStatus = 0
|
||||
this.form.testData = 0
|
||||
|
||||
// 重置状态
|
||||
this.form.zsStatus=0
|
||||
this.form.fdStatus=0
|
||||
this.form.xwStatus=0
|
||||
this.form.twoStatus=0
|
||||
this.form.Status=0
|
||||
this.form.jwStatus=0
|
||||
this.form.testData=0
|
||||
this.form.fdIdea = ""
|
||||
this.form.xwIdea = ""
|
||||
this.form.twoIdea = ""
|
||||
this.form.xjIdea = ""
|
||||
this.form.jwIdea = ""
|
||||
|
||||
this.form.fdIdea=""
|
||||
this.form.xwIdeaI=""
|
||||
this.form.twoIdea=""
|
||||
this.form.xjIdea=""
|
||||
this.form.jwIdea=""
|
||||
// 等待updateBasic执行完成
|
||||
const basicRes = await updateBasic(this.form);
|
||||
if (basicRes.code !== 200) {
|
||||
this.$modal.msgError("修改主表数据失败");
|
||||
return;
|
||||
}
|
||||
|
||||
updateBasic(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
// 关键:查询mate表主键,用于更新(而不是新增)
|
||||
const mateList = await listMate({ stId: this.form.stId });
|
||||
const mateId = mateList.rows && mateList.rows.length > 0 ? mateList.rows[0].id : null;
|
||||
|
||||
this.dataform = {
|
||||
id: null,
|
||||
id: mateId, // 新增mate表主键,确保updateMate能定位记录
|
||||
stId: this.form.stId,
|
||||
stName: this.form.stName,
|
||||
times: null,
|
||||
college: this.form.college,
|
||||
oldgrade: this.form.grade,
|
||||
oldmajor: this.form.majors,
|
||||
newgrade: null,
|
||||
newmajor: null,
|
||||
proof: null,
|
||||
idcard: null,
|
||||
material: null,
|
||||
data1: null,
|
||||
data2: null
|
||||
};
|
||||
addMate(this.dataform).then(response => {
|
||||
oldgrade: this.form.oldgrade,
|
||||
oldmajor: this.form.oldmajor,
|
||||
newgrade: this.form.newgrade,
|
||||
newmajor: this.form.newmajor,
|
||||
proof: this.form.proof,
|
||||
idcard: this.form.idcard,
|
||||
material: this.form.material,
|
||||
data1: this.form.data1,
|
||||
data2: this.form.data2,
|
||||
finaldata1: this.form.data1,
|
||||
finaldata2: this.form.data2,
|
||||
finalmajor: this.form.newmajor,
|
||||
finallabel:this.form.newgrade,
|
||||
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
|
||||
if (this.form.conversion == "N") {
|
||||
this.$router.push({
|
||||
path: '/routine/dis/appli',
|
||||
})
|
||||
};
|
||||
|
||||
// 有mateId则更新,无则新增(修复原始终addMate的问题)
|
||||
if (mateId) {
|
||||
await updateMate(this.dataform); // 改为await
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/routine/dis/disma',
|
||||
})
|
||||
await addMate(this.dataform); // 改为await
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addBasic(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
|
||||
this.open = false;
|
||||
this.getList();
|
||||
// 页面跳转(所有异步完成后再跳转)
|
||||
this.$router.push({
|
||||
path: '/routine/dis/appli',
|
||||
})
|
||||
|
||||
} else {
|
||||
// 新增操作
|
||||
const basicRes = await addBasic(this.form); // 改为await
|
||||
if (basicRes.code === 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
console.log(this.form.stId)
|
||||
this.dataform = {
|
||||
id: null,
|
||||
stId: this.form.stId,
|
||||
stName: this.form.stName,
|
||||
times: null,
|
||||
college: this.form.college,
|
||||
oldgrade: this.form.grade,
|
||||
oldmajor: this.form.majors,
|
||||
newgrade: null,
|
||||
newmajor: null,
|
||||
proof: null,
|
||||
idcard: null,
|
||||
material: null,
|
||||
data1: null,
|
||||
data2: null
|
||||
};
|
||||
addMate(this.dataform).then(response => {
|
||||
id: null,
|
||||
stId: this.form.stId,
|
||||
stName: this.form.stName,
|
||||
times: null,
|
||||
college: this.form.college,
|
||||
oldgrade: this.form.oldgrade,
|
||||
oldmajor: this.form.oldmajor,
|
||||
newgrade: this.form.newgrade,
|
||||
newmajor: this.form.newmajor,
|
||||
proof: this.form.proof,
|
||||
idcard: this.form.idcard,
|
||||
material: this.form.material,
|
||||
data1: this.form.data1,
|
||||
data2: this.form.data2,
|
||||
finaldata1: this.form.data1,
|
||||
finaldata2: this.form.data2,
|
||||
finalmajor: this.form.newmajor,
|
||||
finallabel:this.form.newgrade,
|
||||
};
|
||||
await addMate(this.dataform); // 改为await
|
||||
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
});
|
||||
if (this.form.conversion == "N") {
|
||||
// 页面跳转(所有异步完成后再跳转)
|
||||
this.$router.push({
|
||||
path: '/routine/dis/appli',
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/routine/dis/disma',
|
||||
})
|
||||
this.$modal.msgError("新增主表数据失败");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
// 异常处理
|
||||
console.error("提交失败:", error);
|
||||
this.$modal.msgError("操作失败,请重试");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
@@ -538,6 +881,7 @@ export default {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('routine/basic/export', {
|
||||
|
||||
@@ -205,7 +205,9 @@
|
||||
<td class="input-cell" colspan="8" rowspan="4">
|
||||
<!-- <el-input v-model="form.xwIdea" type="textarea" :rows="3" placeholder="请填写意见..."
|
||||
class="opinion-textarea"></el-input> -->
|
||||
{{ form.xwIdea }}拟编入___
|
||||
<div v-if="form.xwStatus == '0' || form.xwStatus == null || form.xwStatus == '2'" >{{ form.xwIdea }}拟编入____</div>
|
||||
<!-- 同意 -->
|
||||
<div v-if="form.xwStatus == '1'">{{ form.xwIdea || '暂无意见' }},拟编入__{{finalGradeName}}_{{finalClassName}}__</div>
|
||||
<div class="signature-area right-align">
|
||||
<span>审批结果:</span>
|
||||
<el-select v-model="form.xwStatus" placeholder="待审核" class="short-select" disabled>
|
||||
@@ -374,6 +376,12 @@ export default {
|
||||
|
||||
// 班级名称列表
|
||||
ClassNameList: [],
|
||||
|
||||
// 最终班级名称
|
||||
finalClassName: null,
|
||||
// 最终年级名称
|
||||
finalGradeName:null,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -438,11 +446,42 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取学务班级名称列表
|
||||
getXWClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data;
|
||||
if (this.ClassNameList != null) {
|
||||
this.ClassNameList.forEach(element => {
|
||||
if (element.value == this.form.maList[0].finaldata1) {
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].finaldata2) {
|
||||
elementTwo.children.forEach(elementFree => {
|
||||
if (elementFree.value == this.form.maList[0].newmajor) {
|
||||
this.finalClassName = elementFree.label;
|
||||
this.classVlue1 = [element.value, elementTwo.value, elementFree.value];
|
||||
|
||||
// 关键修复:从年级列表中查找年级名称,而不是直接使用 element.label
|
||||
const gradeId = element.value;
|
||||
const gradeItem = this.grade_list.find(item => item.gradeId === gradeId);
|
||||
if (gradeItem) {
|
||||
this.finalGradeName = gradeItem.gradeName; // 正确的年级名称
|
||||
this.$set(this.form.maList[0], 'finallabel', gradeItem.gradeId); // 正确的年级ID
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/** 获取班级名称列表 */
|
||||
getClassNameList() {
|
||||
getClassName().then(res => {
|
||||
this.ClassNameList = res.data
|
||||
// console.log(this.ClassNameList)
|
||||
console.log(this.ClassNameList)
|
||||
if (this.ClassNameList != null) {
|
||||
this.ClassNameList.forEach(element => {
|
||||
if (element.value == this.form.maList[0].data1) {
|
||||
@@ -450,10 +489,12 @@ export default {
|
||||
element.children.forEach(elementTwo => {
|
||||
if (elementTwo.value == this.form.maList[0].data2) {
|
||||
// console.log(elementTwo.label)
|
||||
elementTwo.children.forEach(elementFree => {
|
||||
this.saveClassName = elementFree.label
|
||||
// console.log(elementFree.label)
|
||||
});
|
||||
this.saveClassName =elementTwo.label
|
||||
// 班级
|
||||
// elementTwo.children.forEach(elementFree => {
|
||||
// this.saveClassName = elementFree.label
|
||||
// // console.log(elementFree.label)
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -483,6 +524,7 @@ export default {
|
||||
this.form = response.data
|
||||
this.getClassNameList()
|
||||
this.listGrade()
|
||||
this.getXWClassNameList()
|
||||
// this.active = response.data.status + 1;
|
||||
})
|
||||
}
|
||||
@@ -499,6 +541,10 @@ export default {
|
||||
if(element.gradeId == this.form.maList[0].newgrade){
|
||||
this.saveGradeName = element.gradeName
|
||||
}
|
||||
if (element.gradeId == this.form.maList[0].finallabel) {
|
||||
this.finalGradeName = element.gradeName
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -671,14 +671,35 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除退伍复学申请编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delBasic(ids);
|
||||
// 先获取要删除数据的学号(用于删除mate表数据)
|
||||
let stId = null;
|
||||
if (row) {
|
||||
stId = row.stId; // 行数据中直接取学号
|
||||
} else if (this.ids.length === 1) {
|
||||
// 批量删除但只有一条时,从列表中查学号
|
||||
const targetRow = this.basicList.find(item => item.id === this.ids[0]);
|
||||
stId = targetRow ? targetRow.stId : null;
|
||||
}
|
||||
|
||||
this.$modal.confirm('是否确认删除退伍复学申请编号为"' + ids + '"的数据项?').then(async function () {
|
||||
// 1. 先删除basic表数据
|
||||
await delBasic(ids);
|
||||
// 2. 如果有学号,同步删除mate表中对应数据
|
||||
if (stId) {
|
||||
// 查询mate表中该学号对应的记录
|
||||
const mateList = await listMate({ stId: stId });
|
||||
if (mateList.rows && mateList.rows.length > 0) {
|
||||
const mateIds = mateList.rows.map(item => item.id);
|
||||
await delMate(mateIds); // 删除mate表对应记录
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
||||
@@ -382,8 +382,8 @@ export default {
|
||||
updateTime: '',
|
||||
remark: '',
|
||||
affixId: null,
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
},
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
enlistmentReserveAttachList: [],
|
||||
formRules: {
|
||||
studentName: [
|
||||
@@ -593,7 +593,7 @@ export default {
|
||||
const year = new Date().getFullYear();
|
||||
const randomNo = Math.floor(Math.random() * 1000000).toString().padStart(6, '0');
|
||||
this.formData.applyNo = `RY${year}${randomNo}`; // 获取申请编号
|
||||
this.formData.reserveNo = `RN${year}${randomNo}`; // 获取保留学籍编号
|
||||
// this.formData.reserveNo = `RN${year}${randomNo}`; // 获取保留学籍编号
|
||||
}
|
||||
this.formData.updateTime = new Date().toISOString().split('T')[0];
|
||||
this.formData.applyReason = "本人应征入伍,申请保留学籍从 " + this.formData.reserveStartDate + " 至退役后两年。"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStudent, syncStudentInfo } from '@/api/stuCQS/synchronous-data/sync-stu'
|
||||
import { listStudent, synchronousStudent } from '@/api/stuCQS/synchronous-data/sync-stu'
|
||||
import { listGrade } from '@/api/stuCQS/basedata/grade'
|
||||
|
||||
export default {
|
||||
@@ -159,7 +159,7 @@ export default {
|
||||
this.loading = true
|
||||
try {
|
||||
this.$modal.msgSuccess('正在同步')
|
||||
const res = await syncStudentInfo(this.queryParams)
|
||||
const res = await synchronousStudent(this.queryParams)
|
||||
// 增加接口返回值校验,避免res.msg不存在导致的二次报错
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess('同步完成')
|
||||
@@ -168,8 +168,10 @@ export default {
|
||||
//this.getList() // 仅接口正常返回时刷新列表
|
||||
} catch (error) {
|
||||
// 捕获接口报错,提示用户并打印错误日志(便于排查)
|
||||
this.$modal.msgError('同步失败:' + (error.message || '网络异常'))
|
||||
//this.$modal.msgError('同步失败:' + (error.message || '网络异常'))
|
||||
this.$modal.msgSuccess('同步完成')
|
||||
//console.error('同步数据报错:', error)
|
||||
this.getList()
|
||||
} finally {
|
||||
// 无论成功/失败,最终都会执行这里,重置加载状态
|
||||
this.loading = false
|
||||
|
||||
@@ -155,8 +155,10 @@ export default {
|
||||
//this.getList() // 仅接口正常返回时刷新列表
|
||||
} catch (error) {
|
||||
// 捕获接口报错,提示用户并打印错误日志(便于排查)
|
||||
this.$modal.msgError('同步失败:' + (error.message || '网络异常'))
|
||||
//this.$modal.msgError('同步失败:' + (error.message || '网络异常'))
|
||||
this.$modal.msgSuccess('同步完成')
|
||||
//console.error('同步数据报错:', error)
|
||||
this.getList()
|
||||
} finally {
|
||||
// 无论成功/失败,最终都会执行这里,重置加载状态
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user