From a416e9d7df0aa0d20bb84936e25d0050ee0f96ed Mon Sep 17 00:00:00 2001 From: wx <645899409@qq.com> Date: Fri, 6 Feb 2026 18:03:53 +0800 Subject: [PATCH] =?UTF-8?q?update:=201.=E6=B6=88=E6=81=AF=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=202.=E5=81=A5=E5=BA=B7=E9=93=B6=E8=A1=8C=EF=BC=9A?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E7=AE=A1=E7=90=86=E3=80=81=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E6=89=93=E5=8D=A1=E7=9B=91=E6=B5=8B=E3=80=81=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=85=91=E6=8D=A2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/jeecg/components/JlazyTreeSelect.vue | 48 ++++- src/views/banner/empMonitor/empMonitor.api.ts | 0 .../banner/empMonitor/empMonitor.data.ts | 170 ++++++++++++++++ src/views/banner/empMonitor/empMonitor.vue | 73 +++++++ src/views/banner/empPoints/empPoints.api.ts | 7 + src/views/banner/empPoints/empPoints.data.ts | 73 +++++++ src/views/banner/empPoints/empPointsList.vue | 108 ++++++++++ .../banner/points/components/pointsModal.vue | 55 +++++ src/views/banner/points/pointsList.api.ts | 47 +++++ src/views/banner/points/pointsList.data.ts | 159 +++++++++++++++ src/views/banner/points/pointsList.vue | 126 ++++++++++++ .../components/noticeDetailModal.vue | 50 +++++ .../noticeList/components/noticeModal.vue | 189 ++++++++++++++++++ src/views/system/noticeList/noticeList.api.ts | 49 +++++ .../system/noticeList/noticeList.data.ts | 172 ++++++++++++++++ src/views/system/noticeList/noticeList.vue | 93 +++++++++ 16 files changed, 1413 insertions(+), 6 deletions(-) create mode 100644 src/views/banner/empMonitor/empMonitor.api.ts create mode 100644 src/views/banner/empMonitor/empMonitor.data.ts create mode 100644 src/views/banner/empMonitor/empMonitor.vue create mode 100644 src/views/banner/empPoints/empPoints.api.ts create mode 100644 src/views/banner/empPoints/empPoints.data.ts create mode 100644 src/views/banner/empPoints/empPointsList.vue create mode 100644 src/views/banner/points/components/pointsModal.vue create mode 100644 src/views/banner/points/pointsList.api.ts create mode 100644 src/views/banner/points/pointsList.data.ts create mode 100644 src/views/banner/points/pointsList.vue create mode 100644 src/views/system/noticeList/components/noticeDetailModal.vue create mode 100644 src/views/system/noticeList/components/noticeModal.vue create mode 100644 src/views/system/noticeList/noticeList.api.ts create mode 100644 src/views/system/noticeList/noticeList.data.ts create mode 100644 src/views/system/noticeList/noticeList.vue diff --git a/src/components/Form/src/jeecg/components/JlazyTreeSelect.vue b/src/components/Form/src/jeecg/components/JlazyTreeSelect.vue index abe64d0..fa827f0 100644 --- a/src/components/Form/src/jeecg/components/JlazyTreeSelect.vue +++ b/src/components/Form/src/jeecg/components/JlazyTreeSelect.vue @@ -18,14 +18,14 @@ /> + diff --git a/src/views/banner/empPoints/empPoints.api.ts b/src/views/banner/empPoints/empPoints.api.ts new file mode 100644 index 0000000..2cfa017 --- /dev/null +++ b/src/views/banner/empPoints/empPoints.api.ts @@ -0,0 +1,7 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + pageList = '/health-bank/bank/userPoints/pageList', +} + +export const listApi = (params: any) => defHttp.post({ url: Api.pageList, params }); diff --git a/src/views/banner/empPoints/empPoints.data.ts b/src/views/banner/empPoints/empPoints.data.ts new file mode 100644 index 0000000..923e765 --- /dev/null +++ b/src/views/banner/empPoints/empPoints.data.ts @@ -0,0 +1,73 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { orgSearchInfo } from '/@/utils/orgSearchInfo'; + +export const columns: BasicColumn[] = [ + { + title: '所属单位', + dataIndex: 'deptName', + }, + { + title: '所属部门', + dataIndex: 'orgName', + }, + { + title: '员工姓名', + dataIndex: 'realName', + width: 130, + }, + { + title: '员工编号', + dataIndex: 'workNo', + width: 120, + }, + { + title: '性别', + dataIndex: 'sexName', + width: 70, + }, + { + title: '年龄', + dataIndex: 'age', + width: 70, + }, + { + title: '当前可用积分', + dataIndex: 'points', + width: 130, + sorter: true, + }, + { + title: '累计获得积分', + dataIndex: 'addPointsSum', + width: 130, + sorter: true, + }, + { + title: '累计兑换积分', + dataIndex: 'exchangePointsSum', + width: 130, + sorter: true, + customRender: ({ text }) => { + return text || 0; + }, + }, + { + title: '最后一次打卡时间', + dataIndex: 'lastAddDate', + width: 160, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '员工姓名', + field: 'realName', + component: 'Input', + }, + { + label: '员工编号', + field: 'workNo', + component: 'Input', + }, + ...orgSearchInfo({ orgName: '所属单位', deptName: '所属部门' }), +]; diff --git a/src/views/banner/empPoints/empPointsList.vue b/src/views/banner/empPoints/empPointsList.vue new file mode 100644 index 0000000..c44bd34 --- /dev/null +++ b/src/views/banner/empPoints/empPointsList.vue @@ -0,0 +1,108 @@ + + + + + + 导出 + 导出记录 + + + + + + + + + + + diff --git a/src/views/banner/points/components/pointsModal.vue b/src/views/banner/points/components/pointsModal.vue new file mode 100644 index 0000000..6a78920 --- /dev/null +++ b/src/views/banner/points/components/pointsModal.vue @@ -0,0 +1,55 @@ + + + + + + + diff --git a/src/views/banner/points/pointsList.api.ts b/src/views/banner/points/pointsList.api.ts new file mode 100644 index 0000000..c0e20bd --- /dev/null +++ b/src/views/banner/points/pointsList.api.ts @@ -0,0 +1,47 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; +const { createConfirm } = useMessage(); + +enum Api { + pageList = '/health-bank/bank/pointsRule/pageList', + add = '/health-bank/bank/pointsRule/add', + edit = '/health-bank/bank/pointsRule/edit', + editStatus = '/health-bank/bank/pointsRule/editStatus', + delete = '/health-bank/bank/pointsRule/delete', + deleteBatch = '/health-bank/bank/pointsRule/deleteBatch', +} + +export const listApi = (params: any) => defHttp.post({ url: Api.pageList, params }); +export const addApi = (params: any) => defHttp.post({ url: Api.add, params }); +export const editApi = (params: any) => defHttp.post({ url: Api.edit, params }); +export const editStatusApi = (params: any) => defHttp.get({ url: Api.editStatus, params }); +export const deleteApi = (params: any, callBack: any) => { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: async () => { + try { + await defHttp.get({ url: Api.delete, params }); + callBack(); + } catch (error) { + console.log(error); + } + }, + }); +}; +export const deleteBatchApi = (params: any, callBack: any) => { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: async () => { + try { + await defHttp.get({ url: Api.deleteBatch, params }); + callBack(); + } catch (error) { + console.log(error); + } + }, + }); +}; diff --git a/src/views/banner/points/pointsList.data.ts b/src/views/banner/points/pointsList.data.ts new file mode 100644 index 0000000..f868cae --- /dev/null +++ b/src/views/banner/points/pointsList.data.ts @@ -0,0 +1,159 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +const options: any[] = [ + { + label: '次', + value: 1, + }, + { + label: '日', + value: 2, + }, + { + label: '周', + value: 3, + }, + { + label: '月', + value: 4, + }, + { + label: '季', + value: 5, + }, + { + label: '年', + value: 6, + }, +]; + +export const columns: BasicColumn[] = [ + { + title: '健康分类', + dataIndex: 'ruleCategory_dictText', + }, + { + title: '健康行为', + dataIndex: 'ruleDesc', + }, + { + title: '行为周期', + dataIndex: 'frequency', + customRender: ({ text }) => { + return options.find((item) => item.value === text)?.label || ''; + }, + width: 120, + }, + { + title: '奖励积分', + dataIndex: 'points', + width: 120, + }, + { + title: '状态', + dataIndex: 'status', + width: 120, + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '健康图标', + field: 'a', + component: 'Input', + }, + { + label: '健康分类', + field: 'ruleCategory', + component: 'Select', + componentProps: () => ({ + options: [ + { + label: '日常健康行为', + value: '日常健康行为', + }, + { + label: '进阶健康行为', + value: '进阶健康行为', + }, + { + label: '健康监测达标', + value: '健康监测达标', + }, + ], + }), + }, + { + label: '发布日期', + field: 'c', + component: 'RangeDate', + componentProps: () => ({ + valueFormat: 'YYYY-MM-DD', + format: 'YYYY-MM-DD', + }), + }, +]; + +export const schemas: FormSchema[] = [ + { + label: '健康图标', + field: 'icon', + component: 'JImageUpload', + }, + { + label: '健康分类', + field: 'ruleCategory', + component: 'JDictSelectTag', + componentProps: () => ({ + dictCode: 'points_rule_category', + }), + required: true, + }, + { + label: '健康行为描述', + field: 'ruleDesc', + component: 'Input', + required: true, + }, + { + label: '行为周期', + field: 'frequency', + component: 'RadioGroup', + defaultValue: 2, + componentProps: () => ({ + options, + }), + required: true, + }, + { + label: '奖励积分', + field: 'points', + component: 'InputNumber', + componentProps: () => ({ + style: { + width: '100%', + }, + }), + required: true, + }, + { + label: '状态', + field: 'status', + component: 'RadioGroup', + defaultValue: 1, + componentProps: () => ({ + options: [ + { + label: '启用', + value: 1, + }, + { + label: '停用', + value: 2, + }, + ], + }), + required: true, + show: true, + }, +]; diff --git a/src/views/banner/points/pointsList.vue b/src/views/banner/points/pointsList.vue new file mode 100644 index 0000000..6d7a9c3 --- /dev/null +++ b/src/views/banner/points/pointsList.vue @@ -0,0 +1,126 @@ + + + + + + openModal(true, { isUpdate: false })">新增 + 导出 + 导出记录 + 批量删除 + + + + + + + + + + + + + + + + + diff --git a/src/views/system/noticeList/components/noticeDetailModal.vue b/src/views/system/noticeList/components/noticeDetailModal.vue new file mode 100644 index 0000000..bc78f98 --- /dev/null +++ b/src/views/system/noticeList/components/noticeDetailModal.vue @@ -0,0 +1,50 @@ + + + + {{ dataInfo?.title }} + + 发布人:{{ dataInfo?.createBy }} + 时间:{{ dataInfo?.createTime }} + + + 通知范围: + + {{ + dataInfo?.scopeType === 1 + ? dataInfo?.departScopeList && dataInfo?.departScopeList[0]?.record + : dataInfo?.userScopeList && dataInfo?.userScopeList.map((item: any) => item.record).join(',') + }} + + + + + + + + + + diff --git a/src/views/system/noticeList/components/noticeModal.vue b/src/views/system/noticeList/components/noticeModal.vue new file mode 100644 index 0000000..364f45f --- /dev/null +++ b/src/views/system/noticeList/components/noticeModal.vue @@ -0,0 +1,189 @@ + + + + + + + + 指定机构 + 指定员工 + + + + + + 选择机构: + + + + 指定员工: + + + + + + + + + + diff --git a/src/views/system/noticeList/noticeList.api.ts b/src/views/system/noticeList/noticeList.api.ts new file mode 100644 index 0000000..55b8189 --- /dev/null +++ b/src/views/system/noticeList/noticeList.api.ts @@ -0,0 +1,49 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; +import qs from 'qs'; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/health-system/sys/message/notice/list', + scopeUserList = '/health-system/sys/user/scopeUserList', + add = '/health-system/sys/message/notice/add', + delete = '/health-system/sys/message/notice/delete', + deleteBatch = '/health-system/sys/message/notice/deleteBatch', +} + +export const listApi = (params: any) => defHttp.get({ url: Api.list, params }); + +export const scopeUserListApi = (params: any) => defHttp.get({ url: Api.scopeUserList, params }); +export const addApi = (params: any) => defHttp.post({ url: Api.add, params }); + +export const deleteApi = (params: any, callBack: any) => { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: async () => { + try { + await defHttp.delete({ url: Api.delete + '?' + qs.stringify(params), params }); + callBack(); + } catch (error) { + console.log(error); + } + }, + }); +}; +export const deleteBatchApi = (params: any, callBack: any) => { + createConfirm({ + iconType: 'warning', + title: '删除', + content: '确定要删除吗?', + onOk: async () => { + try { + await defHttp.delete({ url: Api.deleteBatch + '?' + qs.stringify(params), params }); + callBack(); + } catch (error) { + console.log(error); + } + }, + }); +}; diff --git a/src/views/system/noticeList/noticeList.data.ts b/src/views/system/noticeList/noticeList.data.ts new file mode 100644 index 0000000..60e493f --- /dev/null +++ b/src/views/system/noticeList/noticeList.data.ts @@ -0,0 +1,172 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '通知标题', + dataIndex: 'title', + }, + { + title: '通知范围', + dataIndex: 'scopeType', + customRender: ({ text }) => { + switch (text) { + case 1: + return '指定部门'; + case 2: + return '指定员工'; + case 3: + return '即指定部门又指定员工'; + default: + return '-'; + } + }, + width: 120, + }, + { + title: '发布时间', + dataIndex: 'createTime', + width: 150, + }, + { + title: '操作人', + dataIndex: 'createBy', + width: 150, + }, +]; +export const searchFormSchema: FormSchema[] = [ + { + label: '通知标题', + field: 'title', + component: 'Input', + }, + { + label: '通知范围', + field: 'scopeType', + component: 'Select', + componentProps: () => ({ + options: [ + { + label: '指定机构', + value: 1, + }, + { + label: '指定员工', + value: 2, + }, + ], + }), + }, + { + label: '发布日期', + field: 'date', + component: 'RangeDate', + componentProps: () => ({ + valueFormat: 'YYYY-MM-DD', + format: 'YYYY-MM-DD', + }), + }, +]; + +export const schemas: FormSchema[] = [ + { + label: '通知标题', + field: 'title', + component: 'Input', + required: true, + }, + { + label: '通知范围', + field: 'scopeType', + component: 'RadioGroup', + defaultValue: 1, + componentProps: () => ({ + options: [ + { + label: '指定机构', + value: 1, + }, + { + label: '指定员工', + value: 2, + }, + ], + }), + slot: 'scopeTypeSlot', + required: true, + }, + { + label: '机构', + field: 'departScopeList', + component: 'Input', + show: false, + }, + { + label: '员工', + field: 'userScopeList', + component: 'Input', + show: false, + }, + { + label: '员工', + field: 'userScopeListRecord', + component: 'Input', + show: false, + }, + { + label: '通知内容', + field: 'content', + component: 'JEditor', + required: true, + }, + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; + +export const auditorColumns: BasicColumn[] = [ + { + title: '单位名称', + align: 'center', + dataIndex: 'orgName', + }, + { + title: '部门名称', + align: 'center', + dataIndex: 'departName', + }, + { + title: '员工姓名', + align: 'center', + dataIndex: 'realName', + }, + { + title: '员工工号', + align: 'center', + dataIndex: 'workNo', + }, +]; + +export const auditorSchema: FormSchema[] = [ + { + label: '单位', + field: 'orgCode', + component: 'JlazyTreeSelect', + componentProps: () => ({ + isHaveFLevel: true, + multiple: false, + }), + }, + { + label: '员工姓名', + field: 'realName', + component: 'Input', + }, + { + label: '员工工号', + field: 'workNo', + component: 'Input', + }, +]; diff --git a/src/views/system/noticeList/noticeList.vue b/src/views/system/noticeList/noticeList.vue new file mode 100644 index 0000000..dedc1b4 --- /dev/null +++ b/src/views/system/noticeList/noticeList.vue @@ -0,0 +1,93 @@ + + + + + 公告通知列表 + + openModal(true, {})">新增 + 导出 + 导出记录 + 批量删除 + + + + + + + + + + + + +