代码格式修改

This commit is contained in:
2025-10-18 17:13:04 +08:00
parent b9224ed8bb
commit 81017eb280
837 changed files with 102784 additions and 98409 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
<el-form-item label="报表" prop="relId">
<el-input v-model="queryParams.relId" placeholder="请选择报表" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
@@ -11,8 +11,7 @@
:key="item.stuYearName"
:label="item.stuYearName"
:value="item.stuYearName"
>
</el-option>
/>
</el-select>
</el-form-item>
<el-form-item>
@@ -24,47 +23,47 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
v-hasPermi="['diagnostic:eligibility:add']"
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
v-hasPermi="['diagnostic:eligibility:edit']"
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
v-hasPermi="['diagnostic:eligibility:remove']"
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
v-hasPermi="['diagnostic:eligibility:export']"
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>
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row>
<el-table v-loading="loading" :data="eligibilityList" @selection-change="handleSelectionChange">
@@ -76,18 +75,18 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-hasPermi="['diagnostic:eligibility:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['diagnostic:eligibility:edit']"
>填写合格标准</el-button>
<el-button
v-hasPermi="['diagnostic:eligibility:remove']"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['diagnostic:eligibility:remove']"
>删除</el-button>
</template>
</el-table-column>
@@ -104,10 +103,10 @@
</template>
<script>
import { listEligibility, getEligibility, delEligibility, addEligibility, updateEligibility } from "@/api/diagnostic/eligibility";
import { listEligibility, getEligibility, delEligibility, addEligibility, updateEligibility } from '@/api/diagnostic/eligibility'
export default {
name: "Eligibility",
name: 'Eligibility',
data() {
return {
// 遮罩层
@@ -125,7 +124,7 @@ export default {
// 合格标准表格数据
eligibilityList: [],
// 弹出层标题
title: "",
title: '',
// 是否显示弹出层
open: false,
//学期数据
@@ -142,25 +141,25 @@ export default {
// 表单校验
rules: {
}
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
/** 查询合格标准列表 */
getList() {
this.loading = true;
this.loading = true
listEligibility(this.queryParams).then(response => {
this.eligibilityList = response.rows;
this.total = response.total;
this.loading = false;
});
this.eligibilityList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
this.open = false
this.reset()
},
// 表单重置
reset() {
@@ -168,18 +167,18 @@ export default {
eliId: null,
relId: null,
stuYearName: null
};
this.resetForm("form");
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
@@ -189,54 +188,54 @@ export default {
},
listAllYear(){
list().then(res=>{
this.yearOptions = res.data;
this.yearOptions = res.data
})
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加合格标准";
this.reset()
this.open = true
this.title = '添加合格标准'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.reset()
const eliId = row.eliId || this.ids
getEligibility(eliId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改合格标准";
});
this.form = response.data
this.open = true
this.title = '修改合格标准'
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
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();
});
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addEligibility(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete(row) {
const eliIds = row.eliId || this.ids;
const eliIds = row.eliId || this.ids
this.$modal.confirm('是否确认删除合格标准编号为"' + eliIds + '"的数据项?').then(function() {
return delEligibility(eliIds);
return delEligibility(eliIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
@@ -245,5 +244,5 @@ export default {
}, `eligibility_${new Date().getTime()}.xlsx`)
}
}
};
}
</script>