complaint.js
4.26 KB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/complaint/complaint"],{"125f":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return o}));var o={uInput:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-input/u-input")]).then(n.bind(null,"84bb"))},uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"e581"))},uSelect:function(){return n.e("node-modules/uview-ui/components/u-select/u-select").then(n.bind(null,"ba16"))},uButton:function(){return n.e("node-modules/uview-ui/components/u-button/u-button").then(n.bind(null,"2221"))}},r=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t,n,o){return e.onsuccess1(t,n,o,"uUpload")})},u=[]},"4f4f":function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("7ca3"));function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={data:function(){return{fileList:[],ruleForm:{onSitePhoto:[],status:"1"},list:[{value:"物业投诉",label:"物业投诉"},{value:"违规投诉",label:"违规投诉"}],popup1:!1}},methods:{chooseLocation:function(e,t){this.popup1=!0},pops:function(e){this.ruleForm.complaintType=e[0].label},check:function(){return 0==this.ruleForm.onSitePhoto.length?(e.showToast({icon:"none",title:"请上传现场图片"}),!1):this.ruleForm.complaintType?this.ruleForm.problemDescription?!!this.ruleForm.remark||(e.showToast({icon:"none",title:"请输入备注信息"}),!1):(e.showToast({icon:"none",title:"请输入问题描述"}),!1):(e.showToast({icon:"none",title:"请选择投诉类型"}),!1)},submit:function(){var t=this,n=this.check();if(0!=n){this.ruleForm.applicationTime=this.currentTime(),this.ruleForm.createUser=e.getStorageSync("user").phone,this.ruleForm.onSitePhoto.map((function(e){e.replace(t.$img,"")}));var o=i(i({},this.ruleForm),{},{onSitePhoto:this.ruleForm.onSitePhoto.join(",")});this.$http.sendRequest("/cereComplaintsSuggestions/add","POST",o,1).then((function(t){e.navigateTo({url:"/pages/serve/serve"})})).catch((function(e){console.log(e)}))}},currentTime:function(){var e=new Date,t=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),r=e.getHours(),u=e.getMinutes(),i=e.getSeconds();n=n<10?"0"+n:n,o=o<10?"0"+o:o,r=r<10?"0"+r:r,u=u<10?"0"+u:u,i=i<10?"0"+i:i;var c="".concat(t,"-").concat(n,"-").concat(o," ").concat(r,":").concat(u,":").concat(i);return c},onsuccess1:function(t,n,o,r){var u=this;console.error(t,n,o,r),e.uploadFile({url:this.$upload,filePath:t[0].url,name:"file",formData:{filePath:"xcx"},success:function(t){u.ruleForm.onSitePhoto.push(u.$img+JSON.parse(t.data).data),e.showToast({title:"上传成功",icon:"success"})},fail:function(t){console.error("上传失败",t),e.showToast({title:"上传失败",icon:"none"})}})}}};t.default=c}).call(this,n("df3c")["default"])},"59f1":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("06cb");o(n("3240"));var r=o(n("8db1"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"8db1":function(e,t,n){"use strict";n.r(t);var o=n("125f"),r=n("cb98");for(var u in r)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(u);n("f704");var i=n("828b"),c=Object(i["a"])(r["default"],o["b"],o["c"],!1,null,"a6fde4b6",null,!1,o["a"],void 0);t["default"]=c.exports},cb98:function(e,t,n){"use strict";n.r(t);var o=n("4f4f"),r=n.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(u);t["default"]=r.a},d548:function(e,t,n){},f704:function(e,t,n){"use strict";var o=n("d548"),r=n.n(o);r.a}},[["59f1","common/runtime","common/vendor"]]]);