This commit is contained in:
xielue 2023-07-07 17:00:21 +08:00
parent bcd894e924
commit 2b93646863
1 changed files with 88 additions and 92 deletions

View File

@ -1,12 +1,8 @@
<template> <template>
<basic-page-list :desc="desc" :options="pageOptions"> <basic-page-list :desc="desc" :options="pageOptions">
<template v-slot:column1="{row}"> <template v-slot:column1="{ row }">
<img v-if="row && row.avatar" :src="row.avatar" style="width: 100px;" />
<img v-if="row && row.avatar" :src="row.avatar" style="width: 100px;"/> </template>
</template>
</basic-page-list> </basic-page-list>
</template> </template>
@ -50,54 +46,54 @@ export default {
addPageUrl: "/MesStaff/MesStaffAdd", addPageUrl: "/MesStaff/MesStaffAdd",
editPageUrl: "/MesStaff/MesStaffUpdate/", editPageUrl: "/MesStaff/MesStaffUpdate/",
// //
actions: { // Api actions: { // Api
// =============================== Start =============================== // =============================== Start ===============================
MesStaffList: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`, // MesStaffList: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`, //
MesStaffDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detail`, // MesStaffDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detail`, //
MesStaffCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/create`, // MesStaffCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/create`, //
MesStaffUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/update`, // MesStaffUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/update`, //
MesStaffDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detele`, // MesStaffDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detele`, //
MesStaffBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchDelete`, // MesStaffBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchDelete`, //
MesStaffBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchUpdate`, // MesStaffBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchUpdate`, //
MesStaffBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchCreate`, // MesStaffBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchCreate`, //
MesStaffExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/export/excel`, // EXCEL MesStaffExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/export/excel`, // EXCEL
MesStaffImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/import/excel`, // EXCEL MesStaffImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/import/excel`, // EXCEL
MesStaffOpen: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/open`, // MesStaffOpen: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/open`, //
MesStaffClose: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/close`, // MesStaffClose: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/close`, //
StaffWagesList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/list`, // StaffWagesList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/list`, //
StaffWagesDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detail`, // StaffWagesDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detail`, //
StaffWagesCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/create`, // StaffWagesCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/create`, //
StaffWagesUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/update`, // StaffWagesUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/update`, //
StaffWagesDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detele`, // StaffWagesDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detele`, //
StaffWagesBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchDelete`, // StaffWagesBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchDelete`, //
StaffWagesBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchUpdate`, // StaffWagesBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchUpdate`, //
StaffWagesBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchCreate`, // StaffWagesBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchCreate`, //
StaffWagesExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/export/excel`, // EXCEL StaffWagesExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/export/excel`, // EXCEL
StaffWagesImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/import/excel`, // EXCEL StaffWagesImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/import/excel`, // EXCEL
StaffTypeList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/list`, // StaffTypeList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/list`, //
StaffTypeDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detail`, // StaffTypeDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detail`, //
StaffTypeCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/create`, // StaffTypeCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/create`, //
StaffTypeUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/update`, // StaffTypeUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/update`, //
StaffTypeDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detele`, // StaffTypeDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detele`, //
StaffTypeBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchDelete`, // StaffTypeBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchDelete`, //
StaffTypeBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchUpdate`, // StaffTypeBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchUpdate`, //
StaffTypeBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchCreate`, // StaffTypeBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchCreate`, //
StaffTypeExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/export/excel`, // EXCEL StaffTypeExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/export/excel`, // EXCEL
StaffTypeImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/import/excel`, // EXCEL StaffTypeImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/import/excel`, // EXCEL
MesStaffPrintTemplateList: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/list`, // MesStaffPrintTemplateList: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/list`, //
MesStaffPrintTemplateDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detail`, // MesStaffPrintTemplateDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detail`, //
MesStaffPrintTemplateCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/create`, // MesStaffPrintTemplateCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/create`, //
MesStaffPrintTemplateUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/update`, // MesStaffPrintTemplateUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/update`, //
MesStaffPrintTemplateDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detele`, // MesStaffPrintTemplateDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detele`, //
MesStaffPrintTemplateBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchDelete`, // MesStaffPrintTemplateBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchDelete`, //
MesStaffPrintTemplateBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchUpdate`, // MesStaffPrintTemplateBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchUpdate`, //
MesStaffPrintTemplateBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchCreate`, // MesStaffPrintTemplateBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchCreate`, //
MesStaffPrintTemplateExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/export/excel`, // EXCEL MesStaffPrintTemplateExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/export/excel`, // EXCEL
MesStaffPrintTemplateImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/import/excel`, // EXCEL MesStaffPrintTemplateImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/import/excel`, // EXCEL
// =============================== End =============================== // =============================== End ===============================
}, },
start_time: 0, // start_time: 0, //
end_time: 0, // end_time: 0, //
@ -135,52 +131,52 @@ export default {
stripe: true, // stripe: true, //
id: 'datagrid_1', // id: 'datagrid_1', //
// //
columns: [ columns: [
{ type: 'checkbox', width: 'auto' }, // { type: 'checkbox', width: 'auto' }, //
{ type: 'seq', width: 'auto' }, // { type: 'seq', width: 'auto' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 }, { title: '操作', slots: { default: 'op' }, width: 120 },
// =============================== Start =============================== // =============================== Start ===============================
{ slots: { default: 'column1' },title: '员工头像', width: 250 }, { slots: { default: 'column1' }, title: '员工头像', width: 250 },
{ field: 'name', sortable: true, title: '员工姓名', width: 250 }, // { field: 'name', sortable: true, title: '员工姓名', width: 250 }, //
{ field: 'code', sortable: true, title: '员工工号', width: 250 }, // { field: 'code', sortable: true, title: '员工工号', width: 250 }, //
{ field: 'base_department', formatter: 'formatRef', params: { dataType: "object", textField: "name" }, title: '部门', width: 250 }, { field: 'base_department', formatter: 'formatRef', params: { dataType: "object", textField: "name" }, title: '部门', width: 250 },
{ field: 'phone', sortable: true, title: '员工电话', width: 250 }, // { field: 'phone', sortable: true, title: '员工电话', width: 250 }, //
{ field: 'email', sortable: true, title: '员工邮箱', width: 250 }, // { field: 'email', sortable: true, title: '员工邮箱', width: 250 }, //
//{ field: 'password', sortable: true, title: '', width: 250 }, // //{ field: 'password', sortable: true, title: '', width: 250 }, //
//{ field: 'salt', sortable: true, title: '', width: 250 }, // //{ field: 'salt', sortable: true, title: '', width: 250 }, //
{ field: 'nickname', sortable: true, title: '员工昵称', width: 250 }, // { field: 'nickname', sortable: true, title: '员工昵称', width: 250 }, //
//{ field: 'openid', sortable: true, title: 'openid', width: 250 }, // openid //{ field: 'openid', sortable: true, title: 'openid', width: 250 }, // openid
//{ field: 'unionid', sortable: true, title: 'unionid', width: 250 }, // unionid //{ field: 'unionid', sortable: true, title: 'unionid', width: 250 }, // unionid
//{ field: 'session_key', sortable: true, title: 'session_key', width: 250 }, // session_key //{ field: 'session_key', sortable: true, title: 'session_key', width: 250 }, // session_key
//{ field: 'department_id', sortable: true, title: 'ID', width: 250 }, // ID //{ field: 'department_id', sortable: true, title: 'ID', width: 250 }, // ID
//{ field: 'process_id', sortable: true, title: 'ID', width: 250 }, // ID //{ field: 'process_id', sortable: true, title: 'ID', width: 250 }, // ID
//{ field: 'process_scheme_id', sortable: true, title: 'ID', width: 250 }, // ID //{ field: 'process_scheme_id', sortable: true, title: 'ID', width: 250 }, // ID
{ field: 'entry_date', sortable: true, title: '入职日期',formatter: 'formatDate', width: 250 }, // { field: 'entry_date', sortable: true, title: '入职日期', formatter: 'formatDate', width: 250 }, //
{ field: 'departure_date', sortable: true, title: '离职日期', formatter: 'formatDate',width: 250 }, // { field: 'departure_date', sortable: true, title: '离职日期', formatter: 'formatDate', width: 250 }, //
//{ field: 'is_piecework', sortable: true, title: '', width: 250 }, // //{ field: 'is_piecework', sortable: true, title: '', width: 250 }, //
{ field: 'remark', sortable: true, title: '备注', width: 250 }, // { field: 'remark', sortable: true, title: '备注', width: 250 }, //
{ field: 'status', slots: { default: 'status' }, width: 80, sortable: true, title: '状态', showHeaderOverflow: true }, // { field: 'status', slots: { default: 'status' }, width: 80, sortable: true, title: '状态', showHeaderOverflow: true }, //
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // { field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, //
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // { field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, //
// =============================== Start =============================== // =============================== Start ===============================
] ]
} }
}; };
pageData.actions.getList = pageData.actions.MesStaffList; pageData.actions.getList = pageData.actions.MesStaffList;
pageData.actions.delete = pageData.actions.MesStaffBatchDelete; pageData.actions.delete = pageData.actions.MesStaffBatchDelete;
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); //
this.pageOptions = pageData; this.pageOptions = pageData;