commit
b85046c4e1
|
@ -80,7 +80,8 @@ const resetFlowCondition = () => {
|
||||||
if (
|
if (
|
||||||
bpmnElementSourceRef.value &&
|
bpmnElementSourceRef.value &&
|
||||||
bpmnElementSourceRef.value.default &&
|
bpmnElementSourceRef.value.default &&
|
||||||
bpmnElementSourceRef.value.default.id === bpmnElement.value.id
|
bpmnElementSourceRef.value.default.id === bpmnElement.value.id &&
|
||||||
|
flowConditionForm.value.type == 'default'
|
||||||
) {
|
) {
|
||||||
// 默认
|
// 默认
|
||||||
flowConditionForm.value = { type: 'default' }
|
flowConditionForm.value = { type: 'default' }
|
||||||
|
@ -176,11 +177,13 @@ onBeforeUnmount(() => {
|
||||||
watch(
|
watch(
|
||||||
() => props.businessObject,
|
() => props.businessObject,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val) {
|
console.log(val, 'val')
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
resetFlowCondition()
|
resetFlowCondition()
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<Descriptions :schema="allSchemas.detailSchema" :data="formData" />
|
<Descriptions :schema="allSchemas.detailSchema" :data="formData" />
|
||||||
|
<el-button @click="routerReturn" type="primary">返回</el-button>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -9,7 +10,8 @@
|
||||||
// 业务相关的 import
|
// 业务相关的 import
|
||||||
import * as LeaveApi from '@/api/bpm/leave'
|
import * as LeaveApi from '@/api/bpm/leave'
|
||||||
import { allSchemas } from '@/views/bpm/oa/leave/leave.data'
|
import { allSchemas } from '@/views/bpm/oa/leave/leave.data'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
@ -22,6 +24,10 @@ const formData = ref({
|
||||||
reason: undefined
|
reason: undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const routerReturn = () => {
|
||||||
|
router.back()
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
id.value = query.id
|
id.value = query.id
|
||||||
if (!id.value) {
|
if (!id.value) {
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
<!-- 第一步,通过流程定义的列表,选择对应的流程 -->
|
<!-- 第一步,通过流程定义的列表,选择对应的流程 -->
|
||||||
<div v-if="!selectProcessInstance">
|
<div v-if="!selectProcessInstance">
|
||||||
<XTable @register="registerTable">
|
<XTable @register="registerTable">
|
||||||
|
<!-- 流程分类 -->
|
||||||
|
<template #category_default="{ row }">
|
||||||
|
<DictTag :type="DICT_TYPE.BPM_MODEL_CATEGORY" :value="Number(row?.category)" />
|
||||||
|
</template>
|
||||||
<template #version_default="{ row }">
|
<template #version_default="{ row }">
|
||||||
<el-tag v-if="row">v{{ row.version }}</el-tag>
|
<el-tag v-if="row">v{{ row.version }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
@ -56,6 +60,7 @@ import * as DefinitionApi from '@/api/bpm/definition'
|
||||||
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
|
||||||
import { setConfAndFields2 } from '@/utils/formCreate'
|
import { setConfAndFields2 } from '@/utils/formCreate'
|
||||||
import { ApiAttrs } from '@form-create/element-ui/types/config'
|
import { ApiAttrs } from '@form-create/element-ui/types/config'
|
||||||
|
import { DICT_TYPE } from '@/utils/dict'
|
||||||
|
|
||||||
const router = useRouter() // 路由
|
const router = useRouter() // 路由
|
||||||
const message = useMessage() // 消息
|
const message = useMessage() // 消息
|
||||||
|
|
|
@ -14,7 +14,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
title: '流程分类',
|
title: '流程分类',
|
||||||
field: 'category',
|
field: 'category',
|
||||||
dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
|
dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
|
||||||
dictClass: 'number'
|
dictClass: 'number',
|
||||||
|
table: {
|
||||||
|
slots: {
|
||||||
|
default: 'category_default'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '流程版本',
|
title: '流程版本',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<XTable @register="registerTable">
|
<XTable @register="registerTable" ref="xGrid">
|
||||||
<template #options_default="{ row }">
|
<template #options_default="{ row }">
|
||||||
<span :key="option" v-for="option in row.options">
|
<span :key="option" v-for="option in row.options">
|
||||||
<el-tag>
|
<el-tag>
|
||||||
|
@ -145,11 +145,12 @@ import { listSimpleUserGroupsApi } from '@/api/bpm/userGroup'
|
||||||
import { listSimpleDeptApi } from '@/api/system/dept'
|
import { listSimpleDeptApi } from '@/api/system/dept'
|
||||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
||||||
import { handleTree, defaultProps } from '@/utils/tree'
|
import { handleTree, defaultProps } from '@/utils/tree'
|
||||||
import { allSchemas, rules } from './taskAssignRule.data'
|
import { allSchemas, rules, idShowActionClick } from './taskAssignRule.data'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { query } = useRoute()
|
const { query } = useRoute()
|
||||||
|
const xGrid = ref()
|
||||||
|
|
||||||
// ========== 列表相关 ==========
|
// ========== 列表相关 ==========
|
||||||
|
|
||||||
|
@ -165,6 +166,8 @@ const taskAssignScriptDictDatas = getDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_SCRIP
|
||||||
const modelId = query.modelId
|
const modelId = query.modelId
|
||||||
// 流程定义的编号。如果 processDefinitionId 非空,则用于流程定义的查看,不支持配置
|
// 流程定义的编号。如果 processDefinitionId 非空,则用于流程定义的查看,不支持配置
|
||||||
const processDefinitionId = query.processDefinitionId
|
const processDefinitionId = query.processDefinitionId
|
||||||
|
let isShow = idShowActionClick(modelId)
|
||||||
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
modelId: modelId,
|
modelId: modelId,
|
||||||
|
@ -346,5 +349,10 @@ onMounted(() => {
|
||||||
listSimpleUserGroupsApi().then((data) => {
|
listSimpleUserGroupsApi().then((data) => {
|
||||||
userGroupOptions.value.push(...data)
|
userGroupOptions.value.push(...data)
|
||||||
})
|
})
|
||||||
|
if (!isShow) {
|
||||||
|
setTimeout(() => {
|
||||||
|
xGrid.value.Ref.hideColumn('actionbtns')
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -43,4 +43,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const idShowActionClick = (modelId?: any) => {
|
||||||
|
if (modelId) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|
||||||
|
|
|
@ -6,7 +6,15 @@ const { t } = useI18n() // 国际化
|
||||||
export const rules = reactive({
|
export const rules = reactive({
|
||||||
name: [required],
|
name: [required],
|
||||||
sort: [required],
|
sort: [required],
|
||||||
email: [required],
|
// email: [required],
|
||||||
|
email: [
|
||||||
|
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
|
||||||
|
{
|
||||||
|
type: 'email',
|
||||||
|
message: t('profile.rules.truemail'),
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
}
|
||||||
|
],
|
||||||
phone: [
|
phone: [
|
||||||
{
|
{
|
||||||
len: 11,
|
len: 11,
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
||||||
|
|
||||||
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
// 表单校验
|
// 表单校验
|
||||||
export const rules = reactive({
|
export const rules = reactive({
|
||||||
mail: [required],
|
// mail: [required],
|
||||||
|
mail: [
|
||||||
|
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
|
||||||
|
{
|
||||||
|
type: 'email',
|
||||||
|
message: t('profile.rules.truemail'),
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
}
|
||||||
|
],
|
||||||
username: [required],
|
username: [required],
|
||||||
password: [required],
|
password: [required],
|
||||||
host: [required],
|
host: [required],
|
||||||
|
|
|
@ -9,12 +9,19 @@ export const rules = reactive({
|
||||||
})
|
})
|
||||||
// CrudSchema
|
// CrudSchema
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
const crudSchemas = reactive<VxeCrudSchema>({
|
||||||
primaryKey: 'id',
|
// primaryKey: 'id',
|
||||||
primaryTitle: '角色编号',
|
// primaryTitle: '角色编号',
|
||||||
primaryType: 'seq',
|
// primaryType: 'seq',
|
||||||
action: true,
|
action: true,
|
||||||
actionWidth: '400px',
|
actionWidth: '400px',
|
||||||
columns: [
|
columns: [
|
||||||
|
{
|
||||||
|
title: '角色编号',
|
||||||
|
field: 'id',
|
||||||
|
table: {
|
||||||
|
width: 200
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '角色名称',
|
title: '角色名称',
|
||||||
field: 'name',
|
field: 'name',
|
||||||
|
|
|
@ -386,24 +386,31 @@ const handleDetail = async (rowId: number) => {
|
||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
loading.value = true
|
|
||||||
// 提交请求
|
// 提交请求
|
||||||
try {
|
const elForm = unref(formRef)?.getElFormRef()
|
||||||
const data = unref(formRef)?.formModel as UserApi.UserVO
|
if (!elForm) return
|
||||||
if (actionType.value === 'create') {
|
elForm.validate(async (valid) => {
|
||||||
await UserApi.createUserApi(data)
|
if (valid) {
|
||||||
message.success(t('common.createSuccess'))
|
try {
|
||||||
} else {
|
const data = unref(formRef)?.formModel as UserApi.UserVO
|
||||||
await UserApi.updateUserApi(data)
|
if (actionType.value === 'create') {
|
||||||
message.success(t('common.updateSuccess'))
|
await UserApi.createUserApi(data)
|
||||||
|
loading.value = true
|
||||||
|
message.success(t('common.createSuccess'))
|
||||||
|
} else {
|
||||||
|
await UserApi.updateUserApi(data)
|
||||||
|
loading.value = true
|
||||||
|
message.success(t('common.updateSuccess'))
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
|
} finally {
|
||||||
|
// unref(formRef)?.setSchema(allSchemas.formSchema)
|
||||||
|
// 刷新列表
|
||||||
|
await reload()
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
})
|
||||||
} finally {
|
|
||||||
// unref(formRef)?.setSchema(allSchemas.formSchema)
|
|
||||||
// 刷新列表
|
|
||||||
await reload()
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 改变用户状态操作
|
// 改变用户状态操作
|
||||||
const handleStatusChange = async (row: UserApi.UserVO) => {
|
const handleStatusChange = async (row: UserApi.UserVO) => {
|
||||||
|
|
|
@ -5,6 +5,8 @@ const { t } = useI18n()
|
||||||
export const rules = reactive({
|
export const rules = reactive({
|
||||||
username: [required],
|
username: [required],
|
||||||
nickname: [required],
|
nickname: [required],
|
||||||
|
password: [required],
|
||||||
|
deptId: [required],
|
||||||
email: [
|
email: [
|
||||||
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
|
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue