From f7d9e9a6919178c5232ba0040ab4ce6d16ae0103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9C=E9=98=B3?= <1301318913@qq.com> Date: Wed, 27 Mar 2024 16:22:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=8F=AD=E7=BB=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/teamSetting/index.ts | 61 +++++ .../mes/productionPlan/productionPlan.data.ts | 8 +- src/views/mes/teamSetting/index.vue | 244 ++++++++++++++++++ src/views/mes/teamSetting/teamSetting.data.ts | 178 +++++++++++++ 4 files changed, 487 insertions(+), 4 deletions(-) create mode 100644 src/api/mes/teamSetting/index.ts create mode 100644 src/views/mes/teamSetting/index.vue create mode 100644 src/views/mes/teamSetting/teamSetting.data.ts diff --git a/src/api/mes/teamSetting/index.ts b/src/api/mes/teamSetting/index.ts new file mode 100644 index 000000000..61224bc56 --- /dev/null +++ b/src/api/mes/teamSetting/index.ts @@ -0,0 +1,61 @@ +import request from '@/config/axios' + +export interface TeamSettingVO { + id: number + teamCode: string + teamName: string + teamType: string + endTime: Date + textOne: string + textTwo: string + textThree: string + textFour: string + textFive: string + deleteTime: Date + status: string + concurrencyStamp: number + remark: string + deleter: string + siteId: number +} + +// 查询班组人员管理列表 +export const getTeamSettingPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/teamSetting/senior', data }) + } else { + return await request.get({ url: `/mes/teamSetting/page`, params }) + } +} + +// 查询班组人员管理详情 +export const getTeamSetting = async (id: number) => { + return await request.get({ url: `/mes/teamSetting/get?id=` + id }) +} + +// 新增班组人员管理 +export const createTeamSetting = async (data: TeamSettingVO) => { + return await request.post({ url: `/mes/teamSetting/create`, data }) +} + +// 修改班组人员管理 +export const updateTeamSetting = async (data: TeamSettingVO) => { + return await request.put({ url: `/mes/teamSetting/update`, data }) +} + +// 删除班组人员管理 +export const deleteTeamSetting = async (id: number) => { + return await request.delete({ url: `/mes/teamSetting/delete?id=` + id }) +} + +// 导出班组人员管理 Excel +export const exportTeamSetting = async (params) => { + return await request.download({ url: `/mes/teamSetting/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/teamSetting/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/mes/productionPlan/productionPlan.data.ts b/src/views/mes/productionPlan/productionPlan.data.ts index 539264c0e..f6f8f68ec 100644 --- a/src/views/mes/productionPlan/productionPlan.data.ts +++ b/src/views/mes/productionPlan/productionPlan.data.ts @@ -78,7 +78,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ field: 'deleteTime', sort: 'custom', formatter: dateFormatter, - isSearch: true, + isSearch: false, search: { component: 'DatePicker', componentProps: { @@ -99,7 +99,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ label: '状态', field: 'status', sort: 'custom', - isSearch: true, + isSearch: false, form: { component: 'Radio' }, @@ -118,7 +118,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ label: '备注', field: 'remark', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '创建时间', @@ -140,7 +140,7 @@ export const ProductionPlan = useCrudSchemas(reactive([ label: '删除用户名', field: 'deleter', sort: 'custom', - isSearch: true, + isSearch: false, }, { label: '位置ID', diff --git a/src/views/mes/teamSetting/index.vue b/src/views/mes/teamSetting/index.vue new file mode 100644 index 000000000..135bba85f --- /dev/null +++ b/src/views/mes/teamSetting/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/mes/teamSetting/teamSetting.data.ts b/src/views/mes/teamSetting/teamSetting.data.ts new file mode 100644 index 000000000..a24d17006 --- /dev/null +++ b/src/views/mes/teamSetting/teamSetting.data.ts @@ -0,0 +1,178 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const TeamSettingRules = reactive({ + endTime: [required], + concurrencyStamp: [required], +}) + +export const TeamSetting = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '班组编号', + field: 'teamCode', + sort: 'custom', + isSearch: true, + }, + { + label: '班组名称', + field: 'teamName', + sort: 'custom', + isSearch: true, + }, + { + label: '班组类型', + field: 'teamType', + sort: 'custom', + isSearch: true, + // form: { + // component: 'SelectV2' + // }, + }, + { + label: '结束时间', + field: 'endTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '备用字段一', + field: 'textOne', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段二', + field: 'textTwo', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段三', + field: 'textThree', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段四', + field: 'textFour', + sort: 'custom', + isSearch: false, + }, + { + label: '备用字段五', + field: 'textFive', + sort: 'custom', + isSearch: false, + }, + { + label: '删除时间', + field: 'deleteTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: false, + form: { + component: 'Radio' + }, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '删除用户名', + field: 'deleter', + sort: 'custom', + isSearch: false, + }, + { + label: '位置ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) From 29cce41ccc514657a449a655887b1f9c94073bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9C=E9=98=B3?= <1301318913@qq.com> Date: Wed, 27 Mar 2024 17:56:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=8E=86=E6=A0=B7=E5=BC=8F=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/jobcalendar/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/views/mes/jobcalendar/index.vue diff --git a/src/views/mes/jobcalendar/index.vue b/src/views/mes/jobcalendar/index.vue new file mode 100644 index 000000000..ac7716f24 --- /dev/null +++ b/src/views/mes/jobcalendar/index.vue @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file From 37fb23d643132b00acc2d756491a9343c782193f Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 27 Mar 2024 18:54:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=20=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/notify/template/index.ts | 1 + .../system/notify/template/NotifyTemplateForm.vue | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template/index.ts index cd0e12238..b7ce8a2f3 100644 --- a/src/api/system/notify/template/index.ts +++ b/src/api/system/notify/template/index.ts @@ -5,6 +5,7 @@ export interface NotifyTemplateVO { name: string nickname: string code: string + roleIds: [] content: string type: number params: string diff --git a/src/views/system/notify/template/NotifyTemplateForm.vue b/src/views/system/notify/template/NotifyTemplateForm.vue index 919c6549f..30399a481 100644 --- a/src/views/system/notify/template/NotifyTemplateForm.vue +++ b/src/views/system/notify/template/NotifyTemplateForm.vue @@ -16,6 +16,11 @@ + + + + /> + @@ -54,12 +59,15 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as NotifyTemplateApi from '@/api/system/notify/template' import { CommonStatusEnum } from '@/utils/constants' +import * as RoleApi from '@/api/system/role' const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型 +const roleList = ref([]) // 角色的列表 + const formData = ref({ id: null, name: '', @@ -67,6 +75,7 @@ const formData = ref({ code: '', content: '', type: null, + roleIds: [], params: '', status: CommonStatusEnum.ENABLE, remark: '' @@ -76,6 +85,7 @@ const formRules = reactive({ status: [{ required: true, message: '开启状态不能为空', trigger: 'blur' }], code: [{ required: true, message: '模板编码不能为空', trigger: 'blur' }], name: [{ required: true, message: '模板名称不能为空', trigger: 'blur' }], + roleIds: [{ required: true, message: '角色不能为空', trigger: 'blur' }], nickname: [{ required: true, message: '发件人姓名不能为空', trigger: 'blur' }], content: [{ required: true, message: '模板内容不能为空', trigger: 'blur' }] }) @@ -96,6 +106,8 @@ const open = async (type: string, id?: number) => { formLoading.value = false } } + // 获得角色列表 + roleList.value = await RoleApi.getSimpleRoleList() } defineExpose({ open }) // 提供 open 方法,用于打开弹窗