代码格式修改

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,11 +1,11 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="学号" prop="studentId">
@@ -27,13 +27,12 @@
<el-form-item label="申请时间" prop="stuCreated">
<el-date-picker
clearable
v-model="queryParams.stuCreated"
clearable
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请时间"
>
</el-date-picker>
/>
</el-form-item>
<el-form-item label="学院" prop="college">
@@ -53,11 +52,8 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
>搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@@ -87,31 +83,29 @@
</el-col> -->
<el-col :span="1.5">
<el-button
v-hasPermi="['routine:school:remove']"
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['routine:school:remove']"
>删除</el-button
>
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['routine:school:export']"
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['routine:school:export']"
>导出</el-button
>
>导出</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
:show-search.sync="showSearch"
@queryTable="getList"
></right-toolbar>
/>
</el-row>
<el-table
@@ -145,12 +139,8 @@
<template slot-scope="scope">
<!-- 审批状态(0待审批;1已通过; -->
<el-tag v-if="scope.row.status == 0">待审批</el-tag>
<el-tag type="success" v-else-if="scope.row.status == 1"
>已通过</el-tag
>
<el-tag type="danger" v-else-if="scope.row.status == 2"
>已驳回</el-tag
>
<el-tag v-else-if="scope.row.status == 1" type="success">已通过</el-tag>
<el-tag v-else-if="scope.row.status == 2" type="danger">已驳回</el-tag>
</template>
</el-table-column>
@@ -166,12 +156,8 @@
<template slot-scope="scope">
<!-- 审批状态(0待审批;1已通过; -->
<el-tag v-if="scope.row.xgstatus == 0 || scope.row.xgstatus == null ">待审批</el-tag>
<el-tag type="success" v-else-if="scope.row.xgstatus == 1"
>已通过</el-tag
>
<el-tag type="danger" v-else-if="scope.row.xgstatus == 2"
>已驳回</el-tag
>
<el-tag v-else-if="scope.row.xgstatus == 1" type="success">已通过</el-tag>
<el-tag v-else-if="scope.row.xgstatus == 2" type="danger">已驳回</el-tag>
</template>
</el-table-column>
@@ -182,22 +168,20 @@
>
<template slot-scope="scope">
<el-button
v-if="scope.row.status == 1 && (scope.row.xgstatus == 0 || scope.row.xgstatus == null)"
v-hasPermi="['routine:school:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['routine:school:edit']"
v-if="scope.row.status == 1 && (scope.row.xgstatus == 0 || scope.row.xgstatus == null)"
>学工审批</el-button
>
>学工审批</el-button>
<el-button
v-hasPermi="['routine:school:remove']"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['routine:school:remove']"
>删除</el-button
>
>删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -222,14 +206,13 @@
</el-form-item>
<el-form-item label="申请时间" prop="stuCreated">
<el-date-picker
clearable
v-model="form.stuCreated"
clearable
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请时间"
:disabled="true"
>
</el-date-picker>
/>
</el-form-item>
<el-form-item label="身份证" prop="identityCard">
<el-input
@@ -273,8 +256,7 @@
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
/>
</el-select>
</el-form-item>
</el-form>
@@ -293,10 +275,10 @@ import {
delSchool,
addSchool,
updateSchool,
} from "@/api/routine/school";
} from '@/api/routine/school'
export default {
name: "School",
name: 'School',
dicts: ['rt_filling_college', 'sys_commit_status', 'sys_teacher_kpi_filling_year'],
data() {
return {
@@ -304,11 +286,11 @@ export default {
options: [
{
value: 1,
label: "通过",
label: '通过',
},
{
value: 2,
label: "驳回",
label: '驳回',
},
],
// 遮罩层
@@ -326,7 +308,7 @@ export default {
// 测试表格数据
schoolList: [],
// 弹出层标题
title: "",
title: '',
// 是否显示弹出层
open: false,
// 查询参数
@@ -365,38 +347,38 @@ export default {
// 表单校验
rules: {
reason1: [
{ required: true, message: "请输入审批人姓名", trigger: "blur" },
{ required: true, message: '请输入审批人姓名', trigger: 'blur' },
],
reason2: [
{ required: true, message: "请输入学工意见", trigger: "blur" },
{ required: true, message: '请输入学工意见', trigger: 'blur' },
],
reason3: [
{ required: true, message: "请选择是否通过", trigger: "blur" },
{ required: true, message: '请选择是否通过', trigger: 'blur' },
],
reason4: [
{ required: true, message: "选择时间", trigger: "blur" },
{ required: true, message: '选择时间', trigger: 'blur' },
],
},
};
}
},
created() {
this.getList();
this.getList()
},
methods: {
/** 查询测试列表 */
getList() {
this.loading = true;
this.loading = true
listSchool(this.queryParams).then((response) => {
this.schoolList = response.rows;
this.total = response.total;
this.loading = false;
});
this.schoolList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
this.open = false
this.reset()
},
// 表单重置
reset() {
@@ -425,85 +407,85 @@ export default {
className: null,
fdname: null,
xgname: 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) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
this.ids = selection.map((item) => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加测试";
this.reset()
this.open = true
this.title = '添加测试'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
this.reset()
const id = row.id || this.ids
getSchool(id).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.id != null) {
updateSchool(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addSchool(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
const ids = row.id || this.ids
this.$modal
.confirm('是否确认删除测试编号为"' + ids + '"的数据项?')
.then(function () {
return delSchool(ids);
return delSchool(ids)
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {});
.catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download(
"routine/school/export",
'routine/school/export',
{
...this.queryParams,
},
`school_${new Date().getTime()}.xlsx`
);
)
},
},
};
}
</script>