diff --git a/src/types/svc.ts b/src/types/svc.ts index 52cbe80..379f2b1 100644 --- a/src/types/svc.ts +++ b/src/types/svc.ts @@ -152,6 +152,16 @@ export interface SvcFormVo { schemaJson: string; publishTime?: string; referenced?: boolean; + /** 绑定本表单的事项明细(表单页反查使用位置;sch 级共享,可能跨站点) */ + refItems?: SvcFormItemBrief[]; +} + +export interface SvcFormItemBrief { + id: number; + itemCode: string; + title: string; + siteCode: string; + status: number; } export interface SvcFormSaveRequest { diff --git a/src/views/svc/ServiceFormManage.vue b/src/views/svc/ServiceFormManage.vue index fc72c77..6b5386c 100644 --- a/src/views/svc/ServiceFormManage.vue +++ b/src/views/svc/ServiceFormManage.vue @@ -1,11 +1,14 @@ @@ -109,12 +153,13 @@ const cols = [ {{ statusName(row.status) }} - 已绑定事项 - — + 已绑定 {{ (row.refItems || []).length }} 个事项 + 未绑定 编辑 发布 + 去绑定 版本 删除 @@ -135,6 +180,7 @@ const cols = [ 契约:{"groups":[{title, fields:[{key,label,type,required,pattern,min,max,maxLength,options,accept,maxSize,maxFiles,…}]}]} ;一期控件:text/textarea/number/date/select/radio/upload + 预览效果 @@ -143,6 +189,37 @@ const cols = [ + + + + 关闭 + + + + + + + {{ itemStatusName(row.status) }} + + + 编辑 + + + + 用户在绑定此表单的事项发起页填写该表单;草稿表单发布后才会实际下发给发起页。 + + + 关闭 + 去办事事项 + + + { + if (!form.value.formCode) return false; + const f = forms.value.find((x) => x.code === form.value.formCode); + return !!f && f.status !== 1; +}); + /** 部门树扁平化(缩进展示,承袭 CMS flattenDepts) */ const deptOptions = computed(() => { const out: { id: number; label: string }[] = []; @@ -233,8 +240,14 @@ onMounted(loadAll); - {{ f.name }} + + {{ f.name }}{{ f.status !== 1 ? `(${f.status === 2 ? "已停用" : "草稿"})` : "" }} + + + 该表单尚未发布,发布后才能在发起页实际填写;请到「表单管理」发布。 + + 发起页按表单编码取最新已发布版本渲染