|
@@ -302,6 +302,15 @@
|
|
|
<!-- 底部 -->
|
|
|
{{include "/common/bottom.html"}}
|
|
|
<script type="text/javascript">
|
|
|
+var searchtype = {{.T.searchtype}};
|
|
|
+if(searchtype == "1"){
|
|
|
+ searchtype = "tender";
|
|
|
+}else if(searchtype == "2"){
|
|
|
+ searchtype = "bid";
|
|
|
+}else{
|
|
|
+ searchtype = "";
|
|
|
+}
|
|
|
+var searchvalue = {{.T.searchvalue}};
|
|
|
//Array.prototype.indexOf = function (val) {for (var i = 0; i < this.length; i++) {if (this[i] == val) {return i;}} return -1;};
|
|
|
//Array.prototype.removevalue = function (val){var index=this.indexOf(val);if(index > -1){this.splice(index, 1);}};
|
|
|
var oprarr = new Array();
|
|
@@ -337,6 +346,36 @@ $(function(){
|
|
|
}
|
|
|
}
|
|
|
var msgset = {{.T.msgset}};
|
|
|
+ var searchvalueIsExsit = false;
|
|
|
+ if(msgset == ""){
|
|
|
+ if(typeof(searchvalue) != "undefined" && searchvalue.length > 0 ){
|
|
|
+ msgset = {};
|
|
|
+ msgset[searchtype] = {"a_key":[searchvalue],"s_scope":"A"};
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (typeof(searchvalue) != "undefined" && searchvalue.length > 0 ){
|
|
|
+ if(typeof(msgset[searchtype]) != "undefined"){
|
|
|
+ var keywordes = msgset[searchtype].a_key;
|
|
|
+ if(typeof(keywordes) != "undefined" && keywordes.length > 0){
|
|
|
+ for(var i=0;i<keywordes.length;i++){
|
|
|
+ var keywordesArr = keywordes[i].split("+");
|
|
|
+ for(var k=0;k<keywordesArr.length;k++){
|
|
|
+ if(keywordesArr[k] == searchvalue){
|
|
|
+ searchvalueIsExsit = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!searchvalueIsExsit){
|
|
|
+ keywordes.push(searchvalue);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ msgset[searchtype]["a_key"] = [searchvalue];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ msgset[searchtype] = {"a_key":[searchvalue]};
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if(msgset != ""){
|
|
|
if(typeof(msgset.tender) != "undefined"){
|
|
|
selectScope("tender",msgset.tender.s_scope);
|
|
@@ -418,6 +457,16 @@ $(function(){
|
|
|
$(this).hide();
|
|
|
ajaxReq();
|
|
|
});
|
|
|
+ //直接订阅带过来的关键字不存在
|
|
|
+
|
|
|
+ if(typeof(searchvalue) != "undefined" && searchvalue.length > 0){
|
|
|
+ //自动打开
|
|
|
+ if($("#"+searchtype+" .swordfish-checked").is(":hidden")){
|
|
|
+ $("#"+searchtype+" .swordfish-uncheck").click();
|
|
|
+ }else if(!searchvalueIsExsit){//修改关键词
|
|
|
+ ajaxReq();
|
|
|
+ }
|
|
|
+ }
|
|
|
//针对页面异常关闭
|
|
|
if(typeof(msgset.tender) != "undefined"&&typeof(msgset.tender.i_switchstatus) != "undefined"&&msgset.tender.i_switchstatus==1){
|
|
|
if(tender_i_status==0){
|