REVIEW 工作流 - 我的流程、待办任务
This commit is contained in:
parent
8f2acea7a5
commit
5fb61f8cb8
@ -306,30 +306,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
activeMenu: 'bpm/oa/leave/create'
|
activeMenu: 'bpm/oa/leave/create'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/bpm/oa/leave/detail',
|
|
||||||
component: () => import('@/views/bpm/oa/leave/detail.vue'),
|
|
||||||
name: 'OALeaveDetail',
|
|
||||||
meta: {
|
|
||||||
noCache: true,
|
|
||||||
hidden: true,
|
|
||||||
canTo: true,
|
|
||||||
title: '查看 OA 请假',
|
|
||||||
activeMenu: 'bpm/oa/leave/detail'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/bpm/task/done',
|
|
||||||
component: () => import('@/views/bpm/task/done/index.vue'),
|
|
||||||
name: 'TaskDone',
|
|
||||||
meta: {
|
|
||||||
noCache: true,
|
|
||||||
hidden: true,
|
|
||||||
canTo: true,
|
|
||||||
title: '已办任务',
|
|
||||||
activeMenu: 'bpm/task/done/index'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/bpm/task/todo',
|
path: '/bpm/task/todo',
|
||||||
component: () => import('@/views/bpm/task/todo/index.vue'),
|
component: () => import('@/views/bpm/task/todo/index.vue'),
|
||||||
|
2
src/types/auto-components.d.ts
vendored
2
src/types/auto-components.d.ts
vendored
@ -24,6 +24,7 @@ declare module '@vue/runtime-core' {
|
|||||||
DocAlert: typeof import('./../components/DocAlert/index.vue')['default']
|
DocAlert: typeof import('./../components/DocAlert/index.vue')['default']
|
||||||
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
||||||
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
||||||
|
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||||
@ -72,6 +73,7 @@ declare module '@vue/runtime-core' {
|
|||||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
|
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
Error: typeof import('./../components/Error/src/Error.vue')['default']
|
Error: typeof import('./../components/Error/src/Error.vue')['default']
|
||||||
FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default']
|
FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default']
|
||||||
|
@ -27,7 +27,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程分类" prop="category">
|
<el-form-item label="流程分类" prop="category">
|
||||||
<el-select v-model="queryParams.category" placeholder="请选择" clearable>
|
<el-select
|
||||||
|
v-model="queryParams.category"
|
||||||
|
placeholder="请选择流程分类"
|
||||||
|
clearable
|
||||||
|
class="!w-240px"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -37,7 +42,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择" clearable>
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -47,7 +52,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结果" prop="result">
|
<el-form-item label="结果" prop="result">
|
||||||
<el-select v-model="queryParams.result" placeholder="请选择" clearable>
|
<el-select v-model="queryParams.result" placeholder="请选择结果" clearable class="!w-240px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -70,21 +75,16 @@
|
|||||||
<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
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
v-hasPermi="['bpm:process-instance:query']"
|
||||||
|
@click="handleCreate"
|
||||||
|
>
|
||||||
|
发起流程
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-col>
|
|
||||||
<el-row>
|
|
||||||
<el-col>
|
|
||||||
<!-- 操作:新增 -->
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
v-hasPermi="['bpm:process-instance:query']"
|
|
||||||
@click="handleCreate"
|
|
||||||
>发起流程</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
@ -135,16 +135,18 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
v-hasPermi="['bpm:process-instance:cancel']"
|
v-hasPermi="['bpm:process-instance:cancel']"
|
||||||
@click="handleDetail(scope.row)"
|
@click="handleDetail(scope.row)"
|
||||||
>详情</el-button
|
|
||||||
>
|
>
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.result === 1"
|
v-if="scope.row.result === 1"
|
||||||
v-hasPermi="['bpm:process-instance:query']"
|
v-hasPermi="['bpm:process-instance:query']"
|
||||||
@click="handleCancel(scope.row)"
|
@click="handleCancel(scope.row)"
|
||||||
>取消</el-button
|
|
||||||
>
|
>
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -158,14 +160,14 @@
|
|||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// 全局相关的 import
|
|
||||||
import { ElMessageBox } from 'element-plus'
|
|
||||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
|
|
||||||
// 业务相关的 import
|
|
||||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
|
||||||
// import { allSchemas } from './process.data'
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||||
|
const router = useRouter() // 路由
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
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([]) // 列表的数据
|
||||||
@ -179,10 +181,8 @@ const queryParams = reactive({
|
|||||||
result: undefined,
|
result: undefined,
|
||||||
createTime: []
|
createTime: []
|
||||||
})
|
})
|
||||||
const router = useRouter() // 路由
|
|
||||||
const message = useMessage() // 消息弹窗
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
@ -194,6 +194,7 @@ const getList = async () => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
@ -205,11 +206,6 @@ const resetQuery = () => {
|
|||||||
queryFormRef.value.resetFields()
|
queryFormRef.value.resetFields()
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
// ========== 列表相关 ==========
|
|
||||||
// const [reload] = useXTable({
|
|
||||||
// allSchemas: allSchemas,
|
|
||||||
// getListApi: ProcessInstanceApi.getMyProcessInstancePage
|
|
||||||
// })
|
|
||||||
|
|
||||||
/** 发起流程操作 **/
|
/** 发起流程操作 **/
|
||||||
const handleCreate = () => {
|
const handleCreate = () => {
|
||||||
@ -218,7 +214,7 @@ const handleCreate = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 列表操作
|
/** 查看详情 */
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
@ -229,18 +225,21 @@ const handleDetail = (row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 取消按钮操作 */
|
/** 取消按钮操作 */
|
||||||
const handleCancel = (row) => {
|
const handleCancel = async (row) => {
|
||||||
ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
// 二次确认
|
||||||
|
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||||
confirmButtonText: t('common.ok'),
|
confirmButtonText: t('common.ok'),
|
||||||
cancelButtonText: t('common.cancel'),
|
cancelButtonText: t('common.cancel'),
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
inputErrorMessage: '取消原因不能为空'
|
inputErrorMessage: '取消原因不能为空'
|
||||||
}).then(async ({ value }) => {
|
|
||||||
await ProcessInstanceApi.cancelProcessInstance(row.id, value)
|
|
||||||
message.success('取消成功')
|
|
||||||
// reload()
|
|
||||||
})
|
})
|
||||||
|
// 发起取消
|
||||||
|
await ProcessInstanceApi.cancelProcessInstance(row.id, value)
|
||||||
|
message.success('取消成功')
|
||||||
|
// 刷新列表
|
||||||
|
await getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
|
@ -72,10 +72,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
// 业务相关的 import
|
|
||||||
import * as TaskApi from '@/api/bpm/task'
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
const { push } = useRouter() // 路由
|
const { push } = useRouter() // 路由
|
||||||
|
import * as TaskApi from '@/api/bpm/task'
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
const list = ref([]) // 列表的数据
|
const list = ref([]) // 列表的数据
|
||||||
@ -98,17 +98,20 @@ const getList = async () => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
queryFormRef.value.resetFields()
|
queryFormRef.value.resetFields()
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
// 处理审批按钮
|
|
||||||
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (row) => {
|
const handleAudit = (row) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
@ -117,6 +120,7 @@ const handleAudit = (row) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
|
@ -174,9 +174,3 @@ onBeforeMount(() => {
|
|||||||
readRedisInfo()
|
readRedisInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
|
||||||
.redis {
|
|
||||||
height: 600px;
|
|
||||||
max-height: 860px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user