|
@@ -6,6 +6,7 @@ const previewRef = ref()
|
|
|
const tableRef = ref()
|
|
const tableRef = ref()
|
|
|
const modalRef = ref()
|
|
const modalRef = ref()
|
|
|
const uploadModalRef = ref()
|
|
const uploadModalRef = ref()
|
|
|
|
|
+const autoPass = ref(false)
|
|
|
const opts = reactive({
|
|
const opts = reactive({
|
|
|
columns: [
|
|
columns: [
|
|
|
{ field: "id", name: "主键", width: 100, isSort: true, visible: false, tooltip: true },
|
|
{ field: "id", name: "主键", width: 100, isSort: true, visible: false, tooltip: true },
|
|
@@ -106,7 +107,7 @@ const opts = reactive({
|
|
|
field: "category",
|
|
field: "category",
|
|
|
label: "流程分类",
|
|
label: "流程分类",
|
|
|
class: "w-100",
|
|
class: "w-100",
|
|
|
- required: false,
|
|
|
|
|
|
|
+ required: true,
|
|
|
placeholder: "请选择流程分类",
|
|
placeholder: "请选择流程分类",
|
|
|
component: "VST",
|
|
component: "VST",
|
|
|
data: () => categoryOptions.value,
|
|
data: () => categoryOptions.value,
|
|
@@ -122,7 +123,7 @@ const opts = reactive({
|
|
|
field: "flowName",
|
|
field: "flowName",
|
|
|
label: "流程名称",
|
|
label: "流程名称",
|
|
|
class: "w-100",
|
|
class: "w-100",
|
|
|
- required: false,
|
|
|
|
|
|
|
+ required: true,
|
|
|
placeholder: "请输入流程定义名称",
|
|
placeholder: "请输入流程定义名称",
|
|
|
component: "I"
|
|
component: "I"
|
|
|
},
|
|
},
|
|
@@ -130,10 +131,49 @@ const opts = reactive({
|
|
|
field: "flowCode",
|
|
field: "flowCode",
|
|
|
label: "流程编码",
|
|
label: "流程编码",
|
|
|
class: "w-100",
|
|
class: "w-100",
|
|
|
- required: false,
|
|
|
|
|
|
|
+ required: true,
|
|
|
placeholder: "请输入流程定义编码",
|
|
placeholder: "请输入流程定义编码",
|
|
|
component: "I"
|
|
component: "I"
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ field: "modelValue",
|
|
|
|
|
+ label: "设计器模式",
|
|
|
|
|
+ class: "w-100",
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ placeholder: "请选择设计器模式",
|
|
|
|
|
+ component: "VS",
|
|
|
|
|
+ data: [
|
|
|
|
|
+ { label: "经典模式", value: "CLASSICS" },
|
|
|
|
|
+ { label: "仿钉钉模式", value: "MIMIC" }
|
|
|
|
|
+ ],
|
|
|
|
|
+ props: {
|
|
|
|
|
+ type: "radio"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ field: "autoPass",
|
|
|
|
|
+ label: "流程配置",
|
|
|
|
|
+ class: "w-100",
|
|
|
|
|
+ required: false,
|
|
|
|
|
+ placeholder: "请选择流程配置",
|
|
|
|
|
+ component: "slot"
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ field: "formCustom",
|
|
|
|
|
+ label: "动态表单",
|
|
|
|
|
+ class: "w-100",
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ placeholder: "请选择是否择动态表单",
|
|
|
|
|
+ component: "VS",
|
|
|
|
|
+ data: [
|
|
|
|
|
+ { label: "是", value: "Y" },
|
|
|
|
|
+ { label: "否", value: "N" }
|
|
|
|
|
+ ],
|
|
|
|
|
+ props: {
|
|
|
|
|
+ type: "radio"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
field: "formPath",
|
|
field: "formPath",
|
|
|
label: "表单路径",
|
|
label: "表单路径",
|
|
@@ -151,9 +191,12 @@ const opts = reactive({
|
|
|
category: undefined,
|
|
category: undefined,
|
|
|
flowName: undefined,
|
|
flowName: undefined,
|
|
|
flowCode: undefined,
|
|
flowCode: undefined,
|
|
|
- formPath: undefined
|
|
|
|
|
|
|
+ formPath: undefined,
|
|
|
|
|
+ formCustom: "N",
|
|
|
|
|
+ modelValue: "CLASSICS",
|
|
|
|
|
+ ext: ""
|
|
|
},
|
|
},
|
|
|
- labelWidth: "80px"
|
|
|
|
|
|
|
+ labelWidth: "120px"
|
|
|
})
|
|
})
|
|
|
const { queryParams, emptyFormData } = toRefs(opts)
|
|
const { queryParams, emptyFormData } = toRefs(opts)
|
|
|
const form = ref<any>(emptyFormData.value)
|
|
const form = ref<any>(emptyFormData.value)
|
|
@@ -214,7 +257,15 @@ function handleCreate() {
|
|
|
function handleUpdate(row: any) {
|
|
function handleUpdate(row: any) {
|
|
|
tableRef.value.defaultHandleFuns.handleUpdate("", row)
|
|
tableRef.value.defaultHandleFuns.handleUpdate("", row)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+function onFormEdit(data: any) {
|
|
|
|
|
+ autoPass.value = false
|
|
|
|
|
+ if (data.ext != null && data.ext != "") {
|
|
|
|
|
+ const extJson = JSON.parse(data.ext)
|
|
|
|
|
+ if (extJson.autoPass != null && extJson.autoPass != "") {
|
|
|
|
|
+ autoPass.value = extJson.autoPass
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
/** 部署按钮操作 */
|
|
/** 部署按钮操作 */
|
|
|
function handleUpload() {
|
|
function handleUpload() {
|
|
|
uploadForm.value.category = "0"
|
|
uploadForm.value.category = "0"
|
|
@@ -236,6 +287,10 @@ const handleFileChange = (uploadFile: any) => {
|
|
|
file.value = uploadFile
|
|
file.value = uploadFile
|
|
|
}
|
|
}
|
|
|
function handleSubmit() {
|
|
function handleSubmit() {
|
|
|
|
|
+ const ext = {
|
|
|
|
|
+ autoPass: autoPass.value
|
|
|
|
|
+ }
|
|
|
|
|
+ form.value.ext = JSON.stringify(ext)
|
|
|
apis.workflow.processDefinitionApi.addOrUpdate(form.value).then(() => {
|
|
apis.workflow.processDefinitionApi.addOrUpdate(form.value).then(() => {
|
|
|
handleQuery()
|
|
handleQuery()
|
|
|
})
|
|
})
|
|
@@ -332,7 +387,7 @@ function handleDesignView(row) {
|
|
|
designModalRef.value.show()
|
|
designModalRef.value.show()
|
|
|
}
|
|
}
|
|
|
function getDesignUrl(id, disabled: boolean) {
|
|
function getDesignUrl(id, disabled: boolean) {
|
|
|
- let url = `${import.meta.env.VITE_APP_BASE_API}/.html?id=${id}&disabled=${disabled}`
|
|
|
|
|
|
|
+ let url = `${import.meta.env.VITE_APP_BASE_API}/.html?id=${id}&onlyDesignShow=${disabled}`
|
|
|
url += `&Authorization=Bearer ${getToken()}&clientid=${import.meta.env.VITE_APP_CLIENT_ID}`
|
|
url += `&Authorization=Bearer ${getToken()}&clientid=${import.meta.env.VITE_APP_CLIENT_ID}`
|
|
|
return url
|
|
return url
|
|
|
}
|
|
}
|
|
@@ -405,7 +460,8 @@ onMounted(init)
|
|
|
:reset-form-fun="opts.resetForm"
|
|
:reset-form-fun="opts.resetForm"
|
|
|
v-model:form-data="form"
|
|
v-model:form-data="form"
|
|
|
:reset-search-form-fun="resetQuery"
|
|
:reset-search-form-fun="resetQuery"
|
|
|
- :custom-search-fun="handleQuery">
|
|
|
|
|
|
|
+ :custom-search-fun="handleQuery"
|
|
|
|
|
+ @form-edit="onFormEdit">
|
|
|
<template #version="{ row }">v{{ row.version }}.0</template>
|
|
<template #version="{ row }">v{{ row.version }}.0</template>
|
|
|
<template #activityStatus="{ row }">
|
|
<template #activityStatus="{ row }">
|
|
|
<vb-tooltip
|
|
<vb-tooltip
|
|
@@ -496,7 +552,11 @@ onMounted(init)
|
|
|
:form-items="opts.formItems"
|
|
:form-items="opts.formItems"
|
|
|
:label-width="opts.labelWidth"
|
|
:label-width="opts.labelWidth"
|
|
|
append-to-body
|
|
append-to-body
|
|
|
- @confirm="handleSubmit"></VbModal>
|
|
|
|
|
|
|
+ @confirm="handleSubmit">
|
|
|
|
|
+ <template #autoPass_form>
|
|
|
|
|
+ <el-checkbox v-model="autoPass" label="下一节点执行人是当前任务处理人自动审批" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </VbModal>
|
|
|
<VbModal
|
|
<VbModal
|
|
|
v-model:modal="uploadModalRef"
|
|
v-model:modal="uploadModalRef"
|
|
|
title="部署流程"
|
|
title="部署流程"
|