Bläddra i källkod

Merge branch 'master' into feature/v4.9.14

lianbingjie 1 år sedan
förälder
incheckning
925f5e7d66

+ 8 - 3
src/jfw/front/searchOptimize.go

@@ -101,11 +101,11 @@ type SearchOptimize struct {
 	Buyer               string        `json:"buyer"`          //采购单位
 	Buyer               string        `json:"buyer"`          //采购单位
 	Winner              string        `json:"winner"`         //中标企业
 	Winner              string        `json:"winner"`         //中标企业
 	Agency              string        `json:"agency"`         //代理机构
 	Agency              string        `json:"agency"`         //代理机构
-
+	MobileTag           []string      `json:"mobileTag"`      //融创
 }
 }
 
 
 // NewSearchOptimize  初始化
 // NewSearchOptimize  初始化
-func NewSearchOptimize(userId, phone, province, city, district, subtype, topType, publishTime, selectType, price, industry, buyerClass, buyerTel, winnerTel, fileExists, keyWords, additionalWords, exclusionWords, platform, territorialization, expireTime, propertyForm, subinformation string,
+func NewSearchOptimize(mobileTag []string, userId, phone, province, city, district, subtype, topType, publishTime, selectType, price, industry, buyerClass, buyerTel, winnerTel, fileExists, keyWords, additionalWords, exclusionWords, platform, territorialization, expireTime, propertyForm, subinformation string,
 	pageNum, pageSize, searchGroup, searchMode, wordsMode int, period, scale string, changehand, isfile int,
 	pageNum, pageSize, searchGroup, searchMode, wordsMode int, period, scale string, changehand, isfile int,
 	userInfo jy.VipState, searchTypeSwitch bool, r *http.Request, accountId, entAccountId, entId, entUserId int64, buyer, winner, agency string) *SearchOptimize {
 	userInfo jy.VipState, searchTypeSwitch bool, r *http.Request, accountId, entAccountId, entId, entUserId int64, buyer, winner, agency string) *SearchOptimize {
 	IsPay := userInfo.IsPayedUser()
 	IsPay := userInfo.IsPayedUser()
@@ -161,6 +161,7 @@ func NewSearchOptimize(userId, phone, province, city, district, subtype, topType
 		Buyer:            buyer,
 		Buyer:            buyer,
 		Winner:           winner,
 		Winner:           winner,
 		Agency:           agency,
 		Agency:           agency,
+		MobileTag:        mobileTag,
 	}
 	}
 	so.SearchParamsHandle()
 	so.SearchParamsHandle()
 	return so
 	return so
@@ -556,6 +557,10 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 	if so.BidField == "BIProperty" {
 	if so.BidField == "BIProperty" {
 		musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_topinformation", `"情报_物业"`))
 		musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_topinformation", `"情报_物业"`))
 	}
 	}
+	//移动融创
+	if so.MobileTag != nil && len(so.MobileTag) > 0 && so.IsPay { //仅付费bidding表有此字段
+		musts = append(musts, fmt.Sprintf(queryBoolMustA, "mobile_tag", `"`+strings.Join(so.MobileTag, `","`)+`"`))
+	}
 	//物业业态
 	//物业业态
 	if so.PropertyForm != "" && isLogin {
 	if so.PropertyForm != "" && isLogin {
 		arr := []string{}
 		arr := []string{}
@@ -682,6 +687,7 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 		musts = append(musts, fmt.Sprintf(queryBoolMustTermDomain, so.BidField))
 		musts = append(musts, fmt.Sprintf(queryBoolMustTermDomain, so.BidField))
 	}
 	}
 	qstr = fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(mustNot, ","))
 	qstr = fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(mustNot, ","))
+	//fmt.Println("so", so.MobileTag)
 	log.Println("qstr:", qstr)
 	log.Println("qstr:", qstr)
 	return
 	return
 }
 }
@@ -732,7 +738,6 @@ func (so *SearchOptimize) GetBidSearchQuery() string {
 			query_bool_must_and_district := `{"bool":{"must":[{"terms":{"city":["%s"]}},{"terms":{"district":["%s"]}}]}}`
 			query_bool_must_and_district := `{"bool":{"must":[{"terms":{"city":["%s"]}},{"terms":{"district":["%s"]}}]}}`
 			query += fmt.Sprintf(query_bool_must_and_district, cityName, districtName)
 			query += fmt.Sprintf(query_bool_must_and_district, cityName, districtName)
 		}
 		}
-
 	}
 	}
 	if query != "" {
 	if query != "" {
 		query = fmt.Sprintf(queryBoolShould, query)
 		query = fmt.Sprintf(queryBoolShould, query)

+ 76 - 32
src/jfw/front/supsearch.go

@@ -11,10 +11,10 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
-	"app.yhyue.com/moapp/jypkg/jylabutil"
-
+	. "app.yhyue.com/moapp/jybase/api"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"app.yhyue.com/moapp/jypkg/jylabutil"
 	"app.yhyue.com/moapp/jypkg/public"
 	"app.yhyue.com/moapp/jypkg/public"
 
 
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/bidsearch"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/bidsearch"
@@ -31,9 +31,10 @@ import (
 
 
 type Pcsearch struct {
 type Pcsearch struct {
 	*xweb.Action
 	*xweb.Action
-	pcSearchIndex xweb.Mapper `xweb:"/jylab/(supsearch|medical|bi)/index.html"` //搜索首页
-	getNewBids    xweb.Mapper `xweb:"/jylab/supsearch/getNewBids"`              //最新招标信息
-	getstatus     xweb.Mapper `xweb:"/jylab/supsearch/getstatus"`               //实验室开启状态
+	pcSearchIndex xweb.Mapper `xweb:"/jylab/(supsearch|medical|bi)/index.html"`  //搜索首页
+	searchPower   xweb.Mapper `xweb:"/jylab/(supsearch|medical|bi)/searchPower"` //搜索权限页面
+	getNewBids    xweb.Mapper `xweb:"/jylab/supsearch/getNewBids"`               //最新招标信息
+	getstatus     xweb.Mapper `xweb:"/jylab/supsearch/getstatus"`                //实验室开启状态
 	//proposedProject xweb.Mapper `xweb:"/jylab/supsearch/proposedProject.html"`    //拟建项目-- 此功能已取消 影响es 检索功能
 	//proposedProject xweb.Mapper `xweb:"/jylab/supsearch/proposedProject.html"`    //拟建项目-- 此功能已取消 影响es 检索功能
 	qr        xweb.Mapper `xweb:"/jylab/supsearch/qr/(.*)"` //生成进入实验室的二维码
 	qr        xweb.Mapper `xweb:"/jylab/supsearch/qr/(.*)"` //生成进入实验室的二维码
 	changePro xweb.Mapper `xweb:"/jylab/changePro"`         //修改提示信息状态
 	changePro xweb.Mapper `xweb:"/jylab/changePro"`         //修改提示信息状态
@@ -59,7 +60,10 @@ var (
 )
 )
 
 
 // MedicalFunctionCode 医疗行业权益代码
 // MedicalFunctionCode 医疗行业权益代码
-var MedicalFunctionCode = "lyh_yl_ylbxss"
+const (
+	MedicalFunctionCode         = "lyh_yl_ylbxss"
+	MobileTagSearchFunctionCode = "zbcgss_zgydbqjs"
+)
 
 
 func init() {
 func init() {
 	xweb.AddAction(&Pcsearch{})
 	xweb.AddAction(&Pcsearch{})
@@ -321,6 +325,57 @@ func (p *Pcsearch) GetNewBids() error {
 	return nil
 	return nil
 }
 }
 
 
+type (
+	SearchItems struct {
+		Key        string                   `json:"key" doc:"提交后端接口时需要的Key: keyword"`
+		Label      string                   `json:"label" doc:"页面展示的标签:关键词"`
+		Type       string                   `json:"type" doc:"操作类型:下拉、时间选择、多选等"`
+		DefaultVal []string                 `json:"defaultVal"`
+		Options    []*SearchItemsValOptions `json:"options" doc:"选项"`
+	}
+	SearchItemsValOptions struct {
+		Key   string `json:"key" doc:"后端接受值"`
+		Label string `json:"label" doc:"展示标签"`
+	}
+)
+
+var (
+	mobileTagItemsValOptions = []*SearchItemsValOptions{
+		{Key: "all", Label: "全部"},
+		{Key: "军队类", Label: "军队类"},
+		{Key: "武警类", Label: "武警类"},
+		{Key: "融通类", Label: "融通类"},
+		{Key: "退役类", Label: "退役类"},
+		{Key: "融办类", Label: "融办类"},
+		{Key: "某某类", Label: "“某某”类"},
+	}
+	mobileTagItemsValOptionsAll = []string{"军队类", "武警类", "融通类", "退役类", "融办类", "某某类"}
+)
+
+// SearchPower 搜索权益列表
+func (p *Pcsearch) SearchPower(module string) {
+	sessVal := p.Session().GetMultiple()
+	userId := util.ObjToString(sessVal["userId"])
+	data, err := func() ([]*SearchItems, error) {
+		var r []*SearchItems
+		switch module {
+		case "supsearch":
+			//搜索页面检索内容
+			if userId != "" && jy.HasBidFieldPower(config.Middleground, p.Session(), MobileTagSearchFunctionCode) {
+				r = append(r, &SearchItems{
+					Key:        "mobileTag",
+					Label:      "融创",
+					Type:       "multiple",
+					DefaultVal: append(mobileTagItemsValOptionsAll, "all"), //默认选择全部
+					Options:    mobileTagItemsValOptions,
+				})
+			}
+		}
+		return r, nil
+	}()
+	p.ServeJson(NewResult(data, err))
+}
+
 // PcSearchIndex 路由搜索
 // PcSearchIndex 路由搜索
 func (p *Pcsearch) PcSearchIndex(module string) error {
 func (p *Pcsearch) PcSearchIndex(module string) error {
 	defer util.Catch()
 	defer util.Catch()
@@ -405,6 +460,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		buyer                     = ""
 		buyer                     = ""
 		winner                    = ""
 		winner                    = ""
 		agency                    = ""
 		agency                    = ""
+		mobileTag                 []string //P513中国移动定制招标采购搜索
 	)
 	)
 	// 领域化标识
 	// 领域化标识
 	territorialization := p.GetString("bid_field")
 	territorialization := p.GetString("bid_field")
@@ -438,29 +494,6 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	}
 	}
 	//历史导出数据回显
 	//历史导出数据回显
 	if strings.Contains(p.Url(), "?goback") {
 	if strings.Contains(p.Url(), "?goback") {
-		//keywords = util.ObjToString(p.GetSession("Echo_keywords"))
-		//publishtime = util.ObjToString(p.GetSession("Echo_publishtime"))
-		//area = util.ObjToString(p.GetSession("Echo_area"))
-		//subtype = util.ObjToString(p.GetSession("Echo_subtype"))
-		//minprice = util.ObjToString(p.GetSession("Echo_minprice"))
-		//maxprice = util.ObjToString(p.GetSession("Echo_maxprice"))
-		//buyerclass = util.ObjToString(p.GetSession("Echo_buyerclass"))
-		//selectType = util.ObjToString(p.GetSession("Echo_selectType"))
-		//timeslot = util.ObjToString(p.GetSession("Echo_timeslot"))
-		//hasBuyerTel = util.ObjToString(p.GetSession("Echo_hasBuyertel"))
-		//hasWinnerTel = util.ObjToString(p.GetSession("Echo_hasWinnertel"))
-		//industry = util.ObjToString(p.GetSession("Echo_industry"))
-		//notkey = util.ObjToString(p.GetSession("Echo_notkey"))
-		//fileExists = util.ObjToString(p.GetSession("Echo_fileExists"))
-		//city = util.ObjToString(p.GetSession("Echo_city"))
-		//bidField = util.ObjToString(p.GetSession("Echo_bid_field"))              // 领域化数据 0101-医疗行业
-		//territorialization = util.ObjToString(p.GetSession("Echo_bid_field"))    // 领域化数据 0101-医疗行业
-		//searchGroup = util.IntAll(p.GetSession("Echo_searchGroup"))              //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
-		//searchMode = util.IntAll(p.GetSession("Echo_searchMode"))                //搜索模式;默认0:精准模式(不进行系统分词);1:模糊模式(进行系统分词)。
-		//wordsMode = util.IntAll(p.GetSession("Echo_wordsMode"))                  //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
-		//additionalWords = util.ObjToString(p.GetSession("Echo_additionalWords")) //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
-		//queryItems = userInfo.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
-
 		keywords = util.ObjToString(sessVal["Echo_keywords"])
 		keywords = util.ObjToString(sessVal["Echo_keywords"])
 		publishtime = util.ObjToString(sessVal["Echo_publishtime"])
 		publishtime = util.ObjToString(sessVal["Echo_publishtime"])
 		area = util.ObjToString(sessVal["Echo_area"])
 		area = util.ObjToString(sessVal["Echo_area"])
@@ -518,6 +551,18 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		}
 		}
 		b_word, a_word, s_word = jy.InterceptSearchKW(keywords, keywordsLimit, len(industry) == 0)
 		b_word, a_word, s_word = jy.InterceptSearchKW(keywords, keywordsLimit, len(industry) == 0)
 	}
 	}
+	if strings.Index(p.Refer(), "/page_workDesktop/work-bench") > -1 {
+		//超级搜索页面 移动定制搜索标签(仅工作台内展示)
+		mobileTag = p.GetSlice("mobileTag[]")
+		//if len(mobileTag) > 0 { //当无该权限,把此字段置空
+		if !jy.HasBidFieldPower(config.Middleground, p.Session(), MobileTagSearchFunctionCode) {
+			mobileTag = []string{}
+		} else if (len(mobileTag) > 0 && mobileTag[0] == "all") || len(mobileTag) == 0 {
+			mobileTag = mobileTagItemsValOptionsAll
+		}
+		//}
+	}
+
 	//医疗领域化信息 用户前提是大会员 超级订阅,才有领域化功能的权限
 	//医疗领域化信息 用户前提是大会员 超级订阅,才有领域化功能的权限
 	if territorialization != "" && territorialization != "BIProperty" {
 	if territorialization != "" && territorialization != "BIProperty" {
 		isSearch = false
 		isSearch = false
@@ -531,14 +576,14 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	isLimit := 1
 	isLimit := 1
 	if isSearch {
 	if isSearch {
 		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
 		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
-		so := NewSearchOptimize(userId, phone, area, city, district, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, "", "", "",
+		so := NewSearchOptimize(mobileTag, userId, phone, area, city, district, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, "", "", "",
 			0, pageSize, searchGroup, searchMode, wordsMode, "", "", 0, 0,
 			0, pageSize, searchGroup, searchMode, wordsMode, "", "", 0, 0,
 			*userInfo, searchTypeSwitch, p.Request, accountId, entAccountId, entId, entUserId, buyer, winner, agency)
 			*userInfo, searchTypeSwitch, p.Request, accountId, entAccountId, entId, entUserId, buyer, winner, agency)
 		heightKeys = so.HeightKeys //主关键词和附加词合并,多组空格隔开,作为前端渲染高亮关键词使用
 		heightKeys = so.HeightKeys //主关键词和附加词合并,多组空格隔开,作为前端渲染高亮关键词使用
 		//关键词  行业 附加词
 		//关键词  行业 附加词
 		//放开用户不输入关键词可搜索 --P297需求
 		//放开用户不输入关键词可搜索 --P297需求
 		// p329 反爬白名单用户放开  非反爬白名单用户不放开未输入关键词
 		// p329 反爬白名单用户放开  非反爬白名单用户不放开未输入关键词
-		if len(s_word) > 0 || (len(s_word) == 0 && onList) || len(industry) > 0 || strings.TrimSpace(so.AdditionalWords) != "" {
+		if len(s_word) > 0 || (len(s_word) == 0 && onList) || len(industry) > 0 || strings.TrimSpace(so.AdditionalWords) != "" || len(so.MobileTag) > 0 {
 			if searchLimit {
 			if searchLimit {
 				isLimit = public.Lst.IsLimited(p.Request, p.ResponseWriter, p.Session(), isPayedUser)
 				isLimit = public.Lst.IsLimited(p.Request, p.ResponseWriter, p.Session(), isPayedUser)
 				if isLimit == 1 { //没有被限制
 				if isLimit == 1 { //没有被限制
@@ -556,7 +601,6 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	if noLoginBl {
 	if noLoginBl {
 		subtype = ""
 		subtype = ""
 	}
 	}
-	log.Println("userId:+++", userId)
 	if userId == "" {
 	if userId == "" {
 		for _, v := range list {
 		for _, v := range list {
 			*v = SearchFilter(*v)
 			*v = SearchFilter(*v)

+ 12 - 3
src/jfw/front/swordfish.go

@@ -91,6 +91,8 @@ func (m *Front) PcAjaxReq() {
 	phone := util.ObjToString(sessVal["phone"])
 	phone := util.ObjToString(sessVal["phone"])
 	currentPage, _ := m.GetInteger("pageNumber")
 	currentPage, _ := m.GetInteger("pageNumber")
 	pageSize, _ := m.GetInteger("pageSize")
 	pageSize, _ := m.GetInteger("pageSize")
+	mobileTag := m.GetSlice("mobileTag[]") //P513中国移动定制招标采购搜索
+
 	if pageSize == 0 {
 	if pageSize == 0 {
 		pageSize = 50
 		pageSize = 50
 	}
 	}
@@ -109,6 +111,13 @@ func (m *Front) PcAjaxReq() {
 			return
 			return
 		}
 		}
 	}
 	}
+	if len(mobileTag) > 0 { //当无该权限,把此字段置空
+		if !jy.HasBidFieldPower(config.Middleground, m.Session(), MobileTagSearchFunctionCode) {
+			mobileTag = []string{}
+		} else if mobileTag[0] == "all" {
+			mobileTag = mobileTagItemsValOptionsAll
+		}
+	}
 	area := m.GetString("area")
 	area := m.GetString("area")
 	district := m.GetString("district")
 	district := m.GetString("district")
 	subtype := m.GetString("subtype")
 	subtype := m.GetString("subtype")
@@ -217,7 +226,7 @@ func (m *Front) PcAjaxReq() {
 	//放开用户不输入关键词可搜索 --P297需求
 	//放开用户不输入关键词可搜索 --P297需求
 	// p329 反爬白名单用户放开  非反爬白名单用户不放开  未输入关键词
 	// p329 反爬白名单用户放开  非反爬白名单用户不放开  未输入关键词
 	//P492招标采购搜索匹配采购单位等优化--采购单位 || 中标企业 || 招标代理机构 有任何一个都可以进行搜索
 	//P492招标采购搜索匹配采购单位等优化--采购单位 || 中标企业 || 招标代理机构 有任何一个都可以进行搜索
-	if len(s_word) > 0 || (len(s_word) >= 0 && onList) || len(industry) > 0 || strings.TrimSpace(additionalWords) != "" || bwa {
+	if len(s_word) > 0 || (len(s_word) >= 0 && onList) || len(industry) > 0 || strings.TrimSpace(additionalWords) != "" || bwa || len(mobileTag) > 0 {
 		searchLimit := public.IsSearchLimit(queryItems)
 		searchLimit := public.IsSearchLimit(queryItems)
 		//未登录用户标题、正文都限制,已登录用户只限制正文
 		//未登录用户标题、正文都限制,已登录用户只限制正文
 		if userId == "" {
 		if userId == "" {
@@ -234,7 +243,7 @@ func (m *Front) PcAjaxReq() {
 		}
 		}
 		if isLimit == 1 {
 		if isLimit == 1 {
 			searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
 			searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
-			so := NewSearchOptimize(userId, phone, area, city, district, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, expireTime, propertyForm, subinformation, currentPage, pageSize, searchGroup, searchMode, wordsMode, period, scale, changehand, isfile, *userInfo, searchTypeSwitch, m.Request, accountId, entAccountId, entId, entUserId, buyer, winner, agency)
+			so := NewSearchOptimize(mobileTag, userId, phone, area, city, district, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, expireTime, propertyForm, subinformation, currentPage, pageSize, searchGroup, searchMode, wordsMode, period, scale, changehand, isfile, *userInfo, searchTypeSwitch, m.Request, accountId, entAccountId, entId, entUserId, buyer, winner, agency)
 			if so.PageNum < 0 && so.PageSize < 0 {
 			if so.PageNum < 0 && so.PageSize < 0 {
 				log.Printf("查询参数超出范围,有可能是异常请求; 用户id:%s;用户手机号:%s \n", userId, phone)
 				log.Printf("查询参数超出范围,有可能是异常请求; 用户id:%s;用户手机号:%s \n", userId, phone)
 			} else {
 			} else {
@@ -245,7 +254,7 @@ func (m *Front) PcAjaxReq() {
 		}
 		}
 	} else {
 	} else {
 		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
 		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
-		so := NewSearchOptimize(userId, phone, area, city, district, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, expireTime, propertyForm, subinformation, currentPage, pageSize, searchGroup, searchMode, wordsMode, period, scale, changehand, isfile, *userInfo, searchTypeSwitch, m.Request, accountId, entAccountId, entId, entUserId, buyer, winner, agency)
+		so := NewSearchOptimize(mobileTag, userId, phone, area, city, district, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, expireTime, propertyForm, subinformation, currentPage, pageSize, searchGroup, searchMode, wordsMode, period, scale, changehand, isfile, *userInfo, searchTypeSwitch, m.Request, accountId, entAccountId, entId, entUserId, buyer, winner, agency)
 		list, count, total = so.GetBidSearchListByCache()
 		list, count, total = so.GetBidSearchListByCache()
 	}
 	}
 	if userId == "" {
 	if userId == "" {

+ 27 - 0
src/web/staticres/css/selectCommon.css

@@ -9,6 +9,33 @@
   position: relative;
   position: relative;
 }
 }
 
 
+.select-custom-diy {
+  margin-left: 16px;
+}
+.el-popper .select_box.selectArea.select-type--custom-rc .icon_more {
+  display: none;
+}
+
+.select-custom-diy #selectArea_ .el-input__inner {
+  width: 120px;
+}
+
+.el-popper .select_box.selectArea.select-type--custom-rc .left {
+  padding-top: 0;
+}
+
+.el-popper .select_box.selectArea.select-type--custom-rc .left .box_ {
+  margin-top: 0;
+  height: auto;
+}
+.el-popper .select_box.selectArea.select-type--custom-rc {
+  min-width: 200px;
+  width: 200px;
+  height: auto;
+  padding-top: 6px;
+  padding-bottom: 6px;
+}
+
 
 
 .select-common-card + .select-common-card {
 .select-common-card + .select-common-card {
   margin-left: 16px;
   margin-left: 16px;

+ 10 - 4
src/web/staticres/js/selector/area-city-data.js

@@ -1,7 +1,7 @@
-var selectArea_temp = `<div id="selectArea_">
+var selectArea_temp = `<div id="selectArea_" :class="'select-type--' + type">
   <div class="valueBox"><span v-text="valueLabel"></span><span v-text="num" class="hightlight" v-show="num&&num!='全国'&&num!='全部'"></span><span v-show="num&&num!='全国'&&num!='全部'">个</span></div>
   <div class="valueBox"><span v-text="valueLabel"></span><span v-text="num" class="hightlight" v-show="num&&num!='全国'&&num!='全部'"></span><span v-show="num&&num!='全国'&&num!='全部'">个</span></div>
   <el-select ref="selectchoose" :placeholder="placeholderValue" :value="selectValue"  class="select_common" @visible-change="change" popper-class="select_common_data">
   <el-select ref="selectchoose" :placeholder="placeholderValue" :value="selectValue"  class="select_common" @visible-change="change" popper-class="select_common_data">
-    <div slot="empty" class="select_box selectArea">
+    <div slot="empty" class="select_box selectArea" :class="'select-type--' + type">
       <div class="left">
       <div class="left">
         <p class="title_" v-text="leftTit"></p>
         <p class="title_" v-text="leftTit"></p>
         <div class="box_" onmousewheel="var event = window.event || arguments.callee.caller.arguments[0];if(event.preventDefault) event.preventDefault();var delta = event.wheelDelta || event.originalEvent.wheelDelta || event.originalEvent.detail;var k = delta? delta:-delta*10;this.scrollTop = this.scrollTop - k;return false;">
         <div class="box_" onmousewheel="var event = window.event || arguments.callee.caller.arguments[0];if(event.preventDefault) event.preventDefault();var delta = event.wheelDelta || event.originalEvent.wheelDelta || event.originalEvent.detail;var k = delta? delta:-delta*10;this.scrollTop = this.scrollTop - k;return false;">
@@ -16,7 +16,7 @@ var selectArea_temp = `<div id="selectArea_">
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
-      <div class="right" v-show = "!(type=='area'&& !login)">
+      <div class="right" v-show="canShowRight">
        <div class = "head_tit">
        <div class = "head_tit">
        <p class="title_" v-text="rightTit"></p>
        <p class="title_" v-text="rightTit"></p>
        <img class="area-icon-vip" src="/images/biddingSearch/VIP.png" alt="" v-if="type=='area'&&login&&!vipState"/>
        <img class="area-icon-vip" src="/images/biddingSearch/VIP.png" alt="" v-if="type=='area'&&login&&!vipState"/>
@@ -36,7 +36,7 @@ var selectArea_temp = `<div id="selectArea_">
 var selectAreachoose = {
 var selectAreachoose = {
   name: 'selectAreachoose',
   name: 'selectAreachoose',
   template: selectArea_temp,
   template: selectArea_temp,
-  props: ['listData', 'valueLabel', 'leftTit', 'rightTit', 'viplimit', 'vip', 'login', 'type'],
+  props: ['listData', 'valueLabel', 'leftTit', 'rightTit', 'viplimit', 'vip', 'login', 'type', 'showRight'],
   data: function () {
   data: function () {
     return {
     return {
       selectValue: '',
       selectValue: '',
@@ -51,6 +51,12 @@ var selectAreachoose = {
     };
     };
   },
   },
   computed: {
   computed: {
+    canShowRight () {
+      if (this.showRight === false) {
+        return false
+      }
+      return !(this.type == 'area' && !this.login)
+    }
   },
   },
   watch: {
   watch: {
   },
   },

+ 15 - 0
src/web/staticres/js/superSearch.js

@@ -245,6 +245,11 @@ function getNewBiddings(num, size){
     additionalWords: $("#zbSeatchT [name='additionalWords']").val(),
     additionalWords: $("#zbSeatchT [name='additionalWords']").val(),
     district: $("#zbSeatchT [name='district']").val()
     district: $("#zbSeatchT [name='district']").val()
   };
   };
+
+  if (searchInnerVue && typeof searchInnerVue.beforeSubmitFormatParams === 'function') {
+    param = searchInnerVue.beforeSubmitFormatParams(param)
+  }
+
 	$.post("/front/pcAjaxReq",param,function(r){
 	$.post("/front/pcAjaxReq",param,function(r){
     heightWords = r.heightWords
     heightWords = r.heightWords
     showSearchTipForTimeRange(false)
     showSearchTipForTimeRange(false)
@@ -933,6 +938,11 @@ function getVIPData(clickpaging){
         additionalWords: $("#zbSeatchT [name='additionalWords']").val(),
         additionalWords: $("#zbSeatchT [name='additionalWords']").val(),
         district: $("#zbSeatchT [name='district']").val()
         district: $("#zbSeatchT [name='district']").val()
       };
       };
+
+  if (searchInnerVue && typeof searchInnerVue.beforeSubmitFormatParams === 'function') {
+    param = searchInnerVue.beforeSubmitFormatParams(param)
+  }
+
 	$.ajax({
 	$.ajax({
        type:'post',
        type:'post',
        url:'/front/pcAjaxReq',
        url:'/front/pcAjaxReq',
@@ -1341,6 +1351,11 @@ function searchOnsubmit(clickpaging){
       district: $("#zbSeatchT [name='district']").val()
       district: $("#zbSeatchT [name='district']").val()
   }
   }
 }
 }
+
+  if (searchInnerVue && typeof searchInnerVue.beforeSubmitFormatParams === 'function') {
+    param = searchInnerVue.beforeSubmitFormatParams(param)
+  }
+
   // function queryBack (r) {
   // function queryBack (r) {
   $.post("/front/pcAjaxReq",param,function(r){
   $.post("/front/pcAjaxReq",param,function(r){
     heightWords = r.heightWords
     heightWords = r.heightWords

+ 100 - 1
src/web/templates/pc/supsearch.html

@@ -1307,6 +1307,11 @@
                       </el-select>
                       </el-select>
                     </div>
                     </div>
                    </div>
                    </div>
+                    <!-- 客户定制搜索 -->
+                    <div class="select-industry select-custom-diy" v-if="showCustomDiyFilter">
+                      <select-areachoose ref='selectRC' :list-data="customRC.list" :value-label="customRC.label" left-tit="" right-tit="" :show-right="false" :login="islogin" :type="'custom-rc'" @datachange="customRCChange">
+                      </select-areachoose>
+                    </div>
                 </div>
                 </div>
                 <div class="two-filter clearfix nologin-hide" v-show="vipState">
                 <div class="two-filter clearfix nologin-hide" v-show="vipState">
                   <!--领域化页面不展示-->
                   <!--领域化页面不展示-->
@@ -3464,7 +3469,16 @@ function checkTagDisabled () {
         showMoreAreaState: true,
         showMoreAreaState: true,
         datePropertyValue: '',
         datePropertyValue: '',
         showPropertyDialog: false,
         showPropertyDialog: false,
-        IframeSrc: '/succbi/crm_system/app/crm.app/%E9%80%9A%E7%94%A8%E5%88%9B%E5%BB%BA/create_intelligence.spg'
+        IframeSrc: '/succbi/crm_system/app/crm.app/%E9%80%9A%E7%94%A8%E5%88%9B%E5%BB%BA/create_intelligence.spg',
+        // 融创客户定制
+        customRC: {
+          show: false,
+          list: [],
+          label: '',
+          selectVal: [''],
+          // 临时特殊处理
+          allKey: 'all'
+        },
       }
       }
     },
     },
     computed: {
     computed: {
@@ -3553,6 +3567,10 @@ function checkTagDisabled () {
       getSearchRangeLength: function () {
       getSearchRangeLength: function () {
         return this.filterProperty.searchCheckList.length
         return this.filterProperty.searchCheckList.length
       },
       },
+      // 融创客户定制
+      showCustomDiyFilter: function () {
+        return this.customRC.show && goTemplateData.inIframe
+      }
     },
     },
     watch: {
     watch: {
       'listState.allCount': function (val) {
       'listState.allCount': function (val) {
@@ -3568,6 +3586,7 @@ function checkTagDisabled () {
       // this.getAreaData()
       // this.getAreaData()
       this.getIndustryData()
       this.getIndustryData()
       this.getBuyerclassData()
       this.getBuyerclassData()
+      this.getCustomInfo()
       this.getPower()
       this.getPower()
     },
     },
     mounted: function () {
     mounted: function () {
@@ -3651,6 +3670,85 @@ function checkTagDisabled () {
       }
       }
     },
     },
     methods: {
     methods: {
+      // 请求参数格式化
+      beforeSubmitFormatParams (data) {
+        let params = data
+        if (this.customRC.show) {
+          params[this.customRC.key] = this.customRC.selectVal.map(v => {
+            if (v === '全部') {
+              return this.customRC.allKey
+            }
+            return v
+          })
+        }
+        return params
+      },
+      resetCustomFilter (data) {
+        const customData = data || this.customRC.origin
+        if (customData && customData.key) {
+          try {
+            this.customRC.origin = customData
+            this.customRC.label = customData.label
+            this.customRC.key = customData.key
+            this.customRC.list = customData.options.map(v => {
+              const isSelect = customData.defaultVal.indexOf(v.key) > -1
+              if (v.label === '全部') {
+                this.customRC.allKey = v.key
+              }
+              return {
+                children: [
+                  {
+                    disabled: false,
+                    indeterminate: false,
+                    selected: isSelect,
+                    label: '全部',
+                    value: '全部',
+                    parent: v.label
+                  }
+                ],
+                disabled: false,
+                indeterminate: false,
+                selected: isSelect,
+                label: v.label,
+                value: v.label === '全部' ? '全部' : v.key
+              }
+            })
+            this.customRC.selectVal = customData.defaultVal
+            this.customRC.show = true
+            if (this.$refs.selectRC && this.$refs.selectRC.initData) {
+              this.$refs.selectRC.initData()
+              this.$refs.selectRC.getData()
+            }
+          } catch (e) {
+            console.warn(e)
+          }
+        } else {
+          this.customRC.show = false
+        }
+      },
+      // 融创客户定制
+      getCustomInfo () {
+        $.ajax({
+          url: '/jylab/supsearch/searchPower',
+          type: 'POST',
+          success: function (res) {
+            if(res.error_code === 0) {
+              if (res.data && res.data[0]) {
+                const customData = res.data[0]
+                this.resetCustomFilter(customData)
+              }
+            }
+          }.bind(this),
+          error: function (err) {
+            console.log(err)
+          }
+        })
+      },
+      customRCChange: debounce(function(data){ //行业提交搜索
+        // $("#zbSeatchT [name='industry']").val(val.toString())
+        this.customRC.selectVal = data.one
+        beforeSubmit('filter-custom')
+      },200),
       handleClick (e) {
       handleClick (e) {
         e.stopPropagation()
         e.stopPropagation()
         $('.el-date-editor').trigger('click')
         $('.el-date-editor').trigger('click')
@@ -4676,6 +4774,7 @@ function checkTagDisabled () {
       // 重置筛选
       // 重置筛选
       onResetFilter: function() {
       onResetFilter: function() {
         this.resetAll()
         this.resetAll()
+        this.resetCustomFilter()
         beforeSubmit('filter-reset')
         beforeSubmit('filter-reset')
       },
       },
       // 已存筛选条件
       // 已存筛选条件