修改表格操作列
This commit is contained in:
@@ -1,115 +1,115 @@
|
||||
<!--流程分类页面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='流程分类'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
clearable
|
||||
placeholder='请输入分类名称'
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' class='ml10' @click='add' :icon='Plus'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!--弹出框-->
|
||||
<category-popup ref='categoryPopup' />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import CategoryPopup from '@/views/system/bpm/category/categoryPopup.vue'
|
||||
import { deleteCategory } from '@/api/bpm-boot/category'
|
||||
|
||||
defineOptions({
|
||||
name: 'bpmCategory'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
const categoryPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/category/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '分类名称', field: 'name', minWidth: 130 },
|
||||
{ title: '分类标识', field: 'code', minWidth: 130 },
|
||||
{ title: '分类描述', field: 'description', minWidth: 170 },
|
||||
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '排序', field: 'sort', width: 170 },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'update',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
categoryPopup.value.open('修改流程分类', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteCategory(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const add = () => {
|
||||
categoryPopup.value.open('新增流程分类')
|
||||
}
|
||||
|
||||
</script>
|
||||
<!--流程分类页面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='流程分类'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
clearable
|
||||
placeholder='请输入分类名称'
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' class='ml10' @click='add' :icon='Plus'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!--弹出框-->
|
||||
<category-popup ref='categoryPopup' />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import CategoryPopup from '@/views/system/bpm/category/categoryPopup.vue'
|
||||
import { deleteCategory } from '@/api/bpm-boot/category'
|
||||
|
||||
defineOptions({
|
||||
name: 'bpmCategory'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
const categoryPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/category/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '分类名称', field: 'name', minWidth: 130 },
|
||||
{ title: '分类标识', field: 'code', minWidth: 130 },
|
||||
{ title: '分类描述', field: 'description', minWidth: 170 },
|
||||
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '排序', field: 'sort', width: 170 },
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'update',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
categoryPopup.value.open('修改流程分类', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteCategory(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const add = () => {
|
||||
categoryPopup.value.open('新增流程分类')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,167 +1,167 @@
|
||||
<!--流程表单-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='表单名称'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.name'
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' class='ml10' :icon='Plus' @click='openForm'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!-- 预览表单对话框 -->
|
||||
<el-dialog v-model="detailVisible" title="表单详情" width="800">
|
||||
<form-create :option="detailData.option" :rule="detailData.rule" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { onMounted, provide, ref, reactive,nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { deleteForm, getById } from '@/api/bpm-boot/form'
|
||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||
|
||||
|
||||
const { push } = useRouter()
|
||||
defineOptions({
|
||||
name: 'category'
|
||||
})
|
||||
const formJson = reactive({"widgetList":[],"formConfig":{"modelName":"formData","refName":"vForm","rulesName":"rules","labelWidth":80,"labelPosition":"left","size":"","labelAlign":"label-left-align","cssCode":"","customClass":"","functions":"","layoutType":"PC","jsonVersion":3,"onFormCreated":"","onFormMounted":"","onFormDataChange":"","onFormValidate":""}})
|
||||
const formData = reactive({})
|
||||
const optionData = reactive({})
|
||||
const vfRenderRef = ref()
|
||||
const render = reactive({
|
||||
visible: false,
|
||||
title: ''
|
||||
})
|
||||
|
||||
const detailVisible = ref(false)
|
||||
const detailData = ref({
|
||||
rule: [],
|
||||
option: {}
|
||||
})
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/form/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '表单名称', minWidth: '160', field: 'name' },
|
||||
{ title: '备注', minWidth: '140', field: 'remark' },
|
||||
{ title: '状态', minWidth: '140', field: 'status',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'danger',
|
||||
1: 'success',
|
||||
},
|
||||
replaceValue: {
|
||||
0: '关闭',
|
||||
1: '开启',
|
||||
}
|
||||
},
|
||||
{ title: '排序', field: 'sort', width: 170 },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
minWidth: '230',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '预览',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
//首先根据id查询出详细数据,然后渲染json
|
||||
getById(row.id).then(res => {
|
||||
nextTick(async () => {
|
||||
setConfAndFields2(detailData, res.data.conf, res.data.fields)
|
||||
// 弹窗打开
|
||||
detailVisible.value = true
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '设计表单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
// push(`/admin/form/formDesigner?id=${row.id}`)
|
||||
openForm(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteForm(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
/** 添加/修改操作表单 */
|
||||
const openForm = (id?: string) => {
|
||||
const toRouter: { name: string; query?: { id: string } } = {
|
||||
name: 'BpmFormEditor'
|
||||
}
|
||||
// 表单新建的时候id传的是event需要排除
|
||||
if (typeof id === 'string') {
|
||||
toRouter.query = {
|
||||
id
|
||||
}
|
||||
}
|
||||
push(toRouter)
|
||||
}
|
||||
tableStore.table.params.orderBy = 'desc'
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
<!--流程表单-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='表单名称'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.name'
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' class='ml10' :icon='Plus' @click='openForm'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!-- 预览表单对话框 -->
|
||||
<el-dialog v-model="detailVisible" title="表单详情" width="800">
|
||||
<form-create :option="detailData.option" :rule="detailData.rule" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { onMounted, provide, ref, reactive,nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { deleteForm, getById } from '@/api/bpm-boot/form'
|
||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||
|
||||
|
||||
const { push } = useRouter()
|
||||
defineOptions({
|
||||
name: 'category'
|
||||
})
|
||||
const formJson = reactive({"widgetList":[],"formConfig":{"modelName":"formData","refName":"vForm","rulesName":"rules","labelWidth":80,"labelPosition":"left","size":"","labelAlign":"label-left-align","cssCode":"","customClass":"","functions":"","layoutType":"PC","jsonVersion":3,"onFormCreated":"","onFormMounted":"","onFormDataChange":"","onFormValidate":""}})
|
||||
const formData = reactive({})
|
||||
const optionData = reactive({})
|
||||
const vfRenderRef = ref()
|
||||
const render = reactive({
|
||||
visible: false,
|
||||
title: ''
|
||||
})
|
||||
|
||||
const detailVisible = ref(false)
|
||||
const detailData = ref({
|
||||
rule: [],
|
||||
option: {}
|
||||
})
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/form/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '表单名称', minWidth: '160', field: 'name' },
|
||||
{ title: '备注', minWidth: '140', field: 'remark' },
|
||||
{ title: '状态', minWidth: '140', field: 'status',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'danger',
|
||||
1: 'success',
|
||||
},
|
||||
replaceValue: {
|
||||
0: '关闭',
|
||||
1: '开启',
|
||||
}
|
||||
},
|
||||
{ title: '排序', field: 'sort', width: 170 },
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
minWidth: '230',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '预览',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
//首先根据id查询出详细数据,然后渲染json
|
||||
getById(row.id).then(res => {
|
||||
nextTick(async () => {
|
||||
setConfAndFields2(detailData, res.data.conf, res.data.fields)
|
||||
// 弹窗打开
|
||||
detailVisible.value = true
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '设计表单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
// push(`/admin/form/formDesigner?id=${row.id}`)
|
||||
openForm(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteForm(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
/** 添加/修改操作表单 */
|
||||
const openForm = (id?: string) => {
|
||||
const toRouter: { name: string; query?: { id: string } } = {
|
||||
name: 'BpmFormEditor'
|
||||
}
|
||||
// 表单新建的时候id传的是event需要排除
|
||||
if (typeof id === 'string') {
|
||||
toRouter.query = {
|
||||
id
|
||||
}
|
||||
}
|
||||
push(toRouter)
|
||||
}
|
||||
tableStore.table.params.orderBy = 'desc'
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,271 +1,271 @@
|
||||
<!--流程模型管理界面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<!-- <el-form-item label='用户'>-->
|
||||
<!-- <el-select v-model='tableStore.table.params.userId' filterable clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for='item in userListData'-->
|
||||
<!-- :key='item.id'-->
|
||||
<!-- :label='item.userName'-->
|
||||
<!-- :value='item.id'-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' @click='add' class='ml10' :icon='Plus'>新增模型</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef' isGroup></Table>
|
||||
<model-popup ref='modelPopup' />
|
||||
<!-- 弹窗:表单详情 -->
|
||||
<el-dialog title='表单详情' v-model='formDetailVisible' width='800'>
|
||||
<form-create :rule='formDetailPreview.rule' :option='formDetailPreview.option' />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import ModelPopup from '@/views/system/bpm/model/modelPopup.vue'
|
||||
import { deleteModel, deployModel } from '@/api/bpm-boot/model'
|
||||
import { getById } from '@/api/bpm-boot/form'
|
||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||
import { getSignSimpleList } from '@/api/bpm-boot/sign'
|
||||
|
||||
defineOptions({
|
||||
name: 'governSchemeHistory'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
const modelPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/model/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '模型标识', field: 'key', width: 160 },
|
||||
{ title: '模型名称', field: 'name', width: 160 },
|
||||
{ title: '流程分类', field: 'categoryName', width: 150 },
|
||||
{
|
||||
title: '表单信息', field: 'formName', width: 170,
|
||||
formatter: (obj: any) => {
|
||||
const formType = obj.row.formType
|
||||
if (formType == 20) {
|
||||
return getFormNameByViewPath(obj.row.formCustomViewPath)
|
||||
} else {
|
||||
return obj.row.formName
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '最新部署的流程定义',
|
||||
children: [
|
||||
{
|
||||
title: '模型版本',
|
||||
width: '150',
|
||||
field: 'processDefinition.version',
|
||||
type: 'html',
|
||||
formatter: (obj: any) => {
|
||||
if (obj.row.processDefinition) {
|
||||
const val = obj.row.processDefinition.version
|
||||
return `<a href='javascript:void(0);' style='color: #409EFF;text-decoration: none'>v${val}</a>`
|
||||
} else {
|
||||
return '未部署'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '激活状态',
|
||||
width: '150',
|
||||
field: 'processDefinition.suspensionState',
|
||||
// render: 'switch',
|
||||
// activeValue: '1',
|
||||
// inactiveValue: '0',
|
||||
// onChangeField: (row: any, value) => {
|
||||
// console.log(row, 444123, value)
|
||||
// value == 0 ? (value = 1) : (value = 0)
|
||||
// }
|
||||
render: 'tag',
|
||||
custom: {
|
||||
2: 'danger',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
2: '关闭',
|
||||
1: '开启'
|
||||
}
|
||||
},
|
||||
{ title: '部署时间', width: '150', field: 'processDefinition.deploymentTime' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '200',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '设计流程',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleDesign(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '部署流程',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleDeployConfirm(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '表单预览',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleFormDetail(row.formId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteModel(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (tableStore.table.params.addr) {
|
||||
tableStore.table.params.addrStrOption = tableStore.table.params.addr.map(tempArray => tempArray.join('/'))
|
||||
}
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
const flowInfo = ref()
|
||||
|
||||
onMounted(async () => {
|
||||
//加载流程标识
|
||||
await getSignSimpleList().then(res => {
|
||||
flowInfo.value = res.data
|
||||
})
|
||||
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.userId = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
|
||||
//获取流程标识的名称
|
||||
const getFormNameByViewPath = (viewPath: string) => {
|
||||
const nameItem = flowInfo.value.filter(item => item.viewPath == viewPath)
|
||||
if (nameItem.length > 0) {
|
||||
return nameItem[0].name
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
//新增用户信息
|
||||
const add = () => {
|
||||
modelPopup.value.open('新增流程模型')
|
||||
}
|
||||
|
||||
/** 设计流程 */
|
||||
const handleDesign = (rowId: string) => {
|
||||
push({
|
||||
name: 'BpmModelEditor',
|
||||
query: {
|
||||
modelId: rowId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 发布流程 */
|
||||
const handleDeployConfirm = (rowId: string) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
ElMessageBox.confirm('是否部署该流程?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
draggable: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
handleDeploy(rowId)
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
const handleDeploy = async (rowId: string) => {
|
||||
// 发起部署
|
||||
await deployModel(rowId)
|
||||
ElMessage.success('部署成功')
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
/** 流程表单的详情按钮操作 */
|
||||
const formDetailVisible = ref(false)
|
||||
const formDetailPreview = ref({
|
||||
rule: [],
|
||||
option: {}
|
||||
})
|
||||
|
||||
const handleFormDetail = async (formId: string) => {
|
||||
// 设置表单
|
||||
await getById(formId).then(res => {
|
||||
const data = res.data
|
||||
setConfAndFields2(formDetailPreview, data.conf, data.fields)
|
||||
// 弹窗打开
|
||||
formDetailVisible.value = true
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--流程模型管理界面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<!-- <el-form-item label='用户'>-->
|
||||
<!-- <el-select v-model='tableStore.table.params.userId' filterable clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for='item in userListData'-->
|
||||
<!-- :key='item.id'-->
|
||||
<!-- :label='item.userName'-->
|
||||
<!-- :value='item.id'-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' @click='add' class='ml10' :icon='Plus'>新增模型</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef' isGroup></Table>
|
||||
<model-popup ref='modelPopup' />
|
||||
<!-- 弹窗:表单详情 -->
|
||||
<el-dialog title='表单详情' v-model='formDetailVisible' width='800'>
|
||||
<form-create :rule='formDetailPreview.rule' :option='formDetailPreview.option' />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import ModelPopup from '@/views/system/bpm/model/modelPopup.vue'
|
||||
import { deleteModel, deployModel } from '@/api/bpm-boot/model'
|
||||
import { getById } from '@/api/bpm-boot/form'
|
||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||
import { getSignSimpleList } from '@/api/bpm-boot/sign'
|
||||
|
||||
defineOptions({
|
||||
name: 'governSchemeHistory'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
const modelPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/model/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '模型标识', field: 'key', width: 160 },
|
||||
{ title: '模型名称', field: 'name', width: 160 },
|
||||
{ title: '流程分类', field: 'categoryName', width: 150 },
|
||||
{
|
||||
title: '表单信息', field: 'formName', width: 170,
|
||||
formatter: (obj: any) => {
|
||||
const formType = obj.row.formType
|
||||
if (formType == 20) {
|
||||
return getFormNameByViewPath(obj.row.formCustomViewPath)
|
||||
} else {
|
||||
return obj.row.formName
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '最新部署的流程定义',
|
||||
children: [
|
||||
{
|
||||
title: '模型版本',
|
||||
width: '150',
|
||||
field: 'processDefinition.version',
|
||||
type: 'html',
|
||||
formatter: (obj: any) => {
|
||||
if (obj.row.processDefinition) {
|
||||
const val = obj.row.processDefinition.version
|
||||
return `<a href='javascript:void(0);' style='color: #409EFF;text-decoration: none'>v${val}</a>`
|
||||
} else {
|
||||
return '未部署'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '激活状态',
|
||||
width: '150',
|
||||
field: 'processDefinition.suspensionState',
|
||||
// render: 'switch',
|
||||
// activeValue: '1',
|
||||
// inactiveValue: '0',
|
||||
// onChangeField: (row: any, value) => {
|
||||
// console.log(row, 444123, value)
|
||||
// value == 0 ? (value = 1) : (value = 0)
|
||||
// }
|
||||
render: 'tag',
|
||||
custom: {
|
||||
2: 'danger',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
2: '关闭',
|
||||
1: '开启'
|
||||
}
|
||||
},
|
||||
{ title: '部署时间', width: '150', field: 'processDefinition.deploymentTime' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: '200',
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '设计流程',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleDesign(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '部署流程',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleDeployConfirm(row.id)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '表单预览',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleFormDetail(row.formId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteModel(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (tableStore.table.params.addr) {
|
||||
tableStore.table.params.addrStrOption = tableStore.table.params.addr.map(tempArray => tempArray.join('/'))
|
||||
}
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
const flowInfo = ref()
|
||||
|
||||
onMounted(async () => {
|
||||
//加载流程标识
|
||||
await getSignSimpleList().then(res => {
|
||||
flowInfo.value = res.data
|
||||
})
|
||||
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.userId = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
|
||||
//获取流程标识的名称
|
||||
const getFormNameByViewPath = (viewPath: string) => {
|
||||
const nameItem = flowInfo.value.filter(item => item.viewPath == viewPath)
|
||||
if (nameItem.length > 0) {
|
||||
return nameItem[0].name
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
//新增用户信息
|
||||
const add = () => {
|
||||
modelPopup.value.open('新增流程模型')
|
||||
}
|
||||
|
||||
/** 设计流程 */
|
||||
const handleDesign = (rowId: string) => {
|
||||
push({
|
||||
name: 'BpmModelEditor',
|
||||
query: {
|
||||
modelId: rowId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 发布流程 */
|
||||
const handleDeployConfirm = (rowId: string) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
ElMessageBox.confirm('是否部署该流程?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
draggable: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
handleDeploy(rowId)
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
const handleDeploy = async (rowId: string) => {
|
||||
// 发起部署
|
||||
await deployModel(rowId)
|
||||
ElMessage.success('部署成功')
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
/** 流程表单的详情按钮操作 */
|
||||
const formDetailVisible = ref(false)
|
||||
const formDetailPreview = ref({
|
||||
rule: [],
|
||||
option: {}
|
||||
})
|
||||
|
||||
const handleFormDetail = async (formId: string) => {
|
||||
// 设置表单
|
||||
await getById(formId).then(res => {
|
||||
const data = res.data
|
||||
setConfAndFields2(formDetailPreview, data.conf, data.fields)
|
||||
// 弹窗打开
|
||||
formDetailVisible.value = true
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,113 +1,113 @@
|
||||
<!--流程分类页面-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="标识名称">
|
||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标识key">
|
||||
<el-input v-model="tableStore.table.params.signKey" clearable placeholder="请输入key" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" class="ml10" @click="add" :icon="Plus">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
<!--弹出框-->
|
||||
<sign-popup ref="signPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import SignPopup from '@/views/system/bpm/sign/signPopup.vue'
|
||||
import { deleteSign } from '@/api/bpm-boot/sign'
|
||||
|
||||
defineOptions({
|
||||
name: 'bpmSign'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
const signPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpmSign/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '标识名称', field: 'name', minWidth: 130 },
|
||||
{ title: '标识key', field: 'signKey', minWidth: 130 },
|
||||
{ title: '表单查看地址', field: 'viewPath', minWidth: 200 },
|
||||
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '排序', field: 'sort', width: 170 },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'update',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
signPopup.value.open('修改流程标识', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteSign(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.name = ''
|
||||
tableStore.table.params.signKey = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const add = () => {
|
||||
signPopup.value.open('新增流程标识')
|
||||
}
|
||||
</script>
|
||||
<!--流程分类页面-->
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="标识名称">
|
||||
<el-input v-model="tableStore.table.params.name" clearable placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标识key">
|
||||
<el-input v-model="tableStore.table.params.signKey" clearable placeholder="请输入key" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" class="ml10" @click="add" :icon="Plus">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
<!--弹出框-->
|
||||
<sign-popup ref="signPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import SignPopup from '@/views/system/bpm/sign/signPopup.vue'
|
||||
import { deleteSign } from '@/api/bpm-boot/sign'
|
||||
|
||||
defineOptions({
|
||||
name: 'bpmSign'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
const signPopup = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpmSign/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{ title: '标识名称', field: 'name', minWidth: 130 },
|
||||
{ title: '标识key', field: 'signKey', minWidth: 130 },
|
||||
{ title: '表单查看地址', field: 'viewPath', minWidth: 200 },
|
||||
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '排序', field: 'sort', width: 170 },
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'update',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
signPopup.value.open('修改流程标识', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteSign(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.name = ''
|
||||
tableStore.table.params.signKey = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const add = () => {
|
||||
signPopup.value.open('新增流程标识')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,292 +1,292 @@
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<!-- <template #operation>-->
|
||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
|
||||
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!--弹框-->
|
||||
<feedback-popup ref="feedbackPopup" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { cancelFeedback } from '@/api/supervision-boot/leaflet'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
const dictData = useDictData()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const { push } = useRouter()
|
||||
const tableRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const feedbackPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/warningLeaflet/allPageData',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
|
||||
align: 'center',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'problemType',
|
||||
title: '预告警单问题来源',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'warning',
|
||||
2: 'warning',
|
||||
3: 'warning',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '技术监督计划',
|
||||
2: '在线监测超标问题',
|
||||
3: '用户投诉问题',
|
||||
4: '试运行监测点问题'
|
||||
}
|
||||
},
|
||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
|
||||
{
|
||||
field: 'leafletType',
|
||||
title: '告警类型',
|
||||
render: 'tag',
|
||||
minWidth: '150',
|
||||
custom: {
|
||||
1: 'warning',
|
||||
2: 'danger'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '预警单',
|
||||
2: '告警单'
|
||||
}
|
||||
// formatter: (row: any) => {
|
||||
// return row.row.leafletType == 1 ? '预警单' : '告警单'
|
||||
// }
|
||||
},
|
||||
{ field: 'reformAdvice', title: '整改意见', minWidth: '200' },
|
||||
{ field: 'leafletName', title: '单据名称', minWidth: '200' },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
5: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
5: '新增'
|
||||
}
|
||||
},
|
||||
|
||||
{ field: 'createTime', title: '创建时间', minWidth: '150' },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: '220',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '发送督办单',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// click: row => {
|
||||
// // handleAudit(row.processInstanceId)
|
||||
// ElMessage.warning('待打通生成管理系统接口!')
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '问题反馈',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || row.status !== 5
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'填报反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'编辑',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
// deviceQuitPopup.value.open('重新发起', row)
|
||||
feedbackPopup.value.open(
|
||||
'重新发起告警单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath,
|
||||
row.reformAdvice
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '报告下载',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.problemType != 2
|
||||
},
|
||||
click: row => {
|
||||
window.open(row.filePath)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelFeedback(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<template>
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<!-- <template #operation>-->
|
||||
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
|
||||
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!--弹框-->
|
||||
<feedback-popup ref="feedbackPopup" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import FeedbackPopup from '@/views/pqs/supervise/technology/feedbackPopup.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { cancelFeedback } from '@/api/supervision-boot/leaflet'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
const dictData = useDictData()
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const { push } = useRouter()
|
||||
const tableRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const feedbackPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/warningLeaflet/allPageData',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
|
||||
align: 'center',
|
||||
width: 80,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'problemType',
|
||||
title: '预告警单问题来源',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'warning',
|
||||
2: 'warning',
|
||||
3: 'warning',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '技术监督计划',
|
||||
2: '在线监测超标问题',
|
||||
3: '用户投诉问题',
|
||||
4: '试运行监测点问题'
|
||||
}
|
||||
},
|
||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
|
||||
{
|
||||
field: 'leafletType',
|
||||
title: '告警类型',
|
||||
render: 'tag',
|
||||
minWidth: '150',
|
||||
custom: {
|
||||
1: 'warning',
|
||||
2: 'danger'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '预警单',
|
||||
2: '告警单'
|
||||
}
|
||||
// formatter: (row: any) => {
|
||||
// return row.row.leafletType == 1 ? '预警单' : '告警单'
|
||||
// }
|
||||
},
|
||||
{ field: 'reformAdvice', title: '整改意见', minWidth: '200' },
|
||||
{ field: 'leafletName', title: '单据名称', minWidth: '200' },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
minWidth: '150',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning',
|
||||
5: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消',
|
||||
5: '新增'
|
||||
}
|
||||
},
|
||||
|
||||
{ field: 'createTime', title: '创建时间', minWidth: '150' },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
minWidth: '220',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
|
||||
buttons: [
|
||||
// {
|
||||
// name: 'productSetting',
|
||||
// title: '发送督办单',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// click: row => {
|
||||
// // handleAudit(row.processInstanceId)
|
||||
// ElMessage.warning('待打通生成管理系统接口!')
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '问题反馈',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || row.status !== 5
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'填报反馈单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
showDisabled: row => {
|
||||
return row.dutyOrgId != adminInfo.$state.deptId || !(row.status == 0)
|
||||
},
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
click: row => {
|
||||
feedbackPopup.value.open(
|
||||
'编辑',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
|
||||
},
|
||||
click: row => {
|
||||
// deviceQuitPopup.value.open('重新发起', row)
|
||||
feedbackPopup.value.open(
|
||||
'重新发起告警单',
|
||||
row.id,
|
||||
row.status,
|
||||
row.issueDetail,
|
||||
row.problemPath,
|
||||
row.supervisionReport,
|
||||
row.reformAdvice,
|
||||
row.takeStep,
|
||||
row.reportPath,
|
||||
row.reformAdvice
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '报告下载',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.problemType != 2
|
||||
},
|
||||
click: row => {
|
||||
window.open(row.filePath)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelFeedback(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -1,161 +1,161 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker theCurrentTime showTimeAll showExport :showReset="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label='任务名称'>
|
||||
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称' clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { dateFormatter, formatPast2 } from '@/utils/formatTime'
|
||||
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
})
|
||||
const props = defineProps({
|
||||
height: [String, Number] ,
|
||||
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/task/doneList',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'已办任务',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '任务名称', field: 'processInstance.name', minWidth: 130 },
|
||||
{ title: '任务内容', field: 'instanceSign', minWidth: 300 },
|
||||
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 130 },
|
||||
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 130 },
|
||||
{ title: '当前任务', field: 'name', minWidth: 130 },
|
||||
{ title: '发起时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 170 },
|
||||
{
|
||||
title: '审批状态',
|
||||
field: 'status',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '审批建议', field: 'reason', minWidth: 150 },
|
||||
{
|
||||
title: '耗时',
|
||||
field: 'durationInMillis',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return formatPast2(obj.row.durationInMillis)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstance.id, row.historyInstanceId)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: '已取消'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
setTimeout(() => {
|
||||
if (props.height) {
|
||||
tableStore.table.height = props.height
|
||||
}
|
||||
},0)
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker theCurrentTime showTimeAll showExport :showReset="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label='任务名称'>
|
||||
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称' clearable maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { dateFormatter, formatPast2 } from '@/utils/formatTime'
|
||||
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
})
|
||||
const props = defineProps({
|
||||
height: [String, Number] ,
|
||||
|
||||
})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/task/doneList',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'已办任务',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '任务名称', field: 'processInstance.name', minWidth: 130 },
|
||||
{ title: '任务内容', field: 'instanceSign', minWidth: 300 },
|
||||
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 130 },
|
||||
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 130 },
|
||||
{ title: '当前任务', field: 'name', minWidth: 130 },
|
||||
{ title: '发起时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 170 },
|
||||
{
|
||||
title: '审批状态',
|
||||
field: 'status',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '审批建议', field: 'reason', minWidth: 150 },
|
||||
{
|
||||
title: '耗时',
|
||||
field: 'durationInMillis',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return formatPast2(obj.row.durationInMillis)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.processInstanceId
|
||||
},
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstance.id, row.historyInstanceId)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: '已取消'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
setTimeout(() => {
|
||||
if (props.height) {
|
||||
tableStore.table.height = props.height
|
||||
}
|
||||
},0)
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -1,186 +1,186 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker theCurrentTime showTimeAll showExport :showReset="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="任务名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入任务名称" clearable
|
||||
maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { formatDate, formatPast2 } from '@/utils/formatTime'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const categoryOptionList = dictData.getBasicData('flow_category')
|
||||
const props = defineProps({
|
||||
height: [String, Number],
|
||||
|
||||
})
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
})
|
||||
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/processInstance/myPage',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'我发起的',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '任务名称', field: 'name', minWidth: 130 },
|
||||
{ title: '任务内容', field: 'instanceSign', minWidth: 300 },
|
||||
{
|
||||
title: '流程分类',
|
||||
field: 'category',
|
||||
minWidth: 130,
|
||||
formatter: (row: any) => {
|
||||
return categoryOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
render: 'tag',
|
||||
minWidth: 130,
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '发起时间', field: 'startTime', minWidth: 140 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 140 },
|
||||
{
|
||||
title: '耗时',
|
||||
field: 'durationInMillis',
|
||||
minWidth: 130,
|
||||
formatter: (obj: any) => {
|
||||
const millis = obj.row.durationInMillis
|
||||
return millis > 0 ? formatPast2(millis) : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '当前审批任务',
|
||||
field: 'tasks',
|
||||
minWidth: 140,
|
||||
formatter: (obj: any) => {
|
||||
const tasks = obj.row.tasks
|
||||
if (tasks) {
|
||||
return tasks[0].name
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
|
||||
// return millis > 0 ? formatPast2(millis) : '--'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '180',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.id, row.historyInstanceId)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
// }
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: '已取消'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
setTimeout(() => {
|
||||
if (props.height) {
|
||||
tableStore.table.height = props.height
|
||||
}
|
||||
}, 0)
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker theCurrentTime showTimeAll showExport :showReset="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="任务名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入任务名称" clearable
|
||||
maxlength="32" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { formatDate, formatPast2 } from '@/utils/formatTime'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const categoryOptionList = dictData.getBasicData('flow_category')
|
||||
const props = defineProps({
|
||||
height: [String, Number],
|
||||
|
||||
})
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
})
|
||||
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const flag = ref(false)
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/processInstance/myPage',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
filename:'我发起的',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '任务名称', field: 'name', minWidth: 130 },
|
||||
{ title: '任务内容', field: 'instanceSign', minWidth: 300 },
|
||||
{
|
||||
title: '流程分类',
|
||||
field: 'category',
|
||||
minWidth: 130,
|
||||
formatter: (row: any) => {
|
||||
return categoryOptionList.filter(item => item.id === row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
render: 'tag',
|
||||
minWidth: 130,
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '发起时间', field: 'startTime', minWidth: 140 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 140 },
|
||||
{
|
||||
title: '耗时',
|
||||
field: 'durationInMillis',
|
||||
minWidth: 130,
|
||||
formatter: (obj: any) => {
|
||||
const millis = obj.row.durationInMillis
|
||||
return millis > 0 ? formatPast2(millis) : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '当前审批任务',
|
||||
field: 'tasks',
|
||||
minWidth: 140,
|
||||
formatter: (obj: any) => {
|
||||
const tasks = obj.row.tasks
|
||||
if (tasks) {
|
||||
return tasks[0].name
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
|
||||
// return millis > 0 ? formatPast2(millis) : '--'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: '180',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.id, row.historyInstanceId)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
// for (let key in tableStore.table.params) {
|
||||
// if (tableStore.table.params[key] === '') {
|
||||
// delete tableStore.table.params[key]
|
||||
// }
|
||||
// }
|
||||
},
|
||||
exportProcessingData: () => {
|
||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||
item.status =
|
||||
item.status == 0
|
||||
? '待提交审批'
|
||||
: item.status == 1
|
||||
? '审批中'
|
||||
: item.status == 2
|
||||
? '审批通过'
|
||||
: item.status == 3
|
||||
? '审批不通过'
|
||||
: '已取消'
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
setTimeout(() => {
|
||||
if (props.height) {
|
||||
tableStore.table.height = props.height
|
||||
}
|
||||
}, 0)
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -75,7 +75,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作',fixed: 'right',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
render: 'buttons',
|
||||
|
||||
Reference in New Issue
Block a user