Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
47b5ce2f
authored
Apr 09, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REVIEW OA 请假
parent
50efd60e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
54 deletions
+54
-54
src/api/bpm/leave/index.ts
+1
-1
src/types/auto-imports.d.ts
+1
-0
src/views/bpm/oa/leave/create.vue
+13
-13
src/views/bpm/oa/leave/index.vue
+38
-39
src/views/mp/autoReply/index.vue
+1
-1
No files found.
src/api/bpm/leave/index.ts
View file @
47b5ce2f
...
@@ -22,6 +22,6 @@ export const getLeave = async (id: number) => {
...
@@ -22,6 +22,6 @@ export const getLeave = async (id: number) => {
}
}
// 获得请假申请分页
// 获得请假申请分页
export
const
getLeavePage
=
async
(
params
)
=>
{
export
const
getLeavePage
=
async
(
params
:
PageParam
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/oa/leave/page'
,
params
})
return
await
request
.
get
({
url
:
'/bpm/oa/leave/page'
,
params
})
}
}
src/types/auto-imports.d.ts
View file @
47b5ce2f
...
@@ -6,6 +6,7 @@ export {}
...
@@ -6,6 +6,7 @@ export {}
declare
global
{
declare
global
{
const
DICT_TYPE
:
typeof
import
(
'@/utils/dict'
)[
'DICT_TYPE'
]
const
DICT_TYPE
:
typeof
import
(
'@/utils/dict'
)[
'DICT_TYPE'
]
const
EffectScope
:
typeof
import
(
'vue'
)[
'EffectScope'
]
const
EffectScope
:
typeof
import
(
'vue'
)[
'EffectScope'
]
const
ElMessageBox
:
typeof
import
(
'element-plus/es'
)[
'ElMessageBox'
]
const
computed
:
typeof
import
(
'vue'
)[
'computed'
]
const
computed
:
typeof
import
(
'vue'
)[
'computed'
]
const
createApp
:
typeof
import
(
'vue'
)[
'createApp'
]
const
createApp
:
typeof
import
(
'vue'
)[
'createApp'
]
const
customRef
:
typeof
import
(
'vue'
)[
'customRef'
]
const
customRef
:
typeof
import
(
'vue'
)[
'customRef'
]
...
...
src/views/bpm/oa/leave/create.vue
View file @
47b5ce2f
<
template
>
<
template
>
<Dialog
title=
"发起
OA
请假流程"
v-model=
"modelVisible"
>
<Dialog
title=
"发起
OA
请假流程"
v-model=
"modelVisible"
>
<el-form
<el-form
ref=
"formRef"
ref=
"formRef"
:model=
"formData"
:model=
"formData"
...
@@ -71,17 +71,6 @@ const open = async () => {
...
@@ -71,17 +71,6 @@ const open = async () => {
modelVisible
.
value
=
true
modelVisible
.
value
=
true
resetForm
()
resetForm
()
}
}
/** 重置表单 */
const
resetForm
=
()
=>
{
formData
.
value
=
{
type
:
undefined
,
reason
:
undefined
,
startTime
:
undefined
,
endTime
:
undefined
}
formRef
.
value
?.
resetFields
()
}
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
/** 提交表单 */
/** 提交表单 */
...
@@ -95,7 +84,7 @@ const submitForm = async () => {
...
@@ -95,7 +84,7 @@ const submitForm = async () => {
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
const
data
=
formData
.
value
as
unknown
as
LeaveApi
.
LeaveVO
const
data
=
formData
.
value
as
unknown
as
LeaveApi
.
LeaveVO
await
LeaveApi
.
createLeave
Api
(
data
)
await
LeaveApi
.
createLeave
(
data
)
message
.
success
(
'新增成功'
)
message
.
success
(
'新增成功'
)
modelVisible
.
value
=
false
modelVisible
.
value
=
false
// 发送操作成功的事件
// 发送操作成功的事件
...
@@ -104,4 +93,15 @@ const submitForm = async () => {
...
@@ -104,4 +93,15 @@ const submitForm = async () => {
formLoading
.
value
=
false
formLoading
.
value
=
false
}
}
}
}
/** 重置表单 */
const
resetForm
=
()
=>
{
formData
.
value
=
{
type
:
undefined
,
reason
:
undefined
,
startTime
:
undefined
,
endTime
:
undefined
}
formRef
.
value
?.
resetFields
()
}
</
script
>
</
script
>
src/views/bpm/oa/leave/index.vue
View file @
47b5ce2f
<
template
>
<
template
>
<
content-w
rap>
<
ContentW
rap>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
<el-form
class=
"-mb-15px"
class=
"-mb-15px"
...
@@ -56,15 +56,15 @@
...
@@ -56,15 +56,15 @@
<el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
@
click=
"handleCreate()"
<el-button
type=
"primary"
plain
@
click=
"handleCreate()"
>
><Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
发起请假
</el-button
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
发起请假
>
</el-button
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</
content-w
rap>
</
ContentW
rap>
<!-- 列表 -->
<!-- 列表 -->
<
content-w
rap>
<
ContentW
rap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"申请编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"申请编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"result"
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"result"
>
...
@@ -99,36 +99,33 @@
...
@@ -99,36 +99,33 @@
width=
"180"
width=
"180"
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
/>
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"200"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"200"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
link
link
type=
"primary"
type=
"primary"
@
click=
"cancelLeave(scope.row)"
v-hasPermi=
"['bpm:oa-leave:create']"
v-if=
"scope.row.result === 1"
>
取消
</el-button
>
<el-button
link
type=
"primary"
@
click=
"handleDetail(scope.row)"
@
click=
"handleDetail(scope.row)"
v-hasPermi=
"['bpm:oa-leave:query']"
v-hasPermi=
"['bpm:oa-leave:query']"
>
详情
</el-button
>
>
详情
</el-button>
<el-button
<el-button
link
link
type=
"primary"
type=
"primary"
@
click=
"handleProcessDetail(scope.row)"
@
click=
"handleProcessDetail(scope.row)"
v-hasPermi=
"['bpm:oa-leave:query']"
v-hasPermi=
"['bpm:oa-leave:query']"
>
进度
</el-button
>
>
进度
</el-button>
<el-button
link
type=
"danger"
@
click=
"cancelLeave(scope.row)"
v-hasPermi=
"['bpm:oa-leave:create']"
v-if=
"scope.row.result === 1"
>
取消
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -139,28 +136,27 @@
...
@@ -139,28 +136,27 @@
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</
content-w
rap>
</
ContentW
rap>
<!-- 表单弹窗:详情 -->
<!-- 表单弹窗:详情 -->
<LeaveDetail
ref=
"detailRef"
/>
<LeaveDetail
ref=
"detailRef"
/>
<!-- 表单弹窗:添加 -->
<!-- 表单弹窗:添加 -->
<LeaveForm
ref=
"formRef"
@
success=
"getList"
/>
<LeaveForm
ref=
"formRef"
@
success=
"getList"
/>
</template>
</template>
<
script
setup
lang=
"ts"
name=
"
Oa
Leave"
>
<
script
setup
lang=
"ts"
name=
"
BpmOA
Leave"
>
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
LeaveApi
from
'@/api/bpm/leave'
import
*
as
LeaveApi
from
'@/api/bpm/leave'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
LeaveDetail
from
'./detail.vue'
import
LeaveDetail
from
'./detail.vue'
import
LeaveForm
from
'./create.vue'
import
LeaveForm
from
'./create.vue'
const
message
=
useMessage
()
// 消息弹窗
const
router
=
useRouter
()
// 路由
const
{
t
}
=
useI18n
()
// 国际化
const
loading
=
ref
(
true
)
// 列表的加载中
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
total
=
ref
(
0
)
// 列表的总页数
const
list
=
ref
([])
// 列表的数据
const
list
=
ref
([])
// 列表的数据
const
message
=
useMessage
()
// 消息弹窗
const
router
=
useRouter
()
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -175,7 +171,7 @@ const queryFormRef = ref() // 搜索的表单
...
@@ -175,7 +171,7 @@ const queryFormRef = ref() // 搜索的表单
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
LeaveApi
.
getLeavePage
Api
(
queryParams
)
const
data
=
await
LeaveApi
.
getLeavePage
(
queryParams
)
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
@@ -207,20 +203,23 @@ const handleDetail = (data: LeaveApi.LeaveVO) => {
...
@@ -207,20 +203,23 @@ const handleDetail = (data: LeaveApi.LeaveVO) => {
detailRef
.
value
.
open
(
data
)
detailRef
.
value
.
open
(
data
)
}
}
// 取消请假弹窗
/** 取消请假操作 */
const
cancelLeave
=
(
row
)
=>
{
const
cancelLeave
=
async
(
row
)
=>
{
ElMessageBox
.
prompt
(
'请输入取消原因'
,
'取消流程'
,
{
// 二次确认
confirmButtonText
:
'确定'
,
const
{
value
}
=
await
ElMessageBox
.
prompt
(
'请输入取消原因'
,
'取消流程'
,
{
cancelButtonText
:
'取消'
,
confirmButtonText
:
t
(
'common.ok'
),
cancelButtonText
:
t
(
'common.cancel'
),
inputPattern
:
/^
[\s\S]
*.*
\S[\s\S]
*$/
,
// 判断非空,且非空格
inputPattern
:
/^
[\s\S]
*.*
\S[\s\S]
*$/
,
// 判断非空,且非空格
inputErrorMessage
:
'取消原因不能为空'
inputErrorMessage
:
'取消原因不能为空'
}).
then
(
async
({
value
})
=>
{
await
ProcessInstanceApi
.
cancelProcessInstanceApi
(
row
.
id
,
value
)
message
.
success
(
'取消成功'
)
})
})
// 发起取消
await
ProcessInstanceApi
.
cancelProcessInstance
(
row
.
id
,
value
)
message
.
success
(
'取消成功'
)
// 刷新列表
await
getList
()
}
}
/
/ 审批进度
/
** 审批进度 */
const
handleProcessDetail
=
(
row
)
=>
{
const
handleProcessDetail
=
(
row
)
=>
{
router
.
push
({
router
.
push
({
name
:
'BpmProcessInstanceDetail'
,
name
:
'BpmProcessInstanceDetail'
,
...
...
src/views/mp/autoReply/index.vue
View file @
47b5ce2f
...
@@ -182,7 +182,7 @@
...
@@ -182,7 +182,7 @@
</el-dialog>
</el-dialog>
</ContentWrap>
</ContentWrap>
</template>
</template>
<
script
setup
>
<
script
setup
name=
"MpAutoReply"
>
import
{
ref
,
reactive
,
onMounted
,
nextTick
}
from
'vue'
import
{
ref
,
reactive
,
onMounted
,
nextTick
}
from
'vue'
import
WxVideoPlayer
from
'@/views/mp/components/wx-video-play/main.vue'
import
WxVideoPlayer
from
'@/views/mp/components/wx-video-play/main.vue'
import
WxVoicePlayer
from
'@/views/mp/components/wx-voice-play/main.vue'
import
WxVoicePlayer
from
'@/views/mp/components/wx-voice-play/main.vue'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment