chunk-630cb9fd.0eeb0252.js 9.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-630cb9fd"],{"06a8":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},i=[],c=e("795b"),s=e.n(c),o=(e("7f7f"),e("ac6a"),e("f20c")),r=e("5cab"),u=e("f499"),l=e.n(u),d=e("8982"),f="/industryParkApi",h="/wx/data",m="/wx/public",p="/wx/dictController";function g(t){return Object(d["a"])({url:f+h+"/listBizAll/"+t,method:"post"})}function v(t){return Object(d["a"])({url:f+m+"/listProjectAll",method:"post",data:t})}function b(t){return Object(d["a"])({url:f+p+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:l()(t)};return new s.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var y=e("3089"),j={name:"BaseData",data:function(){return{currentPage:1,totalSize:0,pageSize:10,InitialLoading:!0,allLoaded:!1,bottomStatus:"",StaffData:[],StaffMap:{},BizData:[],BizMap:{},UserProject:[],ProjectData:[],ProjectMap:{},dialogImageUrl:"",dialogImageVisible:!1,dc_map:{},dc_data:{},dc_map_no_all:{},dc_data_no_all:{}}},mounted:function(){},methods:{initDict:function(t){var a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!0);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initDict2:function(t){var a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!1);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initBiz:function(){var t=this;return this.BizData=[],g(r["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.businessName,value:a.id};t.BizData.push(e),t.BizMap[a.id]=a.businessName})}).catch(function(){})},initProjectData:function(){var t=this;return this.ProjectData=[],v(r["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.name,value:a.id};t.ProjectData.push(e),t.ProjectMap[e.value]=a})}).catch(function(){})},pagination:function(t){var a=this.currentPage,e=this.pageSize,n=a*e-e,i=a*e;return t.slice(n,i)},getDictValue:function(t,a,e){var n=t[a]?o["a"].castEval(t[a].dictValue):[],i=[];if(n.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};i.push(a)}),e){var c={label:"全部",value:"",active:!0};i.unshift(c)}return i},confirm:function(t,a){return new s.a(function(e,n){y["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(y["Toast"])("已取消"),n(t)})})},handleBottomChange:function(t){console.log("handleBottomChange:"+t),this.bottomStatus=t,"drop"===this.bottomStatus&&this.currentPage++},loadBottom:function(){var t=this,a=this;console.log("loadBottom"),setTimeout(function(){a.getData(),t.$refs.loadmore.onBottomLoaded()},500)},imgPreview:function(t){this.dialogImageUrl="/industryParkApi/wx/img/viewImg/"+t,this.dialogImageVisible=!0},imgRemove:function(t,a){var e=a.indexOf(t);a.splice(e,1)},noImg:function(){var t=event.srcElement;t.src=e("aed7"),t.onerror=null}}},D=j,w=e("2877"),x=Object(w["a"])(D,n,i,!1,null,"3fa5b905",null);a["a"]=x.exports},"1bac":function(t,a,e){"use strict";var n=e("f524"),i=e.n(n);i.a},"386d":function(t,a,e){"use strict";var n=e("cb7c"),i=e("83a1"),c=e("5f1b");e("214f")("search",1,function(t,a,e,s){return[function(e){var n=t(this),i=void 0==e?void 0:e[a];return void 0!==i?i.call(e,n):new RegExp(e)[a](String(n))},function(t){var a=s(e,t,this);if(a.done)return a.value;var o=n(t),r=String(this),u=o.lastIndex;i(u,0)||(o.lastIndex=0);var l=c(o,r);return i(o.lastIndex,u)||(o.lastIndex=u),null===l?-1:l.index}]})},"7f7f":function(t,a,e){var n=e("86cc").f,i=Function.prototype,c=/^\s*function ([^ (]*)/,s="name";s in i||e("9e1e")&&n(i,s,{configurable:!0,get:function(){try{return(""+this).match(c)[1]}catch(t){return""}}})},"83a1":function(t,a){t.exports=Object.is||function(t,a){return t===a?0!==t||1/t===1/a:t!=t&&a!=a}},8982:function(t,a,e){"use strict";e.d(a,"a",function(){return h}),e.d(a,"b",function(){return m});var n=e("795b"),i=e.n(n),c=e("bc3a"),s=e.n(c),o=e("4328"),r=e.n(o),u=e("4360"),l=e("5cab"),d=e("a18c"),f=e("3089");function h(t,a){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var e={method:t.method,url:t.url,data:r.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new i.a(function(a,n){s()(e).then(function(t){if(t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(f["Toast"])(e.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(e.errmsg),n(e.errmsg);break}a(e)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}function m(t){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var a={method:t.method,url:t.url};return a.data=t.data,t.headers&&(a.headers=t.headers,a.headers["MVVM-Key"]=String((new Date).getTime()),a.headers["xx"]="anything",a.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new i.a(function(e,n){s.a.defaults.withCredentials=!0,s()(a).then(function(t){if(console.log("response:",t),t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(f["Toast"])(a.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(a.errmsg),n(a.errmsg);break}e(a)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}},"9f14":function(t,a,e){"use strict";e.d(a,"c",function(){return o}),e.d(a,"a",function(){return r}),e.d(a,"b",function(){return u});var n=e("8982"),i="/industryParkApi",c="/wx/policy",s="/wx/policyType";function o(t){return Object(n["a"])({url:i+c+"/list",method:"post",data:t})}function r(t){return Object(n["a"])({url:i+c+"/getById",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+s+"/listAll",method:"post",data:t})}},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},d1c9:function(t,a,e){t.exports=e.p+"assets/img/ismate.248ac43c.svg"},e368:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"Industrial"},[n("div",{staticClass:"tips-list-bg"},t._l(t.tipList,function(a){return n("div",{key:a.name,class:["tip-item",a.active&&"active"],on:{click:function(e){return t.selectChange(a.id)}}},[t._v("\n "+t._s(a.name)+"\n ")])}),0),n("div",{staticStyle:{display:"flex","align-items":"center","margin-bottom":"15px"}},[t._v("\n 是否匹配:\n "),n("van-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#2a3980",size:"18px"},on:{change:function(a){return t.selectData1()}},model:{value:t.params.isMate,callback:function(a){t.$set(t.params,"isMate",a)},expression:"params.isMate"}})],1),n("div",{staticClass:"news-list"},t._l(t.dataList,function(a){return n("div",{staticClass:"news-item detail-card shadow-radius",on:{click:function(e){return t.$router.push({path:"/industrialPolicy/detail",query:{id:a.id}})}}},[1==a.isMate?n("img",{staticClass:"ismate",attrs:{src:e("d1c9")}}):t._e(),n("div",{staticClass:"content"},[t._m(0,!0),n("div",{staticClass:"right"},[n("div",{staticClass:"top"},[t._v(t._s(a.title))]),n("div",{staticClass:"bottom"},[n("span",[t._v(" "+t._s(a.releaseTime))]),n("span",[t._v("园区管委会")])])])]),n("div",{staticClass:"t-list"},[n("span",{staticClass:"normal-tip by z-bg"},[t._v(t._s(a.policySmallName))])])])}),0)])},i=[function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"left"},[e("i",{staticClass:"iconfont icon-zhuanxiangfuchizhengce"})])}],c=(e("386d"),e("7f7f"),e("ac6a"),e("06a8")),s=e("9f14"),o=e("5cab"),r={data:function(){return{tipList:[],dataList:[],type:[],params:{pageNum:1,pageSize:10,isMate:0,policyBig:"",groupId:"",status:"published"},totalPage:1}},mixins:[c["a"]],mounted:function(){this.selectPolicyType(),this.params.userId=o["a"].currUser().id,console.log("this.search.groupId",this.params.groupId)},methods:{selectPolicyType:function(){var t=this;Object(s["b"])({}).then(function(a){if(console.log(a),a.data){t.type=a.data,t.tipList=[];var e=[];e.push({id:"",name:"全部",active:!1}),a.data.forEach(function(t){"big"===t.type&&e.push({id:t.id,name:t.name,active:!1})}),t.tipList=e}t.selectChange("")})},selectChange:function(t){var a=!0;this.tipList.forEach(function(e){e.id===t?e.active?a=!1:e.active=!0:e.active=!1}),a&&(this.dataList=[],this.selectData(t))},selectData1:function(t){var a=this;Object(s["c"])(a.params).then(function(t){console.log(t),a.dataList=[],t.data&&t.data.forEach(function(t){var e=a.getItemJson(t),n=a.type,i=[];n.forEach(function(t){-1!==e.policySmall.search(t.id)&&i.push(t.name)}),e.policySmallName=i.join(","),a.dataList.push(e)})})},selectData:function(t){var a=this;a.params.policyBig=t,Object(s["c"])(a.params).then(function(t){console.log(t),t.data&&t.data.forEach(function(t){var e=a.getItemJson(t),n=a.type,i=[];n.forEach(function(t){-1!==e.policySmall.search(t.id)&&i.push(t.name)}),e.policySmallName=i.join(","),a.dataList.push(e)})})},getItemJson:function(t){return t.releaseTime=this.$common.transServDate(t.releaseTime),t}}},u=r,l=(e("1bac"),e("2877")),d=Object(l["a"])(u,n,i,!1,null,"6f4318bc",null);a["default"]=d.exports},f524:function(t,a,e){}}]);