chunk-71f1dea0.36b99aa4.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-71f1dea0"],{"06a8":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div")},r=[],i=a("795b"),o=a.n(i),c=(a("7f7f"),a("ac6a"),a("f20c")),s=a("5cab"),u=a("f499"),l=a.n(u),d=a("8982"),f="/industryParkApi",m="/wx/data",h="/wx/public",p="/wx/dictController";function b(t){return Object(d["a"])({url:f+m+"/listBizAll/"+t,method:"post"})}function g(t){return Object(d["a"])({url:f+h+"/listProjectAll",method:"post",data:t})}function v(t){return Object(d["a"])({url:f+p+"/getByCodes",method:"post",data:t})}function j(t){var e={codes:l()(t)};return new o.a(function(t,a){v(e).then(function(e){t(e)}).catch(function(t,e){a(t,e)})})}var _=a("3089"),x={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 e=this;return t||(t=e.dc_key),j(t).then(function(t){t.data&&e.dc_key.forEach(function(a){var n=e.getDictValue(t.data,a,!0);e.dc_data[a]=n,e.dc_map[a]=e.$common.transDcMap(n);var r=e.getDictValue(t.data,a,!1);e.dc_data_no_all[a]=r,e.dc_map_no_all[a]=e.$common.transDcMap(r)})})},initDict2:function(t){var e=this;return t||(t=e.dc_key),j(t).then(function(t){t.data&&e.dc_key.forEach(function(a){var n=e.getDictValue(t.data,a,!1);e.dc_data[a]=n,e.dc_map[a]=e.$common.transDcMap(n);var r=e.getDictValue(t.data,a,!1);e.dc_data_no_all[a]=r,e.dc_map_no_all[a]=e.$common.transDcMap(r)})})},initBiz:function(){var t=this;return this.BizData=[],b(s["a"].uid()).then(function(e){e.data&&e.data.forEach(function(e){var a={label:e.businessName,value:e.id};t.BizData.push(a),t.BizMap[e.id]=e.businessName})}).catch(function(){})},initProjectData:function(){var t=this;return this.ProjectData=[],g(s["a"].uid()).then(function(e){e.data&&e.data.forEach(function(e){var a={label:e.name,value:e.id};t.ProjectData.push(a),t.ProjectMap[a.value]=e})}).catch(function(){})},pagination:function(t){var e=this.currentPage,a=this.pageSize,n=e*a-a,r=e*a;return t.slice(n,r)},getDictValue:function(t,e,a){var n=t[e]?c["a"].castEval(t[e].dictValue):[],r=[];if(n.forEach(function(t){var e={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};r.push(e)}),a){var i={label:"全部",value:"",active:!0};r.unshift(i)}return r},confirm:function(t,e){return new o.a(function(a,n){_["Dialog"].confirm({title:e,message:t}).then(function(t){a(t)}).catch(function(t){Object(_["Toast"])("已取消"),n(t)})})},handleBottomChange:function(t){console.log("handleBottomChange:"+t),this.bottomStatus=t,"drop"===this.bottomStatus&&this.currentPage++},loadBottom:function(){var t=this,e=this;console.log("loadBottom"),setTimeout(function(){e.getData(),t.$refs.loadmore.onBottomLoaded()},500)},imgPreview:function(t){this.dialogImageUrl="/industryParkApi/wx/img/viewImg/"+t,this.dialogImageVisible=!0},imgRemove:function(t,e){var a=e.indexOf(t);e.splice(a,1)},noImg:function(){var t=event.srcElement;t.src=a("aed7"),t.onerror=null}}},w=x,O=a("2877"),k=Object(O["a"])(w,n,r,!1,null,"3fa5b905",null);e["a"]=k.exports},2374:function(t,e,a){"use strict";a.d(e,"a",function(){return o}),a.d(e,"b",function(){return c});var n=a("8982"),r="",i="/wx/noticePark";function o(t){return Object(n["a"])({url:r+i+"/add",method:"post",data:t})}function c(t){return Object(n["a"])({url:r+i+"/edit",method:"post",data:t})}},"24ec":function(t,e,a){"use strict";a.d(e,"i",function(){return c}),a.d(e,"e",function(){return s}),a.d(e,"c",function(){return u}),a.d(e,"j",function(){return l}),a.d(e,"g",function(){return d}),a.d(e,"p",function(){return f}),a.d(e,"m",function(){return m}),a.d(e,"n",function(){return h}),a.d(e,"o",function(){return p}),a.d(e,"a",function(){return b}),a.d(e,"f",function(){return g}),a.d(e,"l",function(){return v}),a.d(e,"k",function(){return j}),a.d(e,"d",function(){return _}),a.d(e,"h",function(){return x}),a.d(e,"b",function(){return w});var n=a("8982"),r="/industryParkApi",i="/wx/user",o="/wx/frameUser";function c(t){return Object(n["a"])({url:r+i+"/login_by_app_main",method:"post",data:t})}function s(t){return Object(n["a"])({url:r+i+"/editMyInformation",method:"post",data:t})}function u(t){return Object(n["a"])({url:r+i+"/changePassword",method:"post",data:t})}function l(t){return Object(n["a"])({url:r+o+"/getById",method:"post",data:t})}function d(t){return Object(n["a"])({url:r+i+"/getById",method:"post",data:t})}function f(t){return Object(n["a"])({url:r+i+"/wechatUnBind",method:"post",data:t})}function m(t){return Object(n["a"])({url:r+i+"/unbound",method:"post",data:t})}function h(t){return Object(n["a"])({url:r+i+"/unbound2",method:"post",data:t})}function p(t){return Object(n["a"])({url:r+i+"/wechatBind",method:"post",data:t})}function b(t){return Object(n["a"])({url:r+i+"/binding",method:"post",data:t})}function g(t){return Object(n["a"])({url:r+o+"/editPassword",method:"post",data:t})}function v(t){return Object(n["a"])({url:r+i+"/send",method:"post",data:t})}function j(t){return Object(n["a"])({url:r+i+"/register_by_account",method:"post",data:t})}function _(t){return Object(n["a"])({url:r+i+"/checkAccount",method:"post",data:t})}function x(t){return Object(n["a"])({url:r+i+"/userInfo/"+t,method:"post"})}function w(t){return Object(n["a"])({url:r+i+"/bizInfo/"+t,method:"post"})}},5257:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"repair-box"},[a("div",{staticClass:"repair-content fixed-page-content"},[a("div",{staticClass:"white-box page-1"},[a("div",{staticClass:"custom-white-box-content"},[a("div",{staticClass:"custom-input-box"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],attrs:{type:"text",maxlength:"50px",placeholder:"请填写标题"},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}})])])]),a("div",{staticClass:"white-box page-2"},[a("div",{staticClass:"block-cell-item"},[a("div",{staticClass:"tit"},[a("div",{staticClass:"block-cell-item"},[t._m(0),a("div",{staticClass:"tit"},[a("van-uploader",{attrs:{multiple:!0,"max-count":6,"after-read":t.afterRead,"before-delete":t.beforeDelete},model:{value:t.fileUrls[0],callback:function(e){t.$set(t.fileUrls,0,e)},expression:"fileUrls[0]"}})],1)])])])]),a("div",{staticClass:"block-cell-item page-3"},[a("div",{staticClass:"custom-textarea-box"},[t._m(1),a("van-field",{staticStyle:{"max-height":"100px"},attrs:{rows:"8",autosize:t.autosiz,type:"textarea",placeholder:"请输入","show-word-limit":"","input-class":"input-class"},model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1)])]),a("div",{staticClass:"repair-bottom bottom-button"},[a("button",{staticClass:"btn",on:{click:t.submmit}},[t._v("发布")])])])},r=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("p",{staticClass:"label"},[t._v("\n\t\t\t\t\t\t\t图片上传"),a("span",{staticClass:"tips"},[t._v("(支持图片/视频上传限20M内,最多6张)")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"custom-item-tit"},[a("p",{staticClass:"tit"},[t._v("通知内容")])])}],i=a("795b"),o=a.n(i),c=a("f499"),s=a.n(c),u=a("06a8"),l=a("24ec"),d=a("bc3a"),f=a.n(d),m=a("2374"),h=a("3089"),p=a("5cab"),b={data:function(){return{fileUrlList:[],fileUrls:[],fileNumbers:0,updateFileNumber:0,form:{groupId:"",id:"",title:"",releaseTime:"",publisherUserId:"",status:"published",content:"",fileUrl:"",deptId:"",parks:"",source:"2"},autosiz:{maxHeight:100}}},mixins:[u["a"]],mounted:function(){document.getElementsByTagName("textarea")[0].style.maxHeight="100px",this.getUserInfo()},methods:{getUserInfo:function(){var t=this;Object(l["j"])({id:p["a"].currUser().id}).then(function(e){e.data&&(t.userInfo=e.data,t.form.deptId=t.userInfo.deptName)})},submmit:function(){var t=this;null!=this.form.title&&""!==this.form.title?0===this.fileNumbers||this.fileNumbers===this.updateFileNumber?(this.form.groupId="870261874875170816",this.form.parks="870261874875170816",this.form.fileUrl=s()(this.fileUrlList),this.form.publisherUserId=p["a"].currUser().id,this.form.releaseTime=this.$common.transServDate(new Date),this.form.createdBy=p["a"].currUser().id,Object(m["a"])(this.form).then(function(e){Object(h["Toast"])("发布成功"),t.$router.push({path:"/propertyNotice-app"})})):Object(h["Toast"])("图片正在上传请稍后再试"):Object(h["Toast"])("请填写标题")},afterRead:function(t){var e=this;this.fileNumbers=0,this.updateFileNumber=0,t instanceof Array?(this.fileNumbers=t.length,t.map(function(t){e.uploadImg(t)})):(this.fileNumbers=1,this.uploadImg(t))},beforeDelete:function(t,e){var a=this;return a.fileUrlList.splice(e.index,1),function(t,n){var r=n.index;a.fileUrlList[e.index].splice(r,1)}},uploadImg:function(t){var e=this,a=new FormData;a.append("file",t.file),console.log(a.get("file"));var n={headers:{"Content-Type":"multipart/form-data","MVVM-Key":String((new Date).getTime()),xx:"anything"}};return new o.a(function(t,r){f.a.post("/industryParkApi/wx/fileController/upload",a,n).then(function(t){var a=t.data.data.substring(1,t.data.data.length);a=a.substring(0,a.length-1),e.fileUrlList.push(e.$common.castEval(a)),e.updateFileNumber=e.updateFileNumber+1}).catch(function(t,e){r(t,e)})})}}},g=b,v=(a("811a"),a("2877")),j=Object(v["a"])(g,n,r,!1,null,"2e3db302",null);e["default"]=j.exports},"7f7f":function(t,e,a){var n=a("86cc").f,r=Function.prototype,i=/^\s*function ([^ (]*)/,o="name";o in r||a("9e1e")&&n(r,o,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},"811a":function(t,e,a){"use strict";var n=a("c1ff"),r=a.n(n);r.a},8982:function(t,e,a){"use strict";a.d(e,"a",function(){return m}),a.d(e,"b",function(){return h});var n=a("795b"),r=a.n(n),i=a("bc3a"),o=a.n(i),c=a("4328"),s=a.n(c),u=a("4360"),l=a("5cab"),d=a("a18c"),f=a("3089");function m(t,e){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var a={method:t.method,url:t.url,data:s.a.stringify(t.data)};return e&&(a.data=t.data),t.headers&&(a.headers=t.headers),new r.a(function(e,n){o()(a).then(function(t){if(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(e,a){console.log(t.url+" fail",e,a),Object(f["Toast"])(e),n(e,a)})})}function h(t){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["a"].getToken());var e={method:t.method,url:t.url};return e.data=t.data,t.headers&&(e.headers=t.headers,e.headers["MVVM-Key"]=String((new Date).getTime()),e.headers["xx"]="anything",e.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new r.a(function(a,n){o.a.defaults.withCredentials=!0,o()(e).then(function(t){if(console.log("response:",t),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(e,a){console.log(t.url+" fail",e,a),Object(f["Toast"])(e),n(e,a)})})}},aed7:function(t,e,a){t.exports=a.p+"assets/img/no-result.b05bdcd3.jpg"},c1ff:function(t,e,a){}}]);