代码格式修改
This commit is contained in:
@@ -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="岗位id" prop="postId">
|
||||
<el-input v-model="queryParams.postId" placeholder="请输入岗位id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
@@ -11,14 +11,15 @@
|
||||
<el-input v-model="queryParams.newCount" placeholder="请输入新的岗位人数" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间" prop="applyTime">
|
||||
<el-date-picker clearable v-model="queryParams.applyTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择提交时间">
|
||||
</el-date-picker>
|
||||
<el-date-picker v-model="queryParams.applyTime" clearable type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择提交时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="applyStatus">
|
||||
<el-select v-model="queryParams.applyStatus" placeholder="请选择审核状态" clearable>
|
||||
<el-option v-for="dict in dict.type.qgzx_apply_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门领导工号" prop="deptNo">
|
||||
@@ -47,22 +48,26 @@
|
||||
|
||||
<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="['workstudy:change:add']">新增</el-button>
|
||||
<el-button v-hasPermi="['workstudy:change:add']" type="primary" plain icon="el-icon-plus" size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</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="['workstudy:change:edit']">修改</el-button>
|
||||
<el-button v-hasPermi="['workstudy:change:edit']" type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
|
||||
@click="handleUpdate"
|
||||
>修改</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="['workstudy:change:remove']">删除</el-button>
|
||||
<el-button v-hasPermi="['workstudy:change:remove']" type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['workstudy:change:export']">导出</el-button>
|
||||
<el-button v-hasPermi="['workstudy:change:export']" type="warning" plain icon="el-icon-download" size="mini"
|
||||
@click="handleExport"
|
||||
>导出</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="changeList" @selection-change="handleSelectionChange">
|
||||
@@ -90,16 +95,19 @@
|
||||
<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="['workstudy:change:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['workstudy:change:remove']">删除</el-button>
|
||||
<el-button v-hasPermi="['workstudy:change:edit']" size="mini" type="text" icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button v-hasPermi="['workstudy:change:remove']" size="mini" type="text" icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</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" />
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改勤工助学岗位修改人数对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
@@ -114,14 +122,15 @@
|
||||
<el-input v-model="form.newCount" placeholder="请输入新的岗位人数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间" prop="applyTime">
|
||||
<el-date-picker clearable v-model="form.applyTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择提交时间">
|
||||
</el-date-picker>
|
||||
<el-date-picker v-model="form.applyTime" clearable type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择提交时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="applyStatus">
|
||||
<el-select v-model="form.applyStatus" placeholder="请选择审核状态">
|
||||
<el-option v-for="dict in dict.type.qgzx_apply_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门领导工号" prop="deptNo">
|
||||
@@ -155,10 +164,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listChange, getChange, delChange, addChange, updateChange } from "@/api/workstudy/change";
|
||||
import { listChange, getChange, delChange, addChange, updateChange } from '@/api/workstudy/change'
|
||||
|
||||
export default {
|
||||
name: "Change",
|
||||
name: 'Change',
|
||||
dicts: ['qgzx_apply_status'],
|
||||
data() {
|
||||
return {
|
||||
@@ -177,7 +186,7 @@ export default {
|
||||
// 勤工助学岗位修改人数表格数据
|
||||
changeList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
@@ -202,28 +211,28 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
delFlag: [
|
||||
{ required: true, message: "删除标志不能为空", trigger: "blur" }
|
||||
{ required: true, message: '删除标志不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询勤工助学岗位修改人数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
listChange(this.queryParams).then(response => {
|
||||
this.changeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.changeList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@@ -246,18 +255,18 @@ export default {
|
||||
updateTime: null,
|
||||
delFlag: null,
|
||||
status: 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) {
|
||||
@@ -267,49 +276,49 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加勤工助学岗位修改人数";
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '添加勤工助学岗位修改人数'
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.reset()
|
||||
const id = row.id || this.ids
|
||||
getChange(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) {
|
||||
updateChange(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addChange(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 delChange(ids);
|
||||
return delChange(ids)
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
}).catch(() => { })
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@@ -318,5 +327,5 @@ export default {
|
||||
}, `change_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user