From d69841e3232171e48dcda214bcfc87dacfcc70f7 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Tue, 4 Nov 2025 08:59:38 +0800 Subject: [PATCH] * Adjust auditcl and nc yaml file. --- lib/zin/wg/formbatchitem/v1.php | 10 +++++- test/data/auditcl.yaml | 27 +++++---------- test/data/nc.yaml | 61 ++++++++++++--------------------- 3 files changed, 40 insertions(+), 58 deletions(-) diff --git a/lib/zin/wg/formbatchitem/v1.php b/lib/zin/wg/formbatchitem/v1.php index ee8cfede80..79a81c2e2f 100644 --- a/lib/zin/wg/formbatchitem/v1.php +++ b/lib/zin/wg/formbatchitem/v1.php @@ -58,7 +58,7 @@ class formBatchItem extends wg */ protected function build(): array { - list($name, $label, $labelClass, $labelProps, $required, $tip, $tipClass, $tipProps, $tipIcon, $control, $width, $strong, $value, $disabled, $items, $placeholder, $ditto, $defaultDitto, $hidden, $readonly, $multiple) = $this->prop(array('name', 'label', 'labelClass', 'labelProps', 'required', 'tip', 'tipClass', 'tipProps', 'tipIcon', 'control', 'width', 'strong', 'value', 'disabled', 'items', 'placeholder', 'ditto', 'defaultDitto', 'hidden', 'readonly', 'multiple')); + list($name, $label, $labelClass, $labelProps, $required, $tip, $tipClass, $tipProps, $tipIcon, $control, $width, $strong, $value, $disabled, $items, $placeholder, $ditto, $defaultDitto, $hidden, $readonly, $multiple, $checkboxName, $checkboxValue, $checkboxText, $checkboxChecked) = $this->prop(array('name', 'label', 'labelClass', 'labelProps', 'required', 'tip', 'tipClass', 'tipProps', 'tipIcon', 'control', 'width', 'strong', 'value', 'disabled', 'items', 'placeholder', 'ditto', 'defaultDitto', 'hidden', 'readonly', 'multiple', 'checkboxName', 'checkboxValue', 'checkboxText', 'checkboxChecked')); if($required === 'auto') $required = isFieldRequired($name); @@ -110,6 +110,14 @@ class formBatchItem extends wg toggle('tooltip', array('title' => $tip)), set($tipProps), set::icon($tipIcon) + ), + empty($checkboxName) ? null : new checkbox + ( + set::rootClass('inline-flex ml-4'), + set::name($checkboxName), + set::value($checkboxValue), + set::text($checkboxText), + set::checked($checkboxChecked) ) ), h::td diff --git a/test/data/auditcl.yaml b/test/data/auditcl.yaml index 1996f57493..f646bdaee0 100644 --- a/test/data/auditcl.yaml +++ b/test/data/auditcl.yaml @@ -70,12 +70,9 @@ fields: format: "" - field: createdDate note: "创建日期" - from: common.date.v1.yaml - use: dateA - prefix: "" - postfix: "" - loop: 0 - format: "" + range: "(M)-(w)" + type: timestamp + format: "YY/MM/DD" - field: editedBy note: "由谁编辑" from: common.user.v1.yaml @@ -86,12 +83,9 @@ fields: format: "" - field: editedDate note: "编辑日期" - from: common.date.v1.yaml - use: dateA - prefix: "" - postfix: "" - loop: 0 - format: "" + range: "(M)-(w)" + type: timestamp + format: "YY/MM/DD" - field: assignedBy note: "由谁指派" from: common.user.v1.yaml @@ -102,12 +96,9 @@ fields: format: "" - field: assignedDate note: "指派日期" - from: common.date.v1.yaml - use: dateA - prefix: "" - postfix: "" - loop: 0 - format: "" + range: "(M)-(w)" + type: timestamp + format: "YY/MM/DD" - field: deleted note: "是否删除" range: 0 diff --git a/test/data/nc.yaml b/test/data/nc.yaml index 7b13f4ee46..b14a584cc7 100644 --- a/test/data/nc.yaml +++ b/test/data/nc.yaml @@ -4,18 +4,11 @@ author: automated export version: "1.0" fields: - field: id - note: "" + note: "ID" + range: 1-10000 prefix: "" postfix: "" loop: 0 - loopfix: "" - format: "" - - field: program - note: "" - prefix: "" - postfix: "" - loop: 0 - loopfix: "" format: "" - field: auditplan note: "" @@ -67,12 +60,10 @@ fields: loopfix: "" format: "" - field: deadline - note: "" - prefix: "" - postfix: "" - loop: 0 - loopfix: "" - format: "" + note: "截至日期" + range: "(M)-(w)" + type: timestamp + format: "YY-MM-DD" - field: resolvedBy note: "" prefix: "" @@ -88,12 +79,10 @@ fields: loopfix: "" format: "" - field: resolvedDate - note: "" - prefix: "" - postfix: "" - loop: 0 - loopfix: "" - format: "" + note: "解决日期" + range: "(M)-(w)" + type: timestamp + format: "YY-MM-DD" - field: closedBy note: "" prefix: "" @@ -102,12 +91,10 @@ fields: loopfix: "" format: "" - field: closedDate - note: "" - prefix: "" - postfix: "" - loop: 0 - loopfix: "" - format: "" + note: "关闭日期" + range: "(M)-(w)" + type: timestamp + format: "YY-MM-DD" - field: parent note: "" prefix: "" @@ -130,12 +117,10 @@ fields: loopfix: "" format: "" - field: createdDate - note: "" - prefix: "" - postfix: "" - loop: 0 - loopfix: "" - format: "" + note: "创建日期" + range: "(M)-(w)" + type: timestamp + format: "YY-MM-DD" - field: editedBy note: "" prefix: "" @@ -144,12 +129,10 @@ fields: loopfix: "" format: "" - field: editedDate - note: "" - prefix: "" - postfix: "" - loop: 0 - loopfix: "" - format: "" + note: "编辑日期" + range: "(M)-(w)" + type: timestamp + format: "YY-MM-DD" - field: deleted note: "" prefix: ""