|
@@ -15,6 +15,7 @@
|
|
|
<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/weui.min.css">
|
|
|
<script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
|
|
|
<script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js"></script>
|
|
|
+ <script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.6.14/vue.min.js"></script>
|
|
|
<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/swiper/swiper.min.css?v={{Msg "seo" "version"}}">
|
|
|
<script src="{{Msg "seo" "cdn"}}/swiper/swiper.min.js?v={{Msg "seo" "version"}}"></script>
|
|
|
|
|
@@ -321,7 +322,7 @@
|
|
|
</li>
|
|
|
<li class="list-item"><a href="JavaScript:;">
|
|
|
<strong class="label" style="width: 2.2rem;min-width: 8em;">关键词匹配方式</strong>
|
|
|
- <span class="match content">按标题匹配</span>
|
|
|
+ <span class="match content">标题</span>
|
|
|
<i class="iconfont icon-arrow"></i>
|
|
|
</a></li>
|
|
|
|
|
@@ -475,6 +476,22 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 多选弹框 -->
|
|
|
+ <div id="checkbox_dialog">
|
|
|
+ <div class="mask" v-show="dialog_show">
|
|
|
+ <div class="box">
|
|
|
+ <div class="head"><p>关键词匹配方式</p><img src="{{Msg "seo" "cdn"}}/wx_dataExport/images/icon_delete_gray@2x.png?v={{Msg "seo" "version"}}" alt="" @click.stop="dialog_show=false"></div>
|
|
|
+ <div class="content">
|
|
|
+ <div class="item" v-for="(item,index) in list"><p :class="{'active_':item.val}">{item.name}</p><i :class="item.val?'check':'nocheck'" @click.stop="choose(item,index)"></i></div>
|
|
|
+ </div>
|
|
|
+ <div class="foot">
|
|
|
+ <div class="reset_btn" @click.stop="reset">重置</div>
|
|
|
+ <div class="ok_btn" @click.stop="ok">确认</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 弹框结束 -->
|
|
|
<script>
|
|
|
// 数据包默认选中企业需请求默认企业接口
|
|
|
try {
|
|
@@ -510,14 +527,17 @@
|
|
|
});
|
|
|
//
|
|
|
$('.match').click(function () {
|
|
|
- $('.match_way').slideDown('slow');
|
|
|
- var selectType = $(this).text();
|
|
|
- $(".read").each(function () {
|
|
|
- var p = $(this).children().text();
|
|
|
- if(p === selectType){
|
|
|
- $(this).next().find("input:radio").prop("checked", true);
|
|
|
- }
|
|
|
- });
|
|
|
+ //单选原有逻辑
|
|
|
+ // $('.match_way').slideDown('slow');
|
|
|
+ // var selectType = $(this).text();
|
|
|
+ // $(".read").each(function () {
|
|
|
+ // var p = $(this).children().text();
|
|
|
+ // if(p === selectType){
|
|
|
+ // $(this).next().find("input:radio").prop("checked", true);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ var selectType = $(this).text();
|
|
|
+ checkboxVm.open_(selectType)
|
|
|
});
|
|
|
|
|
|
$(".helpwhat").on("click",function(){
|
|
@@ -788,13 +808,13 @@
|
|
|
//关键词选择方式
|
|
|
if(localStorage.export_selectType!==""&&localStorage.export_selectType!==undefined){
|
|
|
var selectType = localStorage.export_selectType;
|
|
|
- var type = "";
|
|
|
- if(selectType === "title"){
|
|
|
- type = "按标题匹配";
|
|
|
- }else if (selectType === "all"){
|
|
|
- type = "按全文匹配";
|
|
|
- }
|
|
|
- $(".match").text(type);
|
|
|
+ // var type = "";
|
|
|
+ // if(selectType === "title"){
|
|
|
+ // type = "按标题匹配";
|
|
|
+ // }else if (selectType === "all"){
|
|
|
+ // type = "按全文匹配";
|
|
|
+ // }
|
|
|
+ $(".match").text(selectType);
|
|
|
$(".confirm").hide();
|
|
|
$(".resetOne").css('display','flex');
|
|
|
}
|
|
@@ -1116,15 +1136,69 @@
|
|
|
winner = localStorage.winner;
|
|
|
}
|
|
|
if(localStorage.export_selectType!==undefined&&localStorage.export_selectType!==""){
|
|
|
- selectType = localStorage.export_selectType;
|
|
|
+ // selectType = localStorage.export_selectType; 单选逻辑
|
|
|
+ // 多选
|
|
|
+ var selectType_str = localStorage.export_selectType;
|
|
|
+ var selectType_list =selectType_str.split(',');
|
|
|
+ var new_selectType_list = [];
|
|
|
+ selectType_list.forEach(function(ele){
|
|
|
+ if(ele=='标题'){
|
|
|
+ new_selectType_list.push('title')
|
|
|
+ }
|
|
|
+ if(ele=='正文'){
|
|
|
+
|
|
|
+ new_selectType_list.push('title')
|
|
|
+ new_selectType_list.push('detail')
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ele=='附件'){
|
|
|
+ new_selectType_list.push('filetext')
|
|
|
+
|
|
|
+ }
|
|
|
+ if(ele=='项目名称/标的物'){
|
|
|
+ new_selectType_list.push('purchasing')
|
|
|
+ new_selectType_list.push('projectname.pname')
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ selectType = new_selectType_list.join(',')
|
|
|
}else{
|
|
|
+ // 单选逻辑
|
|
|
+ // var type = $(".match").text();
|
|
|
+ // if(type === "按标题匹配"){
|
|
|
+ // selectType = "title";
|
|
|
+ // }else if(type === "按全文匹配"){
|
|
|
+ // selectType = "all";
|
|
|
+ // }
|
|
|
+ // localStorage.export_selectType = selectType;
|
|
|
+ // 多选
|
|
|
var type = $(".match").text();
|
|
|
- if(type === "按标题匹配"){
|
|
|
- selectType = "title";
|
|
|
- }else if(type === "按全文匹配"){
|
|
|
- selectType = "all";
|
|
|
- }
|
|
|
- localStorage.export_selectType = selectType;
|
|
|
+ localStorage.export_selectType = type;
|
|
|
+ var selectType_list =type.split(',');
|
|
|
+ var new_selectType_list = [];
|
|
|
+ selectType_list.forEach(function(ele){
|
|
|
+ if(ele=='标题'){
|
|
|
+ new_selectType_list.push('title')
|
|
|
+ }
|
|
|
+ if(ele=='正文'){
|
|
|
+
|
|
|
+ new_selectType_list.push('title')
|
|
|
+ new_selectType_list.push('detail')
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ele=='附件'){
|
|
|
+ new_selectType_list.push('filetext')
|
|
|
+
|
|
|
+ }
|
|
|
+ if(ele=='项目名称/标的物'){
|
|
|
+ new_selectType_list.push('purchasing')
|
|
|
+ new_selectType_list.push('projectname.pname')
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ selectType = new_selectType_list.join(',')
|
|
|
}
|
|
|
if(localStorage.comeinfrom!==undefined&&localStorage.comeinfrom!==""){
|
|
|
comeinfrom = localStorage.comeinfrom;
|
|
@@ -1197,7 +1271,7 @@
|
|
|
$("#subType").text("");
|
|
|
$("#winner").text("");
|
|
|
$("#buyer").text("");
|
|
|
- $(".match").text("按标题匹配");
|
|
|
+ $(".match").text("标题");
|
|
|
//
|
|
|
$(".chooseTime ul li").removeClass('active');
|
|
|
$(".chooseTime ul li:eq(0)").addClass('active');
|
|
@@ -1284,6 +1358,100 @@
|
|
|
n = n.toString();
|
|
|
return n[1] ? n : '0' + n
|
|
|
}
|
|
|
+ var checkboxVm=new Vue({
|
|
|
+ el: '#checkbox_dialog',
|
|
|
+ delimiters: ['{', '}'],
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ dialog_show:false,
|
|
|
+ list:[
|
|
|
+ {name:'标题',val:true},
|
|
|
+ {name:'正文',val:false},
|
|
|
+ {name:'附件',val:false},
|
|
|
+ {name:'项目名称/标的物',val:false}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ open_(str){
|
|
|
+ this.list=[
|
|
|
+ {name:'标题',val:true},
|
|
|
+ {name:'正文',val:false},
|
|
|
+ {name:'附件',val:false},
|
|
|
+ {name:'项目名称/标的物',val:false}
|
|
|
+ ]
|
|
|
+ let this_=this
|
|
|
+ let list =str.split(',')
|
|
|
+ list.forEach(function(ele){
|
|
|
+ if(ele=='标题'){
|
|
|
+ this_.list[0].val=true
|
|
|
+ }
|
|
|
+ if(ele=='正文'){
|
|
|
+
|
|
|
+ this_.list[1].val=true
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ele=='附件'){
|
|
|
+ this_.list[2].val=true
|
|
|
+
|
|
|
+ }
|
|
|
+ if(ele=='项目名称/标的物'){
|
|
|
+ this_.list[3].val=true
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.dialog_show=true
|
|
|
+ },
|
|
|
+ choose(item){
|
|
|
+ //至少有一个选项
|
|
|
+ let chooselist=[]
|
|
|
+ this.list.forEach(function(ele){
|
|
|
+ if(ele.val){
|
|
|
+ chooselist.push(ele.val)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(chooselist.length<2){
|
|
|
+ if(item.val==false){
|
|
|
+ item.val=!item.val
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ item.val=!item.val
|
|
|
+ }
|
|
|
+ },
|
|
|
+ reset(){
|
|
|
+ this.list=[
|
|
|
+ {name:'标题',val:true},
|
|
|
+ {name:'正文',val:false},
|
|
|
+ {name:'附件',val:false},
|
|
|
+ {name:'项目名称/标的物',val:false}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ ok(){
|
|
|
+ let list =this.list
|
|
|
+ let choose=[]
|
|
|
+ list.forEach(function(ele) {
|
|
|
+ if(ele.val){
|
|
|
+ choose.push(ele.name)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let choose_str=choose.join(',')
|
|
|
+ console.log(choose_str)
|
|
|
+ if(choose_str!=='标题'){
|
|
|
+ $(".confirm").hide();
|
|
|
+ $(".resetOne").css('display', 'flex');
|
|
|
+ }
|
|
|
+ $('.match').html(choose_str);
|
|
|
+ localStorage.export_selectType = choose_str; //储存汉字提交时再转换为标识字段
|
|
|
+ this.dialog_show=false
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
</script>
|
|
|
{{include "/common/baiducc.html"}}
|