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>
<basic-page-list :desc="desc" :options="pageOptions">
<template v-slot:column1="{row}">
<img v-if="row && row.avatar" :src="row.avatar" style="width: 100px;"/>
</template>
<template v-slot:column1="{ row }">
<img v-if="row && row.avatar" :src="row.avatar" style="width: 100px;" />
</template>
</basic-page-list>
</template>
@ -14,8 +10,8 @@
import BASE_URL from '@/services/mes/api.js';
export default {
i18n: require("./i18n"),
export default {
i18n: require("./i18n"),
props: {
},
@ -50,54 +46,54 @@ export default {
addPageUrl: "/MesStaff/MesStaffAdd",
editPageUrl: "/MesStaff/MesStaffUpdate/",
//
actions: { // Api
// =============================== Start ===============================
MesStaffList: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`, //
MesStaffDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detail`, //
MesStaffCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/create`, //
MesStaffUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/update`, //
MesStaffDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detele`, //
MesStaffBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchDelete`, //
MesStaffBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchUpdate`, //
MesStaffBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchCreate`, //
MesStaffExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/export/excel`, // EXCEL
MesStaffImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/import/excel`, // EXCEL
MesStaffOpen: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/open`, //
MesStaffClose: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/close`, //
StaffWagesList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/list`, //
StaffWagesDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detail`, //
StaffWagesCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/create`, //
StaffWagesUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/update`, //
StaffWagesDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detele`, //
StaffWagesBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchDelete`, //
StaffWagesBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchUpdate`, //
StaffWagesBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchCreate`, //
StaffWagesExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/export/excel`, // EXCEL
StaffWagesImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/import/excel`, // EXCEL
StaffTypeList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/list`, //
StaffTypeDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detail`, //
StaffTypeCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/create`, //
StaffTypeUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/update`, //
StaffTypeDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detele`, //
StaffTypeBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchDelete`, //
StaffTypeBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchUpdate`, //
StaffTypeBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchCreate`, //
StaffTypeExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/export/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`, //
MesStaffPrintTemplateDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detail`, //
MesStaffPrintTemplateCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/create`, //
MesStaffPrintTemplateUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/update`, //
MesStaffPrintTemplateDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detele`, //
MesStaffPrintTemplateBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchDelete`, //
MesStaffPrintTemplateBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchUpdate`, //
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
MesStaffPrintTemplateImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/import/excel`, // EXCEL
//
actions: { // Api
// =============================== Start ===============================
MesStaffList: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`, //
MesStaffDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detail`, //
MesStaffCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/create`, //
MesStaffUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/update`, //
MesStaffDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/detele`, //
MesStaffBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchDelete`, //
MesStaffBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchUpdate`, //
MesStaffBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/batchCreate`, //
MesStaffExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/export/excel`, // EXCEL
MesStaffImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/import/excel`, // EXCEL
MesStaffOpen: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/open`, //
MesStaffClose: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/close`, //
StaffWagesList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/list`, //
StaffWagesDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detail`, //
StaffWagesCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/create`, //
StaffWagesUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/update`, //
StaffWagesDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/detele`, //
StaffWagesBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchDelete`, //
StaffWagesBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchUpdate`, //
StaffWagesBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/batchCreate`, //
StaffWagesExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/export/excel`, // EXCEL
StaffWagesImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/wages/import/excel`, // EXCEL
StaffTypeList: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/list`, //
StaffTypeDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detail`, //
StaffTypeCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/create`, //
StaffTypeUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/update`, //
StaffTypeDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/detele`, //
StaffTypeBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchDelete`, //
StaffTypeBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchUpdate`, //
StaffTypeBatchCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/batchCreate`, //
StaffTypeExportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/staff/type/export/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`, //
MesStaffPrintTemplateDetail: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detail`, //
MesStaffPrintTemplateCreate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/create`, //
MesStaffPrintTemplateUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/update`, //
MesStaffPrintTemplateDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/detele`, //
MesStaffPrintTemplateBatchDelete: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchDelete`, //
MesStaffPrintTemplateBatchUpdate: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/batchUpdate`, //
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
MesStaffPrintTemplateImportExcel: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/print/template/import/excel`, // EXCEL
// =============================== End ===============================
},
// =============================== End ===============================
},
start_time: 0, //
end_time: 0, //
@ -117,7 +113,7 @@ export default {
searchFormItems: [ //
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入标题' } } },
{ field: 'desc', title: '描述', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入描述' } } },
{ span: 8, slots: { default: 'date' } }, //
{
@ -135,52 +131,52 @@ export default {
stripe: true, //
id: 'datagrid_1', //
//
columns: [
{ type: 'checkbox', width: 'auto' }, //
{ type: 'seq', width: 'auto' }, //
//
columns: [
{ type: 'checkbox', width: 'auto' }, //
{ type: 'seq', width: 'auto' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ title: '操作', slots: { default: 'op' }, width: 120 },
// =============================== Start ===============================
{ slots: { default: 'column1' },title: '员工头像', width: 250 },
// =============================== Start ===============================
{ slots: { default: 'column1' }, title: '员工头像', width: 250 },
{ field: 'name', 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: 'phone', sortable: true, title: '员工电话', width: 250 }, //
{ field: 'email', sortable: true, title: '员工邮箱', width: 250 }, //
//{ field: 'password', sortable: true, title: '', width: 250 }, //
//{ field: 'salt', sortable: true, title: '', width: 250 }, //
{ field: 'nickname', sortable: true, title: '员工昵称', width: 250 }, //
//{ field: 'openid', sortable: true, title: 'openid', width: 250 }, // openid
//{ field: 'unionid', sortable: true, title: 'unionid', width: 250 }, // unionid
//{ field: 'session_key', sortable: true, title: 'session_key', width: 250 }, // session_key
//{ field: 'department_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: 'entry_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: 'remark', sortable: true, title: '备注', width: 250 }, //
{ 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: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, //
{ field: 'name', 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: 'phone', sortable: true, title: '员工电话', width: 250 }, //
{ field: 'email', sortable: true, title: '员工邮箱', width: 250 }, //
//{ field: 'password', sortable: true, title: '', width: 250 }, //
//{ field: 'salt', sortable: true, title: '', width: 250 }, //
{ field: 'nickname', sortable: true, title: '员工昵称', width: 250 }, //
//{ field: 'openid', sortable: true, title: 'openid', width: 250 }, // openid
//{ field: 'unionid', sortable: true, title: 'unionid', width: 250 }, // unionid
//{ field: 'session_key', sortable: true, title: 'session_key', width: 250 }, // session_key
//{ field: 'department_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: 'entry_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: 'remark', sortable: true, title: '备注', width: 250 }, //
{ 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: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, //
// =============================== Start ===============================
// =============================== Start ===============================
]
}
]
}
};
pageData.actions.getList = pageData.actions.MesStaffList;
pageData.actions.delete = pageData.actions.MesStaffBatchDelete;
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); //
pageData.actions.getList = pageData.actions.MesStaffList;
pageData.actions.delete = pageData.actions.MesStaffBatchDelete;
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); //
this.pageOptions = pageData;