解决合并冲突
This commit is contained in:
1416
openhis-ui-vue3/src/views/gf/ratioApplicationRecord/index.vue
Normal file
1416
openhis-ui-vue3/src/views/gf/ratioApplicationRecord/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
664
openhis-ui-vue3/src/views/gf/ratioManage/index.vue
Normal file
664
openhis-ui-vue3/src/views/gf/ratioManage/index.vue
Normal file
@@ -0,0 +1,664 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-row class="section-title">公费医疗自付总体比例</el-row>
|
||||
<el-form :inline="true" label-width="68px">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Edit" @click="handleEdit">修改</el-button>
|
||||
<el-button icon="Refresh" @click="resetTypeQuery">刷新</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="typeLoading" :data="typeRatioList" height="600" stripe>
|
||||
<el-table-column label="医保分项编码" prop="ybClass" :show-overflow-tooltip="true" align="center" />
|
||||
<el-table-column label="医保分项名称" prop="ybClassName" :show-overflow-tooltip="true" align="center" />
|
||||
<el-table-column label="医保等级" prop="ybLvName" :show-overflow-tooltip="true" align="center" />
|
||||
<!-- 自付比例列 -->
|
||||
<el-table-column label="自付比例" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.selfRatio !== null && scope.row.selfRatio !== undefined && scope.row.selfRatio !== ''">
|
||||
{{ scope.row.selfRatio }}%
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-row class="section-title">单个药品/诊疗现行自付比例</el-row>
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="68px">
|
||||
<el-form-item label="项目" prop="searchKey">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="项目编号/项目名称/医保编码" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目分类" prop="itemType" label-width="100">
|
||||
<el-select v-model="queryParams.itemType" clearable style="width: 200px;">
|
||||
<el-option label="药品" value="1"></el-option>
|
||||
<el-option label="诊疗" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetIndividualQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="individualLoading" :data="individualRatioList">
|
||||
<el-table-column label="项目编号" prop="busNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目名称" prop="name" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="医保编码" width="250">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.ybNo !== null && scope.row.ybNo !== undefined && scope.row.ybNo !== ''">
|
||||
{{ scope.row.ybNo }}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目分类" prop="itemTypeName" :show-overflow-tooltip="true" width="110" align="center" />
|
||||
<el-table-column label="医保等级" prop="chrgitmLvName" :show-overflow-tooltip="true" width="110" align="center" />
|
||||
<!-- 自付比例列 -->
|
||||
<el-table-column label="自付比例" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.selfRatio !== null && scope.row.selfRatio !== undefined && scope.row.selfRatio !== ''">
|
||||
{{ scope.row.selfRatio }}%
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 二次自付比例列 -->
|
||||
<el-table-column label="二次自付比例" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.twiceRatio !== null && scope.row.twiceRatio !== undefined && scope.row.twiceRatio !== ''">
|
||||
{{ scope.row.twiceRatio }}%
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="startDate" :show-overflow-tooltip="true" align="center" />
|
||||
<el-table-column label="结束时间" prop="endDate" :show-overflow-tooltip="true" align="center" />
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="individualTotal > 0" :total="individualTotal" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getIndividualList" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 修改对话框 -->
|
||||
<el-dialog title="修改总体自付比例" v-model="typeRatioOpen" width="1000px" append-to-body>
|
||||
<el-form ref="typeRatioRef" :model="typeRatioForm" :rules="rules" label-width="180px">
|
||||
<el-row :gutter="20">
|
||||
<!-- 左侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="床位费比例(甲类)" prop="a01ratio">
|
||||
<el-input v-model="typeRatioForm.a01ratio" placeholder="请输入床位费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="诊察费比例(甲类)" prop="a02ratio">
|
||||
<el-input v-model="typeRatioForm.a02ratio" placeholder="请输入诊察费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查费比例(甲类)" prop="a03ratio">
|
||||
<el-input v-model="typeRatioForm.a03ratio" placeholder="请输入检查费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="化验费比例(甲类)" prop="a04ratio">
|
||||
<el-input v-model="typeRatioForm.a04ratio" placeholder="请输入化验费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="治疗费比例(甲类)" prop="a05ratio">
|
||||
<el-input v-model="typeRatioForm.a05ratio" placeholder="请输入治疗费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手术费比例(甲类)" prop="a06ratio">
|
||||
<el-input v-model="typeRatioForm.a06ratio" placeholder="请输入手术费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理费比例(甲类)" prop="a07ratio">
|
||||
<el-input v-model="typeRatioForm.a07ratio" placeholder="请输入护理费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="卫生材料费比例(甲类)" prop="a08ratio">
|
||||
<el-input v-model="typeRatioForm.a08ratio" placeholder="请输入卫生材料费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="西药费比例(甲类)" prop="a09ratio">
|
||||
<el-input v-model="typeRatioForm.a09ratio" placeholder="请输入西药费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中药饮片费比例(甲类)" prop="a10ratio">
|
||||
<el-input v-model="typeRatioForm.a10ratio" placeholder="请输入中药饮片费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中成药费比例(甲类)" prop="a11ratio">
|
||||
<el-input v-model="typeRatioForm.a11ratio" placeholder="请输入中成药费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="一般诊疗费比例(甲类)" prop="a12ratio">
|
||||
<el-input v-model="typeRatioForm.a12ratio" placeholder="请输入一般诊疗费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="挂号费比例(甲类)" prop="a13ratio">
|
||||
<el-input v-model="typeRatioForm.a13ratio" placeholder="请输入挂号费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他费比例(甲类)" prop="a14ratio">
|
||||
<el-input v-model="typeRatioForm.a14ratio" placeholder="请输入其他费比例(甲类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="床位费比例(乙类)" prop="b01ratio">
|
||||
<el-input v-model="typeRatioForm.b01ratio" placeholder="请输入床位费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="诊察费比例(乙类)" prop="b02ratio">
|
||||
<el-input v-model="typeRatioForm.b02ratio" placeholder="请输入诊察费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查费比例(乙类)" prop="b03ratio">
|
||||
<el-input v-model="typeRatioForm.b03ratio" placeholder="请输入检查费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="化验费比例(乙类)" prop="b04ratio">
|
||||
<el-input v-model="typeRatioForm.b04ratio" placeholder="请输入化验费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="治疗费比例(乙类)" prop="b05ratio">
|
||||
<el-input v-model="typeRatioForm.b05ratio" placeholder="请输入治疗费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手术费比例(乙类)" prop="b06ratio">
|
||||
<el-input v-model="typeRatioForm.b06ratio" placeholder="请输入手术费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理费比例(乙类)" prop="b07ratio">
|
||||
<el-input v-model="typeRatioForm.b07ratio" placeholder="请输入护理费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="卫生材料费比例(乙类)" prop="b08ratio">
|
||||
<el-input v-model="typeRatioForm.b08ratio" placeholder="请输入卫生材料费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="西药费比例(乙类)" prop="b09ratio">
|
||||
<el-input v-model="typeRatioForm.b09ratio" placeholder="请输入西药费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中药饮片费比例(乙类)" prop="b10ratio">
|
||||
<el-input v-model="typeRatioForm.b10ratio" placeholder="请输入中药饮片费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中成药费比例(乙类)" prop="b11ratio">
|
||||
<el-input v-model="typeRatioForm.b11ratio" placeholder="请输入中成药费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="一般诊疗费比例(乙类)" prop="b12ratio">
|
||||
<el-input v-model="typeRatioForm.b12ratio" placeholder="请输入一般诊疗费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="挂号费比例(乙类)" prop="b13ratio">
|
||||
<el-input v-model="typeRatioForm.b13ratio" placeholder="请输入挂号费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他费比例(乙类)" prop="b14ratio">
|
||||
<el-input v-model="typeRatioForm.b14ratio" placeholder="请输入其他费比例(乙类)" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="GfRatioManage">
|
||||
import {
|
||||
getTypeRatioList,
|
||||
saveTypeRatioList,
|
||||
getIndividualRatioPage
|
||||
} from "@/api/gf/ratioManage";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const typeRatioOpen = ref(false);
|
||||
const showSearch = ref(true);
|
||||
const individualRatioList = ref([]);
|
||||
const individualLoading = ref(true);
|
||||
const individualTotal = ref(0);
|
||||
const individualDateRange = ref([]);
|
||||
const typeRatioList = ref([]);
|
||||
const typeLoading = ref(true);
|
||||
const typeDateRange = ref([]);
|
||||
|
||||
// 验证规则
|
||||
const validateRatio = (rule, value, callback) => {
|
||||
if (value === '' || value === null) {
|
||||
return callback(new Error('自付比例不能为空'));
|
||||
}
|
||||
const numValue = parseFloat(value);
|
||||
if (isNaN(numValue)) {
|
||||
return callback(new Error('请输入有效数字'));
|
||||
}
|
||||
if (numValue < 0 || numValue > 100) {
|
||||
return callback(new Error('自付比例必须在0~100之间'));
|
||||
}
|
||||
// 验证小数位(可选)
|
||||
if (value.toString().includes('.') && value.toString().split('.')[1].length > 2) {
|
||||
return callback(new Error('最多保留两位小数'));
|
||||
}
|
||||
callback();
|
||||
};
|
||||
|
||||
const data = reactive({
|
||||
typeRatioForm: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
itemType: undefined,
|
||||
},
|
||||
rules: {
|
||||
a01ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b01ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a02ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b02ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a03ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b03ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a04ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b04ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a05ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b05ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a06ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b06ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a07ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b07ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a08ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b08ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a09ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b09ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a10ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b10ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a11ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b11ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a12ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b12ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a13ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b13ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
a14ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
b14ratio: [
|
||||
{ pattern: /^\d*(\.\d{0,2})?$/, message: '请输入数字,最多保留两位小数', trigger: 'blur' },
|
||||
{ validator: validateRatio, trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, typeRatioForm, rules } = toRefs(data);
|
||||
|
||||
/** 查询单项比例分页 */
|
||||
function getIndividualList() {
|
||||
individualLoading.value = true;
|
||||
getIndividualRatioPage(proxy.addDateRange(queryParams.value, individualDateRange.value)).then(response => {
|
||||
individualRatioList.value = response.data.records;
|
||||
individualTotal.value = response.data.total;
|
||||
individualLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询单项比例分页 */
|
||||
function getTypeList() {
|
||||
typeLoading.value = true;
|
||||
getTypeRatioList(proxy.addDateRange(queryParams.value, typeDateRange.value)).then(response => {
|
||||
typeRatioList.value = response.data;
|
||||
typeLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 刷新按钮操作 */
|
||||
function resetTypeQuery() {
|
||||
getTypeList();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getIndividualList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetIndividualQuery() {
|
||||
individualDateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 修改总体比例 */
|
||||
function handleEdit() {
|
||||
typeRatioOpen.value = true;
|
||||
getTypeRatioList(proxy.addDateRange(queryParams.value, typeDateRange.value)).then(response => {
|
||||
typeRatioList.value = response.data;
|
||||
for (const r of typeRatioList.value) {
|
||||
if (r.ybClass == '01' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a01ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '01' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b01ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '02' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a02ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '02' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b02ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '03' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a03ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '03' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b03ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '04' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a04ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '04' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b04ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '05' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a05ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '05' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b05ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '06' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a06ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '06' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b06ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '07' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a07ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '07' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b07ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '08' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a08ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '08' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b08ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '09' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a09ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '09' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b09ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '10' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a10ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '10' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b10ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '11' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a11ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '11' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b11ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '12' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a12ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '12' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b12ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '13' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a13ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '13' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b13ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '14' && r.ybLv == '1') {
|
||||
typeRatioForm.value.a14ratio = r.selfRatio
|
||||
}
|
||||
if (r.ybClass == '14' && r.ybLv == '2') {
|
||||
typeRatioForm.value.b14ratio = r.selfRatio
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
let form = {
|
||||
typeRatioList: [{
|
||||
ybClass: "01",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a01ratio
|
||||
}, {
|
||||
ybClass: "01",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b01ratio
|
||||
}, {
|
||||
ybClass: "02",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a02ratio
|
||||
}, {
|
||||
ybClass: "02",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b02ratio
|
||||
}, {
|
||||
ybClass: "03",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a03ratio
|
||||
}, {
|
||||
ybClass: "03",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b03ratio
|
||||
}, {
|
||||
ybClass: "04",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a04ratio
|
||||
}, {
|
||||
ybClass: "04",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b04ratio
|
||||
}, {
|
||||
ybClass: "05",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a05ratio
|
||||
}, {
|
||||
ybClass: "05",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b05ratio
|
||||
}, {
|
||||
ybClass: "06",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a06ratio
|
||||
}, {
|
||||
ybClass: "06",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b06ratio
|
||||
}, {
|
||||
ybClass: "07",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a07ratio
|
||||
}, {
|
||||
ybClass: "07",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b07ratio
|
||||
}, {
|
||||
ybClass: "08",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a08ratio
|
||||
}, {
|
||||
ybClass: "08",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b08ratio
|
||||
}, {
|
||||
ybClass: "09",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a09ratio
|
||||
}, {
|
||||
ybClass: "09",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b09ratio
|
||||
}, {
|
||||
ybClass: "10",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a10ratio
|
||||
}, {
|
||||
ybClass: "10",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b10ratio
|
||||
}, {
|
||||
ybClass: "11",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a11ratio
|
||||
}, {
|
||||
ybClass: "11",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b11ratio
|
||||
}, {
|
||||
ybClass: "12",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a12ratio
|
||||
}, {
|
||||
ybClass: "12",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b12ratio
|
||||
}, {
|
||||
ybClass: "13",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a13ratio
|
||||
}, {
|
||||
ybClass: "13",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b13ratio
|
||||
}, {
|
||||
ybClass: "14",
|
||||
ybLv: "1",
|
||||
selfRatio: typeRatioForm.value.a14ratio
|
||||
}, {
|
||||
ybClass: "14",
|
||||
ybLv: "2",
|
||||
selfRatio: typeRatioForm.value.b14ratio
|
||||
}]
|
||||
}
|
||||
proxy.$refs["typeRatioRef"].validate(valid => {
|
||||
if (valid) {
|
||||
saveTypeRatioList(form).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
typeRatioOpen.value = false;
|
||||
getTypeList();
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
getIndividualList();
|
||||
getTypeList();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20px 15px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
margin-bottom: 0;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.grid-item :deep(.el-input) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 描述文本样式 */
|
||||
.item-description {
|
||||
font-size: 12px;
|
||||
color: #7f8c8d;
|
||||
margin-top: 8px;
|
||||
line-height: 1.4;
|
||||
padding: 5px;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin-bottom: 20px;
|
||||
font-weight: 550;
|
||||
font-size: 18px;
|
||||
color: #515A6E;
|
||||
}
|
||||
</style>
|
||||
459
openhis-ui-vue3/src/views/gf/studentList/index.vue
Normal file
459
openhis-ui-vue3/src/views/gf/studentList/index.vue
Normal file
@@ -0,0 +1,459 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="68px">
|
||||
<el-form-item label="学生" prop="searchKey">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="学号/姓名/身份证号" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="在校状态" prop="studentStatus" label-width="100">
|
||||
<el-select v-model="queryParams.studentStatus" clearable style="width: 200px;">
|
||||
<el-option v-for="dict in student_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="体检结果" prop="physicalExamResult" label-width="100">
|
||||
<el-select v-model="queryParams.physicalExamResult" clearable style="width: 200px;">
|
||||
<el-option v-for="dict in physical_exam_result" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @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="Plus" @click="handleAdd">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格数据 -->
|
||||
<el-table v-loading="loading" :data="studentList">
|
||||
<el-table-column label="学号" prop="studentId" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="姓名" prop="name" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="性别" prop="gender_dictText" :show-overflow-tooltip="true" width="70" align="center" />
|
||||
<el-table-column label="年龄" prop="age" :show-overflow-tooltip="true" width="70" align="center" />
|
||||
<el-table-column label="身份证号" prop="idNumber" :show-overflow-tooltip="true" width="200" />
|
||||
<el-table-column label="电话" prop="phone" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="学院" prop="college" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="专业" prop="major" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="年级" prop="grade" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="学历层次" prop="educationLevel_dictText" :show-overflow-tooltip="true" width="120"
|
||||
align="center" />
|
||||
<el-table-column label="入校时间" prop="enrollmentDate" :show-overflow-tooltip="true" width="120" align="center" />
|
||||
<el-table-column label="离校时间" prop="graduationDate" :show-overflow-tooltip="true" width="120" align="center" />
|
||||
<el-table-column label="学习形式" prop="studyMode_dictText" :show-overflow-tooltip="true" width="120"
|
||||
align="center" />
|
||||
<el-table-column label="在校状态" prop="studentStatus_dictText" :show-overflow-tooltip="true" width="100"
|
||||
align="center" />
|
||||
<el-table-column label="体检结果" prop="physicalExamResult_dictText" :show-overflow-tooltip="true" width="120"
|
||||
align="center" />
|
||||
<el-table-column label="辅导员" width="120">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.counselor !== null && scope.row.counselor !== undefined && scope.row.counselor !== ''">
|
||||
{{ scope.row.counselor }}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="辅导员电话" width="170">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.counselorPhone !== null && scope.row.counselorPhone !== undefined && scope.row.counselorPhone !== ''">
|
||||
{{ scope.row.counselorPhone }}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="编辑" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">编辑</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="700px" append-to-body>
|
||||
<el-form ref="studentListRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
<!-- 左侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学号" prop="studentId">
|
||||
<el-input v-model="form.studentId" placeholder="请输入学号" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-radio-group v-model="form.gender">
|
||||
<el-radio v-for="dict in sys_user_sex" :key="dict.value" :label="dict.value">
|
||||
{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input :disabled="true" v-model="form.age" placeholder="根据身份证自动计算,无需填写" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入电话" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="college">
|
||||
<el-input v-model="form.college" placeholder="请输入学院" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专业" prop="major">
|
||||
<el-input v-model="form.major" placeholder="请输入专业" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧列 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年级" prop="grade">
|
||||
<el-input v-model="form.grade" placeholder="请输入年级" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学历层次" prop="educationLevel">
|
||||
<el-select v-model="form.educationLevel" clearable style="width: 100%">
|
||||
<el-option v-for="dict in education_level" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入校时间" prop="enrollmentDate">
|
||||
<el-date-picker v-model="form.enrollmentDate" type="date" placeholder="请选择入校时间" value-format="YYYY-MM-DD"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="离校时间" prop="graduationDate">
|
||||
<el-date-picker v-model="form.graduationDate" type="date" placeholder="请选择离校时间" value-format="YYYY-MM-DD"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="学习形式" prop="studyMode">
|
||||
<el-select v-model="form.studyMode" clearable style="width: 100%">
|
||||
<el-option v-for="dict in study_mode" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="在校状态" prop="studentStatus">
|
||||
<el-select v-model="form.studentStatus" clearable style="width: 100%">
|
||||
<el-option v-for="dict in student_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="体检结果" prop="physicalExamResult">
|
||||
<el-select v-model="form.physicalExamResult" clearable style="width: 100%">
|
||||
<el-option v-for="dict in physical_exam_result" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="辅导员" prop="counselor">
|
||||
<el-input v-model="form.counselor" placeholder="请输入辅导员" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="辅导员电话" prop="counselorPhone">
|
||||
<el-input v-model="form.counselorPhone" placeholder="请输入辅导员电话" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 导入对话框 -->
|
||||
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="GfStudentList">
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
getPage,
|
||||
getDetail,
|
||||
add,
|
||||
edit,
|
||||
remove
|
||||
} from "@/api/gf/studentList";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
sys_user_sex,
|
||||
education_level,
|
||||
study_mode,
|
||||
student_status,
|
||||
physical_exam_result
|
||||
} = proxy.useDict(
|
||||
"sys_user_sex",
|
||||
"education_level",
|
||||
"study_mode",
|
||||
"student_status",
|
||||
"physical_exam_result",
|
||||
);
|
||||
|
||||
const studentList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
|
||||
/*** 器材目录导入参数 */
|
||||
const upload = reactive({
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/nenu/gf-student-list/import-data"
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
studentStatus: undefined,
|
||||
physicalExamResult: undefined,
|
||||
},
|
||||
rules: {
|
||||
studentId: [
|
||||
{ required: true, message: "学号不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: "性别不能为空", trigger: "blur" }
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: "身份证号不能为空", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "电话不能为空", trigger: "blur" }
|
||||
],
|
||||
college: [
|
||||
{ required: true, message: "学院不能为空", trigger: "blur" }
|
||||
],
|
||||
major: [
|
||||
{ required: true, message: "专业不能为空", trigger: "blur" }
|
||||
],
|
||||
grade: [
|
||||
{ required: true, message: "年级不能为空", trigger: "blur" }
|
||||
],
|
||||
educationLevel: [
|
||||
{ required: true, message: "学历层次不能为空", trigger: "blur" }
|
||||
],
|
||||
enrollmentDate: [
|
||||
{ required: true, message: "入校时间不能为空", trigger: "blur" }
|
||||
],
|
||||
graduationDate: [
|
||||
{ required: true, message: "离校时间不能为空", trigger: "blur" }
|
||||
],
|
||||
studyMode: [
|
||||
{ required: true, message: "学习形式不能为空", trigger: "blur" }
|
||||
],
|
||||
studentStatus: [
|
||||
{ required: true, message: "在校状态不能为空", trigger: "blur" }
|
||||
],
|
||||
physicalExamResult: [
|
||||
{ required: true, message: "体检结果不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询学生名单 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getPage(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
||||
studentList.value = response.data.records;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
/** 重置新增的表单以及其他数据 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
gender: undefined,
|
||||
age: undefined,
|
||||
studentId: undefined,
|
||||
idNumber: undefined,
|
||||
phone: undefined,
|
||||
college: undefined,
|
||||
major: undefined,
|
||||
educationLevel: undefined,
|
||||
enrollmentDate: undefined,
|
||||
graduationDate: undefined,
|
||||
grade: undefined,
|
||||
studyMode: undefined,
|
||||
studentStatus: undefined,
|
||||
physicalExamResult: undefined,
|
||||
counselor: undefined,
|
||||
counselorPhone: undefined,
|
||||
patientId: undefined,
|
||||
};
|
||||
proxy.resetForm("studentListRef");
|
||||
}
|
||||
/** 添加学生 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加学生信息";
|
||||
}
|
||||
/** 修改学生 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
getDetail(row.id).then(response => {
|
||||
form.value = response.data;
|
||||
//字典str与实际值num不匹配导致无法回显加了这个
|
||||
form.value.gender = response.data.gender.toString()
|
||||
form.value.educationLevel = response.data.educationLevel.toString()
|
||||
form.value.studyMode = response.data.studyMode.toString()
|
||||
form.value.studentStatus = response.data.studentStatus.toString()
|
||||
form.value.physicalExamResult = response.data.physicalExamResult.toString()
|
||||
open.value = true;
|
||||
title.value = "修改学生信息";
|
||||
});
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["studentListRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
edit(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
add(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
/** 导入按钮操作 */
|
||||
function handleImport() {
|
||||
upload.title = '学生名单导入';
|
||||
upload.open = true;
|
||||
}
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download('/nenu/gf-student-list/import-template', {}, `student_template_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
/**文件上传中处理 */
|
||||
const handleFileUploadProgress = (event, file, fileList) => {
|
||||
upload.isUploading = true;
|
||||
};
|
||||
/** 文件上传成功处理 */
|
||||
const handleFileSuccess = (response, file, fileList) => {
|
||||
upload.open = false;
|
||||
upload.isUploading = false;
|
||||
proxy.$refs['uploadRef'].handleRemove(file);
|
||||
proxy.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
'</div>',
|
||||
'导入结果',
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
getList();
|
||||
};
|
||||
/** 提交上传文件 */
|
||||
function submitFileForm() {
|
||||
proxy.$refs['uploadRef'].submit();
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20px 15px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
margin-bottom: 0;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.grid-item :deep(.el-input) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 描述文本样式 */
|
||||
.item-description {
|
||||
font-size: 12px;
|
||||
color: #7f8c8d;
|
||||
margin-top: 8px;
|
||||
line-height: 1.4;
|
||||
padding: 5px;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user