|
@@ -82,7 +82,7 @@ func (pwp *PortraitScreen) PareMatchWord() string {
|
|
|
}
|
|
|
|
|
|
// PareMatchType 格式筛选搜索,默认筛选为标题和正文
|
|
|
-func (ps *PortraitScreen) PareMatchType() (items []string) {
|
|
|
+func (ps *PortraitScreen) PareMatchType(isProject bool) (items []string) {
|
|
|
for _, t := range strings.Split(ps.MatchRange, ",") {
|
|
|
if t == "buyer" {
|
|
|
items = append(items, "buyer.mbuyer")
|
|
@@ -91,11 +91,19 @@ func (ps *PortraitScreen) PareMatchType() (items []string) {
|
|
|
} else if t == "agency" {
|
|
|
items = append(items, "agency.magency")
|
|
|
} else if t == "purchasing" {
|
|
|
- items = append(items, []string{"purchasing", "projectname.pname"}...)
|
|
|
+ if isProject {
|
|
|
+ items = append(items, []string{"purchasing", "projectname.sname"}...)
|
|
|
+ } else {
|
|
|
+ items = append(items, []string{"purchasing", "projectname.pname"}...)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if len(items) == 0 { //默认查询项目名称和标的物
|
|
|
- items = append(items, []string{"purchasing", "projectname.pname"}...)
|
|
|
+ if isProject {
|
|
|
+ items = append(items, []string{"purchasing", "projectname.sname"}...)
|
|
|
+ } else {
|
|
|
+ items = append(items, []string{"purchasing", "projectname.pname"}...)
|
|
|
+ }
|
|
|
}
|
|
|
ps.ShowMatch = strings.Join(items, ",")
|
|
|
return
|
|
@@ -187,7 +195,7 @@ func (pwp *PortraitProjectScreen) CommonPare(isWinner bool) (mustQueryArr []stri
|
|
|
if pareWord := pwp.Screen.PareMatchWord(); pareWord != "" {
|
|
|
pwp.Screen.KeyWordArr = nil
|
|
|
var keywordQueryArr []string
|
|
|
- findFields := fmt.Sprintf(`"%s"`, strings.Join(pwp.Screen.PareMatchType(), "\",\""))
|
|
|
+ findFields := fmt.Sprintf(`"%s"`, strings.Join(pwp.Screen.PareMatchType(false), "\",\""))
|
|
|
for _, keyword := range strings.Split(pareWord, " ") {
|
|
|
if keyword == "" {
|
|
|
continue
|