莳松-行政管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ss-oa-manage-web/src/views/Pers/Employee/index.vue

77 lines
2.1 KiB

10 months ago
<template>
<div>
<el-form :model="searchForm" inline>
<el-form-item>
<el-input v-model="searchForm.name" placeholder="请输入员工姓名" />
</el-form-item>
<el-form-item>
<el-radio-group v-model="searchForm.status">
<el-radio :label="0"> 在职 </el-radio>
<el-radio :label="1"> 离职 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">搜索</el-button>
10 months ago
<el-button @click="handleQuery">新增</el-button>
10 months ago
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" border stripe>
<el-table-column type="index" width="50" />
<el-table-column label="用户姓名" prop="nickname" />
<el-table-column label="部门" key="deptName" prop="deptName" />
<el-table-column label="手机号码" prop="mobile" width="120" />
<el-table-column label="在职状态" prop="status" />
10 months ago
<el-table-column label="参与考勤" width="150">
10 months ago
<template #default="scope">
10 months ago
<el-switch
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
/>
10 months ago
</template>
</el-table-column>
</el-table>
<Pagination
:total="total"
v-model:page="searchForm.pageNo"
v-model:limit="searchForm.pageSize"
@pagination="getList"
/>
</div>
</template>
10 months ago
<script name="OAEmployee" setup>
10 months ago
const searchForm = ref({
name: undefined,
status: 0,
pageNo: 1,
pageSize: 20
})
/** 搜索按钮操作 */
const handleQuery = () => {
searchForm.value.pageNo = 1
getList()
}
const loading = ref(false)
const tableList = ref([])
const total = ref(0)
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
tableList.value = [1, 2]
// const data = await UserApi.getUserPage(queryParams)
// tableList.value = data.list
// total.value = data.total
} finally {
loading.value = false
}
}
</script>
<style lang="scss" scoped></style>