Commit 99eb0bd0 authored by chenzj's avatar chenzj

工作站的人员关联

parent 4032fd35
<template>
<div class="app-container">
<el-table v-loading="loading" :data="workstationworkerList" @selection-change="handleSelectionChange">
<el-table-column label="岗位名称" align="center" prop="postName" />
<el-table-column label="数量" align="center" prop="quantity" />
<!-- <el-table-column label="岗位名称" align="center" prop="postName" /> -->
<!-- <el-table-column label="数量" align="center" prop="quantity" /> -->
<el-table-column label="关联人员" align="center" prop="nickName" />
<el-table-column label="操作" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -26,7 +27,7 @@
<!-- 添加或修改人力资源对话框 -->
<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-item label="岗位" prop="postId">
<!-- <el-form-item label="岗位" prop="postId">
<el-select v-model="form.postId" placeholder="请选择岗位">
<el-option
v-for="dict in postOptions"
......@@ -35,11 +36,25 @@
:value="dict.postId"
></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="关联人员" prop="nickName">
<el-input v-model="form.nickName" placeholder="请选择关联人员" readonly="readonly" >
<el-button
slot="append"
icon="el-icon-search"
@click="handleBrandSelect"
></el-button>
</el-input>
<BrandSelect
ref="brSelect"
@onSelected="onBrandSelected"
></BrandSelect>
</el-form-item>
<el-form-item label="数量" prop="quantity">
<!-- <el-form-item label="数量" prop="quantity">
<el-input-number :min="1" v-model="form.quantity" placeholder="请输入所需人员数量" />
</el-form-item>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
......@@ -52,8 +67,10 @@
<script>
import { listWorkstationworker, getWorkstationworker, delWorkstationworker, addWorkstationworker, updateWorkstationworker } from "@/api/mes/md/workstationworker";
import {listAllPost} from "@/api/system/post";
import BrandSelect from "@/components/userSelect/single.vue"
export default {
name: "Workstationworker",
components: {BrandSelect},
data() {
return {
// 遮罩层
......@@ -84,6 +101,9 @@ export default {
postCode: null,
postName: null,
quantity: null,
userId: null,
userName: null,
nickName: null
},
// 表单参数
form: {},
......@@ -136,6 +156,9 @@ export default {
workstationId: this.workstationId,
postId: null,
postCode: null,
userId: null,
userName: null,
nickName: null,
postName: null,
quantity: null,
remark: null,
......@@ -165,6 +188,16 @@ export default {
this.ids = selection.map(item => item.recordId)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleBrandSelect(){
this.$refs.brSelect.showFlag = true;
},
onBrandSelected(row){
if(row != undefined && row != null){
this.form.userId = row.userId;
this.form.userName = row.userName;
this.form.nickName = row.nickName;
}
},
/** 新增按钮操作 */
handleAdd() {
......
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