import request from '@/utils/request'; import {getTokenAndVerify} from "@/api/sgyhpczl/auth"; export function getPageList(data) { var arr=[] /*下发单位*/ if(data.form.ht_typesub!=null && data.form.ht_typesub!=''){ arr.push({field:"ht_typesub",value:data.form.ht_typesub,type:'OPT'}) } /*隐患单位*/ if(data.form.ht_branch!=null && data.form.ht_branch!=''){ arr.push({field:"ht_branch",value:data.form.ht_branch,type:'TXT'}) } /*隐患类别*/ if(data.form.ht_typesub!=null && data.form.ht_typesub!=''){ arr.push({field:"ht_typesub",value:data.form.ht_typesub,type:'OPT'}) } /*隐患级别*/ if(data.form.ht_level!=null && data.form.ht_level!=''){ arr.push({field:"ht_level",value:data.form.ht_level,type:'OPT'}) } /*隐患地点*/ if(data.form.address!=null && data.form.address!=''){ arr.push({field:"address",value:data.form.address,type:'TXT'}) } /*检查类别*/ if(data.form.ht_typesub!=null && data.form.ht_typesub!=''){ arr.push({field:"ht_typesub",value:data.form.ht_typesub,type:'OPT'}) } /*隐患内容*/ if(data.form.ht_content!=null && data.form.ht_content!=''){ arr.push({field:"ht_content",value:data.form.ht_content,type:'TXT'}) } /*检查时间*/ if(data.form.check_dateStart!=null && data.form.check_dateStart!='' && data.form.check_dateEnd!=null && data.form.check_dateEnd!=''){ arr.push({field:"check_date",value:data.form.check_dateStart+"至"+data.form.check_dateEnd,type:'DAT'}) } data.query_condition=arr return request({ headers:{ 'token': getTokenAndVerify().token, 'verify':getTokenAndVerify().verify }, url: "/taboi/analogy/danger_list", contentType: "application/json", method: 'POST', data }); }