From 8fd35076bd5f39509c09ac592ba984c8011d55b0 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 15 Jul 2021 22:24:47 +0800
Subject: [PATCH] 工作汇报功能新增
---
src/views/workreport/data.js | 230 +++++++
src/views/workreport/workreport.vue | 274 +++++++++
src/router/views/index.js | 733 +++++++++++++------------
src/api/workreport/workreport.js | 64 ++
src/views/workreport/workreply.vue | 274 +++++++++
src/api/system/dept.js | 120 ++-
6 files changed, 1,288 insertions(+), 407 deletions(-)
diff --git a/src/api/system/dept.js b/src/api/system/dept.js
index af5c6e7..d6d3f47 100644
--- a/src/api/system/dept.js
+++ b/src/api/system/dept.js
@@ -1,81 +1,91 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
- return request({
- url: '/api/blade-system/dept/list',
- method: 'get',
- params: {
- ...params,
- current,
- size,
- }
- })
+ return request({
+ url: '/api/blade-system/dept/list',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
}
export const getLazyList = (parentId, params) => {
- return request({
- url: '/api/blade-system/dept/lazy-list',
- method: 'get',
- params: {
- ...params,
- parentId
- }
- })
+ return request({
+ url: '/api/blade-system/dept/lazy-list',
+ method: 'get',
+ params: {
+ ...params,
+ parentId
+ }
+ })
}
export const remove = (ids) => {
- return request({
- url: '/api/blade-system/dept/remove',
- method: 'post',
- params: {
- ids,
- }
- })
+ return request({
+ url: '/api/blade-system/dept/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
}
export const add = (row) => {
- return request({
- url: '/api/blade-system/dept/submit',
- method: 'post',
- data: row
- })
+ return request({
+ url: '/api/blade-system/dept/submit',
+ method: 'post',
+ data: row
+ })
}
export const update = (row) => {
- return request({
- url: '/api/blade-system/dept/submit',
- method: 'post',
- data: row
- })
+ return request({
+ url: '/api/blade-system/dept/submit',
+ method: 'post',
+ data: row
+ })
}
export const getDept = (id) => {
- return request({
- url: '/api/blade-system/dept/detail',
- method: 'get',
- params: {
- id,
- }
- })
+ return request({
+ url: '/api/blade-system/dept/detail',
+ method: 'get',
+ params: {
+ id,
+ }
+ })
}
export const getDeptTree = (tenantId) => {
- return request({
- url: '/api/blade-system/dept/tree',
- method: 'get',
- params: {
- tenantId,
- }
- })
+ return request({
+ url: '/api/blade-system/dept/tree',
+ method: 'get',
+ params: {
+ tenantId,
+ }
+ })
}
export const getDeptLazyTree = (parentId) => {
- return request({
- url: '/api/blade-system/dept/lazy-tree',
- method: 'get',
- params: {
- parentId
- }
- })
+ return request({
+ url: '/api/blade-system/dept/lazy-tree',
+ method: 'get',
+ params: {
+ parentId
+ }
+ })
}
+
+export const getDeptLazyTreeUser = (parentId) => {
+ return request({
+ url: '/api/blade-system/dept/lazy-tree-user',
+ method: 'get',
+ params: {
+ parentId
+ }
+ })
+}
\ No newline at end of file
diff --git a/src/api/workreport/workreport.js b/src/api/workreport/workreport.js
new file mode 100644
index 0000000..5502ab5
--- /dev/null
+++ b/src/api/workreport/workreport.js
@@ -0,0 +1,64 @@
+import request from '@/router/axios';
+
+export const getListPage = (current, size, params) => {
+ return request({
+ url: '/api/workReport/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+
+export const getListPageReply = (current, size, params) => {
+ return request({
+ url: '/api/workReport/pageReply',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+
+
+export const getDetail = (id) => {
+ return request({
+ url: '/api/workReport/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/workReport/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/workReport/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/workReport/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
\ No newline at end of file
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 1e1e013..1484c2d 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -1,358 +1,387 @@
import Layout from '@/page/index/'
export default [{
- path: '/wel',
- component: Layout,
- redirect: '/wel/index',
- children: [{
- path: 'index',
- name: '首页',
- meta: {
- i18n: 'dashboard'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/wel/index')
+ path: '/wel',
+ component: Layout,
+ redirect: '/wel/index',
+ children: [{
+ path: 'index',
+ name: '首页',
+ meta: {
+ i18n: 'dashboard'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/wel/index')
+ }, {
+ path: 'dashboard',
+ name: '控制台',
+ meta: {
+ i18n: 'dashboard',
+ menu: false,
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/wel/dashboard')
+ }]
}, {
- path: 'dashboard',
- name: '控制台',
- meta: {
- i18n: 'dashboard',
- menu: false,
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/wel/dashboard')
- }]
-}, {
- path: '/test',
- component: Layout,
- redirect: '/test/index',
- children: [{
- path: 'index',
- name: '测试页',
- meta: {
- i18n: 'test'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/util/test')
- }]
-}, {
- path: '/dict-horizontal',
- component: Layout,
- redirect: '/dict-horizontal/index',
- children: [{
- path: 'index',
- name: '字典管理',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal')
- }]
-}, {
- path: '/dict-vertical',
- component: Layout,
- redirect: '/dict-vertical/index',
- children: [{
- path: 'index',
- name: '字典管理',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
- }]
-}, {
- path: '/info',
- component: Layout,
- redirect: '/info/index',
- children: [{
- path: 'index',
- name: '个人信息',
- meta: {
- i18n: 'info'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/system/userinfo')
- }]
-}, {
- path: '/work/process/leave',
- component: Layout,
- redirect: '/work/process/leave/form',
- children: [{
- path: 'form/:processDefinitionId',
- name: '请假流程',
- meta: {
- i18n: 'work'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
+ path: '/test',
+ component: Layout,
+ redirect: '/test/index',
+ children: [{
+ path: 'index',
+ name: '测试页',
+ meta: {
+ i18n: 'test'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/util/test')
+ }]
}, {
- path: 'handle/:taskId/:processInstanceId/:businessId',
- name: '处理请假流程',
- meta: {
- i18n: 'work'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
+ path: '/dict-horizontal',
+ component: Layout,
+ redirect: '/dict-horizontal/index',
+ children: [{
+ path: 'index',
+ name: '字典管理',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal')
+ }]
}, {
- path: 'detail/:processInstanceId/:businessId',
- name: '请假流程详情',
- meta: {
- i18n: 'work'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
- }]
-}, {
- path: '/securityAnalysis',
- component: Layout,
- redirect: '/securityAnalysis/index',
- children: [{
- path: 'index',
- name: '保安单位情况智能分析',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
- }]
-}, {
- path: '/recruitmentManagement',
- component: Layout,
- redirect: '/recruitmentManagement/index',
- children: [{
- path: 'index',
- name: '招聘管理',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
- }]
-}, {
- path: '/securityUnit',
- component: Layout,
- redirect: '/securityUnit/index',
- children: [{
- path: 'index',
- name: '保安单位信息',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
- }]
-}, {
- path: '/securityGuard',
- component: Layout,
- redirect: '/securityGuard/securityGuard',
- children: [{
- path: 'index',
- name: '保安员查询',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
- }]
-}, {
- path: '/securityGuardDetail',
- component: Layout,
- redirect: '/securityGuardDetail/index',
- children: [{
- path: 'index',
- name: '保安员详情',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardDetail')
- }]
-}, {
- path: '/resource',
- component: Layout,
- redirect: '/resource/attach',
- children: [{
- path: 'attach',
- name: '附件上传',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/resource/attach')
- }]
-}, {
- path: '/securityUnitChild',
- component: Layout,
- redirect: '/securityUnitChild/index',
- children: [{
- path: 'index',
- name: '保安单位详情',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/securityUnitChild/index')
- }]
-}, {
- path: '/securityGuard',
- component: Layout,
- redirect: '/securityGuard/securityGuard',
- children: [{
- path: 'index',
- name: '保安员管理',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
- }]
-},
-// {
-// path: '/dispatch/dispatch',
-// component: Layout,
-// redirect: '/dispatch/dispatch',
-// children: [{
-// path: 'index',
-// name: '派遣服务管理',
-// meta: {
-// i18n: 'dict'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
-// }]
-// },
-{
- path: '/desk',
- component: Layout,
- redirect: '/desk/notice',
- children: [{
- path: 'index',
- name: '通知公告',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/desk/notice')
- }]
-},
-// {
-// path: '/dispatch',
-// component: Layout,
-// redirect: '/dispatch/dispatch',
-// children: [{
-// path: 'dispatch',
-// name: '派遣单位管理',
-// meta: {
-// i18n: 'dispatch'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
-// }, {
-// path: 'dispatchChildoperable',
-// name: '派遣记录管理',
-// meta: {
-// i18n: 'dispatch'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperable')
-// }]
-// },
-// {
-// path: '/dispatchChild',
-// component: Layout,
-// redirect: '/dispatchChild/index',
-// children: [{
-// path: 'index',
-// name: '派遣服务记录',
-// meta: {
-// i18n: 'dict'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
-// }]
-// },
-// {
-// path: '/equipments',
-// component: Layout,
-// redirect: '/equipments/index',
-// children: [{
-// path: 'index',
-// name: '保安公司装备管理',
-// meta: {
-// i18n: 'dict'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/equipments/index')
-// }]
-// }, {
-// path: '/car',
-// component: Layout,
-// redirect: '/car/index',
-// children: [{
-// path: 'index',
-// name: '保安公司车辆管理',
-// meta: {
-// i18n: 'dict'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/car/index')
-// }]
-// }, {
-// path: '/gun',
-// component: Layout,
-// redirect: '/gun/index',
-// children: [{
-// path: 'index',
-// name: '保安公司枪支管理',
-// meta: {
-// i18n: 'dict'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/gun/index')
-// }]
-// },
-// {
-// path: '/securityEquipment',
-// component: Layout,
-// redirect: '/securityEquipment',
-// children: [{
-// path: 'equipments',
-// name: '装备管理',
-// meta: {
-// i18n: 'securityEquipment'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/securityEquipment/equipments')
-// }, {
-// path: 'car',
-// name: '车辆管理',
-// meta: {
-// i18n: 'car'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/securityEquipment/car')
-// }, {
-// path: 'gun',
-// name: '车辆管理',
-// meta: {
-// i18n: 'gun'
-// },
-// component: () =>
-// import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun')
-// }]
-// },
-{
- path: '/trainingRegistration',
- component: Layout,
- redirect: '/trainingRegistration/index',
- children: [{
- path: 'index',
- name: '保安培训报名管理',
- meta: {
- i18n: 'dict'
- },
- component: () =>
- import( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index')
- }]
-}]
\ No newline at end of file
+ path: '/dict-vertical',
+ component: Layout,
+ redirect: '/dict-vertical/index',
+ children: [{
+ path: 'index',
+ name: '字典管理',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
+ }]
+ }, {
+ path: '/info',
+ component: Layout,
+ redirect: '/info/index',
+ children: [{
+ path: 'index',
+ name: '个人信息',
+ meta: {
+ i18n: 'info'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/system/userinfo')
+ }]
+ }, {
+ path: '/work/process/leave',
+ component: Layout,
+ redirect: '/work/process/leave/form',
+ children: [{
+ path: 'form/:processDefinitionId',
+ name: '请假流程',
+ meta: {
+ i18n: 'work'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
+ }, {
+ path: 'handle/:taskId/:processInstanceId/:businessId',
+ name: '处理请假流程',
+ meta: {
+ i18n: 'work'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
+ }, {
+ path: 'detail/:processInstanceId/:businessId',
+ name: '请假流程详情',
+ meta: {
+ i18n: 'work'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
+ }]
+ }, {
+ path: '/securityAnalysis',
+ component: Layout,
+ redirect: '/securityAnalysis/index',
+ children: [{
+ path: 'index',
+ name: '保安单位情况智能分析',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/securityAnalysis/index')
+ }]
+ }, {
+ path: '/recruitmentManagement',
+ component: Layout,
+ redirect: '/recruitmentManagement/index',
+ children: [{
+ path: 'index',
+ name: '招聘管理',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/recruitmentManagement/index')
+ }]
+ }, {
+ path: '/securityUnit',
+ component: Layout,
+ redirect: '/securityUnit/index',
+ children: [{
+ path: 'index',
+ name: '保安单位信息',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
+ }]
+ }, {
+ path: '/securityGuard',
+ component: Layout,
+ redirect: '/securityGuard/securityGuard',
+ children: [{
+ path: 'index',
+ name: '保安员查询',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
+ }]
+ }, {
+ path: '/securityGuardDetail',
+ component: Layout,
+ redirect: '/securityGuardDetail/index',
+ children: [{
+ path: 'index',
+ name: '保安员详情',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuardDetail')
+ }]
+ }, {
+ path: '/resource',
+ component: Layout,
+ redirect: '/resource/attach',
+ children: [{
+ path: 'attach',
+ name: '附件上传',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/resource/attach')
+ }]
+ }, {
+ path: '/securityUnitChild',
+ component: Layout,
+ redirect: '/securityUnitChild/index',
+ children: [{
+ path: 'index',
+ name: '保安单位详情',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/securityUnitChild/index')
+ }]
+ }, {
+ path: '/securityGuard',
+ component: Layout,
+ redirect: '/securityGuard/securityGuard',
+ children: [{
+ path: 'index',
+ name: '保安员管理',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/securityGuard/securityGuard')
+ }]
+ },
+ // {
+ // path: '/dispatch/dispatch',
+ // component: Layout,
+ // redirect: '/dispatch/dispatch',
+ // children: [{
+ // path: 'index',
+ // name: '派遣服务管理',
+ // meta: {
+ // i18n: 'dict'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
+ // }]
+ // },
+ {
+ path: '/desk',
+ component: Layout,
+ redirect: '/desk/notice',
+ children: [{
+ path: 'index',
+ name: '通知公告',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/desk/notice')
+ }]
+ },
+ {
+ path: '/workreport',
+ component: Layout,
+ redirect: '/workreport/workreport',
+ children: [{
+ path: 'workreport',
+ name: '发起的汇报',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/workreport/workreport')
+ }]
+ },
+ {
+ path: '/workreport',
+ component: Layout,
+ redirect: '/workreport/workreply',
+ children: [{
+ path: 'workreply',
+ name: '接收的汇报',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/workreport/workreply')
+ }]
+ },
+ // {
+ // path: '/dispatch',
+ // component: Layout,
+ // redirect: '/dispatch/dispatch',
+ // children: [{
+ // path: 'dispatch',
+ // name: '派遣单位管理',
+ // meta: {
+ // i18n: 'dispatch'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatch')
+ // }, {
+ // path: 'dispatchChildoperable',
+ // name: '派遣记录管理',
+ // meta: {
+ // i18n: 'dispatch'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/dispatch/dispatchChildoperable')
+ // }]
+ // },
+ // {
+ // path: '/dispatchChild',
+ // component: Layout,
+ // redirect: '/dispatchChild/index',
+ // children: [{
+ // path: 'index',
+ // name: '派遣服务记录',
+ // meta: {
+ // i18n: 'dict'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
+ // }]
+ // },
+ // {
+ // path: '/equipments',
+ // component: Layout,
+ // redirect: '/equipments/index',
+ // children: [{
+ // path: 'index',
+ // name: '保安公司装备管理',
+ // meta: {
+ // i18n: 'dict'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/equipments/index')
+ // }]
+ // }, {
+ // path: '/car',
+ // component: Layout,
+ // redirect: '/car/index',
+ // children: [{
+ // path: 'index',
+ // name: '保安公司车辆管理',
+ // meta: {
+ // i18n: 'dict'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/car/index')
+ // }]
+ // }, {
+ // path: '/gun',
+ // component: Layout,
+ // redirect: '/gun/index',
+ // children: [{
+ // path: 'index',
+ // name: '保安公司枪支管理',
+ // meta: {
+ // i18n: 'dict'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/gun/index')
+ // }]
+ // },
+ // {
+ // path: '/securityEquipment',
+ // component: Layout,
+ // redirect: '/securityEquipment',
+ // children: [{
+ // path: 'equipments',
+ // name: '装备管理',
+ // meta: {
+ // i18n: 'securityEquipment'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/securityEquipment/equipments')
+ // }, {
+ // path: 'car',
+ // name: '车辆管理',
+ // meta: {
+ // i18n: 'car'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/securityEquipment/car')
+ // }, {
+ // path: 'gun',
+ // name: '车辆管理',
+ // meta: {
+ // i18n: 'gun'
+ // },
+ // component: () =>
+ // import( /* webpackChunkName: "views" */ '@/views/securityEquipment/gun')
+ // }]
+ // },
+ {
+ path: '/trainingRegistration',
+ component: Layout,
+ redirect: '/trainingRegistration/index',
+ children: [{
+ path: 'index',
+ name: '保安培训报名管理',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import ( /* webpackChunkName: "views" */ '@/views/trainingRegistration/index')
+ }]
+ }
+]
\ No newline at end of file
diff --git a/src/views/workreport/data.js b/src/views/workreport/data.js
new file mode 100644
index 0000000..eccf4d0
--- /dev/null
+++ b/src/views/workreport/data.js
@@ -0,0 +1,230 @@
+//已发送列表信息
+export var workreportColumn = [{
+ label: "汇报时间",
+ prop: "reportTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ searchRange: true,
+ searchSpan: 6,
+ hide: false,
+ addDisplay: false,
+ editDisplay: false,
+ // viewDisplay: false,
+ search: false,
+ rules: [{
+ required: true,
+ message: "请输入时间",
+ trigger: "blur"
+ }]
+ }, {
+ label: "汇报类别",
+ prop: "category",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workReportCategory",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ searchSpan: 4,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择汇报类别",
+ trigger: "blur"
+ }]
+ }, {
+ label: "汇报类型",
+ prop: "type",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workReportType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ searchSpan: 4,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择汇报类型",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "汇报人身份证号",
+ prop: "idCardNo",
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ },
+ {
+ label: "汇报内容",
+ prop: "content",
+ type: "textarea",
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入汇报内容",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "接收人",
+ prop: "receivedIds",
+ span: 24,
+ type: "tree",
+ dicUrl: "/api/blade-system/dept/lazy-tree-user",
+ hide: true,
+ props: {
+ label: "title",
+ value: "id",
+ },
+ multiple: true,
+ // dataType: "number",
+ rules: [{
+ required: true,
+ message: "请选择接收人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "接收人",
+ prop: "replyRealName",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ },
+ {
+ label: "接收人单位",
+ prop: "replyDeptName",
+ addDisplay: false,
+ editDisplay: false,
+ // viewDisplay: false,
+ },
+ {
+ label: "回复内容",
+ prop: "replyContent",
+ type: "textarea",
+ span: 24,
+ addDisplay: false,
+ editDisplay: false,
+ rules: [{
+ required: true,
+ message: "请输入回复内容",
+ trigger: "blur"
+ }]
+ }
+]
+
+
+//接收人列信息
+export var workreplyColumn = [{
+ label: "汇报人",
+ prop: "realName",
+ disabled: true,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请选择接收人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "汇报人单位",
+ prop: "deptName",
+ addDisplay: false,
+ editDisplay: false,
+ // viewDisplay: false,
+ }, {
+ label: "汇报时间",
+ prop: "reportTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ searchRange: true,
+ searchSpan: 6,
+ hide: false,
+ addDisplay: false,
+ editDisplay: false,
+ // viewDisplay: false,
+ search: false,
+ rules: [{
+ required: true,
+ message: "请输入时间",
+ trigger: "blur"
+ }]
+ }, {
+ label: "汇报类别",
+ prop: "category",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workReportCategory",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ searchSpan: 4,
+ search: true,
+ hide: true,
+ editDisplay: false,
+ rules: [{
+ required: true,
+ message: "请选择汇报类别",
+ trigger: "blur"
+ }]
+ }, {
+ label: "汇报类型",
+ prop: "type",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workReportType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ searchSpan: 4,
+ search: true,
+ disabled: true,
+ rules: [{
+ required: true,
+ message: "请选择汇报类型",
+ trigger: "blur"
+ }]
+ },
+ // {
+ // label: "汇报人身份证号",
+ // prop: "idCardNo",
+ // hide: true,
+ // addDisplay: false,
+ // editDisplay: false,
+ // viewDisplay: false,
+ // },
+ {
+ label: "汇报内容",
+ prop: "content",
+ type: "textarea",
+ // editDisplay: false,
+ disabled: true,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入汇报内容",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "回复内容",
+ prop: "replyContent",
+ type: "textarea",
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入回复内容",
+ trigger: "blur"
+ }]
+ }
+
+]
\ No newline at end of file
diff --git a/src/views/workreport/workreply.vue b/src/views/workreport/workreply.vue
new file mode 100644
index 0000000..a2e2f51
--- /dev/null
+++ b/src/views/workreport/workreply.vue
@@ -0,0 +1,274 @@
+<template>
+ <basic-container>
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ ref="crud"
+ @row-del="rowDel"
+ v-model="form"
+ :permission="permissionList"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ :before-open="beforeOpen"
+ @filter="filterChange"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
+ <!-- <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ </template> -->
+ <!-- <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button :size="size" :type="type" @click="handleUploadPage(row)"
+ >附件上传
+ </el-button>
+ </template> -->
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import { workreplyColumn } from "./data";
+import {
+ getListPageReply,
+ remove,
+ update,
+ add,
+ getDetail,
+} from "@/api/workreport/workreport";
+import { getDept } from "@/api/system/dept";
+import { mapGetters } from "vuex";
+
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ deptCategory: "",
+ deptId: "",
+ userId: "",
+ permissionAdd: "",
+ permissionDelete: "",
+ permissionView: "",
+ permissionEdit: "",
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 1000,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ editBtnText: "回复",
+ updateBtnText: "提交",
+ editTitle: "回复",
+ border: false,
+ index: true,
+ stripe: true,
+ viewBtn: true,
+ selection: true,
+ excelBtn: false,
+ menuWidth: 320,
+ dialogClickModal: false,
+ column: workreplyColumn,
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(null, false),
+ viewBtn: this.vaildData(this.permission.notice_view, false),
+ delBtn: this.vaildData(null, false),
+ editBtn: this.vaildData(this.permission.notice_edit, false),
+ };
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ mounted() {},
+ methods: {
+ rowSave(row, done, loading) {
+ row.category = 1;
+ row.deptId = this.deptId;
+ add(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then((res) => {
+ this.form = res.data.data;
+ });
+ }
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.deptId = JSON.parse(
+ window.localStorage.getItem("saber-userInfo")
+ ).content.dept_id;
+
+ this.userId = JSON.parse(
+ window.localStorage.getItem("saber-userInfo")
+ ).content.user_id;
+
+ var that = this;
+ getDept(this.deptId).then((res) => {
+ var deptCategory = res.data.data.deptCategory;
+ deptCategory == 1
+ ? (that.deptCategory = true)
+ : (that.deptCategory = false);
+
+ // const { releaseTimeRange } = this.query;
+ // if (that.deptCategory) {
+ params["deptId"] = this.deptId;
+ params["userId"] = this.userId;
+ // }
+ let values = {
+ ...params,
+ };
+ // if (releaseTimeRange) {
+ // values = {
+ // ...params,
+ // startTime: releaseTimeRange[0],
+ // endTime: releaseTimeRange[1],
+ // ...this.query,
+ // };
+ // values.releaseTimeRange = null;
+ // }
+ this.loading = true;
+ getListPageReply(page.currentPage, page.pageSize, values).then(
+ (res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ }
+ );
+ });
+ },
+ },
+};
+</script>
+
+<style>
+</style>
diff --git a/src/views/workreport/workreport.vue b/src/views/workreport/workreport.vue
new file mode 100644
index 0000000..d1ca951
--- /dev/null
+++ b/src/views/workreport/workreport.vue
@@ -0,0 +1,274 @@
+<template>
+ <basic-container>
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ ref="crud"
+ @row-del="rowDel"
+ v-model="form"
+ :permission="permissionList"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ :before-open="beforeOpen"
+ @filter="filterChange"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ </template>
+ <!-- <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button :size="size" :type="type" @click="handleUploadPage(row)"
+ >附件上传
+ </el-button>
+ </template> -->
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import { workreportColumn } from "./data";
+import {
+ getListPage,
+ remove,
+ update,
+ add,
+ getDetail,
+} from "@/api/workreport/workreport";
+import { getDept } from "@/api/system/dept";
+import { mapGetters } from "vuex";
+
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ deptCategory: "",
+ deptId: "",
+ userId: "",
+ permissionAdd: "",
+ permissionDelete: "",
+ permissionView: "",
+ permissionEdit: "",
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 1000,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: false,
+ addBtnText: "发起",
+ index: true,
+ stripe: true,
+ viewBtn: true,
+ selection: true,
+ excelBtn: false,
+ menuWidth: 320,
+ dialogClickModal: false,
+ column: workreportColumn,
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.notice_add, false),
+ viewBtn: this.vaildData(this.permission.notice_view, false),
+ delBtn: this.vaildData(this.permission.notice_delete, false),
+ editBtn: this.vaildData(this.permission.notice_edit, false),
+ };
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ mounted() {},
+ methods: {
+ rowSave(row, done, loading) {
+ row.receivedIds = row.receivedIds.join(",");
+ row.deptId = this.deptId;
+ row.userId = this.userId;
+ add(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ row.deptId = this.deptId;
+ row.userId = this.userId;
+ // row.receivedIds = row.receivedIds.join(",");
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then((res) => {
+ this.form = res.data.data;
+ });
+ }
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.deptId = JSON.parse(
+ window.localStorage.getItem("saber-userInfo")
+ ).content.dept_id;
+
+ this.userId = JSON.parse(
+ window.localStorage.getItem("saber-userInfo")
+ ).content.user_id;
+
+ var that = this;
+ getDept(this.deptId).then((res) => {
+ var deptCategory = res.data.data.deptCategory;
+ deptCategory == 1
+ ? (that.deptCategory = true)
+ : (that.deptCategory = false);
+
+ // const { releaseTimeRange } = this.query;
+ // if (that.deptCategory) {
+ params["deptId"] = this.deptId;
+ params["userId"] = this.userId;
+ // }
+ let values = {
+ ...params,
+ };
+ // if (releaseTimeRange) {
+ // values = {
+ // ...params,
+ // startTime: releaseTimeRange[0],
+ // endTime: releaseTimeRange[1],
+ // ...this.query,
+ // };
+ // values.releaseTimeRange = null;
+ // }
+ this.loading = true;
+ getListPage(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ });
+ },
+ },
+};
+</script>
+
+<style>
+</style>
--
Gitblit v1.9.3