select value
This commit is contained in:
parent
467fd8686c
commit
3294245595
|
@ -4,9 +4,10 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.u8t.cn/open/gosdk/util"
|
"git.u8t.cn/open/gosdk/util"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"git.u8t.cn/open/goutil"
|
"git.u8t.cn/open/goutil"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Applyer struct {
|
type Applyer struct {
|
||||||
|
@ -148,10 +149,14 @@ func (d *ApproveDetail) GetData() map[string]string {
|
||||||
|
|
||||||
var value string
|
var value string
|
||||||
if content.Control == "Selector" {
|
if content.Control == "Selector" {
|
||||||
for _, v := range content.Value.Selector.Options[0].Value {
|
if len(content.Value.Selector.Options) > 0 {
|
||||||
if v.Text != "" {
|
values := make([]string, 0)
|
||||||
value = v.Text
|
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" {
|
} else if content.Control == "Text" || content.Control == "Textarea" {
|
||||||
value = content.Value.Text
|
value = content.Value.Text
|
||||||
|
|
Loading…
Reference in New Issue