Compare commits

...

2 Commits

@ -12,6 +12,8 @@ import './styles/index.less';
import mixins from "@/mixins"
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import { Button } from 'ant-design-vue';
Vue.use(Button);
Vue.use(Antd);
Vue.use(mixins);
import store from "@/store";

@ -26,7 +26,7 @@ export default [
meta: {title: '员工管理'}
},
{
path: '/authority',
path: '/Authority',
name: "Authority",
title: "权限管理",
icon: 'profile',
@ -46,7 +46,7 @@ export default [
]
},
{
path: '/attendance',
path: '/Attendance',
name: "Attendance",
title: "考勤管理",
icon: 'profile',
@ -56,7 +56,7 @@ export default [
meta: {title: '考勤管理'},
children: [
{
path: '/attendance/record',
path: '/Attendance/record',
name: "Attendance_record",
title: "考勤记录",
icon: 'profile',
@ -65,7 +65,7 @@ export default [
meta: {title: '考勤记录'},
},
{
path: '/attendance/application',
path: '/Attendance/application',
name: "Attendance_application",
title: "申请记录",
icon: 'profile',
@ -74,7 +74,7 @@ export default [
meta: {title: '申请记录'},
},
{
path: '/attendance/attendanceteam',
path: '/Attendance/attendanceteam',
name: "Attendance_attendanceteam",
title: "考勤小组",
icon: 'profile',
@ -83,7 +83,7 @@ export default [
meta: {title: '考勤小组'},
},
{
path: '/attendance/scheduling',
path: '/Attendance/scheduling',
name: "Attendance_scheduling",
title: "排班计划",
icon: 'profile',

@ -7,20 +7,210 @@
* @FilePath: /ansu-business/src/views/Employee/index.vue
-->
<template>
<div>
<div class="box">
<div class="left">
<a-input-search placeholder="请输入搜索信息" style="width: 200px" />
<a-tree :tree-data="treeData" :expandedKeys.sync="expandedKeys" @node-click="handleNodeClick">
</a-tree>
</div>
<div class="right">
<div class="top">
<div class="topleft">
<a-button icon="plus" type="primary">新增员工</a-button>
<a-button>导入</a-button>
<a-button>导出</a-button>
</div>
<div class="topright">
<a-select show-search placeholder="所属部门" option-filter-prop="children" style="width: 200px" :filter-option="filterOption"></a-select>
<a-select show-search placeholder="职位" option-filter-prop="children" style="width: 200px" :filter-option="filterOption"></a-select>
<a-input-search placeholder="请输入搜索信息" style="width: 200px"></a-input-search>
</div>
</div>
<a-table :row-selection="rowSelection" :columns="columns" :data-source="data">
<template v-slot:action="{record}">
<span>
<a @click="Edit(record)"></a>
<a-divider type="vertical" />
<a-switch checked-children="" un-checked-children="" default-checked />
<span>
<a-divider type="vertical" />
<a @click="Password(record)"></a>
</span>
<span>
<a-divider type="vertical" />
<a @click="Delete(record)"></a>
</span>
</span>
</template>
</a-table>
</div>
</div>
</template>
<script>
const columns = [
{ title: "名称", dataIndex: "name", width: 100, key: "1", align: "center" },
{
title: "手机号",
dataIndex: "mobilenumber",
width: 150,
key: "2",
align: "center",
},
{
title: "所属部门",
dataIndex: "Department",
width: 150,
key: "3",
align: "center",
},
{ title: "职位", dataIndex: "position", width: 150, key: "4", align: "center" },
{ title: "备注", dataIndex: "remarks", key: "5", align: "center" },
{
title: "操作",
dataIndex: "operation",
width: 280,
key: "action",
align: "center",
scopedSlots: { customRender: "action" },
},
];
const data = [
{
key: '1',
name: '潘迪',
mobilenumber: '13899191020',
Department: '安全保卫部',
position: '项目经理',
remarks: '青海省',
operation: '',
},
];
const treeData = [
{
title: "广西印象物业服务有限公司",
key: "0-0",
children: [
{
title: "运营部",
key: "0-0-0",
children: [
{ title: "客服组", key: "0-0-0-0" },
{ title: "商务组", key: "0-0-0-1" },
],
},
{
title: "财务部",
key: "0-0-1",
children: [{ title: "0-0-1-0", key: "0-0-1-0" }],
},
{
title: "房屋管理维修部",
key: "0-0-2",
children: [{ title: "0-0-1-0", key: "0-0-2-0" }],
},
{
title: "安保部",
key: "0-0-3",
children: [{ title: "0-0-1-0", key: "0-0-3-0" }],
},
{
title: "设备工程部门",
key: "0-0-4",
children: [{ title: "0-0-1-0", key: "0-0-4-0" }],
},
{
title: "环境卫生部",
key: "0-0-5",
children: [{ title: "0-0-1-0", key: "0-0-5-0" }],
},
],
},
{
title: "南宁富航资产管理有限公司",
key: "0-1",
children: [
{
title: "工程维修管理单位",
key: "0-1-0",
children: [{ title: "客服组", key: "0-1-0-0" }],
},
{
title: "南宁中建工程机械维修",
key: "0-1-1",
children: [{ title: "0-0-1-0", key: "0-1-0-1" }],
},
],
},
];
const options = [];
export default {
name: "Employee",//
name: "Employee", //
data() {
return {
value: undefined,
treeData,
expandedKeys: ["0-0-0", "0-0-1"],
region: undefined,
options,
data,
columns,
tableData: [],
page: {
pageNo: 1,
limit: 10,
sizes: [1, 5, 10],
total: 0,
},
};
},
methods: {
//
Edit() {},
Password() {},
Delete() {},
//
handleNodeClick(treeData) {
console.log(treeData);
},
//
filterOption(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
},
},
};
</script>
<style lang="less" scoped>
.box {
display: flex;
.left {
width: 20%;
height: 650px;
border-right: 3px solid rgb(175, 174, 174);
}
.right {
width: 75%;
height: 650px;
margin: auto 10px;
}
}
.top {
padding: 10px;
width: 100%;
display: flex;
justify-content: space-between;
.topleft {
width: 25%;
height: 50px;
}
.tpright {
width: 75%;
height: 50px;
}
}
</style>

Loading…
Cancel
Save