Commit f13f4303 by keith

修复几个BUG

parent b8f7c6ac
...@@ -135,6 +135,7 @@ func (c *PublicController) Register() { ...@@ -135,6 +135,7 @@ func (c *PublicController) Register() {
user.ID = 0 user.ID = 0
user.Online = 1 user.Online = 1
user.RemoteAddr = currentRemoteAddr user.RemoteAddr = currentRemoteAddr
user.Platform = sessionRequestDto.Platform
user.LastActivity = time.Now().Unix() user.LastActivity = time.Now().Unix()
user.Address = sessionRequestDto.Address user.Address = sessionRequestDto.Address
......
...@@ -43,4 +43,4 @@ ...@@ -43,4 +43,4 @@
top:0 !important; top:0 !important;
min-height: inherit!important; min-height: inherit!important;
left:0 !important; right:0 !important; bottom:0 !important; margin: auto !important; left:0 !important; right:0 !important; bottom:0 !important; margin: auto !important;
}</style><link href=css/chunk-28ddead2.96f83ab8.css rel=prefetch><link href=css/chunk-5750b049.975722ef.css rel=prefetch><link href=css/chunk-5abde09c.21a06077.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=js/chunk-28ddead2.25a13c55.js rel=prefetch><link href=js/chunk-5750b049.b7cee639.js rel=prefetch><link href=js/chunk-5abde09c.95818801.js rel=prefetch><link href=js/chunk-5e6009ff.cb477013.js rel=prefetch><link href=css/app.19de1655.css rel=preload as=style><link href=css/chunk-vendors.5cea36ab.css rel=preload as=style><link href=js/app.96f57816.js rel=preload as=script><link href=js/chunk-vendors.a823ad66.js rel=preload as=script><link href=css/chunk-vendors.5cea36ab.css rel=stylesheet><link href=css/app.19de1655.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.a823ad66.js></script><script src=js/app.96f57816.js></script></body></html> }</style><link href=css/chunk-5750b049.975722ef.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-6d9c3917.21a06077.css rel=prefetch><link href=css/chunk-bd7efe5c.96f83ab8.css rel=prefetch><link href=js/chunk-5750b049.9b99e61d.js rel=prefetch><link href=js/chunk-5e6009ff.20ab0e77.js rel=prefetch><link href=js/chunk-6d9c3917.c347394d.js rel=prefetch><link href=js/chunk-bd7efe5c.5b3512bd.js rel=prefetch><link href=css/app.19de1655.css rel=preload as=style><link href=css/chunk-vendors.5cea36ab.css rel=preload as=style><link href=js/app.8d623d9d.js rel=preload as=script><link href=js/chunk-vendors.7ce94627.js rel=preload as=script><link href=css/chunk-vendors.5cea36ab.css rel=stylesheet><link href=css/app.19de1655.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.7ce94627.js></script><script src=js/app.8d623d9d.js></script></body></html>
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5750b049"],{"269c":function(t,e,o){t.exports=o.p+"img/fujian1.083cd8b7.png"},"281f":function(t,e,o){},4033:function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[t.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"工单详细"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(e){return t.$router.go(-1)}}})],1),3!=t.workorder.status?s("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.close()}},slot:"right"},[s("span",[t._v("关闭工单")])]):t._e()],1):t._e(),s("div",{staticClass:"content",class:{"hide-header":!t.isShowHeader}},[s("div",{staticClass:"head"},[s("div",{staticClass:"con"},[s("span",[t._v("标题:")]),s("span",[t._v(t._s(t.workorder.title))])]),s("div",{staticClass:"con"},[s("span",[t._v("内容:")]),s("span",{domProps:{innerHTML:t._s(t.workorder.content)}})]),s("div",{staticClass:"con"},[s("span",[t._v("电话:")]),s("span",[t._v(t._s(t.workorder.phone||"未预留电话号码"))])]),s("div",{staticClass:"con"},[s("span",[t._v("邮箱:")]),s("span",[t._v(t._s(t.workorder.email||"未预留邮箱"))])]),s("div",{staticClass:"con"},[s("span",[t._v("时间:")]),s("span",[t._v(t._s(t.$formatDate(t.workorder.create_at)))])]),s("div",{staticClass:"con"},[s("span",[t._v("类型:")]),s("span",[t._v(t._s(t.typeName||"---"))])]),s("div",{staticClass:"con"},[s("span",[t._v("状态:")]),s("span",[1==t.workorder.status?s("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==t.workorder.status?s("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])])]),s("div",{staticClass:"comments"},[t.comments.length<=0?s("div",{staticClass:"no-data"},[t._v("暂无回复内容,请您耐心等待~")]):t._l(t.comments,(function(e,o){return[s("div",{key:o,staticClass:"item"},[s("div",{staticClass:"avatar"},[0==e.aid?s("img",{attrs:{src:t.userInfo.avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}}):s("img",{attrs:{src:e.a_avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}})]),s("div",{staticClass:"right"},[0==e.aid?s("div",{staticClass:"nickname"},[t._v("我")]):s("div",{staticClass:"nickname"},[t._v(t._s(e.a_nickname))]),s("div",{staticClass:"detail",domProps:{innerHTML:t._s(e.content)}}),s("div",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])])])]})),3==t.workorder.status?s("div",{staticClass:"workorder-close"},[t._v("工单已结束~")]):t._e()],2),""!=t.request.source||t.isShowUploadLoading?s("div",{staticClass:"file-view"},[t.isShowUploadLoading?s("span",[s("img",{attrs:{src:o("cf1c"),alt:""}}),s("i",[t._v("上传中~")])]):s("span",[s("img",{attrs:{src:o("269c"),alt:""}}),s("i",[t._v("你已成功添加附件,重新上传可替换~")])])]):t._e(),3!=t.workorder.status?s("div",{staticClass:"input-form"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.request.content,expression:"request.content"}],attrs:{placeholder:"请输入内容~"},domProps:{value:t.request.content},on:{blur:function(e){return t.inputBlur()},input:function(e){e.target.composing||t.$set(t.request,"content",e.target.value)}}}),s("span",{staticClass:"icon-btn"},[s("input",{attrs:{title:"添加附件",type:"file",onclick:"this.value = null"},on:{change:t.uploadFile}})]),s("span",{staticClass:"sub-btn",on:{click:function(e){return t.reply()}}},[t._v("提交")])]):t._e()])],1)},r=[],n=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),a=o("2f62"),i=o("76a0"),c=o("bc3a"),l=o.n(c);function u(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?u(Object(o),!0).forEach((function(e){Object(n["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var p={name:"workorder_detail",components:{},data:function(){return{isShowUploadLoading:!1,isSubmit:!1,workorder:{},comments:[],fileType:"",request:{source:"",content:""}}},computed:d({},Object(a["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs"]),{typeName:function(){var t=this;try{return this.workorderTypes.filter((function(e){return e.id==t.workorder.tid}))[0].title}catch(e){return console.log(e),""}}}),created:function(){var t=this;document.title="工单详细";var e=this.$route.params.id;this.$store.commit("updateState",{isShowPageLoading:!0}),l.a.all([this.getWorkOrder(e),this.getComments(e)]).then(l.a.spread((function(){t.$store.commit("updateState",{isShowPageLoading:!1})})))},methods:{getWorkOrder:function(t){var e=this;return l.a.get("/public/workorder/"+t).then((function(t){e.workorder=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200)})).catch((function(t){console.log(t)}))},getComments:function(t){var e=this;return l.a.get("/public/workorder/comments/"+t).then((function(t){null!=t.data.data&&(e.comments=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200))})).catch((function(t){console.log(t)}))},reply:function(){var t=this,e=this.request.content+this.request.source;if(""!=e.trim()){if(!this.isSubmit){this.isSubmit=!0;var o=this.workorder.id;l.a.post("/public/workorder/reply",{wid:o,content:e}).then((function(e){t.isSubmit=!1,console.log(e),t.getComments(o),t.request={source:"",content:""},setTimeout((function(){var t=document.querySelector(".container").clientHeight,e=document.querySelector(".content").clientHeight;document.querySelector(".container").scrollTop=e-t+20}),500)})).catch((function(e){t.isSubmit=!1,console.log(e),Object(i["Toast"])({message:"提交失败~"})}))}}else Object(i["Toast"])({message:"请输入内容~"})},inputBlur:function(){setTimeout((function(){document.body.scrollTo=0,window.scrollTo(0,0)}),100)},uploadFile:function(t){var e=t.target,o=e.files[0];this.isShowUploadLoading=!0;var s=this;this.$uploadFile({file:o,secret:s.configs.upload_secret,mode:this.configs.upload_mode,percent:function(){},success:function(t){var e;s.isShowUploadLoading=!1;var o=s.configs.upload_host+"/"+t,r=t.substr(t.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?e="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+o+"' />":(e="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",e+="<a target='_blank' style='color: #2e9dfc;' href='"+o+"'>下载附件</a>"),s.request.source=e,Object(i["Toast"])({message:"上传成功~"})},fail:function(t){s.isShowUploadLoading=!1,t.response&&t.response.data&&Object(i["Toast"])({message:t.response.data.message})}})},close:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定关闭该工单吗?").then((function(){l.a.put("/public/workorder/close/"+e).then((function(o){console.log(o),Object(i["Toast"])({message:"工单已关闭~"}),t.getWorkOrder(e)})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))},del:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定删除该工单吗?").then((function(){l.a.delete("/public/workorder/"+e).then((function(e){console.log(e),Object(i["Toast"])({message:"工单已删除~"}),setTimeout((function(){return t.$router.go(-1)}))})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))}}},A=p,g=(o("cb38"),o("2877")),m=Object(g["a"])(A,s,r,!1,null,"35e99ebc",null);e["default"]=m.exports},cb38:function(t,e,o){"use strict";var s=o("281f"),r=o.n(s);r.a},cf1c:function(t,e){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5750b049"],{"269c":function(t,e,o){t.exports=o.p+"img/fujian1.083cd8b7.png"},"281f":function(t,e,o){},4033:function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[t.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"工单详细"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(e){return t.$router.go(-1)}}})],1),3!=t.workorder.status?s("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.close()}},slot:"right"},[s("span",[t._v("关闭工单")])]):t._e()],1):t._e(),s("div",{staticClass:"content",class:{"hide-header":!t.isShowHeader}},[s("div",{staticClass:"head"},[s("div",{staticClass:"con"},[s("span",[t._v("标题:")]),s("span",[t._v(t._s(t.workorder.title))])]),s("div",{staticClass:"con"},[s("span",[t._v("内容:")]),s("span",{domProps:{innerHTML:t._s(t.workorder.content)}})]),s("div",{staticClass:"con"},[s("span",[t._v("电话:")]),s("span",[t._v(t._s(t.workorder.phone||"未预留电话号码"))])]),s("div",{staticClass:"con"},[s("span",[t._v("邮箱:")]),s("span",[t._v(t._s(t.workorder.email||"未预留邮箱"))])]),s("div",{staticClass:"con"},[s("span",[t._v("时间:")]),s("span",[t._v(t._s(t.$formatDate(t.workorder.create_at)))])]),s("div",{staticClass:"con"},[s("span",[t._v("类型:")]),s("span",[t._v(t._s(t.typeName||"---"))])]),s("div",{staticClass:"con"},[s("span",[t._v("状态:")]),s("span",[1==t.workorder.status?s("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==t.workorder.status?s("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==t.workorder.status?s("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])])]),s("div",{staticClass:"comments"},[t.comments.length<=0?s("div",{staticClass:"no-data"},[t._v("暂无回复内容,请您耐心等待~")]):t._l(t.comments,(function(e,o){return[s("div",{key:o,staticClass:"item"},[s("div",{staticClass:"avatar"},[0==e.aid?s("img",{attrs:{src:t.userInfo.avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}}):s("img",{attrs:{src:e.a_avatar||"http://qiniu.cmp520.com/avatar_degault_3.png",alt:""}})]),s("div",{staticClass:"right"},[0==e.aid?s("div",{staticClass:"nickname"},[t._v("我")]):s("div",{staticClass:"nickname"},[t._v(t._s(e.a_nickname))]),s("div",{staticClass:"detail",domProps:{innerHTML:t._s(e.content)}}),s("div",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])])])]})),3==t.workorder.status?s("div",{staticClass:"workorder-close"},[t._v("工单已结束~")]):t._e()],2),""!=t.request.source||t.isShowUploadLoading?s("div",{staticClass:"file-view"},[t.isShowUploadLoading?s("span",[s("img",{attrs:{src:o("cf1c"),alt:""}}),s("i",[t._v("上传中~")])]):s("span",[s("img",{attrs:{src:o("269c"),alt:""}}),s("i",[t._v("你已成功添加附件,重新上传可替换~")])])]):t._e(),3!=t.workorder.status?s("div",{staticClass:"input-form"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.request.content,expression:"request.content"}],attrs:{placeholder:"请输入内容~"},domProps:{value:t.request.content},on:{blur:function(e){return t.inputBlur()},input:function(e){e.target.composing||t.$set(t.request,"content",e.target.value)}}}),s("span",{staticClass:"icon-btn"},[s("input",{attrs:{title:"添加附件",type:"file",onclick:"this.value = null"},on:{change:t.uploadFile}})]),s("span",{staticClass:"sub-btn",on:{click:function(e){return t.reply()}}},[t._v("提交")])]):t._e()])],1)},r=[],n=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),a=o("2f62"),i=o("76a0"),c=o("bc3a"),l=o.n(c);function u(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,s)}return o}function d(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?u(Object(o),!0).forEach((function(e){Object(n["a"])(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var p={name:"workorder_detail",components:{},data:function(){return{isShowUploadLoading:!1,isSubmit:!1,workorder:{},comments:[],fileType:"",request:{source:"",content:""}}},computed:d({},Object(a["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs"]),{typeName:function(){var t=this;try{return this.workorderTypes.filter((function(e){return e.id==t.workorder.tid}))[0].title}catch(e){return console.log(e),""}}}),created:function(){var t=this;document.title="工单详细";var e=this.$route.params.id;this.$store.commit("updateState",{isShowPageLoading:!0}),l.a.all([this.getWorkOrder(e),this.getComments(e)]).then(l.a.spread((function(){t.$store.commit("updateState",{isShowPageLoading:!1})})))},methods:{getWorkOrder:function(t){var e=this;return l.a.get("/public/workorder/"+t).then((function(t){e.workorder=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200)})).catch((function(t){console.log(t)}))},getComments:function(t){var e=this;return l.a.get("/public/workorder/comments/"+t).then((function(t){null!=t.data.data&&(e.comments=t.data.data,setTimeout((function(){return e.$previewRefresh()}),200))})).catch((function(t){console.log(t)}))},reply:function(){var t=this,e=this.request.content+this.request.source;if(""!=e.trim()){if(!this.isSubmit){this.isSubmit=!0;var o=this.workorder.id;l.a.post("/public/workorder/reply",{wid:o,content:e}).then((function(e){t.isSubmit=!1,console.log(e),t.getComments(o),t.request={source:"",content:""},setTimeout((function(){var t=document.querySelector(".container").clientHeight,e=document.querySelector(".content").clientHeight;document.querySelector(".container").scrollTop=e-t+20}),500)})).catch((function(e){t.isSubmit=!1,console.log(e),Object(i["Toast"])({message:"提交失败~"})}))}}else Object(i["Toast"])({message:"请输入内容~"})},inputBlur:function(){setTimeout((function(){document.body.scrollTo=0,window.scrollTo(0,0)}),100)},uploadFile:function(t){var e=t.target,o=e.files[0];this.isShowUploadLoading=!0;var s=this;this.$uploadFile({file:o,secret:s.configs.upload_secret,mode:this.configs.upload_mode,percent:function(){},success:function(t){var e;s.isShowUploadLoading=!1;var o=s.configs.upload_host+"/"+t,r=t.substr(t.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?e="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+o+"' />":(e="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",e+="<a target='_blank' style='color: #2e9dfc;' href='"+o+"'>下载附件</a>"),s.request.source=e,Object(i["Toast"])({message:"上传成功~"})},fail:function(t){s.isShowUploadLoading=!1,t.response&&t.response.data&&Object(i["Toast"])({message:t.response.data.message})}})},close:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定关闭该工单吗?").then((function(){l.a.put("/public/workorder/close/"+e).then((function(o){console.log(o),Object(i["Toast"])({message:"工单已关闭~"}),t.getWorkOrder(e)})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))},del:function(){var t=this,e=this.workorder.id;i["MessageBox"].confirm("您确定删除该工单吗?").then((function(){l.a.delete("/public/workorder/"+e).then((function(e){console.log(e),Object(i["Toast"])({message:"工单已删除~"}),setTimeout((function(){return t.$router.go(-1)}))})).catch((function(t){Object(i["Toast"])({message:"工单关闭失败~"}),console.log(t)}))}))}}},A=p,g=(o("cb38"),o("2877")),m=Object(g["a"])(A,s,r,!1,null,"35e99ebc",null);e["default"]=m.exports},cb38:function(t,e,o){"use strict";var s=o("281f"),r=o.n(s);r.a},cf1c:function(t,e){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"}}]);
//# sourceMappingURL=chunk-5750b049.b7cee639.js.map //# sourceMappingURL=chunk-5750b049.9b99e61d.js.map
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5abde09c"],{a481:function(e,t,s){"use strict";var r=s("cb7c"),i=s("4bf8"),a=s("9def"),n=s("4588"),o=s("0390"),c=s("5f1b"),l=Math.max,u=Math.min,p=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,v=/\$([$&`']|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};s("214f")("replace",2,(function(e,t,s,h){return[function(r,i){var a=e(this),n=void 0==r?void 0:r[t];return void 0!==n?n.call(r,a,i):s.call(String(a),r,i)},function(e,t){var i=h(s,e,this,t);if(i.done)return i.value;var p=r(e),d=String(this),v="function"===typeof t;v||(t=String(t));var m=p.global;if(m){var b=p.unicode;p.lastIndex=0}var w=[];while(1){var y=c(p,d);if(null===y)break;if(w.push(y),!m)break;var k=String(y[0]);""===k&&(p.lastIndex=o(d,a(p.lastIndex),b))}for(var O="",x=0,j=0;j<w.length;j++){y=w[j];for(var q=String(y[0]),S=l(u(n(y.index),d.length),0),_=[],T=1;T<y.length;T++)_.push(f(y[T]));var P=y.groups;if(v){var C=[q].concat(_,S,d);void 0!==P&&C.push(P);var $=String(t.apply(void 0,C))}else $=g(q,d,S,_,P,t);S>=x&&(O+=d.slice(x,S)+$,x=S+q.length)}return O+d.slice(x)}];function g(e,t,r,a,n,o){var c=r+e.length,l=a.length,u=v;return void 0!==n&&(n=i(n),u=d),s.call(o,u,(function(s,i){var o;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(c);case"<":o=n[i.slice(1,-1)];break;default:var u=+i;if(0===u)return s;if(u>l){var d=p(u/10);return 0===d?s:d<=l?void 0===a[d-1]?i.charAt(1):a[d-1]+i.charAt(1):s}o=a[u-1]}return void 0===o?"":o}))}}))},d92a:function(e,t,s){"use strict";var r=s("e8e3"),i=s.n(r);i.a},e8e3:function(e,t,s){},ede1:function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[e.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"创建工单"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(t){return e.$router.go(-1)}}})],1)]):e._e(),s("div",{staticClass:"content",class:{"hide-header":!e.isShowHeader}},[s("div",{staticClass:"field-line arrow-right",on:{click:function(t){e.isShowTypesPicker=!0}}},[s("span",[e._v("类型:")]),s("span",[e._v(e._s(e.selectTyped||"选择工单分类"))])]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("标题:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.title,expression:"request.title"}],attrs:{type:"text",placeholder:"请输入工单标题~"},domProps:{value:e.request.title},on:{input:function(t){t.target.composing||e.$set(e.request,"title",t.target.value)}}})]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("手机:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.phone,expression:"request.phone"}],attrs:{type:"number",placeholder:"请输入您的手机~"},domProps:{value:e.request.phone},on:{input:function(t){t.target.composing||e.$set(e.request,"phone",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("必填,预留手机号方便客服联系到您~")]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("邮箱:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.email,expression:"request.email"}],attrs:{type:"email",placeholder:"请输入您的电子邮箱~"},domProps:{value:e.request.email},on:{input:function(t){t.target.composing||e.$set(e.request,"email",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("非必填,预留邮箱后若工单回复后会通过邮箱通知您~")]),s("div",{staticClass:"field-line textarea"},[s("span",[e._v("内容:")]),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.request.content,expression:"request.content"}],attrs:{placeholder:"请输入您的工单内容~"},domProps:{value:e.request.content},on:{input:function(t){t.target.composing||e.$set(e.request,"content",t.target.value)}}})]),s("div",{staticClass:"field-line arrow-right file"},[s("span",[e._v("附件:")]),s("span",{class:{ed:""!=e.source}},[e._v(e._s(e.source?"已上传附件,重新上传可替换~":"上传附件"))]),s("input",{attrs:{type:"file"},on:{change:e.uploadFile}})]),s("span",{staticClass:"sub-btn",on:{click:function(t){return e.submit()}}},[e._v("提交")])]),e.isShowTypesPicker?s("div",{staticClass:"types-sheet"},[s("div",{staticClass:"picker-box"},[s("div",{staticClass:"title"},[s("span",[e._v("选择工单类型")]),s("span",{staticClass:"sub-btn",on:{click:function(t){e.isShowTypesPicker=!1}}},[e._v("确定")])]),s("mt-picker",{attrs:{slots:e.types},on:{change:e.onValuesChange}})],1)]):e._e()],1)},i=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("a481"),s("bd86")),n=s("2f62"),o=s("76a0"),c=s("bc3a"),l=s.n(c);function u(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function p(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?u(Object(s),!0).forEach((function(t){Object(a["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):u(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var d={name:"workorder_create",components:{},data:function(){return{isSubmit:!1,request:{tid:0,title:"",content:"",phone:"",email:""},selectTyped:"",source:"",isShowTypesPicker:!1}},computed:p({},Object(n["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs","workorderTypes"]),{types:function(){for(var e=[],t=[{flex:1,values:[],className:"workorder-create-picker",textAlign:"center"}],s=0;s<this.workorderTypes.length;s++)e.push(this.workorderTypes[s].title);return t[0].values=e,t}}),mounted:function(){},methods:{onValuesChange:function(e,t){this.selectTyped=t[0];for(var s=0;s<this.workorderTypes.length;s++)if(t[0]==this.workorderTypes[s].title){this.request.tid=this.workorderTypes[s].id;break}console.log(e)},uploadFile:function(e){var t=e.target,s=t.files[0];this.isShowUploadLoading=!0;var r=this;this.$uploadFile({file:s,mode:this.configs.upload_mode,percent:function(){},success:function(e){var t;r.isShowUploadLoading=!1;var s=r.configs.upload_host+"/"+e,i=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(i)?t="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",t+="<a target='_blank' style='color: #2e9dfc;' href='"+s+"'>下载附件</a>"),r.source=t,Object(o["Toast"])({message:"上传成功~"})},fail:function(e){r.isShowUploadLoading=!1,e.response&&e.response.data&&Object(o["Toast"])({message:e.response.data.message})}})},submit:function(){var e=this;0!=this.request.tid?""!=this.request.title.trim()?""!=this.request.content.trim()?this.isSubmit||(this.isSubmit=!0,this.request.content+=this.source,l.a.post("/public/workorder/create",this.request).then((function(t){e.isSubmit=!1,Object(o["Toast"])({message:"工单创建成功~"}),setTimeout((function(){return e.$router.replace("/workorder/detail/"+t.data.data)}),500)})).catch((function(t){e.isSubmit=!1,Object(o["Toast"])({message:t.response.data.message}),console.log(t)}))):Object(o["Toast"])({message:"工单内容不能为空!"}):Object(o["Toast"])({message:"工单标题不能为空!"}):Object(o["Toast"])({message:"请选择工单类型!"})}}},v=d,f=(s("d92a"),s("2877")),h=Object(f["a"])(v,r,i,!1,null,"7497896e",null);t["default"]=h.exports}}]);
//# sourceMappingURL=chunk-5abde09c.95818801.js.map
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6d9c3917"],{d92a:function(e,t,s){"use strict";var i=s("e8e3"),r=s.n(i);r.a},e8e3:function(e,t,s){},ede1:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[e.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"创建工单"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(t){return e.$router.go(-1)}}})],1)]):e._e(),s("div",{staticClass:"content",class:{"hide-header":!e.isShowHeader}},[s("div",{staticClass:"field-line arrow-right",on:{click:function(t){e.isShowTypesPicker=!0}}},[s("span",[e._v("类型:")]),s("span",[e._v(e._s(e.selectTyped||"选择工单分类"))])]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("标题:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.title,expression:"request.title"}],attrs:{type:"text",placeholder:"请输入工单标题~"},domProps:{value:e.request.title},on:{input:function(t){t.target.composing||e.$set(e.request,"title",t.target.value)}}})]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("手机:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.phone,expression:"request.phone"}],attrs:{type:"number",placeholder:"请输入您的手机~"},domProps:{value:e.request.phone},on:{input:function(t){t.target.composing||e.$set(e.request,"phone",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("必填,预留手机号方便客服联系到您~")]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("邮箱:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.email,expression:"request.email"}],attrs:{type:"email",placeholder:"请输入您的电子邮箱~"},domProps:{value:e.request.email},on:{input:function(t){t.target.composing||e.$set(e.request,"email",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("非必填,预留邮箱后若工单回复后会通过邮箱通知您~")]),s("div",{staticClass:"field-line textarea"},[s("span",[e._v("内容:")]),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.request.content,expression:"request.content"}],attrs:{placeholder:"请输入您的工单内容~"},domProps:{value:e.request.content},on:{input:function(t){t.target.composing||e.$set(e.request,"content",t.target.value)}}})]),s("div",{staticClass:"field-line arrow-right file"},[s("span",[e._v("附件:")]),s("span",{class:{ed:""!=e.source}},[e._v(e._s(e.source?"已上传附件,重新上传可替换~":"上传附件"))]),s("input",{attrs:{type:"file"},on:{change:e.uploadFile}})]),s("span",{staticClass:"sub-btn",on:{click:function(t){return e.submit()}}},[e._v("提交")])]),e.isShowTypesPicker?s("div",{staticClass:"types-sheet"},[s("div",{staticClass:"picker-box"},[s("div",{staticClass:"title"},[s("span",[e._v("选择工单类型")]),s("span",{staticClass:"sub-btn",on:{click:function(t){e.isShowTypesPicker=!1}}},[e._v("确定")])]),s("mt-picker",{attrs:{slots:e.types},on:{change:e.onValuesChange}})],1)]):e._e()],1)},r=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("a481"),s("bd86")),o=s("2f62"),n=s("76a0"),c=s("bc3a"),l=s.n(c);function u(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function p(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?u(Object(s),!0).forEach((function(t){Object(a["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):u(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var d={name:"workorder_create",components:{},data:function(){return{isSubmit:!1,request:{tid:0,title:"",content:"",phone:"",email:""},selectTyped:"",source:"",isShowTypesPicker:!1}},computed:p({},Object(o["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs","workorderTypes"]),{types:function(){for(var e=[],t=[{flex:1,values:[],className:"workorder-create-picker",textAlign:"center"}],s=0;s<this.workorderTypes.length;s++)e.push(this.workorderTypes[s].title);return t[0].values=e,t}}),mounted:function(){},methods:{onValuesChange:function(e,t){this.selectTyped=t[0];for(var s=0;s<this.workorderTypes.length;s++)if(t[0]==this.workorderTypes[s].title){this.request.tid=this.workorderTypes[s].id;break}console.log(e)},uploadFile:function(e){var t=e.target,s=t.files[0];this.isShowUploadLoading=!0;var i=this;this.$uploadFile({file:s,mode:this.configs.upload_mode,percent:function(){},success:function(e){var t;i.isShowUploadLoading=!1;var s=i.configs.upload_host+"/"+e,r=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?t="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",t+="<a target='_blank' style='color: #2e9dfc;' href='"+s+"'>下载附件</a>"),i.source=t,Object(n["Toast"])({message:"上传成功~"})},fail:function(e){i.isShowUploadLoading=!1,e.response&&e.response.data&&Object(n["Toast"])({message:e.response.data.message})}})},submit:function(){var e=this;0!=this.request.tid?""!=this.request.title.trim()?""!=this.request.content.trim()?this.isSubmit||(this.isSubmit=!0,this.request.content+=this.source,l.a.post("/public/workorder/create",this.request).then((function(t){e.isSubmit=!1,Object(n["Toast"])({message:"工单创建成功~"}),setTimeout((function(){return e.$router.replace("/workorder/detail/"+t.data.data)}),500)})).catch((function(t){e.isSubmit=!1,Object(n["Toast"])({message:t.response.data.message}),console.log(t)}))):Object(n["Toast"])({message:"工单内容不能为空!"}):Object(n["Toast"])({message:"工单标题不能为空!"}):Object(n["Toast"])({message:"请选择工单类型!"})}}},m=d,h=(s("d92a"),s("2877")),f=Object(h["a"])(m,i,r,!1,null,"7497896e",null);t["default"]=f.exports}}]);
//# sourceMappingURL=chunk-6d9c3917.c347394d.js.map
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-28ddead2"],{3563:function(t,e,A){"use strict";var r=A("b9df"),o=A.n(r);o.a},"7d02":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAEMklEQVR4Xu2dbXbaMBBFFVZWnyysYWEcJRtzetzQpglftuaJ8jSXv8jD6M3Vk4SFeSq8UivwlLr3dL4AQHIIAAAAkiuQvPs4AAAkVyB593EAAEiuQPLu4wAAkFyB5N3HAQDAR4Fa67tDttM02Qwsm0SXwgOAHn8A0GtacIAOouIAfUTFATroigN0EPWKA7x2+ri1YX98bwgAa6Xb2O7CIvB1mqZpYyhJ81prLaUAgETNFUEAYIVIG5tI1gC11mUULKPhf7wezgHuIcI8z/vn5+eX6GcBQEDBS1NAIOTqSwHgUyocYDU2pw1xgIB4OMBRPNYAAYoaL3WZAtR79JMtVynlEaeA7v22AECV5J9B4rINLGW5HTBJIKi1/iylnKz2Vdp2XQOokrwFQKOLqi4750oyAA6Hw8tut1sg+PJSaTsCAKpCKuPIAMAB/imLy3kApoBj0VQ2dWMKUI5cVSwcYFESAOI8MQUwBbALiI8j3wg4gG/tJJkDgERG3yAA4Fs7SeYAIJHRNwgA+NZOkjkASGT0DQIAvrWTZA4AEhl9gwCAb+0kmQOAREbfIADgWztJ5gAgkdE3CAD41k6SOQBIZPQNkhKAS532LePvzJtOCaUE4NJJWAD4VEB12uohTwXjAJ+FTukAAAAAZ8/BMQXkmgLO/eLGmYF9y8/FUk4BzlVW5w4AakXN4gGAWcHU6QKAWlGzeABgVjB1ugCgVtQsHgCYFUydLgCoFTWLBwBmBVOnCwBqRc3iAYBZwdTppgTg2OnlCSM3b1fvdrv3a+2W988VZbnm0nvqIh7jvXEvYKWy3A5OfjuYE0GDALA84XKapv3Kgf+3GQAMAkDruTUAGAQAHOCL9+U7FdwKALuAQRygdQrYumYYuX3K7wFGLujWvgHAVsUGaw8AgxV0a3esAWhdBG4VaeT21gCwCIyjaQ0ADgAATV8Fx2UbJ4K1AzAFxEEEgLiG1hGsAWANEGfPGoBRp4DjfwZvqu48z28tf/duDcCoDtDy93WtgwEANo2z+zQGgG86X/r38Fbq71PG9k8BAAA4e9L4GlKtg8F6CmjtdPvYvM+VOAAO0PT8onS/Cxh1F3Afn/n4FOspAADiqABAXEPrCABgXb548tYAjLoLiJd1fQQAWK/VkC2tAWARGGfSGgCmgOQA4AAAwJnAIAPWUwAOEKw+3wTGBXSPYO0ALALj+F15XpJker35FK41Xch2IGSNJqo21g7AGiCOgTUATAHJAcABAECyUInL6BvBegrAAeLgWe8CAKAfAKr1VddtYCnlNS4BEUopJ4dQXQCgep0UAIBOwrqEBQCXSnXKEwA6CWsUVrLF7r0INNLTK9VHdAAvBQfItuWnZt+7LXGAAbRM2wUASFv6j44DAAAkVyB593EAAEiuQPLu4wAAkFyB5N3HAQAguQLJu48DJAfgF+1bWNtJgJDcAAAAAElFTkSuQmCC"},b9df:function(t,e,A){},fb09:function(t,e,A){"use strict";A.r(e);var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container"},[t.isShowHeader?r("mt-header",{attrs:{fixed:"",title:"我的工单"}},[r("div",{attrs:{slot:"left"},slot:"left"},[r("mt-button",{attrs:{icon:"back"},on:{click:function(e){return t.$router.go(-1)}}})],1),r("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.$router.push("/workorder/create")}},slot:"right"},[r("span",[t._v("创建工单")])])],1):t._e(),r("div",{staticClass:"list",class:{"hide-header":!t.isShowHeader}},[t.workorders.length<=0?r("div",{staticClass:"no-data"},[r("img",{attrs:{src:A("7d02"),alt:""}}),r("div",[t._v("没有相关记录~")])]):r("ul",[t._l(t.workorders,(function(e,A){return[r("li",{key:A,on:{click:function(A){return t.$router.push("/workorder/detail/"+e.id)}}},[r("div",{staticClass:"title"},[t._v(t._s(e.title))]),r("div",[r("span",{staticClass:"type"},[t._v(t._s(t.getTypeName(e.tid)))]),r("span",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])]),1==e.status?r("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==e.status?r("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==e.status?r("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==e.status?r("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])]}))],2)]),t.isShowHeader?t._e():r("div",{staticClass:"floting",on:{click:function(e){return t.$router.push("/workorder/create")}}})],1)},o=[],n=(A("8e6e"),A("ac6a"),A("456d"),A("bd86")),s=A("2f62");function i(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,r)}return A}function c(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?i(Object(A),!0).forEach((function(e){Object(n["a"])(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):i(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var a={name:"workorder",components:{},data:function(){return{}},created:function(){document.title="我的工单"},computed:c({},Object(s["b"])(["isShowHeader","workorders","workorderTypes"])),mounted:function(){this.$store.dispatch("onGetWorkorderTypes"),this.$store.dispatch("onGetWorkorders")},methods:{getTypeName:function(t){try{return this.workorderTypes.filter((function(e){return e.id==t}))[0].title}catch(e){return console.log(e),""}}}},u=a,d=(A("3563"),A("2877")),l=Object(d["a"])(u,r,o,!1,null,"6ca82fb2",null);e["default"]=l.exports}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bd7efe5c"],{3563:function(t,e,A){"use strict";var r=A("b9df"),o=A.n(r);o.a},"7d02":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAEMklEQVR4Xu2dbXbaMBBFFVZWnyysYWEcJRtzetzQpglftuaJ8jSXv8jD6M3Vk4SFeSq8UivwlLr3dL4AQHIIAAAAkiuQvPs4AAAkVyB593EAAEiuQPLu4wAAkFyB5N3HAQDAR4Fa67tDttM02Qwsm0SXwgOAHn8A0GtacIAOouIAfUTFATroigN0EPWKA7x2+ri1YX98bwgAa6Xb2O7CIvB1mqZpYyhJ81prLaUAgETNFUEAYIVIG5tI1gC11mUULKPhf7wezgHuIcI8z/vn5+eX6GcBQEDBS1NAIOTqSwHgUyocYDU2pw1xgIB4OMBRPNYAAYoaL3WZAtR79JMtVynlEaeA7v22AECV5J9B4rINLGW5HTBJIKi1/iylnKz2Vdp2XQOokrwFQKOLqi4750oyAA6Hw8tut1sg+PJSaTsCAKpCKuPIAMAB/imLy3kApoBj0VQ2dWMKUI5cVSwcYFESAOI8MQUwBbALiI8j3wg4gG/tJJkDgERG3yAA4Fs7SeYAIJHRNwgA+NZOkjkASGT0DQIAvrWTZA4AEhl9gwCAb+0kmQOAREbfIADgWztJ5gAgkdE3CAD41k6SOQBIZPQNkhKAS532LePvzJtOCaUE4NJJWAD4VEB12uohTwXjAJ+FTukAAAAAZ8/BMQXkmgLO/eLGmYF9y8/FUk4BzlVW5w4AakXN4gGAWcHU6QKAWlGzeABgVjB1ugCgVtQsHgCYFUydLgCoFTWLBwBmBVOnCwBqRc3iAYBZwdTppgTg2OnlCSM3b1fvdrv3a+2W988VZbnm0nvqIh7jvXEvYKWy3A5OfjuYE0GDALA84XKapv3Kgf+3GQAMAkDruTUAGAQAHOCL9+U7FdwKALuAQRygdQrYumYYuX3K7wFGLujWvgHAVsUGaw8AgxV0a3esAWhdBG4VaeT21gCwCIyjaQ0ADgAATV8Fx2UbJ4K1AzAFxEEEgLiG1hGsAWANEGfPGoBRp4DjfwZvqu48z28tf/duDcCoDtDy93WtgwEANo2z+zQGgG86X/r38Fbq71PG9k8BAAA4e9L4GlKtg8F6CmjtdPvYvM+VOAAO0PT8onS/Cxh1F3Afn/n4FOspAADiqABAXEPrCABgXb548tYAjLoLiJd1fQQAWK/VkC2tAWARGGfSGgCmgOQA4AAAwJnAIAPWUwAOEKw+3wTGBXSPYO0ALALj+F15XpJker35FK41Xch2IGSNJqo21g7AGiCOgTUATAHJAcABAECyUInL6BvBegrAAeLgWe8CAKAfAKr1VddtYCnlNS4BEUopJ4dQXQCgep0UAIBOwrqEBQCXSnXKEwA6CWsUVrLF7r0INNLTK9VHdAAvBQfItuWnZt+7LXGAAbRM2wUASFv6j44DAAAkVyB593EAAEiuQPLu4wAAkFyB5N3HAQAguQLJu48DJAfgF+1bWNtJgJDcAAAAAElFTkSuQmCC"},b9df:function(t,e,A){},fb09:function(t,e,A){"use strict";A.r(e);var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container"},[t.isShowHeader?r("mt-header",{attrs:{fixed:"",title:"我的工单"}},[r("div",{attrs:{slot:"left"},slot:"left"},[r("mt-button",{attrs:{icon:"back"},on:{click:function(e){return t.$router.go(-1)}}})],1),r("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.$router.push("/workorder/create")}},slot:"right"},[r("span",[t._v("创建工单")])])],1):t._e(),r("div",{staticClass:"list",class:{"hide-header":!t.isShowHeader}},[t.workorders.length<=0?r("div",{staticClass:"no-data"},[r("img",{attrs:{src:A("7d02"),alt:""}}),r("div",[t._v("没有相关记录~")])]):r("ul",[t._l(t.workorders,(function(e,A){return[r("li",{key:A,on:{click:function(A){return t.$router.push("/workorder/detail/"+e.id)}}},[r("div",{staticClass:"title"},[t._v(t._s(e.title))]),r("div",[r("span",{staticClass:"type"},[t._v(t._s(t.getTypeName(e.tid)))]),r("span",{staticClass:"date"},[t._v(t._s(t.$formatDate(e.create_at)))])]),1==e.status?r("i",{staticStyle:{color:"#8bc34a"}},[t._v("已回复")]):t._e(),3==e.status?r("i",{staticStyle:{color:"#ccc"}},[t._v("已结束")]):t._e(),0==e.status?r("i",{staticStyle:{color:"#FF9800"}},[t._v("待处理")]):t._e(),2==e.status?r("i",{staticStyle:{color:"#FF9800"}},[t._v("待回复")]):t._e()])]}))],2)]),t.isShowHeader?t._e():r("div",{staticClass:"floting",on:{click:function(e){return t.$router.push("/workorder/create")}}})],1)},o=[],n=(A("8e6e"),A("ac6a"),A("456d"),A("bd86")),s=A("2f62");function i(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,r)}return A}function c(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?i(Object(A),!0).forEach((function(e){Object(n["a"])(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):i(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var a={name:"workorder",components:{},data:function(){return{}},created:function(){document.title="我的工单"},computed:c({},Object(s["b"])(["isShowHeader","workorders","workorderTypes"])),mounted:function(){this.$store.dispatch("onGetWorkorderTypes"),this.$store.dispatch("onGetWorkorders")},methods:{getTypeName:function(t){try{return this.workorderTypes.filter((function(e){return e.id==t}))[0].title}catch(e){return console.log(e),""}}}},u=a,d=(A("3563"),A("2877")),l=Object(d["a"])(u,r,o,!1,null,"6ca82fb2",null);e["default"]=l.exports}}]);
//# sourceMappingURL=chunk-28ddead2.25a13c55.js.map //# sourceMappingURL=chunk-bd7efe5c.5b3512bd.js.map
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -80,7 +80,7 @@ func (r *MessageRepository) ClearRead(uid int64) (int64, error) { ...@@ -80,7 +80,7 @@ func (r *MessageRepository) ClearRead(uid int64) (int64, error) {
// MoveMessageToHistory move message history table // MoveMessageToHistory move message history table
func (r *MessageRepository) MoveMessageToHistory() int64 { func (r *MessageRepository) MoveMessageToHistory() int64 {
fields := "`from_account`,`to_account`,`biz_type`,`version`,`timestamp`,`sequence`,`key`,`transfer_account`,`platform`,`payload`,`read`" fields := "`from_account`,`to_account`,`biz_type`,`version`,`timestamp`,`sequence`,`key`,`transfer_account`,`platform`,`payload`,`read`"
timestampMax := time.Now().Unix() - int64(60*60*24*1) // 30 day timestampMax := time.Now().Unix() - int64(60*60*24*30) // 30 day
res, err := r.o.Raw("INSERT INTO message_history("+fields+") SELECT "+fields+" FROM message WHERE timestamp < ?", timestampMax).Exec() res, err := r.o.Raw("INSERT INTO message_history("+fields+") SELECT "+fields+" FROM message WHERE timestamp < ?", timestampMax).Exec()
if err != nil { if err != nil {
logs.Warn("MoveMessageToHistory move message history table1------------", err) logs.Warn("MoveMessageToHistory move message history table1------------", err)
......
...@@ -23,11 +23,11 @@ func appTask() { ...@@ -23,11 +23,11 @@ func appTask() {
// user // user
userOfflineCount := services.GetUserRepositoryInstance().CheckUsersLoginTimeOutAndSetOffline(userOffLineUnixTimer) userOfflineCount := services.GetUserRepositoryInstance().CheckUsersLoginTimeOutAndSetOffline(userOffLineUnixTimer)
logs.Error("清理登录超时user", userOfflineCount, "个被强制下线") logs.Error("tk--------清理登录超时user", userOfflineCount, "个被强制下线")
// admin // admin
adminOfflineCount := services.GetAdminRepositoryInstance().CheckAdminsLoginTimeOutAndSetOffline(adminOffLineUnixTimer) adminOfflineCount := services.GetAdminRepositoryInstance().CheckAdminsLoginTimeOutAndSetOffline(adminOffLineUnixTimer)
logs.Error("清理登录超时admin", adminOfflineCount, "个被强制下线") logs.Error("tk--------清理登录超时admin", adminOfflineCount, "个被强制下线")
// get offline all robots // get offline all robots
robots, _ := services.GetRobotRepositoryInstance().GetRobotOnlineAll() robots, _ := services.GetRobotRepositoryInstance().GetRobotOnlineAll()
...@@ -36,7 +36,7 @@ func appTask() { ...@@ -36,7 +36,7 @@ func appTask() {
} }
contacts := services.GetContactRepositoryInstance().GetTimeOutList(lastMessageUnixTimer) contacts := services.GetContactRepositoryInstance().GetTimeOutList(lastMessageUnixTimer)
logs.Error("清理会话超时用户,有", len(contacts), "个被结束对话") logs.Error("tk--------清理会话超时用户,有", len(contacts), "个被结束对话")
for _, contact := range contacts { for _, contact := range contacts {
// set end is session end // set end is session end
......
...@@ -15,7 +15,7 @@ func clearUser() { ...@@ -15,7 +15,7 @@ func clearUser() {
clearUserTk := toolbox.NewTask("clearUser", "0 0 03 * * * ", func() error { clearUserTk := toolbox.NewTask("clearUser", "0 0 03 * * * ", func() error {
ids := services.GetUserRepositoryInstance().ClearWhiteUser() ids := services.GetUserRepositoryInstance().ClearWhiteUser()
services.GetMessageRepositoryInstance().DeleteWhiteMessage(ids) services.GetMessageRepositoryInstance().DeleteWhiteMessage(ids)
logs.Error("定时清理了", len(ids), "个没有服务记录的用户~") logs.Error("tk--------定时清理了", len(ids), "个没有服务记录的用户~")
return nil return nil
}) })
toolbox.AddTask("clearUser", clearUserTk) toolbox.AddTask("clearUser", clearUserTk)
......
...@@ -13,7 +13,7 @@ func moveMessage() { ...@@ -13,7 +13,7 @@ func moveMessage() {
// moveMessage day at 5 am // moveMessage day at 5 am
moveMessageTk := toolbox.NewTask("moveMessage", "0 0 05 * * * ", func() error { moveMessageTk := toolbox.NewTask("moveMessage", "0 0 05 * * * ", func() error {
length := services.GetMessageRepositoryInstance().MoveMessageToHistory() length := services.GetMessageRepositoryInstance().MoveMessageToHistory()
logs.Error("定时迁移了", length, "条消息记录到历史表~") logs.Error("tk--------定时迁移了", length, "条消息记录到历史表~")
return nil return nil
}) })
toolbox.AddTask("moveMessage", moveMessageTk) toolbox.AddTask("moveMessage", moveMessageTk)
......
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
artificialAccount, artificialAccount,
robotAccount, robotAccount,
platform; platform;
var query = this.$route.query; var query = this.queryToJson(location.href.substr(location.href.lastIndexOf("?")).replace('#/index', ""))
if (query && query.c) localStorage.clear(); if (query && query.c) localStorage.clear();
// 获取本地缓存 // 获取本地缓存
var urlQuery = this.queryToJson(localStorage.getItem("urlQuery")); var urlQuery = this.queryToJson(localStorage.getItem("urlQuery"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment