You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 line
14KB

  1. !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(r){d=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),u=new P(n||[]);return i(a,"_invoke",{value:q(e,r,u)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=s;var v="suspendedStart",h="suspendedYield",y="executing",m="completed",g={};function b(){}function w(){}function x(){}var k={};d(k,l,(function(){return this}));var j=Object.getPrototypeOf,O=j&&j(j(S([])));O&&O!==o&&a.call(O,l)&&(k=O);var L=x.prototype=b.prototype=Object.create(k);function E(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function _(t,r){function n(o,i,u,l){var c=p(t[o],t,i);if("throw"!==c.type){var f=c.arg,d=f.value;return d&&"object"==e(d)&&a.call(d,"__await")?r.resolve(d.__await).then((function(e){n("next",e,u,l)}),(function(e){n("throw",e,u,l)})):r.resolve(d).then((function(e){f.value=e,u(f)}),(function(e){return n("throw",e,u,l)}))}l(c.arg)}var o;i(this,"_invoke",{value:function(e,t){function a(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(a,a):a()}})}function q(e,t,n){var o=v;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var l=D(u,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=p(e,t,n);if("normal"===c.type){if(o=n.done?m:h,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function D(e,t){var n=t.method,o=e.iterator[n];if(o===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,D(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=p(o,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,g;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,g):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function V(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(V,this),this.reset(!0)}function S(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(a.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}throw new TypeError(e(t)+" is not iterable")}return w.prototype=x,i(L,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=d(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,f,"GeneratorFunction")),e.prototype=Object.create(L),e},n.awrap=function(e){return{__await:e}},E(_.prototype),d(_.prototype,c,(function(){return this})),n.AsyncIterator=_,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new _(s(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(L),d(L,f,"Generator"),d(L,l,(function(){return this})),d(L,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=S,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return u.type="throw",u.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function a(e,t,r,n,o,a,i){try{var u=e[a](i),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){a(i,n,o,u,l,"next",e)}function l(e){a(i,n,o,u,l,"throw",e)}u(void 0)}))}}System.register(["./base-legacy.5aa23bc0.js","./index-legacy.73999841.js","./index-legacy.791c97452.js","./index-legacy.739998412.js","./index-legacy.0af8d43f.js","./index-legacy.a8d30fd3.js","./index-legacy.791c9745.js","./index-legacy.791c97453.js","./advice-feedback-legacy.5fa668bc.js","./uploadAction-legacy.08b88785.js","./index-legacy.a71edc95.js"],(function(e,r){"use strict";var o,a,u,l,c,f,d,s,p,v,h,y,m,g,b,w,x,k,j,O,L,E,_,q,D,V,M,P,S,T=document.createElement("style");return T.innerHTML=".van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}.adviceFeedBack{padding:.26667rem}.adviceFeedBack .form{border-radius:.26667rem}\n",document.head.appendChild(T),{setters:[function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(e){o=e.w,a=e.f},function(e){u=e.f,l=e.u},function(e){c=e.d,f=e.r,d=e.l,s=e.Y,p=e.Z,v=e.V,h=e.a1,y=e.a2,m=e.X,g=e.W,b=e.$,w=e.c,x=e.e,k=e.w,j=e.M,O=e.o,L=e.Q,E=e.F,_=e.v,q=e.g,D=e.t,V=e.K,M=e.b,P=e.G,S=e.a0}],execute:function(){var r={class:"adviceFeedBack"},T=M("span",{style:{color:"#999999","font-size":"12px"}},"支持jpg、jpeg、png图片格式上传",-1),N={style:{margin:"16px",display:"flex"}},F=c({name:"adviceFeedBack"});e("default",Object.assign(F,{setup:function(e){var c=P(),F=f({}),G=function(){var e=i(t().mark((function e(){var r,o;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(F.value.attachFiles),o=n(n({},F.value),{},{feedbackModelDetail:(null===(r=F.value)||void 0===r||null===(r=r.feedbackModelDetail)||void 0===r?void 0:r.map((function(e){var t;return n(n({},e),{},{value:"FILE"===e.modelType?(null===(t=e.value)||void 0===t?void 0:t.length)&&JSON.stringify(u(e.value))||void 0:e.value})})))||void 0}),e.next=4,a(o);case 4:j("提交成功!"),c.go(-1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=i(t().mark((function e(r,n){var o,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.status="uploading",r.message="上传中...","image/jpeg"===r.file.type||"image/png"===r.file.type||"image/jpeg"===r.file.type){e.next=6;break}return S("请上传 jpg、png、jpeg 格式图片"),n.pop(),e.abrupt("return",!1);case 6:return(o=new FormData).append("file",r.file),e.next=10,l(o);case 10:a=e.sent,r.status="success",r.message="上传成功",r.response=a.data;case 14:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();return d(i(t().mark((function e(){var r,n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o();case 2:n=e.sent,F.value={feedbackModelDetail:(null===(r=n.data)||void 0===r?void 0:r.modelConfigToJson)||void 0};case 4:case"end":return e.stop()}}),e)})))),function(e,t){var n=s,o=p,a=v,i=h,u=y,l=m,c=g,f=b;return O(),w("div",r,[x(f,{class:"form",onSubmit:G},{default:k((function(){var r;return[x(a,{name:"radio",label:"反馈类型",required:"",rules:[{required:!0,message:"请选择"}]},{input:k((function(){return[x(o,{modelValue:F.value.type,"onUpdate:modelValue":t[0]||(t[0]=function(e){return F.value.type=e}),direction:"horizontal"},{default:k((function(){return[x(n,{name:1},{default:k((function(){return[L("建议")]})),_:1}),x(n,{name:2},{default:k((function(){return[L("问题")]})),_:1})]})),_:1},8,["modelValue"])]})),_:1}),x(a,{modelValue:F.value.feedbackContent,"onUpdate:modelValue":t[1]||(t[1]=function(e){return F.value.feedbackContent=e}),rows:"2",required:"",autosize:"",label:"反馈内容",type:"textarea",placeholder:"请输入",rules:[{required:!0,message:"请输入"}]},null,8,["modelValue"]),(O(!0),w(E,null,_(null===(r=F.value)||void 0===r?void 0:r.feedbackModelDetail,(function(e,t){return O(),w(E,{key:t},["SINGLE"===e.modelType?(O(),q(a,{key:0,name:"radio",label:e.columnName,prop:"feedbackModelDetail[".concat(t,"].value"),rules:[{required:e.required,message:"请选择"}],required:e.required},{input:k((function(){return[x(o,{modelValue:F.value.feedbackModelDetail[t].value,"onUpdate:modelValue":function(e){return F.value.feedbackModelDetail[t].value=e},direction:"horizontal"},{default:k((function(){return[(O(!0),w(E,null,_(F.value.feedbackModelDetail[t].modelOptions,(function(e,t){return O(),q(n,{key:t,name:e},{default:k((function(){return[L(D(e),1)]})),_:2},1032,["name"])})),128))]})),_:2},1032,["modelValue","onUpdate:modelValue"])]})),_:2},1032,["label","prop","rules","required"])):V("",!0),"TEXT"===e.modelType?(O(),q(a,{key:1,modelValue:F.value.feedbackModelDetail[t].value,"onUpdate:modelValue":function(e){return F.value.feedbackModelDetail[t].value=e},label:e.columnName,prop:"feedbackModelDetail[".concat(t,"].value"),rules:[{required:e.required,message:"请输入"}],required:e.required,placeholder:"请输入"},null,8,["modelValue","onUpdate:modelValue","label","prop","rules","required"])):V("",!0),"MULTIPLE"===e.modelType?(O(),q(a,{key:2,name:"checkboxGroup",label:e.columnName,prop:"feedbackModelDetail[".concat(t,"].value"),rules:[{required:e.required,message:"请选择"}],required:e.required},{input:k((function(){return[x(u,{modelValue:F.value.feedbackModelDetail[t].value,"onUpdate:modelValue":function(e){return F.value.feedbackModelDetail[t].value=e},direction:"horizontal",shape:"square"},{default:k((function(){return[(O(!0),w(E,null,_(F.value.feedbackModelDetail[t].modelOptions,(function(e,t){return O(),q(i,{key:t,name:e,style:{"margin-bottom":"2px"}},{default:k((function(){return[L(D(e),1)]})),_:2},1032,["name"])})),128))]})),_:2},1032,["modelValue","onUpdate:modelValue"])]})),_:2},1032,["label","prop","rules","required"])):V("",!0),"FILE"===e.modelType?(O(),q(a,{key:3,name:"uploader",label:e.columnName,prop:"feedbackModelDetail[".concat(t,"].value"),rules:[{required:e.required,message:"请上传"}],required:e.required},{input:k((function(){return[x(l,{modelValue:F.value.feedbackModelDetail[t].value,"onUpdate:modelValue":function(e){return F.value.feedbackModelDetail[t].value=e},"max-count":5,"after-read":function(e){return U(e,F.value.feedbackModelDetail[t].value)},accept:".png,.jpg,.jpeg"},null,8,["modelValue","onUpdate:modelValue","after-read"]),T]})),_:2},1032,["label","prop","rules","required"])):V("",!0)],64)})),128)),V("",!0),M("div",N,[x(c,{block:"",style:{"margin-right":"12px"},size:"small",round:"",onClick:t[3]||(t[3]=function(t){return e.$router.go(-1)})},{default:k((function(){return[L(" 返回 ")]})),_:1}),x(c,{block:"",type:"primary","native-type":"submit",size:"small",round:""},{default:k((function(){return[L(" 提交 ")]})),_:1})])]})),_:1})])}}}))}}}))}();