!6 修改测试出的多项bug

Merge pull request !6 from 周建/master
This commit is contained in:
芋道源码 2023-03-01 00:54:53 +00:00 committed by Gitee
commit 265302d7dd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
10 changed files with 82 additions and 27 deletions

View File

@ -12,7 +12,9 @@ const props = defineProps({
height: propTypes.string, height: propTypes.string,
minWidth: propTypes.string.def('460'), minWidth: propTypes.string.def('460'),
minHeight: propTypes.string.def('320'), minHeight: propTypes.string.def('320'),
showFooter: propTypes.bool.def(true) showFooter: propTypes.bool.def(true),
maskClosable: propTypes.bool.def(false),
escClosable: propTypes.bool.def(false)
}) })
const getBindValue = computed(() => { const getBindValue = computed(() => {

View File

@ -190,12 +190,12 @@
</div> </div>
<XModal title="预览" width="80%" height="90%" v-model="previewModelVisible" destroy-on-close> <XModal title="预览" width="80%" height="90%" v-model="previewModelVisible" destroy-on-close>
<!-- append-to-body --> <!-- append-to-body -->
<pre v-highlight> <div v-highlight>
<code class="hljs"> <code class="hljs">
<!-- 高亮代码块 --> <!-- 高亮代码块 -->
{{ previewResult }} {{ previewResult }}
</code> </code>
</pre> </div>
<!-- <pre> <!-- <pre>
<code class="hljs" v-html="highlightedCode(previewType, previewResult)"></code> <code class="hljs" v-html="highlightedCode(previewType, previewResult)"></code>
</pre> --> </pre> -->

View File

@ -17,23 +17,29 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '定义名称', title: '定义名称',
field: 'name', field: 'name',
table: { table: {
width: 120, // width: 120,
slots: { slots: {
default: 'name_default' default: 'name_default'
} }
} }
}, },
{ {
title: '流程分类', title: '定义分类',
field: 'category', field: 'category',
dictType: DICT_TYPE.BPM_MODEL_CATEGORY, // dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
dictClass: 'number' // dictClass: 'number',
table: {
// width: 120,
slots: {
default: 'category_default'
}
}
}, },
{ {
title: '表单信息', title: '表单信息',
field: 'formId', field: 'formId',
table: { table: {
width: 120, // width: 200,
slots: { slots: {
default: 'formId_default' default: 'formId_default'
} }
@ -43,7 +49,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '流程版本', title: '流程版本',
field: 'version', field: 'version',
table: { table: {
width: 80, // width: 80,
slots: { slots: {
default: 'version_default' default: 'version_default'
} }
@ -53,7 +59,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '激活状态', title: '激活状态',
field: 'suspensionState', field: 'suspensionState',
table: { table: {
width: 80, // width: 80,
slots: { slots: {
default: 'suspensionState_default' default: 'suspensionState_default'
} }
@ -63,10 +69,10 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '部署时间', title: '部署时间',
field: 'deploymentTime', field: 'deploymentTime',
isForm: false, isForm: false,
formatter: 'formatDate', formatter: 'formatDate'
table: { // table: {
width: 180 // width: 180
} // }
} }
] ]
}) })

View File

@ -6,6 +6,10 @@
<template #name_default="{ row }"> <template #name_default="{ row }">
<XTextButton :title="row.name" @click="handleBpmnDetail(row.id)" /> <XTextButton :title="row.name" @click="handleBpmnDetail(row.id)" />
</template> </template>
<!-- 流程分类 -->
<template #category_default="{ row }">
<DictTag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="Number(row?.category)" />
</template>
<!-- 表单信息 --> <!-- 表单信息 -->
<template #formId_default="{ row }"> <template #formId_default="{ row }">
<XTextButton <XTextButton
@ -43,6 +47,16 @@
v-if="formDetailVisible" v-if="formDetailVisible"
/> />
</XModal> </XModal>
<!-- 流程模型图的预览 -->
<XModal title="流程图" v-model="showBpmnOpen" width="80%" height="90%">
<my-process-viewer
key="designer"
v-model="bpmnXML"
:value="bpmnXML"
v-bind="bpmnControlForm"
:prefix="bpmnControlForm.prefix"
/>
</XModal>
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -51,8 +65,14 @@ import * as DefinitionApi from '@/api/bpm/definition'
// import * as ModelApi from '@/api/bpm/model' // import * as ModelApi from '@/api/bpm/model'
import { allSchemas } from './definition.data' import { allSchemas } from './definition.data'
import { setConfAndFields2 } from '@/utils/formCreate' import { setConfAndFields2 } from '@/utils/formCreate'
import { DICT_TYPE } from '@/utils/dict'
const message = useMessage() // const bpmnXML = ref(null)
const showBpmnOpen = ref(false)
const bpmnControlForm = ref({
prefix: 'flowable'
})
// const message = useMessage() //
const router = useRouter() // const router = useRouter() //
const { query } = useRoute() // const { query } = useRoute() //
@ -89,7 +109,13 @@ const handleFormDetail = async (row) => {
const handleBpmnDetail = (row) => { const handleBpmnDetail = (row) => {
// TODO // TODO
console.log(row) console.log(row)
message.success('流程组件开发中,预计 2 月底完成') DefinitionApi.getProcessDefinitionBpmnXMLApi(row).then((response) => {
console.log(response, 'response')
bpmnXML.value = response
//
showBpmnOpen.value = true
})
// message.success(' 2 ')
} }
// //
@ -97,7 +123,7 @@ const handleAssignRule = (row) => {
router.push({ router.push({
name: 'BpmTaskAssignRuleList', name: 'BpmTaskAssignRuleList',
query: { query: {
modelId: row.id processDefinitionId: row.id
} }
}) })
} }

View File

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

View File

@ -24,6 +24,10 @@
<template #name_default="{ row }"> <template #name_default="{ row }">
<XTextButton :title="row.name" @click="handleBpmnDetail(row.id)" /> <XTextButton :title="row.name" @click="handleBpmnDetail(row.id)" />
</template> </template>
<!-- 流程分类 -->
<template #category_default="{ row }">
<DictTag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="Number(row?.category)" />
</template>
<!-- 表单信息 --> <!-- 表单信息 -->
<template #formId_default="{ row }"> <template #formId_default="{ row }">
<XTextButton <XTextButton
@ -429,6 +433,11 @@ const handleUpdate = async (rowId: number) => {
await setDialogTile('edit') await setDialogTile('edit')
// //
saveForm.value = await ModelApi.getModelApi(rowId) saveForm.value = await ModelApi.getModelApi(rowId)
if (saveForm.value.category == null) {
saveForm.value.category = 1
} else {
saveForm.value.category = Number(saveForm.value.category)
}
} }
// //

View File

@ -44,7 +44,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
field: 'category', field: 'category',
dictType: DICT_TYPE.BPM_MODEL_CATEGORY, dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
dictClass: 'number', dictClass: 'number',
isSearch: true isSearch: true,
table: {
slots: {
default: 'category_default'
}
}
}, },
{ {
title: '表单信息', title: '表单信息',

View File

@ -7,7 +7,7 @@
<XButton <XButton
type="primary" type="primary"
preIcon="ep:zoom-in" preIcon="ep:zoom-in"
title="新建流程" title="发起流程"
v-hasPermi="['bpm:process-instance:query']" v-hasPermi="['bpm:process-instance:query']"
@click="handleCreate" @click="handleCreate"
/> />

View File

@ -45,9 +45,9 @@
<el-select v-model="formData.roleIds" multiple clearable style="width: 100%"> <el-select v-model="formData.roleIds" multiple clearable style="width: 100%">
<el-option <el-option
v-for="item in roleOptions" v-for="item in roleOptions"
:key="parseInt(item.id)" :key="item.id"
:label="item.name" :label="item.name"
:value="parseInt(item.id)" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@ -5,7 +5,14 @@ const { t } = useI18n()
export const rules = reactive({ export const rules = reactive({
username: [required], username: [required],
nickname: [required], nickname: [required],
email: [required], email: [
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
{
type: 'email',
message: t('profile.rules.truemail'),
trigger: ['blur', 'change']
}
],
status: [required], status: [required],
mobile: [ mobile: [
{ {