/**
 * 配置
 * 表格列
 */
export const columns = [
	{
		title: "真实名称",
		dataIndex: "actualName",
		width: "12%",
	},
	{
		title: "手机号",
		dataIndex: "tel",
		width: "14%",
	},
	{
		title: "所属部门",
		dataIndex: "departmentName",
		width: "16%",
	},
	{
		title: "岗位",
		dataIndex: "positionName",
		width: "10%",
	},
	{
		title: "状态",
		dataIndex: "status",
		width: "16%",
		customRender: function (status) {
			switch (status) {
			case 1:
				return '正常'
			case 2:
				return '停用'
			default:
				break;
			}
		}
	},
	{
		title: "备注",
		dataIndex: "remake",
		width: "300",
	},
	{
		title: "操作",
		dataIndex: "action",
		key: "action",
		width: "180",
		fixed: "right",
		scopedSlots: { customRender: "action" },
	},
]
// 搜索项
export const searchForm = {
	keyword: "",
	departmentId: null,
	positionId: null,
}
// 分页
export const pagination = {
	current: 1,
	total: 0,
	pageSize: 10,
	showTotal: (total) => `共 ${total} 条`,
	showSizeChanger: true,
	showQuickJumper: true,
}
export const form = {
	cascVal:[],
	id:null,
	actualName: "",
	sex: null,
	idCard: "",
	tel: "",
	birthday: "",
	password: "",
	email: "",
	address: "",
	idCardImgUrls: [],
	departmentId: "",
	departmentIdPath: "",
	positionId: "",
	entryDate: "",
	salary: "",
	dataImgUrls: [],
	emergencyContact: "",
	emergencyContactNumber: "",
	emergencyContactAddress: "",
	maritalStatus: "",
	nation: "",
	politicalOutlook: "",
	accountType: "",
	remake: "",
}
export const rules = {
	actualName: [
		{ required: true, message: "请输入真实姓名", trigger: "blur" },
	],
	sex: [{ required: true, message: "请选择性别", trigger: "change" }],
	idCard: [
		{ required: true, message: "请输入身份证号", trigger: "blur" },
	],
	tel: [
		{ required: true, message: "请输入手机号", trigger: "blur" },
		{ min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" },
	],
	cascVal:[{  type: 'array',required: true, message: "请选择岗位", trigger: "change" },],
	entryDate: [
		{ required: true, message: "请选择入职时间", trigger: "change" },
	],
}
export const sexOption = [
	{
		id: 1,
		name: "男",
	},
	{
		id: 2,
		name: "女",
	},
	{
		id: 3,
		name: "保密",
	},
]
import store from "@/store";
export const uploadHeaders = {
	"manage-login-token": store.getters.getToken,
}