| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> |
| | | <el-form-item label="运维人员编号" prop="ywPersonCode"> |
| | | <el-input |
| | | v-model="queryParams.ywPersonCode" |
| | | placeholder="请输入运维人员编号" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | v-model="queryParams.ywPersonName" |
| | | placeholder="请输入运维人员姓名" |
| | | clearable |
| | | @clear="handleQuery" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="所属运维单位" prop="belongUnit"> |
| | | <el-input |
| | | v-model="queryParams.belongUnit" |
| | | placeholder="请输入所属运维单位" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-select v-model="queryParams.belongUnit" @change="handleQuery" clearable placeholder="所属运维单位"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | |
| | | |
| | | <el-table v-loading="loading" :data="peopleList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="主键" align="center" prop="id" /> |
| | | <el-table-column label="运维人员编号" align="center" prop="ywPersonCode" /> |
| | | <el-table-column label="运维人员姓名" align="center" prop="ywPersonName" /> |
| | | <el-table-column label="运维人员账号" align="center" prop="ywPersonAccount" /> |
| | | <el-table-column label="所属运维单位" align="center" prop="belongUnit" /> |
| | | <el-table-column label="联系电话" align="center" prop="phone" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | |
| | | <!-- 添加或修改运维人员对话框 --> |
| | | <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="ywPersonCode"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="人员编号" prop="ywPersonCode"> |
| | | <el-input v-model="form.ywPersonCode" placeholder="请输入运维人员编号" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员姓名" prop="ywPersonName"> |
| | | <el-form-item label="人员姓名" prop="ywPersonName"> |
| | | <el-input v-model="form.ywPersonName" placeholder="请输入运维人员姓名" /> |
| | | </el-form-item> |
| | | <el-form-item label="运维人员账号" prop="ywPersonAccount"> |
| | | <el-form-item label="人员账号" prop="ywPersonAccount"> |
| | | <el-input v-model="form.ywPersonAccount" placeholder="请输入运维人员账号" /> |
| | | </el-form-item> |
| | | <el-form-item label="所属运维单位" prop="belongUnit"> |
| | | <el-input v-model="form.belongUnit" placeholder="请输入所属运维单位" /> |
| | | <el-form-item label="所属单位" prop="belongUnit"> |
| | | <el-select v-model="form.belongUnit" placeholder="所属运维单位"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="联系电话" prop="phone"> |
| | | <el-input v-model="form.phone" placeholder="请输入联系电话" /> |
| | |
| | | |
| | | <script> |
| | | import { listPeople, getPeople, delPeople, addPeople, updatePeople } from "@/api/platform/people"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | |
| | | export default { |
| | | name: "People", |
| | |
| | | ywPersonName: null, |
| | | belongUnit: null, |
| | | }, |
| | | unitList: [], |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | |
| | | belongUnit: [ |
| | | { required: true, message: "所属运维单位不能为空", trigger: "blur" } |
| | | ], |
| | | phone: [ |
| | | { required: true, message: "联系电话不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getUnitSelect() |
| | | }, |
| | | methods: { |
| | | /** 查询运维人员列表 */ |
| | | getUnitSelect() { |
| | | // 下拉列表 |
| | | unitSelect().then((res) => { |
| | | this.unitList = res.data; |
| | | }) |
| | | }, |
| | | |
| | | /** 查询运维人员分页 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listPeople(this.queryParams).then(response => { |
| | | this.peopleList = response.rows; |
| | | this.peopleList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |