select value

This commit is contained in:
jiangyong 2025-09-11 18:43:05 +08:00
parent 467fd8686c
commit 3294245595
1 changed files with 9 additions and 4 deletions

View File

@ -4,9 +4,10 @@ import (
"encoding/json"
"fmt"
"git.u8t.cn/open/gosdk/util"
log "github.com/sirupsen/logrus"
"git.u8t.cn/open/goutil"
log "github.com/sirupsen/logrus"
"github.com/spf13/cast"
"strings"
)
type Applyer struct {
@ -148,10 +149,14 @@ func (d *ApproveDetail) GetData() map[string]string {
var value string
if content.Control == "Selector" {
for _, v := range content.Value.Selector.Options[0].Value {
if v.Text != "" {
value = v.Text
if len(content.Value.Selector.Options) > 0 {
values := make([]string, 0)
for _, v := range content.Value.Selector.Options[0].Value {
if v.Text != "" {
values = append(values, v.Text)
}
}
value = strings.Join(values, ",")
}
} else if content.Control == "Text" || content.Control == "Textarea" {
value = content.Value.Text