Commit e6b73f6c authored by 沈翠玲's avatar 沈翠玲

用户管理

parent 4beacc48
...@@ -192,5 +192,5 @@ aside { ...@@ -192,5 +192,5 @@ aside {
} }
.el-dialog__body { .el-dialog__body {
padding: 4vh 20px !important; padding: 3vh 20px !important;
} }
\ No newline at end of file
...@@ -311,11 +311,11 @@ ...@@ -311,11 +311,11 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-divider content-position="center" v-if="title === '修改用户'" <el-divider content-position="center" v-if="title === '修改用户'" class="userdivider"
>工作单元资源</el-divider >工作单元资源</el-divider
> >
<div v-if="title === '修改用户'"> <div v-if="title === '修改用户'">
<el-card shadow="always"> <el-card shadow="always" class="usercard">
<div slot="header"> <div slot="header">
<span>工作单元</span> <span>工作单元</span>
<el-button <el-button
...@@ -415,7 +415,9 @@ export default { ...@@ -415,7 +415,9 @@ export default {
// 角色选项 // 角色选项
roleOptions: [], roleOptions: [],
// 表单参数 // 表单参数
form: {}, form: {
userId: null
},
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label"
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-table v-loading="loading" :data="workstationworkerList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="workstationworkerList" @selection-change="handleSelectionChange" :max-height="tableHeight">
<!-- <el-table-column label="岗位名称" align="center" prop="postName" /> --> <!-- <el-table-column label="岗位名称" align="center" prop="postName" /> -->
<!-- <el-table-column label="数量" align="center" prop="quantity" /> --> <!-- <el-table-column label="数量" align="center" prop="quantity" /> -->
<el-table-column label="工作单元" align="center" prop="workunitName" /> <el-table-column label="工作单元" align="center" prop="workunitName" />
...@@ -27,16 +27,6 @@ ...@@ -27,16 +27,6 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!-- <el-form-item label="岗位" prop="postId">
<el-select v-model="form.postId" placeholder="请选择岗位">
<el-option
v-for="dict in postOptions"
:key="dict.postId"
:label="dict.postName"
:value="dict.postId"
></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="工作单元" prop="nickName"> <el-form-item label="工作单元" prop="nickName">
<el-input v-model="form.workunitName" placeholder="请选择工作单元" readonly="readonly" > <el-input v-model="form.workunitName" placeholder="请选择工作单元" readonly="readonly" >
<el-button <el-button
...@@ -50,11 +40,6 @@ ...@@ -50,11 +40,6 @@
@onSelected="onworkunitSelected" @onSelected="onworkunitSelected"
></workunitSelect> ></workunitSelect>
</el-form-item> </el-form-item>
<!-- <el-form-item label="数量" prop="quantity">
<el-input-number :min="1" v-model="form.quantity" placeholder="请输入所需人员数量" />
</el-form-item> -->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
...@@ -84,6 +69,7 @@ export default { ...@@ -84,6 +69,7 @@ export default {
multiple: true, multiple: true,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
tableHeight: 0,
// 总条数 // 总条数
total: 0, total: 0,
// 工作单元表格数据 // 工作单元表格数据
...@@ -125,10 +111,21 @@ export default { ...@@ -125,10 +111,21 @@ export default {
this.getList() this.getList()
}, },
}, },
mounted(){
this.$nextTick(()=>{
this.tableHeight = window.innerHeight - 550
})
},
methods: { methods: {
/** 查询工作单元列表 */ /** 查询工作单元列表 */
getList() { getList() {
this.loading = true; this.loading = true;
console.log('this.userId', this.userId)
this.queryParams = {
pageNum: 1,
pageSize: 10,
userId: this.userId
}
listWorkunituser(this.queryParams).then(response => { listWorkunituser(this.queryParams).then(response => {
this.workstationworkerList = response.rows; this.workstationworkerList = response.rows;
this.total = response.total; this.total = response.total;
...@@ -226,7 +223,7 @@ export default { ...@@ -226,7 +223,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除此岗位资源').then(function() { this.$modal.confirm('是否确认删除此工作单元资源').then(function() {
return delWorkunituser(ids); return delWorkunituser(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
...@@ -236,3 +233,20 @@ export default { ...@@ -236,3 +233,20 @@ export default {
} }
}; };
</script> </script>
<style lang="scss" >
.el-divider--horizontal.userdivider {
margin-top: 10px;
}
.usercard {
.el-card__header {
padding: 14px 20px;
}
.el-card__body {
padding-top: 0;
padding-bottom: 5px;
}
.app-container {
padding: 10px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment