Skip to content

Commit 265302d

Browse files
YunaiVgitee-org
authored andcommitted
!6 修改测试出的多项bug
Merge pull request !6 from 周建/master
2 parents 4153a70 + f0af1bf commit 265302d

File tree

10 files changed

+82
-27
lines changed

10 files changed

+82
-27
lines changed

src/components/XModal/src/XModal.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ const props = defineProps({
1212
height: propTypes.string,
1313
minWidth: propTypes.string.def('460'),
1414
minHeight: propTypes.string.def('320'),
15-
showFooter: propTypes.bool.def(true)
15+
showFooter: propTypes.bool.def(true),
16+
maskClosable: propTypes.bool.def(false),
17+
escClosable: propTypes.bool.def(false)
1618
})
1719
1820
const getBindValue = computed(() => {

src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@
190190
</div>
191191
<XModal title="预览" width="80%" height="90%" v-model="previewModelVisible" destroy-on-close>
192192
<!-- append-to-body -->
193-
<pre v-highlight>
194-
<code class="hljs">
195-
<!-- 高亮代码块 -->
196-
{{ previewResult }}
197-
</code>
198-
</pre>
193+
<div v-highlight>
194+
<code class="hljs">
195+
<!-- 高亮代码块 -->
196+
{{ previewResult }}
197+
</code>
198+
</div>
199199
<!-- <pre>
200200
<code class="hljs" v-html="highlightedCode(previewType, previewResult)"></code>
201201
</pre> -->

src/views/bpm/definition/definition.data.ts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,29 @@ const crudSchemas = reactive<VxeCrudSchema>({
1717
title: '定义名称',
1818
field: 'name',
1919
table: {
20-
width: 120,
20+
// width: 120,
2121
slots: {
2222
default: 'name_default'
2323
}
2424
}
2525
},
2626
{
27-
title: '流程分类',
27+
title: '定义分类',
2828
field: 'category',
29-
dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
30-
dictClass: 'number'
29+
// dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
30+
// dictClass: 'number',
31+
table: {
32+
// width: 120,
33+
slots: {
34+
default: 'category_default'
35+
}
36+
}
3137
},
3238
{
3339
title: '表单信息',
3440
field: 'formId',
3541
table: {
36-
width: 120,
42+
// width: 200,
3743
slots: {
3844
default: 'formId_default'
3945
}
@@ -43,7 +49,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
4349
title: '流程版本',
4450
field: 'version',
4551
table: {
46-
width: 80,
52+
// width: 80,
4753
slots: {
4854
default: 'version_default'
4955
}
@@ -53,7 +59,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
5359
title: '激活状态',
5460
field: 'suspensionState',
5561
table: {
56-
width: 80,
62+
// width: 80,
5763
slots: {
5864
default: 'suspensionState_default'
5965
}
@@ -63,10 +69,10 @@ const crudSchemas = reactive<VxeCrudSchema>({
6369
title: '部署时间',
6470
field: 'deploymentTime',
6571
isForm: false,
66-
formatter: 'formatDate',
67-
table: {
68-
width: 180
69-
}
72+
formatter: 'formatDate'
73+
// table: {
74+
// width: 180
75+
// }
7076
}
7177
]
7278
})

src/views/bpm/definition/index.vue

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
<template #name_default="{ row }">
77
<XTextButton :title="row.name" @click="handleBpmnDetail(row.id)" />
88
</template>
9+
<!-- 流程分类 -->
10+
<template #category_default="{ row }">
11+
<DictTag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="Number(row?.category)" />
12+
</template>
913
<!-- 表单信息 -->
1014
<template #formId_default="{ row }">
1115
<XTextButton
@@ -43,6 +47,16 @@
4347
v-if="formDetailVisible"
4448
/>
4549
</XModal>
50+
<!-- 流程模型图的预览 -->
51+
<XModal title="流程图" v-model="showBpmnOpen" width="80%" height="90%">
52+
<my-process-viewer
53+
key="designer"
54+
v-model="bpmnXML"
55+
:value="bpmnXML"
56+
v-bind="bpmnControlForm"
57+
:prefix="bpmnControlForm.prefix"
58+
/>
59+
</XModal>
4660
</ContentWrap>
4761
</template>
4862
<script setup lang="ts">
@@ -51,8 +65,14 @@ import * as DefinitionApi from '@/api/bpm/definition'
5165
// import * as ModelApi from '@/api/bpm/model'
5266
import { allSchemas } from './definition.data'
5367
import { setConfAndFields2 } from '@/utils/formCreate'
68+
import { DICT_TYPE } from '@/utils/dict'
5469
55-
const message = useMessage() // 消息弹窗
70+
const bpmnXML = ref(null)
71+
const showBpmnOpen = ref(false)
72+
const bpmnControlForm = ref({
73+
prefix: 'flowable'
74+
})
75+
// const message = useMessage() // 消息弹窗
5676
const router = useRouter() // 路由
5777
const { query } = useRoute() // 查询参数
5878
@@ -89,15 +109,21 @@ const handleFormDetail = async (row) => {
89109
const handleBpmnDetail = (row) => {
90110
// TODO 芋艿:流程组件开发中
91111
console.log(row)
92-
message.success('流程组件开发中,预计 2 月底完成')
112+
DefinitionApi.getProcessDefinitionBpmnXMLApi(row).then((response) => {
113+
console.log(response, 'response')
114+
bpmnXML.value = response
115+
// 弹窗打开
116+
showBpmnOpen.value = true
117+
})
118+
// message.success('流程组件开发中,预计 2 月底完成')
93119
}
94120
95121
// 点击任务分配按钮
96122
const handleAssignRule = (row) => {
97123
router.push({
98124
name: 'BpmTaskAssignRuleList',
99125
query: {
100-
modelId: row.id
126+
processDefinitionId: row.id
101127
}
102128
})
103129
}

src/views/bpm/group/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</XTable>
4444
</ContentWrap>
4545

46-
<XModal v-model="dialogVisible" :title="dialogTitle">
46+
<XModal v-model="dialogVisible" :title="dialogTitle" :mask-closable="false">
4747
<!-- 对话框(添加 / 修改) -->
4848
<Form
4949
v-if="['create', 'update'].includes(actionType)"

src/views/bpm/model/index.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<template #name_default="{ row }">
2525
<XTextButton :title="row.name" @click="handleBpmnDetail(row.id)" />
2626
</template>
27+
<!-- 流程分类 -->
28+
<template #category_default="{ row }">
29+
<DictTag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="Number(row?.category)" />
30+
</template>
2731
<!-- 表单信息 -->
2832
<template #formId_default="{ row }">
2933
<XTextButton
@@ -429,6 +433,11 @@ const handleUpdate = async (rowId: number) => {
429433
await setDialogTile('edit')
430434
// 设置数据
431435
saveForm.value = await ModelApi.getModelApi(rowId)
436+
if (saveForm.value.category == null) {
437+
saveForm.value.category = 1
438+
} else {
439+
saveForm.value.category = Number(saveForm.value.category)
440+
}
432441
}
433442
434443
// 提交按钮

src/views/bpm/model/model.data.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
4444
field: 'category',
4545
dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
4646
dictClass: 'number',
47-
isSearch: true
47+
isSearch: true,
48+
table: {
49+
slots: {
50+
default: 'category_default'
51+
}
52+
}
4853
},
4954
{
5055
title: '表单信息',

src/views/bpm/processInstance/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<XButton
88
type="primary"
99
preIcon="ep:zoom-in"
10-
title="新建流程"
10+
title="发起流程"
1111
v-hasPermi="['bpm:process-instance:query']"
1212
@click="handleCreate"
1313
/>

src/views/bpm/taskAssignRule/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
<el-select v-model="formData.roleIds" multiple clearable style="width: 100%">
4646
<el-option
4747
v-for="item in roleOptions"
48-
:key="parseInt(item.id)"
48+
:key="item.id"
4949
:label="item.name"
50-
:value="parseInt(item.id)"
50+
:value="item.id"
5151
/>
5252
</el-select>
5353
</el-form-item>

src/views/system/user/user.data.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ const { t } = useI18n()
55
export const rules = reactive({
66
username: [required],
77
nickname: [required],
8-
email: [required],
8+
email: [
9+
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
10+
{
11+
type: 'email',
12+
message: t('profile.rules.truemail'),
13+
trigger: ['blur', 'change']
14+
}
15+
],
916
status: [required],
1017
mobile: [
1118
{

0 commit comments

Comments
 (0)