Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
<!--流程模型管理界面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<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>-->
|
||||
<!-- <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>
|
||||
<el-button type="primary" @click="add" class="ml10" :icon="Plus">新增模型</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef' isGroup></Table>
|
||||
<model-popup ref='modelPopup' />
|
||||
<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 title="表单详情" v-model="formDetailVisible" width="800">
|
||||
<form-create :rule="formDetailPreview.rule" :option="formDetailPreview.option" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
@@ -50,7 +50,6 @@ defineOptions({
|
||||
const { push } = useRouter()
|
||||
const modelPopup = ref()
|
||||
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/model/list',
|
||||
method: 'POST',
|
||||
@@ -61,23 +60,33 @@ const tableStore = new TableStore({
|
||||
{ title: '流程分类', field: 'categoryName', width: 150 },
|
||||
{ title: '表单信息', field: 'formName', width: 170 },
|
||||
{
|
||||
title: '创建时间', field: 'createTime', width: 150
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '最新部署的流程定义',
|
||||
children: [
|
||||
{ title: '模型版本', width: '150', field: 'processDefinition.version' },
|
||||
{
|
||||
title: '激活状态', width: '150', field: 'processDefinition.suspensionState',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
2: 'danger',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
2: '关闭',
|
||||
1: '开启'
|
||||
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)
|
||||
}
|
||||
// custom: {
|
||||
// 2: 'danger',
|
||||
// 1: 'success'
|
||||
// },
|
||||
// replaceValue: {
|
||||
// 2: '关闭',
|
||||
// 1: '开启'
|
||||
// }
|
||||
},
|
||||
{ title: '部署时间', width: '150', field: 'processDefinition.deploymentTime' }
|
||||
]
|
||||
@@ -150,11 +159,9 @@ const tableStore = new TableStore({
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
@@ -178,30 +185,23 @@ const handleDesign = (rowId: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/** 发布流程 */
|
||||
const handleDeployConfirm = (rowId: string) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
ElMessageBox.confirm(
|
||||
'是否部署该流程?',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
draggable: true,
|
||||
type: 'warning'
|
||||
}
|
||||
).then(() => {
|
||||
handleDeploy(rowId)
|
||||
ElMessageBox.confirm('是否部署该流程?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
draggable: true,
|
||||
type: 'warning'
|
||||
})
|
||||
.catch(() => {
|
||||
.then(() => {
|
||||
handleDeploy(rowId)
|
||||
})
|
||||
} catch {
|
||||
}
|
||||
.catch(() => {})
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
||||
const handleDeploy = async (rowId: string) => {
|
||||
// 发起部署
|
||||
await deployModel(rowId)
|
||||
@@ -224,8 +224,5 @@ const handleFormDetail = async (formId: string) => {
|
||||
// 弹窗打开
|
||||
formDetailVisible.value = true
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user