修改 监督退役页面
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="挂载表单" width="700" :before-close="handleClose">
|
||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="400" :data="equipmentList">
|
||||
<vxe-column field="formId" title="序号"></vxe-column>
|
||||
<vxe-column field="formId" width="80" title="序号"></vxe-column>
|
||||
<vxe-column field="formName" title="功能名称"></vxe-column>
|
||||
<vxe-column title="操作">
|
||||
<vxe-column title="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" link @click="mount(row)">挂载</el-button>
|
||||
|
||||
</template>
|
||||
<el-button type="primary" size="small" link @click="mount(row)">挂载</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<template #footer>
|
||||
@@ -21,8 +20,11 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const dialogVisible = ref(false)
|
||||
const List = ref({})
|
||||
import { assFormWithDeploy } from '@/api/process-boot/bpm'
|
||||
const emit = defineEmits(['quit'])
|
||||
const List: any = ref({})
|
||||
const equipmentList = ref([
|
||||
{ formId: '1', formName: '谐波普测计划' },
|
||||
{ formId: '2', formName: '干扰源用户管理' },
|
||||
@@ -34,7 +36,13 @@ const handleClose = () => {
|
||||
}
|
||||
// 挂载
|
||||
const mount = (row: any) => {
|
||||
|
||||
assFormWithDeploy({
|
||||
formId: row.formId,
|
||||
deployId: List.value.id
|
||||
}).then(res => {
|
||||
ElMessage.success('挂载成功')
|
||||
handleClose()
|
||||
})
|
||||
}
|
||||
const open = (row: any) => {
|
||||
dialogVisible.value = true
|
||||
|
||||
@@ -89,12 +89,11 @@ onMounted(async () => {
|
||||
if (!data.bpmnXml) {
|
||||
// 首次创建的 Model 模型,它是没有 bpmnXml,此时需要给它一个默认的
|
||||
data.key = Math.random().toString(36).slice(-8)
|
||||
console.log('🚀 ~ onMounted ~ data.key:', data.key)
|
||||
data.bpmnXml = ` <?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.activiti.org/processdef">
|
||||
<process id="flow_${data.key}" name="${data.name || ''}" />
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram">
|
||||
<bpmndi:BPMNPlane id="${data.key}_di" bpmnElement="${data.key}" />
|
||||
<bpmndi:BPMNPlane id="flow_${data.key}_di" bpmnElement="flow_${data.key}" />
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>`
|
||||
}
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
<!-- 设计流程 -->
|
||||
<editor v-if="!addedShow" :model="model" @quit="quit" />
|
||||
<!-- 配置表单 -->
|
||||
<Allocation ref="allocationRef" />
|
||||
|
||||
<Allocation ref="allocationRef" @quit="tableStore.index()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -29,8 +28,9 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Allocation from './allocation.vue'
|
||||
import { deleteDeploy } from '@/api/process-boot/bpm'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
import editor from './editor/index.vue'
|
||||
|
||||
defineOptions({
|
||||
@@ -66,21 +66,7 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{ title: '流程版本(V)', field: 'version' },
|
||||
|
||||
{
|
||||
title: '状态',
|
||||
field: 'suspensionState',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: '',
|
||||
1: 'success',
|
||||
2: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '',
|
||||
1: '激活',
|
||||
2: '挂起'
|
||||
}
|
||||
},
|
||||
|
||||
{ title: '部署时间', field: 'deploymentTime' },
|
||||
{
|
||||
title: '操作',
|
||||
@@ -108,36 +94,25 @@ const tableStore = new TableStore({
|
||||
allocationRef.value.open(row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '挂起',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '激活',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'del',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {}
|
||||
click: row => {
|
||||
deleteDeploy([row.id]).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user