diff --git a/src/views/workflow/extension/form/FormCategoryModal.vue b/src/views/workflow/extension/form/FormCategoryModal.vue new file mode 100644 index 0000000..949d877 --- /dev/null +++ b/src/views/workflow/extension/form/FormCategoryModal.vue @@ -0,0 +1,80 @@ + + diff --git a/src/views/workflow/extension/form/helper/WorkflowFormDesign.vue b/src/views/workflow/extension/form/helper/WorkflowFormDesign.vue index ebc8892..1beac96 100644 --- a/src/views/workflow/extension/form/helper/WorkflowFormDesign.vue +++ b/src/views/workflow/extension/form/helper/WorkflowFormDesign.vue @@ -9,8 +9,8 @@ >
@@ -62,10 +62,13 @@ [GlStateEnum.FORM_DESIGN_PROPS_KEY]: formDesignProps } }), { sandbox: { experimentalStyleIsolation: true }}); + // 处理清除脏数据 state.form = {}; + formDesignProps.options = {}; state.tag = data._tag; const id = data.record?.id; state.form.formDefinitionId = data.record?.formDefinitionId; + // 处理设置数据 const props: Partial = { confirmLoading: false }; switch (state.tag) { case 'add': @@ -85,11 +88,11 @@ } /** 处理弹出框提交 */ - async function handleSubmitForm(status: number) { + async function handleSubmitForm(status: string) { try { const formRef = microAppStore.getFormDesignApp.getFormDesignRef(); state.form.json = formRef.getWidgetFormJson(); - this.form.status = status; + state.form.status = status; state.form.isPrimary = '1'; // 处理提交之前逻辑 setModalProps({ confirmLoading: true }); diff --git a/src/views/workflow/extension/form/index.vue b/src/views/workflow/extension/form/index.vue index b1a0ce4..c85a804 100644 --- a/src/views/workflow/extension/form/index.vue +++ b/src/views/workflow/extension/form/index.vue @@ -234,9 +234,9 @@ } /** 处理工作流表单设计 */ - function handleWorkFlowFormDesign (row) { + function handleWorkFlowFormDesign(row: Recordable) { const record = row.formDefinitionJson || {}; - openWorkflowFormModal(true, { _tag: 'add', record }); + openWorkflowFormModal(true, { _tag: 'edit', record }); } function handleSelect(selectedKeys: string[]) { diff --git a/src/views/workflow/extension/formJson/FormJsonModal.vue b/src/views/workflow/extension/formJson/FormJsonModal.vue new file mode 100644 index 0000000..ad12466 --- /dev/null +++ b/src/views/workflow/extension/formJson/FormJsonModal.vue @@ -0,0 +1,103 @@ + + diff --git a/src/views/workflow/extension/formJson/formJson.data.ts b/src/views/workflow/extension/formJson/formJson.data.ts new file mode 100644 index 0000000..0c7bd3a --- /dev/null +++ b/src/views/workflow/extension/formJson/formJson.data.ts @@ -0,0 +1,164 @@ +/** + * @program: kicc-ui + * @description: 授权客户端模块动态渲染配置 + * @author: entfrm开发团队-王翔 + * @create: 2022/4/21 + */ + +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +/** 表格列配置 */ +export const columns: BasicColumn[] = [ + { + title: '客户端Id', + dataIndex: 'clientId', + width: 100 + }, + { + title: '客户端密钥', + dataIndex: 'clientSecret', + width: 100 + }, + { + title: '授权类型', + dataIndex: 'authorizedGrantTypes', + width: 130 + }, + { + title: '授权范围', + dataIndex: 'scope', + width: 90 + }, + { + title: '令牌过期秒数', + dataIndex: 'accessTokenValidity', + width: 130 + }, + { + title: '令牌过期秒数', + dataIndex: 'refreshTokenValidity', + width: 130 + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 100 + } +]; + +/** 搜索表单配置 */ +export const searchFormSchema: FormSchema[] = [ + { + field: 'clientId', + label: '客户端编码', + component: 'Input', + componentProps: { + placeholder: '请输入客户端编码', + }, + colProps: { span: 8 }, + }, + { + field: 'dateRange', + label: '创建时间', + component: 'RangePicker', + componentProps: { + style: { width:'100%' }, + valueFormat: 'YYYY-MM-DD', + placeholder: ['开始日期','结束日期'] + }, + colProps: { span: 8 } + } +]; + +/** 表单配置 */ +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'clientId', + label: '客户端Id', + component: 'Input', + required: true, + colProps: { + span: 12 + } + }, + { + field: 'clientSecret', + label: '客户端密钥', + component: 'Input', + required: true, + colProps: { + span: 12 + } + }, + { + field: 'authorizedGrantTypes', + label: '授权类型', + component: 'InputTextArea', + required:true, + componentProps: { + rows: 3 + }, + colProps: { + span: 24 + } + }, + { + field: 'scope', + label: '授权范围', + component: 'Input', + required:true, + colProps: { + span: 12 + } + }, + { + field: 'accessTokenValidity', + label: '过期秒数', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + colProps: { + span: 12 + } + }, + { + field: 'refreshTokenValidity', + label: '刷新秒数', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + colProps: { + span: 12 + } + }, + { + field: 'webServerRedirectUri', + label: '回调地址', + component: 'Input', + colProps: { + span: 12 + } + }, + { + field: 'additionalInformation', + label: '附加说明', + component: 'InputTextArea', + componentProps: { + rows: 6 + }, + colProps: { + span: 24 + } + } +]; diff --git a/src/views/workflow/extension/formJson/index.vue b/src/views/workflow/extension/formJson/index.vue new file mode 100644 index 0000000..06a9558 --- /dev/null +++ b/src/views/workflow/extension/formJson/index.vue @@ -0,0 +1,150 @@ + + +