Commit b6252c89 by chenxianqi

update code

parent c03280ec
...@@ -64,7 +64,6 @@ func (c *BaseController) GetUserInfo() *models.User { ...@@ -64,7 +64,6 @@ func (c *BaseController) GetUserInfo() *models.User {
} }
var userRepository = services.GetUserRepositoryInstance() var userRepository = services.GetUserRepositoryInstance()
user := userRepository.GetUserWithToken(token) user := userRepository.GetUserWithToken(token)
print("user==", user)
if user == nil { if user == nil {
logs.Warn("GetUserInfo get current user info error------------用户效验失败!") logs.Warn("GetUserInfo get current user info error------------用户效验失败!")
} }
......
...@@ -697,7 +697,7 @@ func (c *PublicController) ReplyWorkOrder() { ...@@ -697,7 +697,7 @@ func (c *PublicController) ReplyWorkOrder() {
} }
} }
if workOrder.Status == 0 { if workOrder.Status == 0 && user != nil {
status = 0 status = 0
} }
params["Status"] = status params["Status"] = status
......
.container[data-v-1f126a3f]{height:100vh;overflow:hidden;overflow-y:auto}.content[data-v-1f126a3f]{padding-top:50px;padding-bottom:90px}.content .no-data[data-v-1f126a3f]{color:#666;font-size:14px}.content .workorder-close[data-v-1f126a3f]{text-align:center;color:#666;font-size:14px;padding:10px}.content.hide-header[data-v-1f126a3f]{padding-top:0}.content .head[data-v-1f126a3f]{margin:0 10px;padding:10px 0;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .head .con[data-v-1f126a3f]{font-size:15px;color:#333;display:-ms-flexbox;display:flex;margin-bottom:8px}.content .head .con span[data-v-1f126a3f]{-ms-flex-flow:1;flex-flow:1}.content .head .con span[data-v-1f126a3f]:first-child{-ms-flex-flow:0;flex-flow:0;-ms-flex-negative:0;flex-shrink:0;width:45px}.content .head .con i[data-v-1f126a3f]{font-style:normal}.content .comments[data-v-1f126a3f]{padding:10px}.content .comments .item[data-v-1f126a3f]{display:-ms-flexbox;display:flex}.content .comments .item .avatar[data-v-1f126a3f]{padding-top:10px;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .avatar img[data-v-1f126a3f]{width:30px;height:30px;border-radius:100px;display:block}.content .comments .item .right[data-v-1f126a3f]{padding:10px 5px;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .right .nickname[data-v-1f126a3f]{font-size:15px;color:#333}.content .comments .item .right .detail[data-v-1f126a3f]{font-size:15px;color:#333;margin-top:5px}.content .comments .item .right .date[data-v-1f126a3f]{color:#999;font-size:14px;margin-top:5px}.content .comments .item:last-child .avatar[data-v-1f126a3f],.content .comments .item:last-child .right[data-v-1f126a3f]{border-bottom:0}.content .file-view[data-v-1f126a3f]{position:fixed;bottom:80px;left:0;right:0;padding:5px 10px;margin:0 auto;font-size:13px;color:#8bc34a}.content .file-view span[data-v-1f126a3f]{display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.content .file-view span img[data-v-1f126a3f]{width:20px;height:20px}.content .file-view span i[data-v-1f126a3f]{font-style:normal;margin-left:5px}.content .input-form[data-v-1f126a3f]{position:fixed;bottom:0;left:0;right:0;margin:0 auto;width:100%;height:80px;background-color:#fff;border-top:1px solid hsla(0,0%,62%,.13);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0 10px;box-sizing:border-box;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.content .input-form textarea[data-v-1f126a3f]{height:45px;-ms-flex-positive:1;flex-grow:1;border-radius:0;border:0;color:#333;font-size:14px;resize:none}.content .input-form .icon-btn[data-v-1f126a3f]{background:url(../img/upload.76668586.png) 50% no-repeat;background-size:30px;width:55px;height:55px;overflow:hidden}.content .input-form .icon-btn input[data-v-1f126a3f]{display:block;width:100%;height:100%;font-size:100px;opacity:0}.content .input-form .sub-btn[data-v-1f126a3f]{display:block;width:55px;height:30px;color:#fff;line-height:30px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.content .input-form .sub-btn[data-v-1f126a3f]:active{opacity:.8}
\ No newline at end of file
.content[data-v-c74ea690]{padding:50px 10px}.content .field-line[data-v-c74ea690]{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;box-sizing:border-box;height:45px;border-bottom:1px solid #ddd;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#333}.content .field-line span[data-v-c74ea690]:first-child{width:35px}.content .field-line input[data-v-c74ea690]{-ms-flex-positive:1;flex-grow:1;padding-left:10px;height:100%;background:none;border:0;color:#333;font-size:14px;border-radius:0}.content .field-line.algin-left[data-v-c74ea690]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-c74ea690]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFDUlEQVR4Xu2dMU8UQRTH32wBvR/AxmhjJZVS3R4tsdCY2NoabY100IDGUo2x0s7EaGFDtzubkPAdaCz8AFjRkRuzATwCd3sz+24nb+b9aXkw8/7/3755M7MchvClWgGjOnskTwBAOQQAAAAoV0B5+qgAAEC5AsrTRwUAAMoVUJ4+KgAAUK6A8vRRAQCAcgWUp48KAACUK6A8fVQAACBbgaZpPhPRfefcbefccVEUvyeTyZvxeLwve+ZpzE5sBTg4OLhzenp6NE/GyWSys7GxsZ2GzHJnKRYAa60lolGXdICAD5ZIAKy1T4nom096gMBHpfkxIgGo6/qjMea5b2qAwFep63FSAfhpjHkUkhYgCFFrGisSAGvtCyJ6H5oSIAhVjGS+FFpV1VpRFIdEtBqaEiAIU0xkBWhTaJpm1zm3FZbOWTQg8FdNLABtCtba70T0xD+daSQg8FNNNABcCIhouyzLHT8pdEaJB4ALASpBN9hJAAAIhqtOyQAACIaBICkAuBCgJ0jkJHAR69gdLFLI//vJVYCL1DgQoBIIPwr25ZcDAXYHZyonWwFQCXwfk0y2gV1poBL0hyH5CrCMSqB5OcgGAO4WUSsEWQHAhUDj7iA7ALgQaKsEWQIACPybwmwBAAR+EGQNABcCDT1B9gBwI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AElFTkSuQmCC) 100% no-repeat;background-size:18px;padding-right:25px}.content .field-line.file[data-v-c74ea690]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-c74ea690]{color:#8bc34a}.content .field-line.file input[data-v-c74ea690]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-c74ea690]{-ms-flex-align:start;align-items:start;-ms-flex-line-pack:start;align-content:start;border-bottom:0;padding-top:10px;height:100px}.content .field-line.textarea textarea[data-v-c74ea690]{-ms-flex-positive:1;flex-grow:1;border:0;height:100%;resize:none;color:#333;font-size:14px;padding:3px 10px;background-color:rgba(0,0,0,.03);border-radius:3px}.content .tip[data-v-c74ea690]{font-size:11px;color:#ff9800}.content.hide-header[data-v-c74ea690]{padding-top:0}.content .sub-btn[data-v-c74ea690]{display:block;width:100%;height:45px;color:#fff;margin-top:30px;line-height:45px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.content .sub-btn[data-v-c74ea690]:active{opacity:.8}.types-sheet[data-v-c74ea690]{width:100vw;height:100vh;position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;background-color:rgba(0,0,0,.5)}.types-sheet .picker-box[data-v-c74ea690]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-c74ea690]{height:35px;border-bottom:1px solid #f3f3f3;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0 10px;box-sizing:border-box;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.types-sheet .title span[data-v-c74ea690]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-c74ea690]{display:block;width:55px;height:30px;color:#26a2ff;line-height:30px;text-align:right;font-size:14px;font-weight:900}.types-sheet .title .sub-btn[data-v-c74ea690]:active{opacity:.8} .content[data-v-28659677]{padding:50px 10px}.content .field-line[data-v-28659677]{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;box-sizing:border-box;height:45px;border-bottom:1px solid #ddd;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center;font-size:14px;color:#333}.content .field-line span[data-v-28659677]:first-child{width:35px}.content .field-line input[data-v-28659677]{-ms-flex-positive:1;flex-grow:1;padding-left:10px;height:100%;background:none;border:0;color:#333;font-size:14px;border-radius:0}.content .field-line.algin-left[data-v-28659677]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-28659677]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFDUlEQVR4Xu2dMU8UQRTH32wBvR/AxmhjJZVS3R4tsdCY2NoabY100IDGUo2x0s7EaGFDtzubkPAdaCz8AFjRkRuzATwCd3sz+24nb+b9aXkw8/7/3755M7MchvClWgGjOnskTwBAOQQAAAAoV0B5+qgAAEC5AsrTRwUAAMoVUJ4+KgAAUK6A8vRRAQCAcgWUp48KAACUK6A8fVQAACBbgaZpPhPRfefcbefccVEUvyeTyZvxeLwve+ZpzE5sBTg4OLhzenp6NE/GyWSys7GxsZ2GzHJnKRYAa60lolGXdICAD5ZIAKy1T4nom096gMBHpfkxIgGo6/qjMea5b2qAwFep63FSAfhpjHkUkhYgCFFrGisSAGvtCyJ6H5oSIAhVjGS+FFpV1VpRFIdEtBqaEiAIU0xkBWhTaJpm1zm3FZbOWTQg8FdNLABtCtba70T0xD+daSQg8FNNNABcCIhouyzLHT8pdEaJB4ALASpBN9hJAAAIhqtOyQAACIaBICkAuBCgJ0jkJHAR69gdLFLI//vJVYCL1DgQoBIIPwr25ZcDAXYHZyonWwFQCXwfk0y2gV1poBL0hyH5CrCMSqB5OcgGAO4WUSsEWQHAhUDj7iA7ALgQaKsEWQIACPybwmwBAAR+EGQNABcCDT1B9gBwIci9J1ABACCYvxyoAQAQzIZAFQCAIJP3Afz62/lRuD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.field-line.file[data-v-28659677]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-28659677]{color:#8bc34a}.content .field-line.file input[data-v-28659677]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-28659677]{-ms-flex-align:start;align-items:start;-ms-flex-line-pack:start;align-content:start;border-bottom:0;padding-top:10px;height:100px}.content .field-line.textarea textarea[data-v-28659677]{-ms-flex-positive:1;flex-grow:1;border:0;height:100%;resize:none;color:#333;font-size:14px;padding:3px 10px;background-color:rgba(0,0,0,.03);border-radius:3px}.content .tip[data-v-28659677]{font-size:11px;color:#ff9800}.content.hide-header[data-v-28659677]{padding-top:0}.content .sub-btn[data-v-28659677]{display:block;width:100%;height:45px;color:#fff;margin-top:30px;line-height:45px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.content .sub-btn[data-v-28659677]:active{opacity:.8}.types-sheet[data-v-28659677]{width:100vw;height:100vh;position:fixed;top:0;left:0;right:0;bottom:0;margin:auto;background-color:rgba(0,0,0,.5)}.types-sheet .picker-box[data-v-28659677]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-28659677]{height:35px;border-bottom:1px solid #f3f3f3;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0 10px;box-sizing:border-box;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.types-sheet .title span[data-v-28659677]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-28659677]{display:block;width:55px;height:30px;color:#26a2ff;line-height:30px;text-align:right;font-size:14px;font-weight:900}.types-sheet .title .sub-btn[data-v-28659677]:active{opacity:.8}
\ No newline at end of file \ No newline at end of file
.container[data-v-5ee5eef8]{height:100vh;overflow:hidden;overflow-y:auto}.content[data-v-5ee5eef8]{padding-top:50px;padding-bottom:90px}.content .no-data[data-v-5ee5eef8]{color:#666;font-size:14px}.content .workorder-close[data-v-5ee5eef8]{text-align:center;color:#666;font-size:14px;padding:10px}.content.hide-header[data-v-5ee5eef8]{padding-top:0}.content .head[data-v-5ee5eef8]{margin:0 10px;padding:10px 0;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .head .con[data-v-5ee5eef8]{font-size:15px;color:#333;display:-ms-flexbox;display:flex;margin-bottom:8px}.content .head .con span[data-v-5ee5eef8]{-ms-flex-flow:1;flex-flow:1}.content .head .con span[data-v-5ee5eef8]:first-child{-ms-flex-flow:0;flex-flow:0;-ms-flex-negative:0;flex-shrink:0;width:45px}.content .head .con i[data-v-5ee5eef8]{font-style:normal}.content .comments[data-v-5ee5eef8]{padding:10px}.content .comments .item[data-v-5ee5eef8]{display:-ms-flexbox;display:flex}.content .comments .item .avatar[data-v-5ee5eef8]{padding-top:10px;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .avatar img[data-v-5ee5eef8]{width:30px;height:30px;border-radius:100px;display:block}.content .comments .item .right[data-v-5ee5eef8]{padding:10px 5px;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid hsla(0,0%,62%,.13)}.content .comments .item .right .nickname[data-v-5ee5eef8]{font-size:15px;color:#333}.content .comments .item .right .detail[data-v-5ee5eef8]{font-size:15px;color:#333;margin-top:5px}.content .comments .item .right .date[data-v-5ee5eef8]{color:#999;font-size:14px;margin-top:5px}.content .comments .item:last-child .avatar[data-v-5ee5eef8],.content .comments .item:last-child .right[data-v-5ee5eef8]{border-bottom:0}.content .file-view[data-v-5ee5eef8]{position:fixed;bottom:80px;left:0;right:0;padding:5px 10px;margin:0 auto;font-size:13px;color:#8bc34a}.content .file-view span[data-v-5ee5eef8]{display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.content .file-view span img[data-v-5ee5eef8]{width:20px;height:20px}.content .file-view span i[data-v-5ee5eef8]{font-style:normal;margin-left:5px}.content .input-form[data-v-5ee5eef8]{position:fixed;bottom:0;left:0;right:0;margin:0 auto;width:100%;height:80px;background-color:#fff;border-top:1px solid hsla(0,0%,62%,.13);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0 10px;box-sizing:border-box;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center}.content .input-form textarea[data-v-5ee5eef8]{height:45px;-ms-flex-positive:1;flex-grow:1;border-radius:0;border:0;color:#333;font-size:14px;resize:none}.content .input-form .icon-btn[data-v-5ee5eef8]{background:url(../img/upload.76668586.png) 50% no-repeat;background-size:30px;width:55px;height:55px;overflow:hidden}.content .input-form .icon-btn input[data-v-5ee5eef8]{display:block;width:100%;height:100%;font-size:100px;opacity:0}.content .input-form .sub-btn[data-v-5ee5eef8]{display:block;width:55px;height:30px;color:#fff;line-height:30px;text-align:center;border-radius:3px;border:none;font-size:14px;background:linear-gradient(90deg,#26a2ff,#736cde);-ms-flex-negative:0;flex-shrink:0}.content .input-form .sub-btn[data-v-5ee5eef8]:active{opacity:.8}
\ No newline at end of file
...@@ -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-3844157e.e6fe08d0.css rel=prefetch><link href=css/chunk-52968946.e435645c.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-612d9b40.3daa63d4.css rel=prefetch><link href=js/chunk-3844157e.c695c8fe.js rel=prefetch><link href=js/chunk-52968946.335d29c1.js rel=prefetch><link href=js/chunk-5e6009ff.d7088d94.js rel=prefetch><link href=js/chunk-612d9b40.13a3a9bb.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.8310229e.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.8310229e.js></script></body></html> }</style><link href=css/chunk-233fded2.68e29c95.css rel=prefetch><link href=css/chunk-2c568771.92feb802.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-612d9b40.3daa63d4.css rel=prefetch><link href=js/chunk-233fded2.64fa5b81.js rel=prefetch><link href=js/chunk-2c568771.a81203d3.js rel=prefetch><link href=js/chunk-5e6009ff.d7088d94.js rel=prefetch><link href=js/chunk-612d9b40.13a3a9bb.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.cd5008bc.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.cd5008bc.js></script></body></html>
\ No newline at end of file \ No newline at end of file
(function(e){function t(t){for(var a,r,c=t[0],i=t[1],u=t[2],l=0,d=[];l<c.length;l++)r=c[l],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&d.push(o[r][0]),o[r]=0;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a]);f&&f(t);while(d.length)d.shift()();return s.push.apply(s,u||[]),n()}function n(){for(var e,t=0;t<s.length;t++){for(var n=s[t],a=!0,r=1;r<n.length;r++){var c=n[r];0!==o[c]&&(a=!1)}a&&(s.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},r={app:0},o={app:0},s=[];function c(e){return i.p+"js/"+({}[e]||e)+"."+{"chunk-3844157e":"c695c8fe","chunk-52968946":"335d29c1","chunk-5e6009ff":"d7088d94","chunk-612d9b40":"13a3a9bb"}[e]+".js"}function i(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-3844157e":1,"chunk-52968946":1,"chunk-5e6009ff":1,"chunk-612d9b40":1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise((function(t,n){for(var a="css/"+({}[e]||e)+"."+{"chunk-3844157e":"e6fe08d0","chunk-52968946":"e435645c","chunk-5e6009ff":"86cb9867","chunk-612d9b40":"3daa63d4"}[e]+".css",o=i.p+a,s=document.getElementsByTagName("link"),c=0;c<s.length;c++){var u=s[c],l=u.getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(l===a||l===o))return t()}var d=document.getElementsByTagName("style");for(c=0;c<d.length;c++){u=d[c],l=u.getAttribute("data-href");if(l===a||l===o)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.onerror=function(t){var a=t&&t.target&&t.target.src||o,s=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");s.code="CSS_CHUNK_LOAD_FAILED",s.request=a,delete r[e],f.parentNode.removeChild(f),n(s)},f.href=o;var p=document.getElementsByTagName("head")[0];p.appendChild(f)})).then((function(){r[e]=0})));var a=o[e];if(0!==a)if(a)t.push(a[2]);else{var s=new Promise((function(t,n){a=o[e]=[t,n]}));t.push(a[2]=s);var u,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=c(e);var d=new Error;u=function(t){l.onerror=l.onload=null,clearTimeout(f);var n=o[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+a+": "+r+")",d.name="ChunkLoadError",d.type=a,d.request=r,n[1](d)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:l})}),12e4);l.onerror=l.onload=u,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],l=u.push.bind(u);u.push=t,u=u.slice();for(var d=0;d<u.length;d++)t(u[d]);var f=l;s.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},4678:function(e,t,n){var a={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=o,e.exports=r,r.id="4678"},"56d7":function(e,t,n){"use strict";n.r(t);n("cadf"),n("551c"),n("f751"),n("097d");var a=n("2b0e"),r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.isShowPageLoading?n("div",{staticClass:"mini-im-loading",class:{"pc-mini-im-loading":!e.isMobile}},[n("mt-spinner",{attrs:{type:"triple-bounce",color:"#26a2ff"}})],1):e._e(),n("router-view")],1)},o=[],s=(n("8e6e"),n("ac6a"),n("456d"),n("28a5"),n("bd86")),c=n("2f62");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(s["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={name:"app",data:function(){return{}},computed:u({},Object(c["b"])(["isShowPageLoading","userAccount","isArtificial","isMobile","artificialAccount","robotAccount","platform","userLocal","uid","uid"])),created:function(){var e=this;this.getLocal(),setTimeout((function(){e.handelUrl(),e.runApp()}),500),this.onCheckIsOutSession()},methods:{runApp:function(){var e=this,t=this.$mimcInstance.getLocalCacheUser();t&&null!=this.userAccount&&this.userAccount!=t.id&&0!=this.userAccount&&localStorage.clear(),this.$mimcInstance.init({type:0,address:this.userLocal,uid:this.uid||0,platform:this.platform,account_id:this.userAccount||0},(function(t){if(e.upLastActivity(),e.$store.dispatch("onGetCompanyInfo"),e.$store.dispatch("onGetUploadSecret"),e.$store.dispatch("onGetWorkorderTypes"),e.$store.dispatch("onGetWorkorders"),t){e.$store.commit("updateState",{userAccount:t.id,userInfo:t});var n=e.$mimcInstance.robot;localStorage.setItem("robot_"+n.id,JSON.stringify(n)),e.$store.commit("updateState",{robotAccount:n.id,robotInfo:n}),e.$mimcInstance.login();var a=function t(){null!=e.$mimcInstance.user&&e.$mimcInstance.user.isLogin()?e.artificialAccount||(console.log("握手消息"),e.$mimcInstance.sendMessage("handshake",e.robotAccount,"")):setTimeout((function(){return t()}),200)};a()}else setTimeout((function(){return e.runApp()}),1e3)}))},handelUrl:function(){var e,t,n,a,r,o,s,c,i=this.$route.query;i&&i.c&&localStorage.clear();var u=this.queryToJson(localStorage.getItem("urlQuery"));u&&(i=Object.assign({},u,i)),i&&("0"==i.h&&(e=!1),"0"==i.m&&(t=!1,e=!1),i.u&&(n=parseInt(i.u)),i.p&&(c=parseInt(i.p)),i.uid&&(a=parseInt(i.uid)),"0"==i.r?(r=!0,o=parseInt(i.a)):s=parseInt(i.a));var l=localStorage.getItem("isArtificial"),d=localStorage.getItem("artificialAccount");"true"==l&&(r=!0,o=parseInt(d)),this.$store.commit("updateState",{isShowHeader:e,isMobile:t,userAccount:n,uid:a,isArtificial:r,artificialAccount:o,robotAccount:s,platform:c})},queryToJson:function(e){if(!e||""==e)return null;var t=e.substr(1,e.length).split("&");if(!t)return null;for(var n={},a=0;a<t.length;a++){var r=t[a].split("=");n[r[0]]=r[1]}return n},getLocal:function(){this.$store.dispatch("onGetLocal",this.$store.state.AmapAPPKey)},upLastActivity:function(){var e=this;this.onCheckIsOutSession();var t=this.$mimcInstance.getLocalCacheUser();t&&this.$store.dispatch("onUpdateLastActivity"),this.isArtificial&&localStorage.setItem("artificialTime",Date.now()),setTimeout((function(){return e.upLastActivity()}),6e4)},onCheckIsOutSession:function(){var e=localStorage.getItem("artificialTime");e&&(e=parseInt(e),Date.now()>e+6e5&&this.$store.commit("updateState",{isArtificial:!1,artificialAccount:null}))}}},d=l,f=(n("7faf"),n("2877")),p=Object(f["a"])(d,r,o,!1,null,null,null),m=p.exports,h=n("d1d4"),b=n.n(h),g=n("8c4f");a["default"].use(g["a"]);var j=new g["a"]({base:"",routes:[{path:"/",redirect:"/index"},{path:"/index",name:"index",component:function(){return n.e("chunk-5e6009ff").then(n.bind(null,"e0a0"))}},{path:"/workorder",name:"workorder",component:function(){return n.e("chunk-612d9b40").then(n.bind(null,"fb09"))}},{path:"/workorder/create",name:"workorder_create",component:function(){return n.e("chunk-3844157e").then(n.bind(null,"ede1"))}},{path:"/workorder/detail/:id",name:"workorder_detail",component:function(){return n.e("chunk-52968946").then(n.bind(null,"4033"))}}]}),k=j,v=n("bc3a"),y=n.n(v),w={onGetMessages:function(e,t){var n=20;y.a.post("/public/messages",{timestamp:t.timestamp,page_size:n}).then((function(a){var r=[],o=a.data.data.list||[];(o.length<n||0==o.length)&&e.commit("updateState",{isLoadMorEnd:!0}),r=0==t.oldMsg.length&&o.length>0?a.data.data.list:o.length>0?o.concat(t.oldMsg):t.oldMsg,e.commit("updateState",{messages:r}),t.callback&&t.callback()})).catch((function(e){console.log(e)}))},onGetLocal:function(e,t){y.a.get("https://restapi.amap.com/v3/ip?key="+t).then((function(t){t.data.province&&e.commit("updateState",{userLocal:t.data.province+t.data.city})})).catch((function(e){console.error(e)}))},onCleanRead:function(){y.a.get("/public/clean_read/")},onUpdateLastActivity:function(){y.a.get("/public/activity/")},onToggleWindow:function(e,t){y.a.put("/public/window/",{window:t})},onGetCompanyInfo:function(e){y.a.get("/public/company").then((function(t){e.commit("updateState",{companyInfo:t.data.data})})).catch((function(e){console.error(e)}))},onGetUploadSecret:function(e){y.a.get("/public/secret").then((function(t){e.commit("updateState",{uploadToken:t.data.data})}))},onGetWorkorderTypes:function(e){y.a.get("/public/workorder/types").then((function(t){e.commit("updateState",{workorderTypes:t.data.data})}))},onGetWorkorders:function(e){y.a.get("/public/workorders").then((function(t){e.commit("updateState",{workorders:t.data.data})}))}},_={updateState:function(e,t){var n=e;for(var a in t)void 0!=t[a]&&(n[a]=t[a]);e=n}},M=(n("4917"),{platform:function(e){return e.platform},isArtificial:function(e){return e.isArtificial},isShowHeader:function(e){return e.isShowHeader},isMobile:function(e){return e.isMobile},uid:function(e){return e.uid},userAccount:function(e){return e.userAccount},artificialAccount:function(e){return e.artificialAccount},robotInfo:function(e){return e.robotInfo},robotAccount:function(e){return e.robotAccount},isLoadMorEnd:function(e){return e.isLoadMorEnd},messages:function(e){return e.messages||[]},userLocal:function(e){return e.userLocal},isLoadMorLoading:function(e){return e.isLoadMorLoading},userInfo:function(e){return e.userInfo},companyInfo:function(e){return e.companyInfo},uploadToken:function(e){return e.uploadToken},isIOS:function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},isSafari:function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1},isJudgeBigScreen:function(){var e=!1,t=window.screen.height/window.screen.width,n=window.screen.height==window.screen.availHeight?1.8:1.65;return t>n&&(e=!0),e},isShowPageLoading:function(e){return e.isShowPageLoading},workorders:function(e){return e.workorders},workorderTypes:function(e){return e.workorderTypes}}),I={platform:5,isShowPageLoading:!1,isShowHeader:!0,isMobile:!0,isArtificial:!1,uid:0,userAccount:0,artificialAccount:null,robotInfo:null,robotAccount:null,messages:[],isLoadMorEnd:!1,userLocal:"",AmapAPPKey:"",isLoadMorLoading:!1,userInfo:{},companyInfo:null,uploadToken:null,workorders:[],workorderTypes:[]};a["default"].use(c["a"]);var S=new c["a"].Store({state:I,getters:M,mutations:_,actions:w}),A=(n("394c"),n("76a0")),L=n.n(A),T=(n("aa35"),n("7f7f"),n("cea2")),C=n("c1df"),O={install:function(e,t){e.prototype.$myMethod=function(){console.log(t)},e.prototype.$formatUnixDate=function(e,t){return C(parseInt(e+"000")).format(t)},e.prototype.$formatFromNowDate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return C().format("YYYYMMDD")==C(parseInt(e+"000")).format("YYYYMMDD")?"今天 "+C(parseInt(e+"000")).format("HH:mm"):C(parseInt(e+"000")).format(t)},e.prototype.$formatDate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm:ss";return C(parseInt(e+"000")).format(t)},e.prototype.$robotNickname=function(e){for(var t,n=this.$store.getters.robots,a=0;a<n.length;a++)n[a].id==e&&(t=n[a].nickname);return t},e.prototype.$uploadFile=function(e){var t=e.mode,n=e.file,a=e.percent,r=e.success,o=e.fail,s=null,c=parseInt(1e4*Math.random()*(new Date).getTime())+n.name.substr(n.name.lastIndexOf("."));if(1==t){var i=new FormData;i.append("file",n),i.append("file_name",c),y.a.post("/public/upload",i).then((function(e){r&&r(e.data.data)})).catch((function(e){o&&o(e)}))}else if(2==t){var u={quality:.92,noCompressIfLarger:!0,maxWidth:1500};T["compressImage"](n,u).then((function(e){var t=T["upload"](e.dist,c,self.uploadToken.secret,{},{mimeType:null});s=t.subscribe({next:function(e){a&&a(e)},error:function(){var e=new FormData;e.append("fileType","image"),e.append("fileName","file"),e.append("key",c),e.append("token",self.uploadToken.secret),e.append("file",n),y.a.post("https://upload.qiniup.com",e).then((function(){r&&r(c)})).catch((function(e){o&&o(e)}))},complete:function(e){r&&r(e.key)}})}))}return s}}},D=O,Y=(n("6b54"),{install:function(e,t){console.log(t),e.MimcInstance=e.prototype.$mimcInstance={user:null,robot:null,platform:5,fetchMIMCTokenResult:null,_receiveP2PMsgCallback:null,_statusChangeCallback:null,_serverAckCallback:null,_disconnectCallback:null,init:function(e,t){this.platform=e.platform,this.fetchMIMCToken(e,t)},getLocalCacheUser:function(){var e=localStorage.getItem("user");return e?JSON.parse(e):null},fetchMIMCToken:function(e,t){var n=this;y.a.post("/public/register",e).then((function(e){n.fetchMIMCTokenResult=e.data.data.token,localStorage.setItem("user",JSON.stringify(e.data.data.user)),localStorage.setItem("Token",e.data.data.user.token),console.log("MIMC初始化成功"),n.getRobot((function(){t&&t(e.data.data.user)}))})).catch((function(e){t&&t(null),console.log(e)}))},getRobot:function(e){var t=this;y.a.get("/public/robot/"+this.platform).then((function(n){t.robot=n.data.data,e&&e()})).catch((function(e){console.log("mimc初始化失败,请刷新重试",e)}))},pushMessage:function(e){var t=this;y.a.post("/public/message/push",{msgType:"NORMAL_MSG",payload:e}).then((function(n){console.log(n.data),200!=n.data["code"]&&setTimeout((function(){return t.pushMessage(e)}),300)})).catch((function(){setTimeout((function(){return t.pushMessage(e)}),300)}))},login:function(e){var t=this;try{if(this.user)return;var n=this.fetchMIMCTokenResult;this.user=new MIMCUser(n.data.appId,n.data.appAccount,"666"),this.user.registerP2PMsgHandler((function(e){var n=JSON.parse(window.Base64.decode(e.getPayload()));t._receiveP2PMsgCallback&&t._receiveP2PMsgCallback(n)})),this.user.registerFetchToken((function(){return n})),this.user.registerStatusChange((function(e,n,a,r){t._statusChangeCallback&&t._statusChangeCallback(e,n,a,r)})),this.user.registerServerAckHandler((function(e,n,a,r){t._serverAckCallback&&t._serverAckCallback(e,n,a,r)})),this.user.registerDisconnHandler((function(){t._disconnectCallback&&t._disconnectCallback()})),this.user.login(),window.mimcInstance=this,e&&e(),console.log("MIMC登录成功")}catch(a){console.log("MIMC登录失败"),setTimeout((function(){t.login()}),1e3)}},logout:function(){this.user&&(this.user.logout(),this.user=null)},addEventListener:function(e,t){switch(e){case"receiveP2PMsg":this._receiveP2PMsgCallback=t;break;case"statusChange":this._statusChangeCallback=t;break;case"serverAck":this._serverAckCallback=t;break;case"disconnect":this._disconnectCallback=t;break}},sendMessage:function(e,t){var n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.user){var r={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(t),biz_type:e,version:"0",timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,platform:this.platform,transfer_account:0,payload:a+""},o=window.Base64.encode(JSON.stringify(r));return"contacts"!=e&&"pong"!=e&&"welcome"!=e&&"handshake"!=e&&"search_knowledge"!=e&&this.pushMessage(window.Base64.encode(o)),setTimeout((function(){n.user.sendMessage(t.toString(),o)}),150),r}Object(A["Toast"])({message:"服务异常,请刷新重试!"})},createLocalMessage:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(t),biz_type:e,version:"0",platform:this.platform,timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,transfer_account:parseInt(a),payload:n+""};return r}}}}),P=Y,$={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY年MM月DD日",LLL:"YYYY年MM月DD日Ah点mm分",LLLL:"YYYY年MM月DD日ddddAh点mm分",l:"YYYY-M-D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},week:{dow:1,doy:4}},z=n("c1df");z.locale("zh-cn",$),y.a.defaults.baseURL="/api",y.a.interceptors.request.use((function(e){var t=localStorage.getItem("Token")||"";return e.headers=Object.assign({},{Token:t},e.headers),e}),(function(e){return console.log(e),Promise.reject(e)}));var H={clickToCloseNonZoomable:!1,fullscreenEl:!1};a["default"].use(b.a,H),a["default"].use(D),a["default"].use(P),a["default"].use(L.a),a["default"].config.productionTip=!1,new a["default"]({router:k,store:S,render:function(e){return e(m)}}).$mount("#app")},"7faf":function(e,t,n){"use strict";var a=n("8fba"),r=n.n(a);r.a},"8fba":function(e,t,n){}}); (function(e){function t(t){for(var a,r,c=t[0],i=t[1],u=t[2],l=0,d=[];l<c.length;l++)r=c[l],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&d.push(o[r][0]),o[r]=0;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a]);f&&f(t);while(d.length)d.shift()();return s.push.apply(s,u||[]),n()}function n(){for(var e,t=0;t<s.length;t++){for(var n=s[t],a=!0,r=1;r<n.length;r++){var c=n[r];0!==o[c]&&(a=!1)}a&&(s.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},r={app:0},o={app:0},s=[];function c(e){return i.p+"js/"+({}[e]||e)+"."+{"chunk-233fded2":"64fa5b81","chunk-2c568771":"a81203d3","chunk-5e6009ff":"d7088d94","chunk-612d9b40":"13a3a9bb"}[e]+".js"}function i(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-233fded2":1,"chunk-2c568771":1,"chunk-5e6009ff":1,"chunk-612d9b40":1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=new Promise((function(t,n){for(var a="css/"+({}[e]||e)+"."+{"chunk-233fded2":"68e29c95","chunk-2c568771":"92feb802","chunk-5e6009ff":"86cb9867","chunk-612d9b40":"3daa63d4"}[e]+".css",o=i.p+a,s=document.getElementsByTagName("link"),c=0;c<s.length;c++){var u=s[c],l=u.getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(l===a||l===o))return t()}var d=document.getElementsByTagName("style");for(c=0;c<d.length;c++){u=d[c],l=u.getAttribute("data-href");if(l===a||l===o)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.onerror=function(t){var a=t&&t.target&&t.target.src||o,s=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");s.code="CSS_CHUNK_LOAD_FAILED",s.request=a,delete r[e],f.parentNode.removeChild(f),n(s)},f.href=o;var p=document.getElementsByTagName("head")[0];p.appendChild(f)})).then((function(){r[e]=0})));var a=o[e];if(0!==a)if(a)t.push(a[2]);else{var s=new Promise((function(t,n){a=o[e]=[t,n]}));t.push(a[2]=s);var u,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=c(e);var d=new Error;u=function(t){l.onerror=l.onload=null,clearTimeout(f);var n=o[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+a+": "+r+")",d.name="ChunkLoadError",d.type=a,d.request=r,n[1](d)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:l})}),12e4);l.onerror=l.onload=u,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],l=u.push.bind(u);u.push=t,u=u.slice();for(var d=0;d<u.length;d++)t(u[d]);var f=l;s.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},4678:function(e,t,n){var a={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=o,e.exports=r,r.id="4678"},"56d7":function(e,t,n){"use strict";n.r(t);n("cadf"),n("551c"),n("f751"),n("097d");var a=n("2b0e"),r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.isShowPageLoading?n("div",{staticClass:"mini-im-loading",class:{"pc-mini-im-loading":!e.isMobile}},[n("mt-spinner",{attrs:{type:"triple-bounce",color:"#26a2ff"}})],1):e._e(),n("router-view")],1)},o=[],s=(n("8e6e"),n("ac6a"),n("456d"),n("28a5"),n("bd86")),c=n("2f62");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(s["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={name:"app",data:function(){return{}},computed:u({},Object(c["b"])(["isShowPageLoading","userAccount","isArtificial","isMobile","artificialAccount","robotAccount","platform","userLocal","uid","uid"])),created:function(){var e=this;this.getLocal(),setTimeout((function(){e.handelUrl(),e.runApp()}),500),this.onCheckIsOutSession()},methods:{runApp:function(){var e=this,t=this.$mimcInstance.getLocalCacheUser();t&&null!=this.userAccount&&this.userAccount!=t.id&&0!=this.userAccount&&localStorage.clear(),this.$mimcInstance.init({type:0,address:this.userLocal,uid:this.uid||0,platform:this.platform,account_id:this.userAccount||0},(function(t){if(e.upLastActivity(),e.$store.dispatch("onGetCompanyInfo"),e.$store.dispatch("onGetUploadSecret"),e.$store.dispatch("onGetWorkorderTypes"),e.$store.dispatch("onGetWorkorders"),t){e.$store.commit("updateState",{userAccount:t.id,userInfo:t});var n=e.$mimcInstance.robot;localStorage.setItem("robot_"+n.id,JSON.stringify(n)),e.$store.commit("updateState",{robotAccount:n.id,robotInfo:n}),e.$mimcInstance.login();var a=function t(){null!=e.$mimcInstance.user&&e.$mimcInstance.user.isLogin()?e.artificialAccount||(console.log("握手消息"),e.$mimcInstance.sendMessage("handshake",e.robotAccount,"")):setTimeout((function(){return t()}),200)};a()}else setTimeout((function(){return e.runApp()}),1e3)}))},handelUrl:function(){var e,t,n,a,r,o,s,c,i=this.$route.query;i&&i.c&&localStorage.clear();var u=this.queryToJson(localStorage.getItem("urlQuery"));u&&(i=Object.assign({},u,i)),i&&("0"==i.h&&(e=!1),"0"==i.m&&(t=!1,e=!1),i.u&&(n=parseInt(i.u)),i.p&&(c=parseInt(i.p)),i.uid&&(a=parseInt(i.uid)),"0"==i.r?(r=!0,o=parseInt(i.a)):s=parseInt(i.a));var l=localStorage.getItem("isArtificial"),d=localStorage.getItem("artificialAccount");"true"==l&&(r=!0,o=parseInt(d)),this.$store.commit("updateState",{isShowHeader:e,isMobile:t,userAccount:n,uid:a,isArtificial:r,artificialAccount:o,robotAccount:s,platform:c})},queryToJson:function(e){if(!e||""==e)return null;var t=e.substr(1,e.length).split("&");if(!t)return null;for(var n={},a=0;a<t.length;a++){var r=t[a].split("=");n[r[0]]=r[1]}return n},getLocal:function(){this.$store.dispatch("onGetLocal",this.$store.state.AmapAPPKey)},upLastActivity:function(){var e=this;this.onCheckIsOutSession();var t=this.$mimcInstance.getLocalCacheUser();t&&this.$store.dispatch("onUpdateLastActivity"),this.isArtificial&&localStorage.setItem("artificialTime",Date.now()),setTimeout((function(){return e.upLastActivity()}),6e4)},onCheckIsOutSession:function(){var e=localStorage.getItem("artificialTime");e&&(e=parseInt(e),Date.now()>e+6e5&&this.$store.commit("updateState",{isArtificial:!1,artificialAccount:null}))}}},d=l,f=(n("7faf"),n("2877")),p=Object(f["a"])(d,r,o,!1,null,null,null),m=p.exports,h=n("d1d4"),b=n.n(h),g=n("8c4f");a["default"].use(g["a"]);var j=new g["a"]({base:"",routes:[{path:"/",redirect:"/index"},{path:"/index",name:"index",component:function(){return n.e("chunk-5e6009ff").then(n.bind(null,"e0a0"))}},{path:"/workorder",name:"workorder",component:function(){return n.e("chunk-612d9b40").then(n.bind(null,"fb09"))}},{path:"/workorder/create",name:"workorder_create",component:function(){return n.e("chunk-2c568771").then(n.bind(null,"ede1"))}},{path:"/workorder/detail/:id",name:"workorder_detail",component:function(){return n.e("chunk-233fded2").then(n.bind(null,"4033"))}}]}),k=j,v=n("bc3a"),y=n.n(v),w={onGetMessages:function(e,t){var n=20;y.a.post("/public/messages",{timestamp:t.timestamp,page_size:n}).then((function(a){var r=[],o=a.data.data.list||[];(o.length<n||0==o.length)&&e.commit("updateState",{isLoadMorEnd:!0}),r=0==t.oldMsg.length&&o.length>0?a.data.data.list:o.length>0?o.concat(t.oldMsg):t.oldMsg,e.commit("updateState",{messages:r}),t.callback&&t.callback()})).catch((function(e){console.log(e)}))},onGetLocal:function(e,t){y.a.get("https://restapi.amap.com/v3/ip?key="+t).then((function(t){t.data.province&&e.commit("updateState",{userLocal:t.data.province+t.data.city})})).catch((function(e){console.error(e)}))},onCleanRead:function(){y.a.get("/public/clean_read/")},onUpdateLastActivity:function(){y.a.get("/public/activity/")},onToggleWindow:function(e,t){y.a.put("/public/window/",{window:t})},onGetCompanyInfo:function(e){y.a.get("/public/company").then((function(t){e.commit("updateState",{companyInfo:t.data.data})})).catch((function(e){console.error(e)}))},onGetUploadSecret:function(e){y.a.get("/public/secret").then((function(t){e.commit("updateState",{uploadToken:t.data.data})}))},onGetWorkorderTypes:function(e){y.a.get("/public/workorder/types").then((function(t){e.commit("updateState",{workorderTypes:t.data.data})}))},onGetWorkorders:function(e){y.a.get("/public/workorders").then((function(t){e.commit("updateState",{workorders:t.data.data})}))}},_={updateState:function(e,t){var n=e;for(var a in t)void 0!=t[a]&&(n[a]=t[a]);e=n}},M=(n("4917"),{platform:function(e){return e.platform},isArtificial:function(e){return e.isArtificial},isShowHeader:function(e){return e.isShowHeader},isMobile:function(e){return e.isMobile},uid:function(e){return e.uid},userAccount:function(e){return e.userAccount},artificialAccount:function(e){return e.artificialAccount},robotInfo:function(e){return e.robotInfo},robotAccount:function(e){return e.robotAccount},isLoadMorEnd:function(e){return e.isLoadMorEnd},messages:function(e){return e.messages||[]},userLocal:function(e){return e.userLocal},isLoadMorLoading:function(e){return e.isLoadMorLoading},userInfo:function(e){return e.userInfo},companyInfo:function(e){return e.companyInfo},uploadToken:function(e){return e.uploadToken},isIOS:function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},isSafari:function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")<1},isJudgeBigScreen:function(){var e=!1,t=window.screen.height/window.screen.width,n=window.screen.height==window.screen.availHeight?1.8:1.65;return t>n&&(e=!0),e},isShowPageLoading:function(e){return e.isShowPageLoading},workorders:function(e){return e.workorders},workorderTypes:function(e){return e.workorderTypes}}),I={platform:5,isShowPageLoading:!1,isShowHeader:!0,isMobile:!0,isArtificial:!1,uid:0,userAccount:0,artificialAccount:null,robotInfo:null,robotAccount:null,messages:[],isLoadMorEnd:!1,userLocal:"",AmapAPPKey:"",isLoadMorLoading:!1,userInfo:{},companyInfo:null,uploadToken:null,workorders:[],workorderTypes:[]};a["default"].use(c["a"]);var S=new c["a"].Store({state:I,getters:M,mutations:_,actions:w}),A=(n("394c"),n("76a0")),L=n.n(A),T=(n("aa35"),n("7f7f"),n("cea2")),C=n("c1df"),O={install:function(e,t){e.prototype.$myMethod=function(){console.log(t)},e.prototype.$formatUnixDate=function(e,t){return C(parseInt(e+"000")).format(t)},e.prototype.$formatFromNowDate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return C().format("YYYYMMDD")==C(parseInt(e+"000")).format("YYYYMMDD")?"今天 "+C(parseInt(e+"000")).format("HH:mm"):C(parseInt(e+"000")).format(t)},e.prototype.$formatDate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm:ss";return C(parseInt(e+"000")).format(t)},e.prototype.$robotNickname=function(e){for(var t,n=this.$store.getters.robots,a=0;a<n.length;a++)n[a].id==e&&(t=n[a].nickname);return t},e.prototype.$uploadFile=function(e){var t=e.mode,n=e.file,a=e.percent,r=e.success,o=e.fail,s=null,c=parseInt(1e4*Math.random()*(new Date).getTime())+n.name.substr(n.name.lastIndexOf("."));if(1==t){var i=new FormData;i.append("file",n),i.append("file_name",c),y.a.post("/public/upload",i).then((function(e){r&&r(e.data.data)})).catch((function(e){o&&o(e)}))}else if(2==t){var u={quality:.92,noCompressIfLarger:!0,maxWidth:1500};T["compressImage"](n,u).then((function(e){var t=T["upload"](e.dist,c,self.uploadToken.secret,{},{mimeType:null});s=t.subscribe({next:function(e){a&&a(e)},error:function(){var e=new FormData;e.append("fileType","image"),e.append("fileName","file"),e.append("key",c),e.append("token",self.uploadToken.secret),e.append("file",n),y.a.post("https://upload.qiniup.com",e).then((function(){r&&r(c)})).catch((function(e){o&&o(e)}))},complete:function(e){r&&r(e.key)}})}))}return s}}},D=O,Y=(n("6b54"),{install:function(e,t){console.log(t),e.MimcInstance=e.prototype.$mimcInstance={user:null,robot:null,platform:5,fetchMIMCTokenResult:null,_receiveP2PMsgCallback:null,_statusChangeCallback:null,_serverAckCallback:null,_disconnectCallback:null,init:function(e,t){this.platform=e.platform,this.fetchMIMCToken(e,t)},getLocalCacheUser:function(){var e=localStorage.getItem("user");return e?JSON.parse(e):null},fetchMIMCToken:function(e,t){var n=this;y.a.post("/public/register",e).then((function(e){n.fetchMIMCTokenResult=e.data.data.token,localStorage.setItem("user",JSON.stringify(e.data.data.user)),localStorage.setItem("Token",e.data.data.user.token),console.log("MIMC初始化成功"),n.getRobot((function(){t&&t(e.data.data.user)}))})).catch((function(e){t&&t(null),console.log(e)}))},getRobot:function(e){var t=this;y.a.get("/public/robot/"+this.platform).then((function(n){t.robot=n.data.data,e&&e()})).catch((function(e){console.log("mimc初始化失败,请刷新重试",e)}))},pushMessage:function(e){var t=this;y.a.post("/public/message/push",{msgType:"NORMAL_MSG",payload:e}).then((function(n){console.log(n.data),200!=n.data["code"]&&setTimeout((function(){return t.pushMessage(e)}),300)})).catch((function(){setTimeout((function(){return t.pushMessage(e)}),300)}))},login:function(e){var t=this;try{if(this.user)return;var n=this.fetchMIMCTokenResult;this.user=new MIMCUser(n.data.appId,n.data.appAccount,"666"),this.user.registerP2PMsgHandler((function(e){var n=JSON.parse(window.Base64.decode(e.getPayload()));t._receiveP2PMsgCallback&&t._receiveP2PMsgCallback(n)})),this.user.registerFetchToken((function(){return n})),this.user.registerStatusChange((function(e,n,a,r){t._statusChangeCallback&&t._statusChangeCallback(e,n,a,r)})),this.user.registerServerAckHandler((function(e,n,a,r){t._serverAckCallback&&t._serverAckCallback(e,n,a,r)})),this.user.registerDisconnHandler((function(){t._disconnectCallback&&t._disconnectCallback()})),this.user.login(),window.mimcInstance=this,e&&e(),console.log("MIMC登录成功")}catch(a){console.log("MIMC登录失败"),setTimeout((function(){t.login()}),1e3)}},logout:function(){this.user&&(this.user.logout(),this.user=null)},addEventListener:function(e,t){switch(e){case"receiveP2PMsg":this._receiveP2PMsgCallback=t;break;case"statusChange":this._statusChangeCallback=t;break;case"serverAck":this._serverAckCallback=t;break;case"disconnect":this._disconnectCallback=t;break}},sendMessage:function(e,t){var n=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.user){var r={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(t),biz_type:e,version:"0",timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,platform:this.platform,transfer_account:0,payload:a+""},o=window.Base64.encode(JSON.stringify(r));return"contacts"!=e&&"pong"!=e&&"welcome"!=e&&"handshake"!=e&&"search_knowledge"!=e&&this.pushMessage(window.Base64.encode(o)),setTimeout((function(){n.user.sendMessage(t.toString(),o)}),150),r}Object(A["Toast"])({message:"服务异常,请刷新重试!"})},createLocalMessage:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r={from_account:parseInt(this.fetchMIMCTokenResult.data.appAccount),to_account:parseInt(t),biz_type:e,version:"0",platform:this.platform,timestamp:parseInt(((new Date).getTime()+" ").substr(0,10)),key:(new Date).getTime(),read:0,transfer_account:parseInt(a),payload:n+""};return r}}}}),P=Y,$={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY年MM月DD日",LLL:"YYYY年MM月DD日Ah点mm分",LLLL:"YYYY年MM月DD日ddddAh点mm分",l:"YYYY-M-D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},week:{dow:1,doy:4}},z=n("c1df");z.locale("zh-cn",$),y.a.defaults.baseURL="/api",y.a.interceptors.request.use((function(e){var t=localStorage.getItem("Token")||"";return e.headers=Object.assign({},{Token:t},e.headers),e}),(function(e){return console.log(e),Promise.reject(e)}));var H={clickToCloseNonZoomable:!1,fullscreenEl:!1};a["default"].use(b.a,H),a["default"].use(D),a["default"].use(P),a["default"].use(L.a),a["default"].config.productionTip=!1,new a["default"]({router:k,store:S,render:function(e){return e(m)}}).$mount("#app")},"7faf":function(e,t,n){"use strict";var a=n("8fba"),r=n.n(a);r.a},"8fba":function(e,t,n){}});
//# sourceMappingURL=app.8310229e.js.map //# sourceMappingURL=app.cd5008bc.js.map
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-233fded2"],{"0b3a":function(t,e,o){},"269c":function(t,e,o){t.exports=o.p+"img/fujian1.083cd8b7.png"},"3fb2":function(t,e,o){"use strict";var s=o("0b3a"),r=o.n(s);r.a},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("关闭工单")])]):s("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.del()}},slot:"right"},[s("span",[t._v("删除")])])],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",[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 A={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","uploadToken"])),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,mode:this.uploadToken.mode,percent:function(){},success:function(t){var e;s.isShowUploadLoading=!1;var o=s.uploadToken.host+"/"+t,r=t.substr(t.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?e="<br><img style='max-width:45%' 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)}))}))}}},p=A,g=(o("3fb2"),o("2877")),m=Object(g["a"])(p,s,r,!1,null,"1f126a3f",null);e["default"]=m.exports},cf1c:function(t,e){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"}}]);
//# sourceMappingURL=chunk-233fded2.64fa5b81.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/assets/fujian1.png","webpack:///./src/views/workorder_detail.vue?00b7","webpack:///./src/views/workorder_detail.vue?073f","webpack:///src/views/workorder_detail.vue","webpack:///./src/views/workorder_detail.vue?9869","webpack:///./src/views/workorder_detail.vue","webpack:///./src/assets/loading.gif"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","slot","on","$event","$router","go","workorder","status","close","_v","del","_e","class","isShowHeader","_s","title","domProps","content","phone","email","$formatDate","create_at","staticStyle","comments","length","_l","item","index","key","aid","userInfo","avatar","a_avatar","a_nickname","request","source","isShowUploadLoading","directives","name","rawName","value","expression","inputBlur","target","composing","$set","uploadFile","reply","staticRenderFns","components","data","isSubmit","fileType","computed","created","document","$store","commit","methods","getWorkOrder","getComments","trim","message","setTimeout","body","scrollTo","window","fileDom","e","file","files","$uploadFile","mode","uploadToken","percent","success","html","self","fullPath","host","src","substr","lastIndexOf","indexOf","fail","response","wid","id","component"],"mappings":"8HAAAA,EAAOC,QAAU,IAA0B,4B,oCCA3C,yBAA+iB,EAAG,G,yCCAljB,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,aAAa,CAAEN,EAAgB,aAAEI,EAAG,YAAY,CAACG,MAAM,CAAC,MAAQ,GAAG,MAAQ,SAAS,CAACH,EAAG,MAAM,CAACG,MAAM,CAAC,KAAO,QAAQC,KAAK,QAAQ,CAACJ,EAAG,YAAY,CAACG,MAAM,CAAC,KAAO,QAAQE,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOV,EAAIW,QAAQC,IAAI,QAAQ,GAA4B,GAAxBZ,EAAIa,UAA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k-233fded2.64fa5b81.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/fujian1.083cd8b7.png\";","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=style&index=0&id=1f126a3f&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=style&index=0&id=1f126a3f&lang=stylus&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[(_vm.isShowHeader)?_c('mt-header',{attrs:{\"fixed\":\"\",\"title\":\"工单详细\"}},[_c('div',{attrs:{\"slot\":\"left\"},slot:\"left\"},[_c('mt-button',{attrs:{\"icon\":\"back\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}})],1),(_vm.workorder.status != 3)?_c('mt-button',{attrs:{\"slot\":\"right\"},on:{\"click\":function($event){return _vm.close()}},slot:\"right\"},[_c('span',[_vm._v(\"关闭工单\")])]):_c('mt-button',{attrs:{\"slot\":\"right\"},on:{\"click\":function($event){return _vm.del()}},slot:\"right\"},[_c('span',[_vm._v(\"删除\")])])],1):_vm._e(),_c('div',{staticClass:\"content\",class:{'hide-header': !_vm.isShowHeader}},[_c('div',{staticClass:\"head\"},[_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"标题:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.title))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"内容:\")]),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.workorder.content)}})]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"电话:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.phone || '未预留电话号码'))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"邮箱:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.email || '未预留邮箱'))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"时间:\")]),_c('span',[_vm._v(_vm._s(_vm.$formatDate(_vm.workorder.create_at)))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"状态:\")]),_c('span',[(_vm.workorder.status == 1)?_c('i',{staticStyle:{\"color\":\"#8bc34a\"}},[_vm._v(\"已回复\")]):_vm._e(),(_vm.workorder.status == 3)?_c('i',{staticStyle:{\"color\":\"#ccc\"}},[_vm._v(\"已结束\")]):_vm._e(),(_vm.workorder.status == 0)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待处理\")]):_vm._e(),(_vm.workorder.status == 2)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待回复\")]):_vm._e()])])]),_c('div',{staticClass:\"comments\"},[(_vm.comments.length <= 0)?_c('div',{staticClass:\"no-data\"},[_vm._v(\"暂无回复内容,请您耐心等待~\")]):_vm._l((_vm.comments),function(item,index){return [_c('div',{key:index,staticClass:\"item\"},[_c('div',{staticClass:\"avatar\"},[(item.aid == 0)?_c('img',{attrs:{\"src\":_vm.userInfo.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png',\"alt\":\"\"}}):_c('img',{attrs:{\"src\":item.a_avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png',\"alt\":\"\"}})]),_c('div',{staticClass:\"right\"},[(item.aid == 0)?_c('div',{staticClass:\"nickname\"},[_vm._v(\"我\")]):_c('div',{staticClass:\"nickname\"},[_vm._v(_vm._s(item.a_nickname))]),_c('div',{staticClass:\"detail\",domProps:{\"innerHTML\":_vm._s(item.content)}}),_c('div',{staticClass:\"date\"},[_vm._v(_vm._s(_vm.$formatDate(item.create_at)))])])])]}),(_vm.workorder.status == 3)?_c('div',{staticClass:\"workorder-close\"},[_vm._v(\"工单已结束~\")]):_vm._e()],2),(_vm.request.source != '' || _vm.isShowUploadLoading)?_c('div',{staticClass:\"file-view\"},[(_vm.isShowUploadLoading)?_c('span',[_c('img',{attrs:{\"src\":require(\"./../assets/loading.gif\"),\"alt\":\"\"}}),_c('i',[_vm._v(\"上传中~\")])]):_c('span',[_c('img',{attrs:{\"src\":require(\"./../assets/fujian1.png\"),\"alt\":\"\"}}),_c('i',[_vm._v(\"你已成功添加附件,重新上传可替换~\")])])]):_vm._e(),(_vm.workorder.status != 3)?_c('div',{staticClass:\"input-form\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.content),expression:\"request.content\"}],attrs:{\"placeholder\":\"请输入内容~\"},domProps:{\"value\":(_vm.request.content)},on:{\"blur\":function($event){return _vm.inputBlur()},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"content\", $event.target.value)}}}),_c('span',{staticClass:\"icon-btn\"},[_c('input',{attrs:{\"title\":\"添加附件\",\"type\":\"file\",\"onclick\":\"this.value = null\"},on:{\"change\":_vm.uploadFile}})]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){return _vm.reply()}}},[_vm._v(\"提交\")])]):_vm._e()])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"container\">\n <mt-header v-if=\"isShowHeader\" fixed title=\"工单详细\">\n <div slot=\"left\">\n <mt-button @click=\"$router.go(-1)\" icon=\"back\"></mt-button>\n </div>\n <mt-button @click=\"close()\" v-if=\"workorder.status != 3\" slot=\"right\">\n <span>关闭工单</span>\n </mt-button>\n <mt-button @click=\"del()\" v-else slot=\"right\">\n <span>删除</span>\n </mt-button>\n </mt-header>\n <div class=\"content\" :class=\"{'hide-header': !isShowHeader}\">\n <div class=\"head\">\n <div class=\"con\">\n <span>标题:</span>\n <span>{{workorder.title}}</span>\n </div>\n <div class=\"con\">\n <span>内容:</span>\n <span v-html=\"workorder.content\"></span>\n </div>\n <div class=\"con\">\n <span>电话:</span>\n <span>{{workorder.phone || '未预留电话号码'}}</span>\n </div>\n <div class=\"con\">\n <span>邮箱:</span>\n <span>{{workorder.email || '未预留邮箱'}}</span>\n </div>\n <div class=\"con\">\n <span>时间:</span>\n <span>{{$formatDate(workorder.create_at)}}</span>\n </div>\n <div class=\"con\">\n <span>状态:</span>\n <span>\n <i v-if=\"workorder.status == 1\" style=\"color:#8bc34a;\">已回复</i>\n <i v-if=\"workorder.status == 3\" style=\"color:#ccc\">已结束</i>\n <i v-if=\"workorder.status == 0\" style=\"color:#FF9800\">待处理</i>\n <i v-if=\"workorder.status == 2\" style=\"color:#FF9800\">待回复</i>\n </span>\n </div>\n </div>\n <div class=\"comments\">\n <div class=\"no-data\" v-if=\"comments.length <= 0\">暂无回复内容,请您耐心等待~</div>\n <template v-else v-for=\"(item,index) in comments\">\n <div :key=\"index\" class=\"item\">\n <div class=\"avatar\">\n <img\n v-if=\"item.aid == 0\"\n :src=\"userInfo.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png'\"\n alt\n />\n <img v-else :src=\"item.a_avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png'\" alt />\n </div>\n <div class=\"right\">\n <div class=\"nickname\" v-if=\"item.aid == 0\">我</div>\n <div class=\"nickname\" v-else>{{item.a_nickname}}</div>\n <div class=\"detail\" v-html=\"item.content\"></div>\n <div class=\"date\">{{$formatDate(item.create_at)}}</div>\n </div>\n </div>\n </template>\n <div class=\"workorder-close\" v-if=\"workorder.status == 3\">工单已结束~</div>\n </div>\n <div class=\"file-view\" v-if=\"request.source != '' || isShowUploadLoading\">\n <span v-if=\"isShowUploadLoading\">\n <img src=\"./../assets/loading.gif\" alt />\n <i>上传中~</i>\n </span>\n <span v-else>\n <img src=\"./../assets/fujian1.png\" alt />\n <i>你已成功添加附件,重新上传可替换~</i>\n </span>\n </div>\n <div class=\"input-form\" v-if=\"workorder.status != 3\">\n <textarea v-model=\"request.content\" @blur=\"inputBlur()\" placeholder=\"请输入内容~\"></textarea>\n <span class=\"icon-btn\">\n <input title=\"添加附件\" type=\"file\" @change=\"uploadFile\" onclick=\"this.value = null\" />\n </span>\n <span class=\"sub-btn\" @click=\"reply()\">提交</span>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { mapGetters } from \"vuex\";\nimport { Toast, MessageBox } from \"mint-ui\";\nimport axios from \"axios\";\nexport default {\n name: \"workorder_detail\",\n components: {},\n data() {\n return {\n isShowUploadLoading: false,\n isSubmit: false,\n workorder: {},\n comments: [],\n fileType: \"\",\n request: {\n source: \"\",\n content: \"\"\n }\n };\n },\n computed: {\n ...mapGetters([\n \"isShowHeader\",\n \"workorders\",\n \"userInfo\",\n \"workorderTypes\",\n \"uploadToken\"\n ])\n },\n created() {\n document.title = \"工单详细\";\n const id = this.$route.params.id;\n this.$store.commit(\"updateState\", { isShowPageLoading: true });\n axios.all([this.getWorkOrder(id), this.getComments(id)]).then(\n axios.spread(() => {\n this.$store.commit(\"updateState\", { isShowPageLoading: false });\n })\n );\n },\n methods: {\n getWorkOrder(id) {\n return axios\n .get(\"/public/workorder/\" + id)\n .then(response => {\n this.workorder = response.data.data;\n setTimeout(()=>this.$previewRefresh(), 200)\n })\n .catch(error => {\n console.log(error);\n });\n },\n getComments(id) {\n return axios\n .get(\"/public/workorder/comments/\" + id)\n .then(response => {\n if (response.data.data == null) return;\n this.comments = response.data.data;\n setTimeout(()=>this.$previewRefresh(), 200)\n })\n .catch(error => {\n console.log(error);\n });\n },\n reply() {\n const content = this.request.content + this.request.source;\n if (content.trim() == \"\") {\n Toast({\n message: \"请输入内容~\"\n });\n return;\n }\n if (this.isSubmit) return;\n this.isSubmit = true;\n const wid = this.workorder.id;\n axios\n .post(\"/public/workorder/reply\", { wid, content })\n .then(response => {\n this.isSubmit = false\n console.log(response);\n this.getComments(wid);\n this.request = {\n source: \"\",\n content: \"\"\n };\n setTimeout(()=>{\n var sBoxHeight = document.querySelector(\".container\").clientHeight\n var sHeight = document.querySelector(\".content\").clientHeight\n document.querySelector(\".container\").scrollTop = sHeight - sBoxHeight + 20\n }, 500)\n })\n .catch(error => {\n this.isSubmit = false\n console.log(error);\n Toast({\n message: \"提交失败~\"\n });\n });\n },\n inputBlur() {\n setTimeout(() => {\n document.body.scrollTo = 0;\n window.scrollTo(0, 0);\n }, 100);\n },\n uploadFile(e) {\n var fileDom = e.target;\n var file = fileDom.files[0];\n this.isShowUploadLoading = true;\n const self = this;\n this.$uploadFile({\n file,\n mode: this.uploadToken.mode,\n // 七牛才会执行\n percent() {},\n success(src) {\n\n self.isShowUploadLoading = false;\n var html\n var fullPath = self.uploadToken.host + \"/\" + src;\n var fileType = src.substr(src.lastIndexOf(\".\") + 1);\n if (\"jpg,jpeg,png,JPG,JPEG,PNG\".indexOf(fileType) != -1) {\n html = \"<br><img style='max-width:45%' preview='1' src='\" + fullPath + \"' />\"\n }else{\n html = \"<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />\"\n html += \"<a target='_blank' style='color: #2e9dfc;' href='\"+fullPath+\"'>下载附件</a>\"\n }\n self.request.source = html\n Toast({\n message: \"上传成功~\"\n });\n },\n fail(e) {\n self.isShowUploadLoading = false;\n if (e.response && e.response.data) {\n Toast({\n message: e.response.data.message\n });\n return;\n }\n }\n });\n },\n close() {\n var wid = this.workorder.id;\n MessageBox.confirm(\"您确定关闭该工单吗?\").then(() => {\n axios\n .put(\"/public/workorder/close/\" + wid)\n .then(response => {\n console.log(response);\n Toast({\n message: \"工单已关闭~\"\n });\n this.getWorkOrder(wid);\n })\n .catch(error => {\n Toast({\n message: \"工单关闭失败~\"\n });\n console.log(error);\n });\n });\n },\n del() {\n var wid = this.workorder.id;\n MessageBox.confirm(\"您确定删除该工单吗?\").then(() => {\n axios\n .delete(\"/public/workorder/\" + wid)\n .then(response => {\n console.log(response);\n Toast({\n message: \"工单已删除~\"\n });\n setTimeout(() => this.$router.go(-1));\n })\n .catch(error => {\n Toast({\n message: \"工单关闭失败~\"\n });\n console.log(error);\n });\n });\n }\n }\n};\n</script>\n<style lang=\"stylus\" scoped>\n.container {\n height: 100vh;\n overflow: hidden;\n overflow-y: auto;\n}\n\n.content {\n padding-top: 50px;\n padding-bottom: 90px;\n\n .no-data {\n color: #666;\n font-size: 14px;\n }\n\n .workorder-close {\n text-align: center;\n color: #666;\n font-size: 14px;\n padding: 10px;\n }\n\n &.hide-header {\n padding-top: 0;\n }\n\n .head {\n margin: 0 10px;\n padding: 10px 0;\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n\n .con {\n font-size: 15px;\n color: #333;\n display: flex;\n margin-bottom: 8px;\n\n span {\n flex-flow: 1;\n }\n\n span:first-child {\n flex-flow: 0;\n flex-shrink: 0;\n width: 45px;\n }\n\n i {\n font-style: normal;\n }\n }\n }\n\n .comments {\n padding: 10px;\n\n .item {\n display: flex;\n\n .avatar {\n padding-top: 10px;\n\n img {\n width: 30px;\n height: 30px;\n border-radius: 100px;\n display: block;\n }\n\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n }\n\n .right {\n padding: 10px 5px;\n flex-grow: 1;\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n\n .nickname {\n font-size: 15px;\n color: #333;\n }\n\n .detail {\n font-size: 15px;\n color: #333;\n margin-top: 5px;\n }\n\n .date {\n color: #999;\n font-size: 14px;\n margin-top: 5px;\n }\n }\n\n &:last-child {\n .right, .avatar {\n border-bottom: 0;\n }\n }\n }\n }\n\n .file-view {\n position: fixed;\n bottom: 80px;\n left: 0;\n right: 0;\n padding: 5px 10px;\n margin: 0 auto;\n font-size: 13px;\n color: #8bc34a;\n\n span {\n display: flex;\n align-content: center;\n align-items: center;\n\n img {\n width: 20px;\n height: 20px;\n }\n\n i {\n font-style: normal;\n margin-left: 5px;\n }\n }\n }\n\n .input-form {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n width: 100%;\n height: 80px;\n background-color: #fff;\n border-top: 1px solid rgba(158, 158, 158, 0.13);\n display: flex;\n justify-content: space-between;\n padding: 0 10px;\n box-sizing: border-box;\n align-content: center;\n align-items: center;\n\n textarea {\n height: 45px;\n flex-grow: 1;\n border-radius: 0;\n border: 0;\n color: #333;\n font-size: 14px;\n resize: none;\n }\n\n .icon-btn {\n background: url('./../assets/upload.png') center center no-repeat;\n background-size: 30px;\n width: 55px;\n height: 55px;\n overflow: hidden;\n\n input {\n display: block;\n width: 100%;\n height: 100%;\n font-size: 100px;\n opacity: 0;\n }\n }\n\n .sub-btn {\n display: block;\n width: 55px;\n height: 30px;\n color: #fff;\n line-height: 30px;\n text-align: center;\n border-radius: 3px;\n border: none;\n font-size: 14px;\n background: linear-gradient(to right, #26a2ff, #736cde);\n flex-shrink: 0;\n\n &:active {\n opacity: 0.8;\n }\n }\n }\n}\n</style>\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./workorder_detail.vue?vue&type=template&id=1f126a3f&scoped=true&\"\nimport script from \"./workorder_detail.vue?vue&type=script&lang=js&\"\nexport * from \"./workorder_detail.vue?vue&type=script&lang=js&\"\nimport style0 from \"./workorder_detail.vue?vue&type=style&index=0&id=1f126a3f&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1f126a3f\",\n null\n \n)\n\nexport default component.exports","module.exports = \"data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7\""],"sourceRoot":""}
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3844157e"],{"1a3c":function(e,t,s){"use strict";var r=s("914e"),i=s.n(r);i.a},"914e":function(e,t,s){},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="",T=0,j=0;j<w.length;j++){y=w[j];for(var q=String(y[0]),x=l(u(n(y.index),d.length),0),S=[],_=1;_<y.length;_++)S.push(f(y[_]));var P=y.groups;if(v){var C=[q].concat(S,x,d);void 0!==P&&C.push(P);var $=String(t.apply(void 0,C))}else $=g(q,d,x,S,P,t);x>=T&&(O+=d.slice(T,x)+$,T=x+q.length)}return O+d.slice(T)}];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}))}}))},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","uploadToken","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.uploadToken.mode,percent:function(){},success:function(e){var t;r.isShowUploadLoading=!1;var s=r.uploadToken.host+"/"+e,i=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(i)?t="<br><img style='max-width:45%' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:30px;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("1a3c"),s("2877")),h=Object(f["a"])(v,r,i,!1,null,"c74ea690",null);t["default"]=h.exports}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c568771"],{"48fb":function(e,t,s){},"909f":function(e,t,s){"use strict";var r=s("48fb"),i=s.n(r);i.a},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="",T=0,j=0;j<w.length;j++){y=w[j];for(var q=String(y[0]),x=l(u(n(y.index),d.length),0),S=[],_=1;_<y.length;_++)S.push(f(y[_]));var P=y.groups;if(v){var C=[q].concat(S,x,d);void 0!==P&&C.push(P);var $=String(t.apply(void 0,C))}else $=g(q,d,x,S,P,t);x>=T&&(O+=d.slice(T,x)+$,T=x+q.length)}return O+d.slice(T)}];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}))}}))},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","uploadToken","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.uploadToken.mode,percent:function(){},success:function(e){var t;r.isShowUploadLoading=!1;var s=r.uploadToken.host+"/"+e,i=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(i)?t="<br><img style='max-width:45%' 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("909f"),s("2877")),h=Object(f["a"])(v,r,i,!1,null,"28659677",null);t["default"]=h.exports}}]);
//# sourceMappingURL=chunk-3844157e.c695c8fe.js.map //# sourceMappingURL=chunk-2c568771.a81203d3.js.map
\ No newline at end of file \ No newline at end of file
{"version":3,"sources":["webpack:///./src/views/workorder_create.vue?4ef1","webpack:///./node_modules/core-js/modules/es6.regexp.replace.js","webpack:///./src/views/workorder_create.vue?1042","webpack:///src/views/workorder_create.vue","webpack:///./src/views/workorder_create.vue?1481","webpack:///./src/views/workorder_create.vue"],"names":["anObject","toObject","toLength","toInteger","advanceStringIndex","regExpExec","max","Math","min","floor","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","it","undefined","String","defined","REPLACE","$replace","maybeCallNative","searchValue","replaceValue","O","this","fn","call","regexp","res","done","value","rx","S","functionalReplace","global","fullUnicode","unicode","lastIndex","results","result","push","matchStr","accumulatedResult","nextSourcePosition","i","length","matched","position","index","captures","j","namedCaptures","groups","replacerArgs","concat","replacement","apply","getSubstitution","slice","str","tailPos","m","symbols","match","ch","capture","charAt","n","f","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","slot","on","$event","$router","go","_e","class","isShowHeader","isShowTypesPicker","_v","_s","selectTyped","directives","name","rawName","request","expression","domProps","target","composing","$set","source","uploadFile","submit","types","onValuesChange","staticRenderFns","components","data","isSubmit","computed","values","workorderTypes","title","mounted","methods","tid","id","console","log","_","fileDom","e","file","files","isShowUploadLoading","$uploadFile","mode","uploadToken","percent","success","html","self","fullPath","host","src","fileType","substr","lastIndexOf","indexOf","message","fail","response","content","component"],"mappings":"kHAAA,yBAA+iB,EAAG,G,2DCEljB,IAAIA,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAY,EAAQ,QACpBC,EAAqB,EAAQ,QAC7BC,EAAa,EAAQ,QACrBC,EAAMC,KAAKD,IACXE,EAAMD,KAAKC,IACXC,EAAQF,KAAKE,MACbC,EAAuB,4BACvBC,EAAgC,oBAEhCC,EAAgB,SAAUC,GAC5B,YAAcC,IAAPD,EAAmBA,EAAKE,OAAOF,IAIxC,EAAQ,OAAR,CAAyB,UAAW,GAAG,SAAUG,EAASC,EAASC,EAAUC,GAC3E,MAAO,CAGL,SAAiBC,EAAaC,GAC5B,IAAIC,EAAIN,EAAQO,MACZC,OAAoBV,GAAfM,OAA2BN,EAAYM,EAAYH,GAC5D,YAAcH,IAAPU,EACHA,EAAGC,KAAKL,EAAaE,EAAGD,GACxBH,EAASO,KAAKV,OAAOO,GAAIF,EAAaC,IAI5C,SAAUK,EAAQL,GAChB,IAAIM,EAAMR,EAAgBD,EAAUQ,EAAQH,KAAMF,GAClD,GAAIM,EAAIC,KAAM,OAAOD,EAAIE,MAEzB,IAAIC,EAAK9B,EAAS0B,GACdK,EAAIhB,OAAOQ,MACXS,EAA4C,oBAAjBX,EAC1BW,IAAmBX,EAAeN,OAAOM,IAC9C,IAAIY,EAASH,EAAGG,OAChB,GAAIA,EAAQ,CACV,IAAIC,EAAcJ,EAAGK,QACrBL,EAAGM,UAAY,EAEjB,IAAIC,EAAU,GACd,MAAO,EAAM,CACX,IAAIC,EAASjC,EAAWyB,EAAIC,GAC5B,GAAe,OAAXO,EAAiB,MAErB,GADAD,EAAQE,KAAKD,IACRL,EAAQ,MACb,IAAIO,EAAWzB,OAAOu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ACM5E,KAAKkF,UAAW,EAChBlF,KAAKoE,QAAQgD,SAAWpH,KAAK0E,OAC7B,EAAN,EACA,8CACA,kBACQ,EAAR,YACQ,OAAR,WAAQ,CAAR,CACU,QAAV,YAEQ,YAAR,WAAU,OAAV,8DAEA,mBACQ,EAAR,YACQ,OAAR,WAAQ,CAAR,CACU,QAAV,0BAEQ,QAAR,WAtBQ,OAAR,WAAQ,CAAR,CACUuC,QAAS,cAPX,OAAR,WAAQ,CAAR,CACUA,QAAS,cAPX,OAAR,WAAQ,CAAR,CACUA,QAAS,gBC5J0W,I,wBCQzXI,EAAY,eACd,EACAxE,EACAkC,GACA,EACA,KACA,WACA,MAIa,aAAAsC,E","file":"js/chunk-3844157e.c695c8fe.js","sourcesContent":["import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=style&index=0&id=c74ea690&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=style&index=0&id=c74ea690&lang=stylus&scoped=true&\"","'use strict';\n\nvar anObject = require('./_an-object');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar toInteger = require('./_to-integer');\nvar advanceStringIndex = require('./_advance-string-index');\nvar regExpExec = require('./_regexp-exec-abstract');\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[(_vm.isShowHeader)?_c('mt-header',{attrs:{\"fixed\":\"\",\"title\":\"创建工单\"}},[_c('div',{attrs:{\"slot\":\"left\"},slot:\"left\"},[_c('mt-button',{attrs:{\"icon\":\"back\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}})],1)]):_vm._e(),_c('div',{staticClass:\"content\",class:{'hide-header': !_vm.isShowHeader}},[_c('div',{staticClass:\"field-line arrow-right\",on:{\"click\":function($event){_vm.isShowTypesPicker = true}}},[_c('span',[_vm._v(\"类型:\")]),_c('span',[_vm._v(_vm._s(_vm.selectTyped || '选择工单分类'))])]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"标题:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.title),expression:\"request.title\"}],attrs:{\"type\":\"text\",\"placeholder\":\"请输入工单标题~\"},domProps:{\"value\":(_vm.request.title)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"title\", $event.target.value)}}})]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"手机:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.phone),expression:\"request.phone\"}],attrs:{\"type\":\"number\",\"placeholder\":\"请输入您的手机~\"},domProps:{\"value\":(_vm.request.phone)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"phone\", $event.target.value)}}})]),_c('div',{staticClass:\"tip\"},[_vm._v(\"必填,预留手机号方便客服联系到您~\")]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"邮箱:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.email),expression:\"request.email\"}],attrs:{\"type\":\"email\",\"placeholder\":\"请输入您的电子邮箱~\"},domProps:{\"value\":(_vm.request.email)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"email\", $event.target.value)}}})]),_c('div',{staticClass:\"tip\"},[_vm._v(\"非必填,预留邮箱后若工单回复后会通过邮箱通知您~\")]),_c('div',{staticClass:\"field-line textarea\"},[_c('span',[_vm._v(\"内容:\")]),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.content),expression:\"request.content\"}],attrs:{\"placeholder\":\"请输入您的工单内容~\"},domProps:{\"value\":(_vm.request.content)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"content\", $event.target.value)}}})]),_c('div',{staticClass:\"field-line arrow-right file\"},[_c('span',[_vm._v(\"附件:\")]),_c('span',{class:{'ed': _vm.source != ''}},[_vm._v(_vm._s(_vm.source ? '已上传附件,重新上传可替换~' : '上传附件'))]),_c('input',{attrs:{\"type\":\"file\"},on:{\"change\":_vm.uploadFile}})]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){return _vm.submit()}}},[_vm._v(\"提交\")])]),(_vm.isShowTypesPicker)?_c('div',{staticClass:\"types-sheet\"},[_c('div',{staticClass:\"picker-box\"},[_c('div',{staticClass:\"title\"},[_c('span',[_vm._v(\"选择工单类型\")]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){_vm.isShowTypesPicker = false}}},[_vm._v(\"确定\")])]),_c('mt-picker',{attrs:{\"slots\":_vm.types},on:{\"change\":_vm.onValuesChange}})],1)]):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"container\">\n <mt-header v-if=\"isShowHeader\" fixed title=\"创建工单\">\n <div slot=\"left\">\n <mt-button @click=\"$router.go(-1)\" icon=\"back\"></mt-button>\n </div>\n </mt-header>\n <div class=\"content\" :class=\"{'hide-header': !isShowHeader}\">\n\n <div class=\"field-line arrow-right\" @click=\"isShowTypesPicker = true\">\n <span>类型:</span>\n <span>{{selectTyped || '选择工单分类'}}</span>\n </div>\n <div class=\"field-line algin-left\">\n <span>标题:</span>\n <input type=\"text\" v-model=\"request.title\" placeholder=\"请输入工单标题~\">\n </div>\n <div class=\"field-line algin-left\">\n <span>手机:</span>\n <input type=\"number\" v-model=\"request.phone\" placeholder=\"请输入您的手机~\">\n </div>\n <div class=\"tip\">必填,预留手机号方便客服联系到您~</div>\n <div class=\"field-line algin-left\">\n <span>邮箱:</span>\n <input type=\"email\" v-model=\"request.email\" placeholder=\"请输入您的电子邮箱~\">\n </div>\n <div class=\"tip\">非必填,预留邮箱后若工单回复后会通过邮箱通知您~</div>\n <div class=\"field-line textarea\">\n <span>内容:</span>\n <textarea v-model=\"request.content\" placeholder=\"请输入您的工单内容~\"></textarea>\n </div>\n <div class=\"field-line arrow-right file\">\n <span>附件:</span>\n <span :class=\"{'ed': source != ''}\">{{source ? '已上传附件,重新上传可替换~' : '上传附件'}}</span>\n <input type=\"file\" @change=\"uploadFile\" />\n </div>\n <span class=\"sub-btn\" @click=\"submit()\">提交</span>\n </div>\n\n <!-- types-sheet -->\n <div class=\"types-sheet\" v-if=\"isShowTypesPicker\">\n <!-- <div class=\"mask\" @click=\"isShowTypesPicker = false\"></div> -->\n <div class=\"picker-box\">\n <div class=\"title\">\n <span>选择工单类型</span>\n <span class=\"sub-btn\" @click=\"isShowTypesPicker = false\">确定</span>\n </div>\n <mt-picker :slots=\"types\" @change=\"onValuesChange\"></mt-picker>\n </div>\n </div>\n\n </div>\n</template>\n<script>\nimport { mapGetters } from \"vuex\";\nimport { Toast } from \"mint-ui\";\nimport axios from \"axios\";\nexport default {\n name: \"workorder_create\",\n components: {},\n data() {\n return {\n isSubmit: false,\n request: {\n \"tid\": 0,\n \"title\": \"\",\n \"content\": \"\",\n \"phone\": \"\",\n \"email\": \"\"\n },\n selectTyped: \"\",\n source: \"\",\n isShowTypesPicker: false\n };\n },\n computed: {\n ...mapGetters([\n \"isShowHeader\",\n \"workorders\",\n \"userInfo\",\n \"workorderTypes\",\n \"uploadToken\",\n \"workorderTypes\"\n ]),\n types() {\n var values = [];\n var slot = [\n {\n flex: 1,\n values: [],\n className: \"workorder-create-picker\",\n textAlign: \"center\"\n }\n ];\n for (var i = 0; i < this.workorderTypes.length; i++) {\n values.push(this.workorderTypes[i].title);\n }\n slot[0].values = values;\n return slot;\n }\n },\n mounted() {\n \n },\n methods: {\n onValuesChange(_, values) {\n this.selectTyped = values[0]\n for(var i=0; i<this.workorderTypes.length; i++){\n if(values[0] == this.workorderTypes[i].title){\n this.request.tid = this.workorderTypes[i].id\n break\n }\n }\n console.log(_)\n },\n uploadFile(e) {\n var fileDom = e.target;\n var file = fileDom.files[0];\n this.isShowUploadLoading = true;\n const self = this;\n this.$uploadFile({\n file,\n mode: this.uploadToken.mode,\n // 七牛才会执行\n percent() {},\n success(src) {\n\n self.isShowUploadLoading = false;\n var html\n var fullPath = self.uploadToken.host + \"/\" + src;\n var fileType = src.substr(src.lastIndexOf(\".\") + 1);\n if (\"jpg,jpeg,png,JPG,JPEG,PNG\".indexOf(fileType) != -1) {\n html = \"<br><img style='max-width:45%' preview='1' src='\" + fullPath + \"' />\"\n }else{\n html = \"<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />\"\n html += \"<a target='_blank' style='color: #2e9dfc;' href='\"+fullPath+\"'>下载附件</a>\"\n }\n self.source = html\n Toast({\n message: \"上传成功~\"\n });\n },\n fail(e) {\n self.isShowUploadLoading = false;\n if (e.response && e.response.data) {\n Toast({\n message: e.response.data.message\n });\n return;\n }\n }\n });\n },\n submit(){\n if(this.request.tid == 0){\n Toast({\n message: \"请选择工单类型!\"\n });\n return\n }\n if(this.request.title.trim() == \"\"){\n Toast({\n message: \"工单标题不能为空!\"\n });\n return\n }\n if(this.request.content.trim() == \"\"){\n Toast({\n message: \"工单内容不能为空!\"\n });\n return\n }\n if(this.isSubmit) return\n this.isSubmit = true\n this.request.content += this.source\n axios\n .post(\"/public/workorder/create\", this.request)\n .then(response => {\n this.isSubmit = false\n Toast({\n message: \"工单创建成功~\"\n });\n setTimeout(()=>this.$router.replace(\"/workorder/detail/\"+response.data.data), 500)\n })\n .catch(error => {\n this.isSubmit = false\n Toast({\n message: error.response.data.message\n });\n console.log(error);\n });\n }\n }\n};\n</script>\n<style lang=\"stylus\" scoped>\n.content {\n padding 50px 10px\n .field-line{\n display flex\n justify-content space-between\n box-sizing border-box\n height 45px\n border-bottom 1px solid #ddd\n align-content center\n align-items center\n font-size 14px\n color #333\n span:first-child{\n width 35px\n }\n input{\n flex-grow 1\n padding-left 10px\n height 100%\n background none \n border 0\n color #333\n font-size 14px\n border-radius 0\n }\n &.algin-left{\n align-content left \n align-items left\n }\n &.arrow-right{\n background url(./../assets/arrow.png) right center no-repeat\n background-size 18px\n padding-right 25px\n }\n &.file{\n position relative\n overflow hidden\n margin-top 20px\n border-top 1px solid #ddd\n .ed{\n color #8bc34a\n }\n input{\n font-size 100px\n opacity 0\n position absolute\n top 0\n right 0\n }\n }\n &.textarea{\n align-items start\n align-content start\n border-bottom 0\n padding-top 10px\n height 100px\n textarea{\n flex-grow 1\n border 0\n height 100%\n resize none\n color #333\n font-size 14px\n padding 3px 10px\n background-color rgba(0, 0, 0, 0.03);\n border-radius 3px\n }\n }\n }\n .tip{\n font-size 11px\n color #ff9800\n }\n &.hide-header {\n padding-top: 0;\n }\n .sub-btn {\n display: block;\n width: 100%;\n height: 45px;\n color: #fff;\n margin-top 30px\n line-height: 45px;\n text-align: center;\n border-radius: 3px;\n border: none;\n font-size: 14px;\n background: linear-gradient(to right, #26a2ff, #736cde);\n flex-shrink: 0;\n\n &:active {\n opacity: 0.8;\n }\n }\n}\n.types-sheet{\n width 100vw;\n height 100vh\n position fixed\n top 0\n left 0\n right 0\n bottom 0\n margin auto\n background-color rgba(0,0,0,.5)\n // .mask{\n // width 100vw;\n // height 100vh\n // background-color rgba(0,0,0,.5)\n // }\n .picker-box{\n height 250px\n width 100vw\n position absolute\n bottom 0\n left 0\n right 0\n margin 0 auto\n background-color #fff\n }\n .title{\n height 35px\n border-bottom 1px solid #f3f3f3\n display flex\n justify-content space-between\n padding 0 10px\n box-sizing border-box\n align-content center\n align-items center\n span{\n font-size 14px\n color #333\n }\n .sub-btn {\n display: block;\n width: 55px;\n height: 30px;\n color: #26a2ff\n line-height: 30px;\n text-align: right;\n font-size: 14px;\n font-weight 900\n &:active {\n opacity: 0.8;\n }\n }\n }\n}\n</style>\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./workorder_create.vue?vue&type=template&id=c74ea690&scoped=true&\"\nimport script from \"./workorder_create.vue?vue&type=script&lang=js&\"\nexport * from \"./workorder_create.vue?vue&type=script&lang=js&\"\nimport style0 from \"./workorder_create.vue?vue&type=style&index=0&id=c74ea690&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"c74ea690\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} {"version":3,"sources":["webpack:///./src/views/workorder_create.vue?c572","webpack:///./node_modules/core-js/modules/es6.regexp.replace.js","webpack:///./src/views/workorder_create.vue?c37b","webpack:///src/views/workorder_create.vue","webpack:///./src/views/workorder_create.vue?1481","webpack:///./src/views/workorder_create.vue"],"names":["anObject","toObject","toLength","toInteger","advanceStringIndex","regExpExec","max","Math","min","floor","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","it","undefined","String","defined","REPLACE","$replace","maybeCallNative","searchValue","replaceValue","O","this","fn","call","regexp","res","done","value","rx","S","functionalReplace","global","fullUnicode","unicode","lastIndex","results","result","push","matchStr","accumulatedResult","nextSourcePosition","i","length","matched","position","index","captures","j","namedCaptures","groups","replacerArgs","concat","replacement","apply","getSubstitution","slice","str","tailPos","m","symbols","match","ch","capture","charAt","n","f","render","_vm","_h","$createElement","_c","_self","staticClass","attrs","slot","on","$event","$router","go","_e","class","isShowHeader","isShowTypesPicker","_v","_s","selectTyped","directives","name","rawName","request","expression","domProps","target","composing","$set","source","uploadFile","submit","types","onValuesChange","staticRenderFns","components","data","isSubmit","computed","values","workorderTypes","title","mounted","methods","tid","id","console","log","_","fileDom","e","file","files","isShowUploadLoading","$uploadFile","mode","uploadToken","percent","success","html","self","fullPath","host","src","fileType","substr","lastIndexOf","indexOf","message","fail","response","content","component"],"mappings":"2IAAA,yBAA+iB,EAAG,G,kCCEljB,IAAIA,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAW,EAAQ,QACnBC,EAAY,EAAQ,QACpBC,EAAqB,EAAQ,QAC7BC,EAAa,EAAQ,QACrBC,EAAMC,KAAKD,IACXE,EAAMD,KAAKC,IACXC,EAAQF,KAAKE,MACbC,EAAuB,4BACvBC,EAAgC,oBAEhCC,EAAgB,SAAUC,GAC5B,YAAcC,IAAPD,EAAmBA,EAAKE,OAAOF,IAIxC,EAAQ,OAAR,CAAyB,UAAW,GAAG,SAAUG,EAASC,EAASC,EAAUC,GAC3E,MAAO,CAGL,SAAiBC,EAAaC,GAC5B,IAAIC,EAAIN,EAAQO,MACZC,OAAoBV,GAAfM,OAA2BN,EAAYM,EAAYH,GAC5D,YAAcH,IAAPU,EACHA,EAAGC,KAAKL,EAAaE,EAAGD,GACxBH,EAASO,KAAKV,OAAOO,GAAIF,EAAaC,IAI5C,SAAUK,EAAQL,GAChB,IAAIM,EAAMR,EAAgBD,EAAUQ,EAAQH,KAAMF,GAClD,GAAIM,EAAIC,KAAM,OAAOD,EAAIE,MAEzB,IAAIC,EAAK9B,EAAS0B,GACdK,EAAIhB,OAAOQ,MACXS,EAA4C,oBAAjBX,EAC1BW,IAAmBX,EAAeN,OAAOM,IAC9C,IAAIY,EAASH,EAAGG,OAChB,GAAI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U,CAAV,CACYS,QAAS,WAGbC,KAtBR,SAsBA,GACUT,EAAKP,qBAAsB,EACvBH,EAAEoB,UAAYpB,EAAEoB,SAASlC,MAC3B,OAAZ,WAAY,CAAZ,CACcgC,QAASlB,EAAEoB,SAASlC,KAAKgC,cAOnCrC,OAjDJ,WAiDA,WACA,oBAMA,8BAMA,gCAMA,gBACM5E,KAAKkF,UAAW,EAChBlF,KAAKoE,QAAQgD,SAAWpH,KAAK0E,OAC7B,EAAN,EACA,8CACA,kBACQ,EAAR,YACQ,OAAR,WAAQ,CAAR,CACU,QAAV,YAEQ,YAAR,WAAU,OAAV,8DAEA,mBACQ,EAAR,YACQ,OAAR,WAAQ,CAAR,CACU,QAAV,0BAEQ,QAAR,WAtBQ,OAAR,WAAQ,CAAR,CACUuC,QAAS,cAPX,OAAR,WAAQ,CAAR,CACUA,QAAS,cAPX,OAAR,WAAQ,CAAR,CACUA,QAAS,gBC5J0W,I,wBCQzXI,EAAY,eACd,EACAxE,EACAkC,GACA,EACA,KACA,WACA,MAIa,aAAAsC,E","file":"js/chunk-2c568771.a81203d3.js","sourcesContent":["import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=style&index=0&id=28659677&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=style&index=0&id=28659677&lang=stylus&scoped=true&\"","'use strict';\n\nvar anObject = require('./_an-object');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar toInteger = require('./_to-integer');\nvar advanceStringIndex = require('./_advance-string-index');\nvar regExpExec = require('./_regexp-exec-abstract');\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[(_vm.isShowHeader)?_c('mt-header',{attrs:{\"fixed\":\"\",\"title\":\"创建工单\"}},[_c('div',{attrs:{\"slot\":\"left\"},slot:\"left\"},[_c('mt-button',{attrs:{\"icon\":\"back\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}})],1)]):_vm._e(),_c('div',{staticClass:\"content\",class:{'hide-header': !_vm.isShowHeader}},[_c('div',{staticClass:\"field-line arrow-right\",on:{\"click\":function($event){_vm.isShowTypesPicker = true}}},[_c('span',[_vm._v(\"类型:\")]),_c('span',[_vm._v(_vm._s(_vm.selectTyped || '选择工单分类'))])]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"标题:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.title),expression:\"request.title\"}],attrs:{\"type\":\"text\",\"placeholder\":\"请输入工单标题~\"},domProps:{\"value\":(_vm.request.title)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"title\", $event.target.value)}}})]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"手机:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.phone),expression:\"request.phone\"}],attrs:{\"type\":\"number\",\"placeholder\":\"请输入您的手机~\"},domProps:{\"value\":(_vm.request.phone)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"phone\", $event.target.value)}}})]),_c('div',{staticClass:\"tip\"},[_vm._v(\"必填,预留手机号方便客服联系到您~\")]),_c('div',{staticClass:\"field-line algin-left\"},[_c('span',[_vm._v(\"邮箱:\")]),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.email),expression:\"request.email\"}],attrs:{\"type\":\"email\",\"placeholder\":\"请输入您的电子邮箱~\"},domProps:{\"value\":(_vm.request.email)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"email\", $event.target.value)}}})]),_c('div',{staticClass:\"tip\"},[_vm._v(\"非必填,预留邮箱后若工单回复后会通过邮箱通知您~\")]),_c('div',{staticClass:\"field-line textarea\"},[_c('span',[_vm._v(\"内容:\")]),_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.content),expression:\"request.content\"}],attrs:{\"placeholder\":\"请输入您的工单内容~\"},domProps:{\"value\":(_vm.request.content)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"content\", $event.target.value)}}})]),_c('div',{staticClass:\"field-line arrow-right file\"},[_c('span',[_vm._v(\"附件:\")]),_c('span',{class:{'ed': _vm.source != ''}},[_vm._v(_vm._s(_vm.source ? '已上传附件,重新上传可替换~' : '上传附件'))]),_c('input',{attrs:{\"type\":\"file\"},on:{\"change\":_vm.uploadFile}})]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){return _vm.submit()}}},[_vm._v(\"提交\")])]),(_vm.isShowTypesPicker)?_c('div',{staticClass:\"types-sheet\"},[_c('div',{staticClass:\"picker-box\"},[_c('div',{staticClass:\"title\"},[_c('span',[_vm._v(\"选择工单类型\")]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){_vm.isShowTypesPicker = false}}},[_vm._v(\"确定\")])]),_c('mt-picker',{attrs:{\"slots\":_vm.types},on:{\"change\":_vm.onValuesChange}})],1)]):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"container\">\n <mt-header v-if=\"isShowHeader\" fixed title=\"创建工单\">\n <div slot=\"left\">\n <mt-button @click=\"$router.go(-1)\" icon=\"back\"></mt-button>\n </div>\n </mt-header>\n <div class=\"content\" :class=\"{'hide-header': !isShowHeader}\">\n\n <div class=\"field-line arrow-right\" @click=\"isShowTypesPicker = true\">\n <span>类型:</span>\n <span>{{selectTyped || '选择工单分类'}}</span>\n </div>\n <div class=\"field-line algin-left\">\n <span>标题:</span>\n <input type=\"text\" v-model=\"request.title\" placeholder=\"请输入工单标题~\">\n </div>\n <div class=\"field-line algin-left\">\n <span>手机:</span>\n <input type=\"number\" v-model=\"request.phone\" placeholder=\"请输入您的手机~\">\n </div>\n <div class=\"tip\">必填,预留手机号方便客服联系到您~</div>\n <div class=\"field-line algin-left\">\n <span>邮箱:</span>\n <input type=\"email\" v-model=\"request.email\" placeholder=\"请输入您的电子邮箱~\">\n </div>\n <div class=\"tip\">非必填,预留邮箱后若工单回复后会通过邮箱通知您~</div>\n <div class=\"field-line textarea\">\n <span>内容:</span>\n <textarea v-model=\"request.content\" placeholder=\"请输入您的工单内容~\"></textarea>\n </div>\n <div class=\"field-line arrow-right file\">\n <span>附件:</span>\n <span :class=\"{'ed': source != ''}\">{{source ? '已上传附件,重新上传可替换~' : '上传附件'}}</span>\n <input type=\"file\" @change=\"uploadFile\" />\n </div>\n <span class=\"sub-btn\" @click=\"submit()\">提交</span>\n </div>\n\n <!-- types-sheet -->\n <div class=\"types-sheet\" v-if=\"isShowTypesPicker\">\n <!-- <div class=\"mask\" @click=\"isShowTypesPicker = false\"></div> -->\n <div class=\"picker-box\">\n <div class=\"title\">\n <span>选择工单类型</span>\n <span class=\"sub-btn\" @click=\"isShowTypesPicker = false\">确定</span>\n </div>\n <mt-picker :slots=\"types\" @change=\"onValuesChange\"></mt-picker>\n </div>\n </div>\n\n </div>\n</template>\n<script>\nimport { mapGetters } from \"vuex\";\nimport { Toast } from \"mint-ui\";\nimport axios from \"axios\";\nexport default {\n name: \"workorder_create\",\n components: {},\n data() {\n return {\n isSubmit: false,\n request: {\n \"tid\": 0,\n \"title\": \"\",\n \"content\": \"\",\n \"phone\": \"\",\n \"email\": \"\"\n },\n selectTyped: \"\",\n source: \"\",\n isShowTypesPicker: false\n };\n },\n computed: {\n ...mapGetters([\n \"isShowHeader\",\n \"workorders\",\n \"userInfo\",\n \"workorderTypes\",\n \"uploadToken\",\n \"workorderTypes\"\n ]),\n types() {\n var values = [];\n var slot = [\n {\n flex: 1,\n values: [],\n className: \"workorder-create-picker\",\n textAlign: \"center\"\n }\n ];\n for (var i = 0; i < this.workorderTypes.length; i++) {\n values.push(this.workorderTypes[i].title);\n }\n slot[0].values = values;\n return slot;\n }\n },\n mounted() {\n \n },\n methods: {\n onValuesChange(_, values) {\n this.selectTyped = values[0]\n for(var i=0; i<this.workorderTypes.length; i++){\n if(values[0] == this.workorderTypes[i].title){\n this.request.tid = this.workorderTypes[i].id\n break\n }\n }\n console.log(_)\n },\n uploadFile(e) {\n var fileDom = e.target;\n var file = fileDom.files[0];\n this.isShowUploadLoading = true;\n const self = this;\n this.$uploadFile({\n file,\n mode: this.uploadToken.mode,\n // 七牛才会执行\n percent() {},\n success(src) {\n\n self.isShowUploadLoading = false;\n var html\n var fullPath = self.uploadToken.host + \"/\" + src;\n var fileType = src.substr(src.lastIndexOf(\".\") + 1);\n if (\"jpg,jpeg,png,JPG,JPEG,PNG\".indexOf(fileType) != -1) {\n html = \"<br><img style='max-width:45%' preview='1' src='\" + fullPath + \"' />\"\n }else{\n html = \"<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />\"\n html += \"<a target='_blank' style='color: #2e9dfc;' href='\"+fullPath+\"'>下载附件</a>\"\n }\n self.source = html\n Toast({\n message: \"上传成功~\"\n });\n },\n fail(e) {\n self.isShowUploadLoading = false;\n if (e.response && e.response.data) {\n Toast({\n message: e.response.data.message\n });\n return;\n }\n }\n });\n },\n submit(){\n if(this.request.tid == 0){\n Toast({\n message: \"请选择工单类型!\"\n });\n return\n }\n if(this.request.title.trim() == \"\"){\n Toast({\n message: \"工单标题不能为空!\"\n });\n return\n }\n if(this.request.content.trim() == \"\"){\n Toast({\n message: \"工单内容不能为空!\"\n });\n return\n }\n if(this.isSubmit) return\n this.isSubmit = true\n this.request.content += this.source\n axios\n .post(\"/public/workorder/create\", this.request)\n .then(response => {\n this.isSubmit = false\n Toast({\n message: \"工单创建成功~\"\n });\n setTimeout(()=>this.$router.replace(\"/workorder/detail/\"+response.data.data), 500)\n })\n .catch(error => {\n this.isSubmit = false\n Toast({\n message: error.response.data.message\n });\n console.log(error);\n });\n }\n }\n};\n</script>\n<style lang=\"stylus\" scoped>\n.content {\n padding 50px 10px\n .field-line{\n display flex\n justify-content space-between\n box-sizing border-box\n height 45px\n border-bottom 1px solid #ddd\n align-content center\n align-items center\n font-size 14px\n color #333\n span:first-child{\n width 35px\n }\n input{\n flex-grow 1\n padding-left 10px\n height 100%\n background none \n border 0\n color #333\n font-size 14px\n border-radius 0\n }\n &.algin-left{\n align-content left \n align-items left\n }\n &.arrow-right{\n background url(./../assets/arrow.png) right center no-repeat\n background-size 18px\n padding-right 25px\n }\n &.file{\n position relative\n overflow hidden\n margin-top 20px\n border-top 1px solid #ddd\n .ed{\n color #8bc34a\n }\n input{\n font-size 100px\n opacity 0\n position absolute\n top 0\n right 0\n }\n }\n &.textarea{\n align-items start\n align-content start\n border-bottom 0\n padding-top 10px\n height 100px\n textarea{\n flex-grow 1\n border 0\n height 100%\n resize none\n color #333\n font-size 14px\n padding 3px 10px\n background-color rgba(0, 0, 0, 0.03);\n border-radius 3px\n }\n }\n }\n .tip{\n font-size 11px\n color #ff9800\n }\n &.hide-header {\n padding-top: 0;\n }\n .sub-btn {\n display: block;\n width: 100%;\n height: 45px;\n color: #fff;\n margin-top 30px\n line-height: 45px;\n text-align: center;\n border-radius: 3px;\n border: none;\n font-size: 14px;\n background: linear-gradient(to right, #26a2ff, #736cde);\n flex-shrink: 0;\n\n &:active {\n opacity: 0.8;\n }\n }\n}\n.types-sheet{\n width 100vw;\n height 100vh\n position fixed\n top 0\n left 0\n right 0\n bottom 0\n margin auto\n background-color rgba(0,0,0,.5)\n // .mask{\n // width 100vw;\n // height 100vh\n // background-color rgba(0,0,0,.5)\n // }\n .picker-box{\n height 250px\n width 100vw\n position absolute\n bottom 0\n left 0\n right 0\n margin 0 auto\n background-color #fff\n }\n .title{\n height 35px\n border-bottom 1px solid #f3f3f3\n display flex\n justify-content space-between\n padding 0 10px\n box-sizing border-box\n align-content center\n align-items center\n span{\n font-size 14px\n color #333\n }\n .sub-btn {\n display: block;\n width: 55px;\n height: 30px;\n color: #26a2ff\n line-height: 30px;\n text-align: right;\n font-size: 14px;\n font-weight 900\n &:active {\n opacity: 0.8;\n }\n }\n }\n}\n</style>\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_create.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./workorder_create.vue?vue&type=template&id=28659677&scoped=true&\"\nimport script from \"./workorder_create.vue?vue&type=script&lang=js&\"\nexport * from \"./workorder_create.vue?vue&type=script&lang=js&\"\nimport style0 from \"./workorder_create.vue?vue&type=style&index=0&id=28659677&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"28659677\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-52968946"],{"269c":function(t,e,o){t.exports=o.p+"img/fujian1.083cd8b7.png"},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("关闭工单")])]):s("mt-button",{attrs:{slot:"right"},on:{click:function(e){return t.del()}},slot:"right"},[s("span",[t._v("删除")])])],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",[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:{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=[],a=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),n=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(a["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 A={name:"workorder_detail",components:{},data:function(){return{isShowUploadLoading:!1,isSubmit:!1,workorder:{},comments:[],fileType:"",request:{source:"",content:""}}},computed:d({},Object(n["b"])(["isShowHeader","workorders","userInfo","workorderTypes","uploadToken"])),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:""},document.querySelector(".container").scrollTop=1e4})).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,mode:this.uploadToken.mode,percent:function(){},success:function(t){var e;s.isShowUploadLoading=!1;var o=s.uploadToken.host+"/"+t,r=t.substr(t.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?e="<br><img style='max-width:45%' preview='1' src='"+o+"' />":(e="<br><img style='width:20px;height:30px;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)}))}))}}},p=A,g=(o("e6af"),o("2877")),m=Object(g["a"])(p,s,r,!1,null,"5ee5eef8",null);e["default"]=m.exports},"55f0":function(t,e,o){},cf1c:function(t,e){t.exports="data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7"},e6af:function(t,e,o){"use strict";var s=o("55f0"),r=o.n(s);r.a}}]);
//# sourceMappingURL=chunk-52968946.335d29c1.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/assets/fujian1.png","webpack:///./src/views/workorder_detail.vue?29ae","webpack:///src/views/workorder_detail.vue","webpack:///./src/views/workorder_detail.vue?9869","webpack:///./src/views/workorder_detail.vue","webpack:///./src/assets/loading.gif","webpack:///./src/views/workorder_detail.vue?d25b"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","slot","on","$event","$router","go","workorder","status","close","_v","del","_e","class","isShowHeader","_s","title","domProps","content","phone","email","$formatDate","create_at","staticStyle","comments","length","_l","item","index","key","aid","userInfo","avatar","a_avatar","a_nickname","request","source","isShowUploadLoading","directives","name","rawName","value","expression","inputBlur","target","composing","$set","uploadFile","reply","staticRenderFns","components","data","isSubmit","fileType","computed","created","document","$store","commit","methods","getWorkOrder","getComments","trim","message","setTimeout","body","scrollTo","window","fileDom","e","file","files","$uploadFile","mode","uploadToken","percent","success","html","self","fullPath","host","src","substr","lastIndexOf","indexOf","fail","response","wid","id","component"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,4B,yCCA3C,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,aAAa,CAAEN,EAAgB,aAAEI,EAAG,YAAY,CAACG,MAAM,CAAC,MAAQ,GAAG,MAAQ,SAAS,CAACH,EAAG,MAAM,CAACG,MAAM,CAAC,KAAO,QAAQC,KAAK,QAAQ,CAACJ,EAAG,YAAY,CAACG,MAAM,CAAC,KAAO,QAAQE,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOV,EAAIW,QAAQC,IAAI,QAAQ,GAA4B,GAAxBZ,EAAIa,UAAUC,OAAaV,EAAG,YAAY,CAACG,MAAM,CAAC,KAAO,SAASE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OACZ0B,EAAOF,EAAQG,MAAM,GACzB5E,KAAK0C,qBAAsB,EAC3B,IAAN,OACM1C,KAAK6E,YAAY,CACfF,KAAR,EACQG,KAAM9E,KAAK+E,YAAYD,KAEvBE,QAJR,aAKQC,QALR,SAKA,GAGU,IAAIC,EADJC,EAAKzC,qBAAsB,EAE3B,IAAI0C,EAAWD,EAAKJ,YAAYM,KAAO,IAAMC,EACzC5B,EAAW4B,EAAIC,OAAOD,EAAIE,YAAY,KAAO,IACK,GAAlD,4BAA4BC,QAAQ/B,GACtC,EAAZ,6DAEY,EAAZ,qIACY,GAAZ,oEAEUyB,EAAK3C,QAAQC,OAASyC,EACtB,OAAV,WAAU,CAAV,CACYd,QAAS,WAGbsB,KAtBR,SAsBA,GACUP,EAAKzC,qBAAsB,EACvBgC,EAAEiB,UAAYjB,EAAEiB,SAASnC,MAC3B,OAAZ,WAAY,CAAZ,CACcY,QAASM,EAAEiB,SAASnC,KAAKY,cAOnCtD,MAnGJ,WAmGA,WACU8E,EAAM5F,KAAKY,UAAUiF,GACzB,EAAN,qDACQ,EAAR,EACA,kCACA,kBACU,QAAV,OACU,OAAV,WAAU,CAAV,CACY,QAAZ,WAEU,EAAV,mBAEA,mBACU,OAAV,WAAU,CAAV,CACY,QAAZ,YAEU,QAAV,cAII7E,IAvHJ,WAuHA,WACU4E,EAAM5F,KAAKY,UAAUiF,GACzB,EAAN,qDACQ,EAAR,EACA,+BACA,kBACU,QAAV,OACU,OAAV,WAAU,CAAV,CACY,QAAZ,WAEU,YAAV,WAAY,OAAZ,uBAEA,mBACU,OAAV,WAAU,CAAV,CACY,QAAZ,YAEU,QAAV,gBCrQ6X,I,wBCQzXC,EAAY,eACd,EACAhG,EACAwD,GACA,EACA,KACA,WACA,MAIa,aAAAwC,E,qDCnBflG,EAAOC,QAAU,shB,kCCAjB,yBAA+iB,EAAG","file":"js/chunk-52968946.335d29c1.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/fujian1.083cd8b7.png\";","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[(_vm.isShowHeader)?_c('mt-header',{attrs:{\"fixed\":\"\",\"title\":\"工单详细\"}},[_c('div',{attrs:{\"slot\":\"left\"},slot:\"left\"},[_c('mt-button',{attrs:{\"icon\":\"back\"},on:{\"click\":function($event){return _vm.$router.go(-1)}}})],1),(_vm.workorder.status != 3)?_c('mt-button',{attrs:{\"slot\":\"right\"},on:{\"click\":function($event){return _vm.close()}},slot:\"right\"},[_c('span',[_vm._v(\"关闭工单\")])]):_c('mt-button',{attrs:{\"slot\":\"right\"},on:{\"click\":function($event){return _vm.del()}},slot:\"right\"},[_c('span',[_vm._v(\"删除\")])])],1):_vm._e(),_c('div',{staticClass:\"content\",class:{'hide-header': !_vm.isShowHeader}},[_c('div',{staticClass:\"head\"},[_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"标题:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.title))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"内容:\")]),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.workorder.content)}})]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"电话:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.phone || '未预留电话号码'))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"邮箱:\")]),_c('span',[_vm._v(_vm._s(_vm.workorder.email || '未预留邮箱'))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"时间:\")]),_c('span',[_vm._v(_vm._s(_vm.$formatDate(_vm.workorder.create_at)))])]),_c('div',{staticClass:\"con\"},[_c('span',[_vm._v(\"状态:\")]),_c('span',[(_vm.workorder.status == 1)?_c('i',{staticStyle:{\"color\":\"#8bc34a\"}},[_vm._v(\"已回复\")]):_vm._e(),(_vm.workorder.status == 3)?_c('i',{staticStyle:{\"color\":\"#ccc\"}},[_vm._v(\"已结束\")]):_vm._e(),(_vm.workorder.status == 0)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待处理\")]):_vm._e(),(_vm.workorder.status == 2)?_c('i',{staticStyle:{\"color\":\"#FF9800\"}},[_vm._v(\"待回复\")]):_vm._e()])])]),_c('div',{staticClass:\"comments\"},[(_vm.comments.length <= 0)?_c('div',{staticClass:\"no-data\"},[_vm._v(\"暂无回复内容,请您耐心等待~\")]):_vm._l((_vm.comments),function(item,index){return [_c('div',{key:index,staticClass:\"item\"},[_c('div',{staticClass:\"avatar\"},[(item.aid == 0)?_c('img',{attrs:{\"src\":_vm.userInfo.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png',\"alt\":\"\"}}):_c('img',{attrs:{\"src\":item.a_avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png',\"alt\":\"\"}})]),_c('div',{staticClass:\"right\"},[(item.aid == 0)?_c('div',{staticClass:\"nickname\"},[_vm._v(\"我\")]):_c('div',{staticClass:\"nickname\"},[_vm._v(_vm._s(item.a_nickname))]),_c('div',{staticClass:\"detail\",domProps:{\"innerHTML\":_vm._s(item.content)}}),_c('div',{staticClass:\"date\"},[_vm._v(_vm._s(_vm.$formatDate(item.create_at)))])])])]}),(_vm.workorder.status == 3)?_c('div',{staticClass:\"workorder-close\"},[_vm._v(\"工单已结束~\")]):_vm._e()],2),(_vm.request.source != '' || _vm.isShowUploadLoading)?_c('div',{staticClass:\"file-view\"},[(_vm.isShowUploadLoading)?_c('span',[_c('img',{attrs:{\"src\":require(\"./../assets/loading.gif\"),\"alt\":\"\"}}),_c('i',[_vm._v(\"上传中~\")])]):_c('span',[_c('img',{attrs:{\"src\":require(\"./../assets/fujian1.png\"),\"alt\":\"\"}}),_c('i',[_vm._v(\"你已成功添加附件,重新上传可替换~\")])])]):_vm._e(),(_vm.workorder.status != 3)?_c('div',{staticClass:\"input-form\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.request.content),expression:\"request.content\"}],attrs:{\"placeholder\":\"请输入内容~\"},domProps:{\"value\":(_vm.request.content)},on:{\"blur\":function($event){return _vm.inputBlur()},\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.request, \"content\", $event.target.value)}}}),_c('span',{staticClass:\"icon-btn\"},[_c('input',{attrs:{\"type\":\"file\",\"onclick\":\"this.value = null\"},on:{\"change\":_vm.uploadFile}})]),_c('span',{staticClass:\"sub-btn\",on:{\"click\":function($event){return _vm.reply()}}},[_vm._v(\"提交\")])]):_vm._e()])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"container\">\n <mt-header v-if=\"isShowHeader\" fixed title=\"工单详细\">\n <div slot=\"left\">\n <mt-button @click=\"$router.go(-1)\" icon=\"back\"></mt-button>\n </div>\n <mt-button @click=\"close()\" v-if=\"workorder.status != 3\" slot=\"right\">\n <span>关闭工单</span>\n </mt-button>\n <mt-button @click=\"del()\" v-else slot=\"right\">\n <span>删除</span>\n </mt-button>\n </mt-header>\n <div class=\"content\" :class=\"{'hide-header': !isShowHeader}\">\n <div class=\"head\">\n <div class=\"con\">\n <span>标题:</span>\n <span>{{workorder.title}}</span>\n </div>\n <div class=\"con\">\n <span>内容:</span>\n <span v-html=\"workorder.content\"></span>\n </div>\n <div class=\"con\">\n <span>电话:</span>\n <span>{{workorder.phone || '未预留电话号码'}}</span>\n </div>\n <div class=\"con\">\n <span>邮箱:</span>\n <span>{{workorder.email || '未预留邮箱'}}</span>\n </div>\n <div class=\"con\">\n <span>时间:</span>\n <span>{{$formatDate(workorder.create_at)}}</span>\n </div>\n <div class=\"con\">\n <span>状态:</span>\n <span>\n <i v-if=\"workorder.status == 1\" style=\"color:#8bc34a;\">已回复</i>\n <i v-if=\"workorder.status == 3\" style=\"color:#ccc\">已结束</i>\n <i v-if=\"workorder.status == 0\" style=\"color:#FF9800\">待处理</i>\n <i v-if=\"workorder.status == 2\" style=\"color:#FF9800\">待回复</i>\n </span>\n </div>\n </div>\n <div class=\"comments\">\n <div class=\"no-data\" v-if=\"comments.length <= 0\">暂无回复内容,请您耐心等待~</div>\n <template v-else v-for=\"(item,index) in comments\">\n <div :key=\"index\" class=\"item\">\n <div class=\"avatar\">\n <img\n v-if=\"item.aid == 0\"\n :src=\"userInfo.avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png'\"\n alt\n />\n <img v-else :src=\"item.a_avatar || 'http://qiniu.cmp520.com/avatar_degault_3.png'\" alt />\n </div>\n <div class=\"right\">\n <div class=\"nickname\" v-if=\"item.aid == 0\">我</div>\n <div class=\"nickname\" v-else>{{item.a_nickname}}</div>\n <div class=\"detail\" v-html=\"item.content\"></div>\n <div class=\"date\">{{$formatDate(item.create_at)}}</div>\n </div>\n </div>\n </template>\n <div class=\"workorder-close\" v-if=\"workorder.status == 3\">工单已结束~</div>\n </div>\n <div class=\"file-view\" v-if=\"request.source != '' || isShowUploadLoading\">\n <span v-if=\"isShowUploadLoading\">\n <img src=\"./../assets/loading.gif\" alt />\n <i>上传中~</i>\n </span>\n <span v-else>\n <img src=\"./../assets/fujian1.png\" alt />\n <i>你已成功添加附件,重新上传可替换~</i>\n </span>\n </div>\n <div class=\"input-form\" v-if=\"workorder.status != 3\">\n <textarea v-model=\"request.content\" @blur=\"inputBlur()\" placeholder=\"请输入内容~\"></textarea>\n <span class=\"icon-btn\">\n <input type=\"file\" @change=\"uploadFile\" onclick=\"this.value = null\" />\n </span>\n <span class=\"sub-btn\" @click=\"reply()\">提交</span>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { mapGetters } from \"vuex\";\nimport { Toast, MessageBox } from \"mint-ui\";\nimport axios from \"axios\";\nexport default {\n name: \"workorder_detail\",\n components: {},\n data() {\n return {\n isShowUploadLoading: false,\n isSubmit: false,\n workorder: {},\n comments: [],\n fileType: \"\",\n request: {\n source: \"\",\n content: \"\"\n }\n };\n },\n computed: {\n ...mapGetters([\n \"isShowHeader\",\n \"workorders\",\n \"userInfo\",\n \"workorderTypes\",\n \"uploadToken\"\n ])\n },\n created() {\n document.title = \"工单详细\";\n const id = this.$route.params.id;\n this.$store.commit(\"updateState\", { isShowPageLoading: true });\n axios.all([this.getWorkOrder(id), this.getComments(id)]).then(\n axios.spread(() => {\n this.$store.commit(\"updateState\", { isShowPageLoading: false });\n })\n );\n },\n methods: {\n getWorkOrder(id) {\n return axios\n .get(\"/public/workorder/\" + id)\n .then(response => {\n this.workorder = response.data.data;\n setTimeout(()=>this.$previewRefresh(), 200)\n })\n .catch(error => {\n console.log(error);\n });\n },\n getComments(id) {\n return axios\n .get(\"/public/workorder/comments/\" + id)\n .then(response => {\n if (response.data.data == null) return;\n this.comments = response.data.data;\n setTimeout(()=>this.$previewRefresh(), 200)\n })\n .catch(error => {\n console.log(error);\n });\n },\n reply() {\n const content = this.request.content + this.request.source;\n if (content.trim() == \"\") {\n Toast({\n message: \"请输入内容~\"\n });\n return;\n }\n if (this.isSubmit) return;\n this.isSubmit = true;\n const wid = this.workorder.id;\n axios\n .post(\"/public/workorder/reply\", { wid, content })\n .then(response => {\n this.isSubmit = false\n console.log(response);\n this.getComments(wid);\n this.request = {\n source: \"\",\n content: \"\"\n };\n document.querySelector(\".container\").scrollTop = 10000\n })\n .catch(error => {\n this.isSubmit = false\n console.log(error);\n Toast({\n message: \"提交失败~\"\n });\n });\n },\n inputBlur() {\n setTimeout(() => {\n document.body.scrollTo = 0;\n window.scrollTo(0, 0);\n }, 100);\n },\n uploadFile(e) {\n var fileDom = e.target;\n var file = fileDom.files[0];\n this.isShowUploadLoading = true;\n const self = this;\n this.$uploadFile({\n file,\n mode: this.uploadToken.mode,\n // 七牛才会执行\n percent() {},\n success(src) {\n\n self.isShowUploadLoading = false;\n var html\n var fullPath = self.uploadToken.host + \"/\" + src;\n var fileType = src.substr(src.lastIndexOf(\".\") + 1);\n if (\"jpg,jpeg,png,JPG,JPEG,PNG\".indexOf(fileType) != -1) {\n html = \"<br><img style='max-width:45%' preview='1' src='\" + fullPath + \"' />\"\n }else{\n html = \"<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />\"\n html += \"<a target='_blank' style='color: #2e9dfc;' href='\"+fullPath+\"'>下载附件</a>\"\n }\n self.request.source = html\n Toast({\n message: \"上传成功~\"\n });\n },\n fail(e) {\n self.isShowUploadLoading = false;\n if (e.response && e.response.data) {\n Toast({\n message: e.response.data.message\n });\n return;\n }\n }\n });\n },\n close() {\n var wid = this.workorder.id;\n MessageBox.confirm(\"您确定关闭该工单吗?\").then(() => {\n axios\n .put(\"/public/workorder/close/\" + wid)\n .then(response => {\n console.log(response);\n Toast({\n message: \"工单已关闭~\"\n });\n this.getWorkOrder(wid);\n })\n .catch(error => {\n Toast({\n message: \"工单关闭失败~\"\n });\n console.log(error);\n });\n });\n },\n del() {\n var wid = this.workorder.id;\n MessageBox.confirm(\"您确定删除该工单吗?\").then(() => {\n axios\n .delete(\"/public/workorder/\" + wid)\n .then(response => {\n console.log(response);\n Toast({\n message: \"工单已删除~\"\n });\n setTimeout(() => this.$router.go(-1));\n })\n .catch(error => {\n Toast({\n message: \"工单关闭失败~\"\n });\n console.log(error);\n });\n });\n }\n }\n};\n</script>\n<style lang=\"stylus\" scoped>\n.container {\n height: 100vh;\n overflow: hidden;\n overflow-y: auto;\n}\n\n.content {\n padding-top: 50px;\n padding-bottom: 90px;\n\n .no-data {\n color: #666;\n font-size: 14px;\n }\n\n .workorder-close {\n text-align: center;\n color: #666;\n font-size: 14px;\n padding: 10px;\n }\n\n &.hide-header {\n padding-top: 0;\n }\n\n .head {\n margin: 0 10px;\n padding: 10px 0;\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n\n .con {\n font-size: 15px;\n color: #333;\n display: flex;\n margin-bottom: 8px;\n\n span {\n flex-flow: 1;\n }\n\n span:first-child {\n flex-flow: 0;\n flex-shrink: 0;\n width: 45px;\n }\n\n i {\n font-style: normal;\n }\n }\n }\n\n .comments {\n padding: 10px;\n\n .item {\n display: flex;\n\n .avatar {\n padding-top: 10px;\n\n img {\n width: 30px;\n height: 30px;\n border-radius: 100px;\n display: block;\n }\n\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n }\n\n .right {\n padding: 10px 5px;\n flex-grow: 1;\n border-bottom: 1px solid rgba(158, 158, 158, 0.13);\n\n .nickname {\n font-size: 15px;\n color: #333;\n }\n\n .detail {\n font-size: 15px;\n color: #333;\n margin-top: 5px;\n }\n\n .date {\n color: #999;\n font-size: 14px;\n margin-top: 5px;\n }\n }\n\n &:last-child {\n .right, .avatar {\n border-bottom: 0;\n }\n }\n }\n }\n\n .file-view {\n position: fixed;\n bottom: 80px;\n left: 0;\n right: 0;\n padding: 5px 10px;\n margin: 0 auto;\n font-size: 13px;\n color: #8bc34a;\n\n span {\n display: flex;\n align-content: center;\n align-items: center;\n\n img {\n width: 20px;\n height: 20px;\n }\n\n i {\n font-style: normal;\n margin-left: 5px;\n }\n }\n }\n\n .input-form {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n width: 100%;\n height: 80px;\n background-color: #fff;\n border-top: 1px solid rgba(158, 158, 158, 0.13);\n display: flex;\n justify-content: space-between;\n padding: 0 10px;\n box-sizing: border-box;\n align-content: center;\n align-items: center;\n\n textarea {\n height: 45px;\n flex-grow: 1;\n border-radius: 0;\n border: 0;\n color: #333;\n font-size: 14px;\n resize: none;\n }\n\n .icon-btn {\n background: url('./../assets/upload.png') center center no-repeat;\n background-size: 30px;\n width: 55px;\n height: 55px;\n overflow: hidden;\n\n input {\n display: block;\n width: 100%;\n height: 100%;\n font-size: 100px;\n opacity: 0;\n }\n }\n\n .sub-btn {\n display: block;\n width: 55px;\n height: 30px;\n color: #fff;\n line-height: 30px;\n text-align: center;\n border-radius: 3px;\n border: none;\n font-size: 14px;\n background: linear-gradient(to right, #26a2ff, #736cde);\n flex-shrink: 0;\n\n &:active {\n opacity: 0.8;\n }\n }\n }\n}\n</style>\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./workorder_detail.vue?vue&type=template&id=5ee5eef8&scoped=true&\"\nimport script from \"./workorder_detail.vue?vue&type=script&lang=js&\"\nexport * from \"./workorder_detail.vue?vue&type=script&lang=js&\"\nimport style0 from \"./workorder_detail.vue?vue&type=style&index=0&id=5ee5eef8&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5ee5eef8\",\n null\n \n)\n\nexport default component.exports","module.exports = \"data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=style&index=0&id=5ee5eef8&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/index.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./workorder_detail.vue?vue&type=style&index=0&id=5ee5eef8&lang=stylus&scoped=true&\""],"sourceRoot":""}
\ No newline at end of file
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<el-table-column <el-table-column
type="index" type="index"
:index="indexMethod" :index="indexMethod"
label="#序号"
width="60"> width="60">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
<el-divider /> <el-divider />
<el-table :data="tableData.list" style="width: 100%" v-loading="loading"> <el-table :data="tableData.list" style="width: 100%" v-loading="loading">
<el-table-column type="index" :index="indexMethod" width="60"></el-table-column> <el-table-column type="index" :index="indexMethod" width="60" label="#序号"></el-table-column>
<el-table-column prop="title" label="主标题"></el-table-column> <el-table-column prop="title" label="主标题"></el-table-column>
<el-table-column prop="sub_title" label="子标题"> <el-table-column prop="sub_title" label="子标题">
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<el-table-column <el-table-column
type="index" type="index"
:index="indexMethod" :index="indexMethod"
label="#序号"
width="60"> width="60">
</el-table-column> </el-table-column>
<el-table-column prop="service_account" label="接待客服"> <el-table-column prop="service_account" label="接待客服">
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
<el-table-column <el-table-column
type="index" type="index"
:index="indexMethod" :index="indexMethod"
label="#序号"
width="60"> width="60">
</el-table-column> </el-table-column>
<el-table-column prop="avatar" label="头像" width="80"> <el-table-column prop="avatar" label="头像" width="80">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<el-divider /> <el-divider />
<el-table :data="tableData.list" style="width: 100%" v-loading="loading"> <el-table :data="tableData.list" style="width: 100%" v-loading="loading">
<el-table-column type="index" :index="indexMethod" width="60"></el-table-column> <el-table-column type="index" :index="indexMethod" width="60" label="#序号"></el-table-column>
<el-table-column prop="title" label="工单标题"></el-table-column> <el-table-column prop="title" label="工单标题"></el-table-column>
<el-table-column prop="status" label="当前状态"> <el-table-column prop="status" label="当前状态">
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</span> </span>
<div class="content"> <div class="content">
<div class="scroll">
<div class="form-line"> <div class="form-line">
<span class="lable">标题:</span> <span class="lable">标题:</span>
<div class="con">{{showData.title}}</div> <div class="con">{{showData.title}}</div>
...@@ -42,7 +43,11 @@ ...@@ -42,7 +43,11 @@
</div> </div>
<el-divider style="height:10px;" /> <el-divider style="height:10px;" />
<div class="comments"> <div class="comments">
<div class="no-data" v-if="comments.length <= 0">暂无回复内容~</div> <div class="no-data" v-if="comments.length <= 0 && !isShowGetCommentsLoading">暂无回复内容~</div>
<div class="comments-loading" v-if="isShowGetCommentsLoading">
<i class="el-icon-loading"></i>
<span> 正在努力加载中~</span>
</div>
<template v-else v-for="(item,index) in comments"> <template v-else v-for="(item,index) in comments">
<div :key="index" class="item"> <div :key="index" class="item">
<div class="avatar"> <div class="avatar">
...@@ -68,6 +73,7 @@ ...@@ -68,6 +73,7 @@
<div class="workorder-close" v-if="showData && showData.status == 3">工单已结束~</div> <div class="workorder-close" v-if="showData && showData.status == 3">工单已结束~</div>
</div> </div>
</div> </div>
</div>
<div class="file-view" v-if="request.source != '' || isShowUploadLoading"> <div class="file-view" v-if="request.source != '' || isShowUploadLoading">
<span v-if="isShowUploadLoading"> <span v-if="isShowUploadLoading">
<i class="el-icon-loading"></i> <i class="el-icon-loading"></i>
...@@ -98,6 +104,7 @@ export default { ...@@ -98,6 +104,7 @@ export default {
data() { data() {
return { return {
isShowUploadLoading: false, isShowUploadLoading: false,
isShowGetCommentsLoading: false,
isSubmit: false, isSubmit: false,
workorder: null, workorder: null,
comments: [], comments: [],
...@@ -115,6 +122,9 @@ export default { ...@@ -115,6 +122,9 @@ export default {
}, },
prop: Object prop: Object
}, },
created() {
this.comments = []
},
computed: { computed: {
showData() { showData() {
return this.workorder || this.prop; return this.workorder || this.prop;
...@@ -136,9 +146,15 @@ export default { ...@@ -136,9 +146,15 @@ export default {
}); });
}, },
getComments() { getComments() {
this.isShowGetCommentsLoading = true
axios.get("/public/workorder/comments/" + this.prop.id).then(response => { axios.get("/public/workorder/comments/" + this.prop.id).then(response => {
if(response.data.data != null)this.comments = response.data.data; if(response.data.data != null)this.comments = response.data.data;
setTimeout(() => this.$previewRefresh(), 500); setTimeout(() => this.$previewRefresh(), 500);
this.isShowGetCommentsLoading = false
}).catch(error => {
console.log(error);
this.isShowGetCommentsLoading = false
this.$message.error('加载失败,请刷新尝试~');
}); });
}, },
reply() { reply() {
...@@ -161,8 +177,12 @@ export default { ...@@ -161,8 +177,12 @@ export default {
source: "", source: "",
content: "" content: ""
}; };
document.querySelector(".content").scrollTop = 10000
this.$message.success('回复成功~'); this.$message.success('回复成功~');
setTimeout(()=>{
var sBoxHeight = document.querySelector(".content").clientHeight
var sHeight = document.querySelector(".scroll").clientHeight
document.querySelector(".content").scrollTop = sHeight - sBoxHeight + 20
}, 500)
}) })
.catch(error => { .catch(error => {
this.isSubmit = false this.isSubmit = false
...@@ -193,7 +213,7 @@ export default { ...@@ -193,7 +213,7 @@ export default {
if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) { if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) {
html = "<br><img style='max-width:45%' preview='1' src='" + fullPath + "' />" html = "<br><img style='max-width:45%' preview='1' src='" + fullPath + "' />"
}else{ }else{
html = "<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />" html = "<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />"
html += "<a target='_blank' style='color: #2e9dfc;' href='"+fullPath+"'>下载附件</a>" html += "<a target='_blank' style='color: #2e9dfc;' href='"+fullPath+"'>下载附件</a>"
} }
self.request.source = html self.request.source = html
...@@ -202,9 +222,7 @@ export default { ...@@ -202,9 +222,7 @@ export default {
error(e) { error(e) {
self.isShowUploadLoading = false; self.isShowUploadLoading = false;
if (e.response && e.response.data) { if (e.response && e.response.data) {
Toast({ self.$message.error(e.response.data.message);
message: e.response.data.message
});
return; return;
} }
} }
...@@ -243,7 +261,7 @@ export default { ...@@ -243,7 +261,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
.workorder-close { .workorder-close ,.comments-loading{
text-align: center; text-align: center;
color: #666; color: #666;
font-size: 14px; font-size: 14px;
...@@ -300,7 +318,7 @@ export default { ...@@ -300,7 +318,7 @@ export default {
} }
} }
.content-box { .content-box {
width: 550px; width: 600px;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
position: fixed; position: fixed;
...@@ -311,7 +329,7 @@ export default { ...@@ -311,7 +329,7 @@ export default {
overflow: hidden; overflow: hidden;
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
padding-top: 40px; padding-top: 40px;
padding-bottom 115px padding-bottom 135px
box-sizing: border-box; box-sizing: border-box;
.content{ .content{
box-sizing: border-box; box-sizing: border-box;
...@@ -326,7 +344,7 @@ export default { ...@@ -326,7 +344,7 @@ export default {
} }
.file-view { .file-view {
position: absolute; position: absolute;
bottom: 115px; bottom: 135px;
left: 0; left: 0;
right: 0; right: 0;
padding: 5px 10px; padding: 5px 10px;
...@@ -356,18 +374,18 @@ export default { ...@@ -356,18 +374,18 @@ export default {
right: 0; right: 0;
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
height: 80px; height: 100px;
background-color: #fff; background-color: #fff;
border-top: 1px solid rgba(158, 158, 158, 0.13); border-top: 1px solid rgba(158, 158, 158, 0.13);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 10px; padding: 10px 10px 0;
box-sizing: border-box; box-sizing: border-box;
align-content: center; align-content: center;
align-items: center; align-items: center;
textarea { textarea {
height: 45px; height: 90%;
flex-grow: 1; flex-grow: 1;
border-radius: 0; border-radius: 0;
border: 0; border: 0;
......
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) { if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) {
html = "<br><img style='max-width:45%' preview='1' src='" + fullPath + "' />" html = "<br><img style='max-width:45%' preview='1' src='" + fullPath + "' />"
}else{ }else{
html = "<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />" html = "<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />"
html += "<a target='_blank' style='color: #2e9dfc;' href='"+fullPath+"'>下载附件</a>" html += "<a target='_blank' style='color: #2e9dfc;' href='"+fullPath+"'>下载附件</a>"
} }
self.source = html self.source = html
......
...@@ -169,7 +169,11 @@ export default { ...@@ -169,7 +169,11 @@ export default {
source: "", source: "",
content: "" content: ""
}; };
document.querySelector(".container").scrollTop = 10000 setTimeout(()=>{
var sBoxHeight = document.querySelector(".container").clientHeight
var sHeight = document.querySelector(".content").clientHeight
document.querySelector(".container").scrollTop = sHeight - sBoxHeight + 20
}, 500)
}) })
.catch(error => { .catch(error => {
this.isSubmit = false this.isSubmit = false
...@@ -204,7 +208,7 @@ export default { ...@@ -204,7 +208,7 @@ export default {
if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) { if ("jpg,jpeg,png,JPG,JPEG,PNG".indexOf(fileType) != -1) {
html = "<br><img style='max-width:45%' preview='1' src='" + fullPath + "' />" html = "<br><img style='max-width:45%' preview='1' src='" + fullPath + "' />"
}else{ }else{
html = "<br><img style='width:20px;height:30px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />" html = "<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />"
html += "<a target='_blank' style='color: #2e9dfc;' href='"+fullPath+"'>下载附件</a>" html += "<a target='_blank' style='color: #2e9dfc;' href='"+fullPath+"'>下载附件</a>"
} }
self.request.source = html self.request.source = html
......
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