Commit 51322b58 by keith

1.服务端工单显示列表排序问题 2.H5客户端创建工单使用七牛云上传缺少token问题 3.H5客户端发送图片消息没有即时显示问题 4.server增加七牛云FileSize策略,避免上传0B文件

parent 80b91a2f
......@@ -4,4 +4,5 @@ kefu_server
kefu_server.tar.gz
conf/app.back.conf
node_modules
app copy.conf
\ No newline at end of file
app copy.conf
kefu_workbench
\ No newline at end of file
......@@ -343,7 +343,8 @@ func (c *PublicController) Configs() {
qiniuSetting := services.GetQiniuRepositoryInstance().GetQiniuConfigInfo()
putPolicy := storage.PutPolicy{
Scope: qiniuSetting.Bucket,
Scope: qiniuSetting.Bucket,
FsizeMin: 1,
}
// 2 hours validity
......
.content[data-v-51923d50]{padding:50px 10px}.content .field-line[data-v-51923d50]{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-51923d50]:first-child{width:35px}.content .field-line input[data-v-51923d50]{-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-51923d50]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-51923d50]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFDUlEQVR4Xu2dMU8UQRTH32wBvR/AxmhjJZVS3R4tsdCY2NoabY100IDGUo2x0s7EaGFDtzubkPAdaCz8AFjRkRuzATwCd3sz+24nb+b9aXkw8/7/3755M7MchvClWgGjOnskTwBAOQQAAAAoV0B5+qgAAEC5AsrTRwUAAMoVUJ4+KgAAUK6A8vRRAQCAcgWUp48KAACUK6A8fVQAACBbgaZpPhPRfefcbefccVEUvyeTyZvxeLwve+ZpzE5sBTg4OLhzenp6NE/GyWSys7GxsZ2GzHJnKRYAa60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S7zrmtPhJovNXro5NYAKqqWiuK4pCIVkMTg/lhiol8H8Ba+5qI9sJSIYL5oYoJ/cugpml+OecehqQD80PUmsaKrAB1Xb81xrzyTQnm+yp1PU4qAI+NMT980oL5PirNjxEJQDtda60lolFXejCfZ77YXUA7sbqu2x7gizHmxqw0YT7ffNEAtJOrqupWURTvjDF3nXM3jTHHzrnfzrm98Xi8vxwJdP8WsUuAblviZQ8A4mktciQAINKWeJMCAPG0FjkSABBpS7xJAYB4WoscCQCItCXepABAPK1FjgQARNoSb1IAIJ7WIkcCACJtiTcpABBPa5EjAQCRtsSbFACIp7XIkQCASFviTQoAxNNa5Ej/AAxh3J+K76XOAAAAAElFTkSuQmCC) 100% no-repeat;background-size:18px;padding-right:25px}.content .field-line.file[data-v-51923d50]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-51923d50]{color:#8bc34a}.content .field-line.file input[data-v-51923d50]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-51923d50]{-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-51923d50]{-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-51923d50]{font-size:11px;color:#ff9800}.content.hide-header[data-v-51923d50]{padding-top:0}.content .sub-btn[data-v-51923d50]{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-51923d50]:active{opacity:.8}.types-sheet[data-v-51923d50]{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-51923d50]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-51923d50]{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-51923d50]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-51923d50]{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-51923d50]:active{opacity:.8}.tips[data-v-51923d50]{font-size:12px;color:red;padding:10px 0}
\ No newline at end of file
.content[data-v-3f27545b]{padding:50px 10px}.content .field-line[data-v-3f27545b]{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-3f27545b]:first-child{width:35px}.content .field-line input[data-v-3f27545b]{-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-3f27545b]{-ms-flex-line-pack:left;align-content:left;-ms-flex-align:left;align-items:left}.content .field-line.arrow-right[data-v-3f27545b]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFDUlEQVR4Xu2dMU8UQRTH32wBvR/AxmhjJZVS3R4tsdCY2NoabY100IDGUo2x0s7EaGFDtzubkPAdaCz8AFjRkRuzATwCd3sz+24nb+b9aXkw8/7/3755M7MchvClWgGjOnskTwBAOQQAAAAoV0B5+qgAAEC5AsrTRwUAAMoVUJ4+KgAAUK6A8vRRAQCAcgWUp48KAACUK6A8fVQAACBbgaZpPhPRfefcbefccVEUvyeTyZvxeLwve+ZpzE5sBTg4OLhzenp6NE/GyWSys7GxsZ2GzHJnKRY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A0zS7zrmtPhJovNXro5NYAKqqWiuK4pCIVkMTg/lhiol8H8Ba+5qI9sJSIYL5oYoJ/cugpml+OecehqQD80PUmsaKrAB1Xb81xrzyTQnm+yp1PU4qAI+NMT980oL5PirNjxEJQDtda60lolFXejCfZ77YXUA7sbqu2x7gizHmxqw0YT7ffNEAtJOrqupWURTvjDF3nXM3jTHHzrnfzrm98Xi8vxwJdP8WsUuAblviZQ8A4mktciQAINKWeJMCAPG0FjkSABBpS7xJAYB4WoscCQCItCXepABAPK1FjgQARNoSb1IAIJ7WIkcCACJtiTcpABBPa5EjAQCRtsSbFACIp7XIkQCASFviTQoAxNNa5Ej/AAxh3J+K76XOAAAAAElFTkSuQmCC) 100% no-repeat;background-size:18px;padding-right:25px}.content .field-line.file[data-v-3f27545b]{position:relative;overflow:hidden;margin-top:20px;border-top:1px solid #ddd}.content .field-line.file .ed[data-v-3f27545b]{color:#8bc34a}.content .field-line.file input[data-v-3f27545b]{font-size:100px;opacity:0;position:absolute;top:0;right:0}.content .field-line.textarea[data-v-3f27545b]{-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-3f27545b]{-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-3f27545b]{font-size:11px;color:#ff9800}.content.hide-header[data-v-3f27545b]{padding-top:0}.content .sub-btn[data-v-3f27545b]{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-3f27545b]:active{opacity:.8}.types-sheet[data-v-3f27545b]{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-3f27545b]{height:250px;width:100vw;position:absolute;bottom:0;left:0;right:0;margin:0 auto;background-color:#fff}.types-sheet .title[data-v-3f27545b]{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-3f27545b]{font-size:14px;color:#333}.types-sheet .title .sub-btn[data-v-3f27545b]{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-3f27545b]:active{opacity:.8}.tips[data-v-3f27545b]{font-size:12px;color:red;padding:10px 0}
\ No newline at end of file
......@@ -43,4 +43,4 @@
top:0 !important;
min-height: inherit!important;
left:0 !important; right:0 !important; bottom:0 !important; margin: auto !important;
}</style><link href=css/chunk-11c35424.f67c0e89.css rel=prefetch><link href=css/chunk-5750b049.975722ef.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-bd7efe5c.96f83ab8.css rel=prefetch><link href=js/chunk-11c35424.75674ec0.js rel=prefetch><link href=js/chunk-5750b049.b7cee639.js rel=prefetch><link href=js/chunk-5e6009ff.6619c1ef.js rel=prefetch><link href=js/chunk-bd7efe5c.3bdd8028.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.23ac3c87.js rel=preload as=script><link href=js/chunk-vendors.7ce94627.js rel=preload as=script><link href=css/chunk-vendors.5cea36ab.css rel=stylesheet><link href=css/app.19de1655.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.7ce94627.js></script><script src=js/app.23ac3c87.js></script></body></html>
\ No newline at end of file
}</style><link href=css/chunk-5750b049.975722ef.css rel=prefetch><link href=css/chunk-5e6009ff.86cb9867.css rel=prefetch><link href=css/chunk-95ccd994.d241ba9d.css rel=prefetch><link href=css/chunk-bd7efe5c.96f83ab8.css rel=prefetch><link href=js/chunk-5750b049.b7cee639.js rel=prefetch><link href=js/chunk-5e6009ff.cb9acf4c.js rel=prefetch><link href=js/chunk-95ccd994.571b5445.js rel=prefetch><link href=js/chunk-bd7efe5c.3bdd8028.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.4015b26c.js rel=preload as=script><link href=js/chunk-vendors.7ce94627.js rel=preload as=script><link href=css/chunk-vendors.5cea36ab.css rel=stylesheet><link href=css/app.19de1655.css rel=stylesheet></head><body><noscript><strong>We're sorry but m doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.7ce94627.js></script><script src=js/app.4015b26c.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-11c35424"],{"33a5":function(e,t,s){"use strict";var i=s("a2b5"),r=s.n(i);r.a},a2b5:function(e,t,s){},ede1:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[e.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"创建工单"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(t){return e.$router.go(-1)}}})],1)]):e._e(),s("div",{staticClass:"content",class:{"hide-header":!e.isShowHeader}},[s("div",{staticClass:"field-line arrow-right",on:{click:function(t){e.isShowTypesPicker=!0}}},[s("span",[e._v("类型:")]),s("span",[e._v(e._s(e.selectTyped||"选择工单分类"))])]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("标题:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.title,expression:"request.title"}],attrs:{type:"text",placeholder:"请输入工单标题~"},domProps:{value:e.request.title},on:{input:function(t){t.target.composing||e.$set(e.request,"title",t.target.value)}}})]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("手机:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.phone,expression:"request.phone"}],attrs:{type:"number",placeholder:"请输入您的手机~"},domProps:{value:e.request.phone},on:{input:function(t){t.target.composing||e.$set(e.request,"phone",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("必填,预留手机号方便客服联系到您~")]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("邮箱:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.email,expression:"request.email"}],attrs:{type:"email",placeholder:"请输入您的电子邮箱~"},domProps:{value:e.request.email},on:{input:function(t){t.target.composing||e.$set(e.request,"email",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("非必填,预留邮箱后若工单回复后会通过邮箱通知您~")]),s("div",{staticClass:"field-line textarea"},[s("span",[e._v("内容:")]),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.request.content,expression:"request.content"}],attrs:{placeholder:"请输入您的工单内容~"},domProps:{value:e.request.content},on:{input:function(t){t.target.composing||e.$set(e.request,"content",t.target.value)}}})]),s("div",{staticClass:"field-line arrow-right file"},[s("span",[e._v("附件:")]),s("span",{class:{ed:""!=e.source}},[e._v(e._s(e.source?"已上传附件,重新上传可替换~":"上传附件"))]),s("input",{attrs:{type:"file"},on:{change:e.uploadFile}})]),s("div",{staticClass:"tips"},[e._v("温馨提示:由于客服值班时间原因,工单回复较慢,请您耐心等待~")]),s("span",{staticClass:"sub-btn",on:{click:function(t){return e.submit()}}},[e._v("提交")])]),e.isShowTypesPicker?s("div",{staticClass:"types-sheet"},[s("div",{staticClass:"picker-box"},[s("div",{staticClass:"title"},[s("span",[e._v("选择工单类型")]),s("span",{staticClass:"sub-btn",on:{click:function(t){e.isShowTypesPicker=!1}}},[e._v("确定")])]),s("mt-picker",{attrs:{slots:e.types},on:{change:e.onValuesChange}})],1)]):e._e()],1)},r=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("a481"),s("bd86")),o=s("2f62"),n=s("76a0"),c=s("bc3a"),l=s.n(c);function u(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function p(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?u(Object(s),!0).forEach((function(t){Object(a["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):u(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var d={name:"workorder_create",components:{},data:function(){return{isSubmit:!1,request:{tid:0,title:"",content:"",phone:"",email:""},selectTyped:"",source:"",isShowTypesPicker:!1}},computed:p({},Object(o["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs","workorderTypes"]),{types:function(){for(var e=[],t=[{flex:1,values:[],className:"workorder-create-picker",textAlign:"center"}],s=0;s<this.workorderTypes.length;s++)e.push(this.workorderTypes[s].title);return t[0].values=e,t}}),mounted:function(){},methods:{onValuesChange:function(e,t){this.selectTyped=t[0];for(var s=0;s<this.workorderTypes.length;s++)if(t[0]==this.workorderTypes[s].title){this.request.tid=this.workorderTypes[s].id;break}console.log(e)},uploadFile:function(e){var t=e.target,s=t.files[0];this.isShowUploadLoading=!0;var i=this;this.$uploadFile({file:s,mode:this.configs.upload_mode,percent:function(){},success:function(e){var t;i.isShowUploadLoading=!1;var s=i.configs.upload_host+"/"+e,r=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?t="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",t+="<a target='_blank' style='color: #2e9dfc;' href='"+s+"'>下载附件</a>"),i.source=t,Object(n["Toast"])({message:"上传成功~"})},fail:function(e){i.isShowUploadLoading=!1,e.response&&e.response.data&&Object(n["Toast"])({message:e.response.data.message})}})},submit:function(){var e=this;0!=this.request.tid?""!=this.request.title.trim()?""!=this.request.content.trim()?this.isSubmit||(this.isSubmit=!0,this.request.content+=this.source,l.a.post("/public/workorder/create",this.request).then((function(t){e.isSubmit=!1,Object(n["Toast"])({message:"工单创建成功~"}),setTimeout((function(){return e.$router.replace("/workorder/detail/"+t.data.data)}),500)})).catch((function(t){e.isSubmit=!1,Object(n["Toast"])({message:t.response.data.message}),console.log(t)}))):Object(n["Toast"])({message:"工单内容不能为空!"}):Object(n["Toast"])({message:"工单标题不能为空!"}):Object(n["Toast"])({message:"请选择工单类型!"})}}},m=d,h=(s("33a5"),s("2877")),f=Object(h["a"])(m,i,r,!1,null,"51923d50",null);t["default"]=f.exports}}]);
//# sourceMappingURL=chunk-11c35424.75674ec0.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-95ccd994"],{3525:function(e,t,s){"use strict";var i=s("cddf"),r=s.n(i);r.a},cddf:function(e,t,s){},ede1:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[e.isShowHeader?s("mt-header",{attrs:{fixed:"",title:"创建工单"}},[s("div",{attrs:{slot:"left"},slot:"left"},[s("mt-button",{attrs:{icon:"back"},on:{click:function(t){return e.$router.go(-1)}}})],1)]):e._e(),s("div",{staticClass:"content",class:{"hide-header":!e.isShowHeader}},[s("div",{staticClass:"field-line arrow-right",on:{click:function(t){e.isShowTypesPicker=!0}}},[s("span",[e._v("类型:")]),s("span",[e._v(e._s(e.selectTyped||"选择工单分类"))])]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("标题:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.title,expression:"request.title"}],attrs:{type:"text",placeholder:"请输入工单标题~"},domProps:{value:e.request.title},on:{input:function(t){t.target.composing||e.$set(e.request,"title",t.target.value)}}})]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("手机:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.phone,expression:"request.phone"}],attrs:{type:"number",placeholder:"请输入您的手机~"},domProps:{value:e.request.phone},on:{input:function(t){t.target.composing||e.$set(e.request,"phone",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("必填,预留手机号方便客服联系到您~")]),s("div",{staticClass:"field-line algin-left"},[s("span",[e._v("邮箱:")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.request.email,expression:"request.email"}],attrs:{type:"email",placeholder:"请输入您的电子邮箱~"},domProps:{value:e.request.email},on:{input:function(t){t.target.composing||e.$set(e.request,"email",t.target.value)}}})]),s("div",{staticClass:"tip"},[e._v("非必填,预留邮箱后若工单回复后会通过邮箱通知您~")]),s("div",{staticClass:"field-line textarea"},[s("span",[e._v("内容:")]),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.request.content,expression:"request.content"}],attrs:{placeholder:"请输入您的工单内容~"},domProps:{value:e.request.content},on:{input:function(t){t.target.composing||e.$set(e.request,"content",t.target.value)}}})]),s("div",{staticClass:"field-line arrow-right file"},[s("span",[e._v("附件:")]),s("span",{class:{ed:""!=e.source}},[e._v(e._s(e.source?"已上传附件,重新上传可替换~":"上传附件"))]),s("input",{attrs:{type:"file"},on:{change:e.uploadFile}})]),s("div",{staticClass:"tips"},[e._v("温馨提示:由于客服值班时间原因,工单回复较慢,请您耐心等待~")]),s("span",{staticClass:"sub-btn",on:{click:function(t){return e.submit()}}},[e._v("提交")])]),e.isShowTypesPicker?s("div",{staticClass:"types-sheet"},[s("div",{staticClass:"picker-box"},[s("div",{staticClass:"title"},[s("span",[e._v("选择工单类型")]),s("span",{staticClass:"sub-btn",on:{click:function(t){e.isShowTypesPicker=!1}}},[e._v("确定")])]),s("mt-picker",{attrs:{slots:e.types},on:{change:e.onValuesChange}})],1)]):e._e()],1)},r=[],a=(s("8e6e"),s("ac6a"),s("456d"),s("a481"),s("bd86")),o=s("2f62"),n=s("76a0"),c=s("bc3a"),l=s.n(c);function u(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function p(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?u(Object(s),!0).forEach((function(t){Object(a["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):u(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var d={name:"workorder_create",components:{},data:function(){return{isSubmit:!1,request:{tid:0,title:"",content:"",phone:"",email:""},selectTyped:"",source:"",isShowTypesPicker:!1}},computed:p({},Object(o["b"])(["isShowHeader","workorders","userInfo","workorderTypes","configs","workorderTypes"]),{types:function(){for(var e=[],t=[{flex:1,values:[],className:"workorder-create-picker",textAlign:"center"}],s=0;s<this.workorderTypes.length;s++)e.push(this.workorderTypes[s].title);return t[0].values=e,t}}),mounted:function(){},methods:{onValuesChange:function(e,t){this.selectTyped=t[0];for(var s=0;s<this.workorderTypes.length;s++)if(t[0]==this.workorderTypes[s].title){this.request.tid=this.workorderTypes[s].id;break}console.log(e)},uploadFile:function(e){var t=e.target,s=t.files[0];this.isShowUploadLoading=!0;var i=this;this.$uploadFile({file:s,secret:this.configs.upload_secret,mode:this.configs.upload_mode,percent:function(){},success:function(e){var t;i.isShowUploadLoading=!1;var s=i.configs.upload_host+"/"+e,r=e.substr(e.lastIndexOf(".")+1);-1!="jpg,jpeg,png,JPG,JPEG,PNG".indexOf(r)?t="<br><img style='max-width:45%;margin-top:5px;' preview='1' src='"+s+"' />":(t="<br><img style='width:20px;height:20px;top:3px; right:3px;position: relative;' preview='1' src='http://qiniu.cmp520.com/fj.png' />",t+="<a target='_blank' style='color: #2e9dfc;' href='"+s+"'>下载附件</a>"),i.source=t,Object(n["Toast"])({message:"上传成功~"})},fail:function(e){i.isShowUploadLoading=!1,e.response&&e.response.data&&Object(n["Toast"])({message:e.response.data.message})}})},submit:function(){var e=this;0!=this.request.tid?""!=this.request.title.trim()?""!=this.request.content.trim()?this.isSubmit||(this.isSubmit=!0,this.request.content+=this.source,l.a.post("/public/workorder/create",this.request).then((function(t){e.isSubmit=!1,Object(n["Toast"])({message:"工单创建成功~"}),setTimeout((function(){return e.$router.replace("/workorder/detail/"+t.data.data)}),500)})).catch((function(t){e.isSubmit=!1,Object(n["Toast"])({message:t.response.data.message}),console.log(t)}))):Object(n["Toast"])({message:"工单内容不能为空!"}):Object(n["Toast"])({message:"工单标题不能为空!"}):Object(n["Toast"])({message:"请选择工单类型!"})}}},f=d,h=(s("3525"),s("2877")),m=Object(h["a"])(f,i,r,!1,null,"3f27545b",null);t["default"]=m.exports}}]);
//# sourceMappingURL=chunk-95ccd994.571b5445.js.map
\ No newline at end of file
......@@ -114,7 +114,7 @@ func (r *WorkOrderRepository) GetWorkOrders(request models.WorkOrderPaginationDt
del := strconv.Itoa(request.Del)
var workOrders []models.WorkOrderDto
SQLSUB := "SELECT w.*,u.nickname AS u_nickname,a.nickname AS a_nickname,w.id AS i_d,w.uid AS u_i_d,w.tid AS t_i_d,w.cid AS c_i_d FROM work_order w LEFT JOIN (SELECT id, nickname FROM `user`) u ON w.uid = u.id LEFT JOIN (SELECT id, nickname FROM `admin`) a ON w.last_reply = a.id"
SQL := "SELECT * FROM (" + SQLSUB + ") w WHERE `delete` = " + del + statusSQL + tidSQL + " ORDER BY status ASC, create_at DESC"
SQL := "SELECT * FROM (" + SQLSUB + ") w WHERE `delete` = " + del + statusSQL + tidSQL + " ORDER BY create_at DESC, update_at DESC, status ASC"
_, err := r.o.Raw(SQL+" LIMIT ? OFFSET ?", request.PageSize, (request.PageOn-1)*request.PageSize).QueryRows(&workOrders)
if err != nil {
logs.Warn("GetWorkOrders get WorkOrders------------", err)
......
......@@ -592,7 +592,7 @@ export default {
setTimeout(() => {
self.updateMessageHideCancel(localMessage)
}, 10000);
self.messages.push(self.handlerMessage(localMessage));
self.messagesPushMemory(localMessage);
var cacheMsg = Object.assign({}, localMessage);
cacheMsg.payload = self.configs.upload_host + "/" + fileName;
self.$previewRefresh();
......
......@@ -121,6 +121,7 @@ export default {
const self = this;
this.$uploadFile({
file,
secret: this.configs.upload_secret,
mode: this.configs.upload_mode,
// 七牛才会执行
percent() {},
......
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