From 018f0b49ecc5f0134245f2215de1a7fd10ecae9c Mon Sep 17 00:00:00 2001 From: lbw Date: Fri, 3 Mar 2023 00:43:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/oa/leave-bill.ts | 46 ++++++++ src/api/oa/model.ts | 46 ++++++++ src/api/oa/process.ts | 23 ++++ src/api/oa/task.ts | 31 +++++ src/i18n/pages/form/en.ts | 1 + src/i18n/pages/form/zh-cn.ts | 1 + src/utils/storage.ts | 4 +- src/views/oa/leave_bill/form.vue | 144 +++++++++++++++++++++++ src/views/oa/leave_bill/i18n/en.ts | 26 +++++ src/views/oa/leave_bill/i18n/zh-cn.ts | 26 +++++ src/views/oa/leave_bill/index.vue | 154 +++++++++++++++++++++++++ src/views/oa/model/detail.vue | 37 ++++++ src/views/oa/model/form.vue | 105 +++++++++++++++++ src/views/oa/model/i18n/en.ts | 16 +++ src/views/oa/model/i18n/zh-cn.ts | 16 +++ src/views/oa/model/index.vue | 142 +++++++++++++++++++++++ src/views/oa/process/i18n/en.ts | 17 +++ src/views/oa/process/i18n/zh-cn.ts | 16 +++ src/views/oa/process/index.vue | 157 ++++++++++++++++++++++++++ src/views/oa/task/comment.vue | 74 ++++++++++++ src/views/oa/task/form.vue | 136 ++++++++++++++++++++++ src/views/oa/task/i18n/en.ts | 18 +++ src/views/oa/task/i18n/zh-cn.ts | 18 +++ src/views/oa/task/index.vue | 131 +++++++++++++++++++++ src/views/personal/index.vue | 2 - 25 files changed, 1384 insertions(+), 3 deletions(-) create mode 100644 src/api/oa/leave-bill.ts create mode 100644 src/api/oa/model.ts create mode 100644 src/api/oa/process.ts create mode 100644 src/api/oa/task.ts create mode 100644 src/views/oa/leave_bill/form.vue create mode 100644 src/views/oa/leave_bill/i18n/en.ts create mode 100644 src/views/oa/leave_bill/i18n/zh-cn.ts create mode 100644 src/views/oa/leave_bill/index.vue create mode 100644 src/views/oa/model/detail.vue create mode 100644 src/views/oa/model/form.vue create mode 100644 src/views/oa/model/i18n/en.ts create mode 100644 src/views/oa/model/i18n/zh-cn.ts create mode 100644 src/views/oa/model/index.vue create mode 100644 src/views/oa/process/i18n/en.ts create mode 100644 src/views/oa/process/i18n/zh-cn.ts create mode 100644 src/views/oa/process/index.vue create mode 100644 src/views/oa/task/comment.vue create mode 100644 src/views/oa/task/form.vue create mode 100644 src/views/oa/task/i18n/en.ts create mode 100644 src/views/oa/task/i18n/zh-cn.ts create mode 100644 src/views/oa/task/index.vue diff --git a/src/api/oa/leave-bill.ts b/src/api/oa/leave-bill.ts new file mode 100644 index 00000000..de553bf0 --- /dev/null +++ b/src/api/oa/leave-bill.ts @@ -0,0 +1,46 @@ +import request from '/@/utils/request'; + +export function fetchList(query) { + return request({ + url: '/admin/leave-bill/page', + method: 'get', + params: query + }) +} + +export function addObj(obj) { + return request({ + url: '/admin/leave-bill', + method: 'post', + data: obj + }) +} + +export function getObj(id) { + return request({ + url: '/admin/leave-bill/' + id, + method: 'get' + }) +} + +export function submit(id) { + return request({ + url: '/admin/leave-bill/submit/' + id, + method: 'get' + }) +} + +export function delObj(id) { + return request({ + url: '/admin/leave-bill/' + id, + method: 'delete' + }) +} + +export function putObj(obj) { + return request({ + url: '/admin/leave-bill/', + method: 'put', + data: obj + }) +} diff --git a/src/api/oa/model.ts b/src/api/oa/model.ts new file mode 100644 index 00000000..4de5bd3e --- /dev/null +++ b/src/api/oa/model.ts @@ -0,0 +1,46 @@ +import request from '/@/utils/request'; + +export function fetchList(query) { + return request({ + url: '/admin/model', + method: 'get', + params: query + }) +} + +export function delObj(id) { + return request({ + url: '/admin/model/' + id, + method: 'delete' + }) +} + +export function deploy(id) { + return request({ + url: '/admin/model/deploy/' + id, + method: 'post' + }) +} + +export function addObj(obj) { + return request({ + url: '/admin/model/insert', + method: 'post', + data: obj + }) +} + +export function getObj(id) { + return request({ + url: '/admin/log/' + id, + method: 'get' + }) +} + +export function putObj(obj) { + return request({ + url: '/admin/log/', + method: 'put', + data: obj + }) +} diff --git a/src/api/oa/process.ts b/src/api/oa/process.ts new file mode 100644 index 00000000..3369e76c --- /dev/null +++ b/src/api/oa/process.ts @@ -0,0 +1,23 @@ +import request from '/@/utils/request'; + +export function fetchList(query) { + return request({ + url: '/admin/process', + method: 'get', + params: query + }) +} + +export function delObj(id) { + return request({ + url: '/admin/process/' + id, + method: 'delete' + }) +} + +export function status(id, type) { + return request({ + url: '/admin/process/status/' + id + '/' + type, + method: 'put' + }) +} diff --git a/src/api/oa/task.ts b/src/api/oa/task.ts new file mode 100644 index 00000000..689cdf19 --- /dev/null +++ b/src/api/oa/task.ts @@ -0,0 +1,31 @@ +import request from '/@/utils/request'; + +export function fetchList(query) { + return request({ + url: '/admin/task/todo', + method: 'get', + params: query + }) +} + +export function fetchDetail(id) { + return request({ + url: '/admin/task/' + id, + method: 'get' + }) +} + +export function fetchComment(id) { + return request({ + url: '/admin/task/comment/' + id, + method: 'get' + }) +} + +export function doTask(obj) { + return request({ + url: '/admin/task', + method: 'post', + data: obj + }) +} diff --git a/src/i18n/pages/form/en.ts b/src/i18n/pages/form/en.ts index 6a367d0d..193d784e 100644 --- a/src/i18n/pages/form/en.ts +++ b/src/i18n/pages/form/en.ts @@ -13,6 +13,7 @@ export default { resetBtn: 'reset', action:'action', optSuccessText: 'operation success', + optConfirmText: 'Confirm this operation ', editSuccessText: 'edit success', addSuccessText: 'add success', delSuccessText: 'delete success', diff --git a/src/i18n/pages/form/zh-cn.ts b/src/i18n/pages/form/zh-cn.ts index 4b74b3dd..ca3ff167 100644 --- a/src/i18n/pages/form/zh-cn.ts +++ b/src/i18n/pages/form/zh-cn.ts @@ -16,6 +16,7 @@ export default { addSuccessText: '添加成功', delSuccessText: '删除成功', delConfirmText: '此操作将永久删除', + optConfirmText: '是否确认本操作', confirmButtonText: '确认', cancelButtonText: '取消', download: '下载' diff --git a/src/utils/storage.ts b/src/utils/storage.ts index a5760d9c..d7286c68 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -37,7 +37,9 @@ export const Local = { export const Session = { // 设置临时缓存 set(key: string, val: any) { - if (key === 'token' || key === 'refresh_token') return Cookies.set(key, val); + if (key === 'token' || key === 'refresh_token') { + Cookies.set(key, val) + } window.sessionStorage.setItem(key, JSON.stringify(val)); }, // 获取临时缓存 diff --git a/src/views/oa/leave_bill/form.vue b/src/views/oa/leave_bill/form.vue new file mode 100644 index 00000000..ffed072a --- /dev/null +++ b/src/views/oa/leave_bill/form.vue @@ -0,0 +1,144 @@ + + + \ No newline at end of file diff --git a/src/views/oa/leave_bill/i18n/en.ts b/src/views/oa/leave_bill/i18n/en.ts new file mode 100644 index 00000000..869c73f3 --- /dev/null +++ b/src/views/oa/leave_bill/i18n/en.ts @@ -0,0 +1,26 @@ +export default { + leave: { + index: 'index', + importoaLeaveBillTip: 'import OaLeaveBill', + leaveId: 'leaveId', + username: 'username', + days: 'days', + content: 'content', + state: 'state', + leaveTime: 'leaveTime', + createTime: 'createTime', + updateTime: 'updateTime', + delFlag: 'delFlag', + tenantId: 'tenantId', + inputLeaveIdTip: 'input leaveId', + inputUsernameTip: 'input username', + inputDaysTip: 'input days', + inputContentTip: 'input content', + inputStateTip: 'input state', + inputLeaveTimeTip: 'input leaveTime', + inputCreateTimeTip: 'input createTime', + inputUpdateTimeTip: 'input updateTime', + inputDelFlagTip: 'input delFlag', + inputTenantIdTip: 'input tenantId', + } +} \ No newline at end of file diff --git a/src/views/oa/leave_bill/i18n/zh-cn.ts b/src/views/oa/leave_bill/i18n/zh-cn.ts new file mode 100644 index 00000000..0e4254f6 --- /dev/null +++ b/src/views/oa/leave_bill/i18n/zh-cn.ts @@ -0,0 +1,26 @@ +export default { + leave: { + index: '序号', + importoaLeaveBillTip: '导入请假表', + leaveId: '主键', + username: '用户名', + days: '请假天数', + content: '备注', + state: '状态', + leaveTime: '请假时间', + createTime: '创建时间', + updateTime: '更新时间', + delFlag: '删除标识', + tenantId: '所属租户', + inputLeaveIdTip: '请输入主键', + inputUsernameTip: '请输入用户名', + inputDaysTip: '请输入请假天数', + inputContentTip: '请输入备注', + inputStateTip: '请输入状态', + inputLeaveTimeTip: '请输入请假时间', + inputCreateTimeTip: '请输入创建时间', + inputUpdateTimeTip: '请输入更新时间', + inputDelFlagTip: '请输入删除标识', + inputTenantIdTip: '请输入所属租户', + } +} \ No newline at end of file diff --git a/src/views/oa/leave_bill/index.vue b/src/views/oa/leave_bill/index.vue new file mode 100644 index 00000000..5c727dfb --- /dev/null +++ b/src/views/oa/leave_bill/index.vue @@ -0,0 +1,154 @@ + + + \ No newline at end of file diff --git a/src/views/oa/model/detail.vue b/src/views/oa/model/detail.vue new file mode 100644 index 00000000..4217add0 --- /dev/null +++ b/src/views/oa/model/detail.vue @@ -0,0 +1,37 @@ +