|
@@ -59,22 +59,6 @@
|
|
|
<!-- 添加或修改油站员工信息对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="姓名" prop="personnelName">
|
|
|
- <el-input v-model="form.personnelName" placeholder="请输入员工姓名" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="负责枪号" prop="gunNo">
|
|
|
-<!-- <el-input v-model="form.gunNo" placeholder="请输入员工负责枪号" />-->
|
|
|
- <el-checkbox-group v-model="gunNoList">
|
|
|
- <el-checkbox
|
|
|
- v-for = "item in checkList"
|
|
|
- :key=item.oilGunId
|
|
|
- :label="item.oilGunNo"
|
|
|
- :value="item.oilGunNo"
|
|
|
- >
|
|
|
- {{item.oilGunNo+"号枪/"+item.oilName}}
|
|
|
- </el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="油站名称" prop="stationId" >
|
|
|
<el-select
|
|
|
v-model="form.stationId"
|
|
@@ -91,6 +75,26 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="油站名称" v-show="false" prop="personnelName">
|
|
|
+ <el-input v-model="form.stationName" placeholder="请输入油站名称" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="姓名" prop="personnelName">
|
|
|
+ <el-input v-model="form.personnelName" placeholder="请输入员工姓名" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="负责枪号" prop="gunNo">
|
|
|
+<!-- <el-input v-model="form.gunNo" placeholder="请输入员工负责枪号" />-->
|
|
|
+ <el-checkbox-group v-model="gunNoList">
|
|
|
+ <el-checkbox
|
|
|
+ v-for = "item in checkList"
|
|
|
+ :key=item.oilGunId
|
|
|
+ :label="item.oilGunNo"
|
|
|
+ :value="item.oilGunNo"
|
|
|
+ >
|
|
|
+ {{item.oilGunNo+"号枪/"+item.oilName}}
|
|
|
+ </el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<!-- <el-form-item label="二维码" prop="qrCode">
|
|
|
<el-input v-model="form.qrCode" placeholder="请输入二维码" />
|
|
|
</el-form-item>-->
|
|
@@ -108,7 +112,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { listPersonnel, getPersonnel, delPersonnel, addPersonnel, updatePersonnel, exportPersonnel } from "@/api/station/personnel";
|
|
|
-import {stationinfo,selectGun} from "@/api/station/gun";
|
|
|
+import {stationinfo,selectGun,listGun} from "@/api/station/gun";
|
|
|
|
|
|
export default {
|
|
|
name: "Personnel",
|
|
@@ -146,6 +150,10 @@ export default {
|
|
|
qrCode: null,
|
|
|
personnelPhone: null
|
|
|
},
|
|
|
+ // 查询参数
|
|
|
+ queryInfo: {
|
|
|
+ stationId: null
|
|
|
+ },
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
@@ -158,10 +166,10 @@ export default {
|
|
|
stationinfo().then(response => {
|
|
|
this.stationOptions = response.rows;
|
|
|
});
|
|
|
- //获取油枪
|
|
|
- selectGun().then(response => {
|
|
|
- this.checkList = response.rows;
|
|
|
- });
|
|
|
+ // //获取油枪 目前获取所有的,因为不能根据当前用户来确定当前油站
|
|
|
+ // selectGun().then(response => {
|
|
|
+ // this.checkList = response.rows;
|
|
|
+ // });
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询油站员工信息列表 */
|
|
@@ -178,7 +186,12 @@ export default {
|
|
|
obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
|
|
|
return item.stationId === e;//筛选出匹配数据
|
|
|
})
|
|
|
+
|
|
|
this.form.stationName=obj.stationName;
|
|
|
+ this.queryInfo.stationId=obj.stationId;
|
|
|
+ listGun(this.queryInfo).then(response => {
|
|
|
+ this.checkList = response.rows;
|
|
|
+ });
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
@@ -231,6 +244,10 @@ export default {
|
|
|
if(this.form.gunNo!=null &&this.form.gunNo!="" ){
|
|
|
this.gunNoList=this.form.gunNo.split(",");
|
|
|
}
|
|
|
+ this.queryInfo.stationId=row.stationId;
|
|
|
+ listGun(this.queryInfo).then(response => {
|
|
|
+ this.checkList = response.rows;
|
|
|
+ });
|
|
|
this.open = true;
|
|
|
this.title = "修改油站员工信息";
|
|
|
});
|