初始化

This commit is contained in:
2025-07-28 15:52:07 +08:00
commit cd0e77b332
1304 changed files with 302802 additions and 0 deletions

View File

@@ -0,0 +1,249 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="报表" prop="relId">
<el-input v-model="queryParams.relId" placeholder="请选择报表" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="学期" prop="stuYearName">
<el-select v-model="queryParams.stuYearName" clearable placeholder="请选择学期">
<el-option
v-for="item in yearOptions"
:key="item.stuYearName"
:label="item.stuYearName"
:value="item.stuYearName"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['diagnostic:eligibility:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['diagnostic:eligibility:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['diagnostic:eligibility:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['diagnostic:eligibility:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="eligibilityList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="eliId" />
<el-table-column label="报表" align="center" prop="name" />
<el-table-column label="学期" align="center" prop="stuYearName" />
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['diagnostic:eligibility:edit']"
>填写合格标准</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['diagnostic:eligibility:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listEligibility, getEligibility, delEligibility, addEligibility, updateEligibility } from "@/api/diagnostic/eligibility";
export default {
name: "Eligibility",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 合格标准表格数据
eligibilityList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
//学期数据
yearOptions:[],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
relId: null,
stuYearName: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询合格标准列表 */
getList() {
this.loading = true;
listEligibility(this.queryParams).then(response => {
this.eligibilityList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
eliId: null,
relId: null,
stuYearName: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.eliId)
this.single = selection.length!==1
this.multiple = !selection.length
},
listAllYear(){
list().then(res=>{
this.yearOptions = res.data;
})
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加合格标准";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const eliId = row.eliId || this.ids
getEligibility(eliId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改合格标准";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.eliId != null) {
updateEligibility(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addEligibility(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const eliIds = row.eliId || this.ids;
this.$modal.confirm('是否确认删除合格标准编号为"' + eliIds + '"的数据项?').then(function() {
return delEligibility(eliIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('diagnostic/eligibility/export', {
...this.queryParams
}, `eligibility_${new Date().getTime()}.xlsx`)
}
}
};
</script>