体检管理bug调整

This commit is contained in:
2026-04-09 16:40:18 +08:00
parent fc4ae41785
commit c5401f31ae
2 changed files with 70 additions and 46 deletions
@@ -74,12 +74,12 @@ layout("/layouts/platform.html"){
type="primary"
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">管理员代选择
</el-button>-->
<!-- <el-button @click="openLastYear"-->
<!-- icon="el-icon-printer"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">一键选择去年数据-->
<!-- </el-button>-->
<el-button @click="openLastYear"
icon="el-icon-printer"
size="small"
type="primary"
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">一键选择去年数据
</el-button>
<el-button @click="msgNotSelect"
icon="el-icon-printer"
size="small"
@@ -231,9 +231,9 @@ layout("/layouts/platform.html"){
width="35%">
<el-form label-position="right" label-width="120px">
<el-form-item label="体检项目">
<el-select style="width: 100%" v-model="noSelectOptionId">
<el-option :key="item.id" :label="item.optionName" :value="item.id"
v-for="item in projectSubjectOptions"></el-option>
<el-select style="width: 100%" v-model="lastYearProjectId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in lastYearProjectSubjectOptions"></el-option>
</el-select>
</el-form-item>
</el-form>
@@ -283,6 +283,8 @@ layout("/layouts/platform.html"){
campus: null,
loading: false,
selectLastYearProject: false,
lastYearProjectId: null,
lastYearProjectSubjectOptions: []
}
},
methods: {
@@ -346,11 +348,17 @@ layout("/layouts/platform.html"){
cancelButtonText: '取消',
type: 'warning'
})
if(!this.lastYearProjectId){
this.$message().error('请选择上年度体检项目');
}
if (confirm === "confirm") {
const resp = await this.$axios.post(loc() + '/selectOptionByLastYear', {
projectId: this.pageForm.projectId
projectId: this.pageForm.projectId,
lastYearProjectId: this.lastYearProjectId
})
if (resp.code === 0) {
this.lastYearProjectId = '';
this.selectLastYearProject = false;
this.doSearch()
this.notifySuccess(resp.msg)
} else {
@@ -528,8 +536,18 @@ layout("/layouts/platform.html"){
});
return sums;
},
openLastYear(){
this.selectLastYearProject = true;
async openLastYear(){
const resp = await this.$axios.post("/platform/healthCheckup/project/mange/getHealthCheckupProject", {year: this.pageForm.year - 1})
if (resp.code === 0) {
if(resp.data.length > 0){
this.lastYearProjectSubjectOptions = resp.data
this.selectLastYearProject = true;
} else {
this.$message().error("无上一年度体检项目");
}
} else {
this.notifyError(resp.msg)
}
}
},
async created() {