select value
This commit is contained in:
parent
467fd8686c
commit
3294245595
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue