| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-03-26 10:28:33 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-03-28 18:18:33 |
| | | * @LastEditTime: 2024-04-08 11:03:11 |
| | | * @FilePath: /smart-web/src/views/master/person/main/index.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | <div class="right-top"> |
| | | <div class="right-title">部门:千文科技</div> |
| | | <div> |
| | | <el-select v-model="input3" placeholder="状态" class="searchStatus"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | size="small" |
| | | /> |
| | | <el-select v-model="searchData.status" placeholder="状态" class="searchStatus"> |
| | | <el-option v-for="item in statusList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" size="small"/> |
| | | </el-select> |
| | | <el-input |
| | | v-model="input3" |
| | | style="width: 200px" |
| | | size="small" |
| | | placeholder="请输入关键字进行过滤" |
| | | class="input-with-select" |
| | | > |
| | | <el-input v-model="searchData.keywords" style="width: 200px" size="small" placeholder="请输入关键字进行过滤"> |
| | | <template #append> |
| | | <el-button :icon="Search" /> |
| | | <el-button :icon="searchIcon" @click="searchPerson" /> |
| | | </template> |
| | | </el-input> |
| | | </div> |
| | |
| | | <el-button type="danger" plain @click="delPerson">删除</el-button> |
| | | </div> |
| | | <div class="right-table"> |
| | | <el-table |
| | | ref="multipleTableRef" |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%" |
| | | class="multipleTableRef" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | prop="date" |
| | | label="张三" |
| | | width="150"> |
| | | <el-table-column prop="name" label="姓名" width="150"></el-table-column> |
| | | <el-table-column prop="jobNumber" label="工号" width="150"></el-table-column> |
| | | <el-table-column label="关联账号" width="120"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.account?scope.row.account:'-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="关联账号" |
| | | width="120"> |
| | | <el-table-column label="部门" width="120"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.organizationName?scope.row.organizationName:'-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="province" |
| | | label="部门" |
| | | width="120"> |
| | | <el-table-column label="岗位" width="120"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.postName?scope.row.postName:'-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="city" |
| | | label="岗位" |
| | | width="120"> |
| | | <el-table-column label="邮箱" width="120"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.email?scope.row.email:'-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="邮箱" |
| | | width="300"> |
| | | <el-table-column prop="tel" label="手机号" width="120"></el-table-column> |
| | | <el-table-column prop="tel" label="状态" width="120"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.status == "1"?"在职":'离职'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="zip" |
| | | label="手机号" |
| | | width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="zip" |
| | | label="状态" |
| | | width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="140"> |
| | | <template #default="scope"> |
| | | <el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> |
| | | <el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button> |
| | | </template> |
| | | <el-table-column fixed="right" label="操作" width="140"> |
| | | <template #default="scope"> |
| | | <el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> |
| | | <el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | |
| | | <script> |
| | | import saveDialog from './save' |
| | | export default { |
| | | name: "bakalaka", |
| | | name: "personPerson", |
| | | data(){ |
| | | return { |
| | | searchIcon: "el-icon-search", |
| | | searchData: { |
| | | current: 1, |
| | | size: 15, |
| | | total: 0, |
| | | status: "1", |
| | | keywords: "", |
| | | postId: "", |
| | | organizationCode: "00001" |
| | | }, |
| | | isSaveing: false, |
| | | groups: [], |
| | | departmentFrom: { |
| | |
| | | }, |
| | | leftActive: true, |
| | | input: '', |
| | | options: [{ |
| | | value: '选项1', |
| | | label: '黄金糕' |
| | | }], |
| | | statusList: [], |
| | | input3: '', |
| | | tableData: [{ |
| | | date: '2016-05-02', |
| | | name: '王小虎', |
| | | province: '上海', |
| | | city: '普陀区', |
| | | address: '上海市普陀区金沙江路 1518 弄', |
| | | zip: 200333 |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: '王小虎', |
| | | province: '上海', |
| | | city: '普陀区', |
| | | address: '上海市普陀区金沙江路 1517 弄', |
| | | zip: 200333 |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: '王小虎', |
| | | province: '上海', |
| | | city: '普陀区', |
| | | address: '上海市普陀区金沙江路 1519 弄', |
| | | zip: 200333 |
| | | }, { |
| | | date: '2016-05-03', |
| | | name: '王小虎', |
| | | province: '上海', |
| | | city: '普陀区', |
| | | address: '上海市普陀区金沙江路 1516 弄', |
| | | zip: 200333 |
| | | }] |
| | | tableData: [] |
| | | } |
| | | }, |
| | | created(){ |
| | | |
| | | }, |
| | | mounted(){ |
| | | |
| | | this.getStatus(); |
| | | this.searchPerson(); //员工列表 |
| | | }, |
| | | components: { |
| | | saveDialog |
| | | }, |
| | | methods: { |
| | | searchPerson() { |
| | | this.$HTTP.get(`/api/blade-cps/employee/list?`+this.$TOOL.qsStringify(this.searchData)).then(res=> { |
| | | if(res.code == 200) { |
| | | res.data.records.forEach(item=> { |
| | | if(item.dictValue == "在职") { |
| | | this.searchData.status = item.dictKey; |
| | | } |
| | | }) |
| | | this.tableData = res.data.records; |
| | | } |
| | | }) |
| | | }, |
| | | getStatus() { //获取全部账号 |
| | | this.$HTTP.get(`/api/blade-system/dict/dictionary?code=employee_status`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.statusList = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | departmentSubmit() { |
| | | this.departmentVisible=false; //部门调整 |
| | | }, |