|
|
@@ -8,10 +8,10 @@
|
|
|
<el-form-item label="部门" prop="deptId">
|
|
|
<treeselect style="width: 250px" :default-expand-level="1" v-model="queryParams.deptId" :options="deptOptions" :normalizer="normalizer" placeholder="选择部门" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="职位" prop="position">
|
|
|
- <el-select v-model="queryParams.position" placeholder="请选择"
|
|
|
+ <el-form-item label="职位" prop="postId">
|
|
|
+ <el-select v-model="queryParams.postId" placeholder="请选择"
|
|
|
style="width: 250px">
|
|
|
- <el-option v-for="item in postOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -218,6 +218,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { listSimplePosts } from "@/api/system/post";
|
|
|
import { getEmployeeInfo } from "@/api/system/user";
|
|
|
import { listStamp, getStamp, delStamp, addStamp, updateStamp, exportStamp } from "@/api/stamp/list";
|
|
|
import { typeList } from "@/api/oa/stamp"
|
|
|
@@ -248,7 +249,7 @@ export default {
|
|
|
showSearch: true,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
- // 岗位表格数据
|
|
|
+ // 表格数据
|
|
|
StampList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
@@ -261,7 +262,7 @@ export default {
|
|
|
pageSize: 10,
|
|
|
employeeName: undefined,
|
|
|
deptId: undefined,
|
|
|
- position: undefined,
|
|
|
+ postId: undefined,
|
|
|
employeePhone: undefined,
|
|
|
stampTitle: undefined,
|
|
|
status: undefined,
|
|
|
@@ -320,6 +321,11 @@ export default {
|
|
|
listDept().then(response => {
|
|
|
this.deptOptions = this.handleTree(response.data, "id");
|
|
|
});
|
|
|
+ listSimplePosts().then(response => {
|
|
|
+ // 处理 postOptions 参数
|
|
|
+ this.postOptions = [];
|
|
|
+ this.postOptions.push(...response.data);
|
|
|
+ });
|
|
|
},
|
|
|
/** 转换部门数据结构 */
|
|
|
normalizer(node) {
|
|
|
@@ -343,7 +349,7 @@ export default {
|
|
|
this.getEmployee();
|
|
|
this.singlePeopleOpen = false;
|
|
|
},
|
|
|
- /** 查询岗位列表 */
|
|
|
+ /** 查询列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
listStamp(this.queryParams).then(response => {
|
|
|
@@ -386,7 +392,7 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
- this.title = "添加岗位";
|
|
|
+ this.title = "添加";
|
|
|
},
|
|
|
handleRemove(file, fileList) {
|
|
|
console.log(file, fileList);
|
|
|
@@ -447,7 +453,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.open = true;
|
|
|
- this.title = "修改岗位";
|
|
|
+ this.title = "修改";
|
|
|
});
|
|
|
},
|
|
|
/** 详情按钮操作 */
|
|
|
@@ -485,7 +491,7 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id;
|
|
|
- this.$modal.confirm('是否确认删除岗位编号为"' + ids + '"的数据项?').then(function () {
|
|
|
+ this.$modal.confirm('是否确认删除数据项?').then(function () {
|
|
|
return delStamp(ids);
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
@@ -495,11 +501,11 @@ export default {
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
- this.$modal.confirm('是否确认导出所有岗位数据项?').then(() => {
|
|
|
+ this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
|
|
this.exportLoading = true;
|
|
|
return exportStamp(queryParams);
|
|
|
}).then(response => {
|
|
|
- this.$download.excel(response, '岗位数据.xls');
|
|
|
+ this.$download.excel(response, '用印数据.xls');
|
|
|
this.exportLoading = false;
|
|
|
}).catch(() => { });
|
|
|
}
|