chunk-09f53fd8.5ff6d749.js 15 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-09f53fd8"],{"0353":function(t,e,n){"use strict";var i=n("6bf8"),a=RegExp.prototype.exec,r=String.prototype.replace,o=a,l="lastIndex",s=function(){var t=/a/,e=/b*/g;return a.call(t,"a"),a.call(e,"a"),0!==t[l]||0!==e[l]}(),c=void 0!==/()??/.exec("")[1],u=s||c;u&&(o=function(t){var e,n,o,u,d=this;return c&&(n=new RegExp("^"+d.source+"$(?!\\s)",i.call(d))),s&&(e=d[l]),o=a.call(d,t),s&&o&&(d[l]=d.global?o.index+o[0].length:e),c&&o&&o.length>1&&r.call(o[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o}),t.exports=o},"0e97":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[t._m(0),n("div",{staticClass:"content"},[n("div",{staticClass:"download-all",staticStyle:{display:"inline-block",float:"right"}},[n("el-button",{attrs:{type:"primary",icon:"el-icon-download",size:"mini"},on:{click:t.downloadAll}},[t._v("导出excel")])],1),t._l(t.results,(function(e,i){return n("div",{key:i,staticClass:"item"},[n("div",{staticClass:"item-title"},[n("span",{staticClass:"title-num"},[t._v("第"+t._s(i+1)+"题:")]),n("span",{staticClass:"title-header"},[t._v(t._s(e.label))]),n("span",{staticClass:"title-type"},[t._v(t._s(t._f("getType")(e.type)))]),n("span",{staticClass:"title-download",on:{click:function(n){return t.downloadItem(e)}}},[t._v("导出Excel")])]),"input"==e.type||"textarea"==e.type?n("div",{staticClass:"item-content"},[t._v("\n 【答案】:"),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(n){return t.showItemResult(e)}}},[t._v("查看详情")])],1):t._e(),"radio"==e.type||"checkbox"==e.type?n("div",{staticClass:"item-content"},[n("el-table",{attrs:{data:e.items,border:""}},[n("el-table-column",{attrs:{prop:"label",label:"选项"}}),n("el-table-column",{attrs:{prop:"times",label:"次数"}}),n("el-table-column",{attrs:{prop:"sale",label:"比例"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("el-progress",{attrs:{percentage:t.row.sale}})]}}],null,!0)})],1),n("div",{staticStyle:{width:"500px",height:"250px"},attrs:{id:"chartPie"+i}}),n("div",{staticStyle:{width:"500px",height:"250px"},attrs:{id:"chartBar"+i}})],1):t._e()])}))],2),n("el-dialog",{attrs:{title:t.dialogTitle,"close-on-click-modal":!1,visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{staticClass:"content"},[n("div",{staticClass:"filter"},[n("el-form",{attrs:{size:"small","label-width":"70px",inline:!0,"label-position":"left"}},[n("el-form-item",{attrs:{label:""}},[n("el-input",{attrs:{clearable:"",placeholder:"请输入标题"},on:{clear:t.search},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search(e)}},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("搜索")])],1),n("el-form-item",{staticStyle:{float:"right"}},[n("el-button",{attrs:{type:"primary",icon:"el-icon-download",size:"mini"},on:{click:function(e){return t.downloadItem(t.cur_item)}}},[t._v("导出excel")])],1)],1)],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.analyseDataList,height:"50vh",border:"","default-expand-all":"","row-key":"id"}},[n("el-table-column",{attrs:{label:"序号",type:"index",width:"50",align:"center"}}),t._l(this.headers,(function(t,e){return n("el-table-column",{key:e,attrs:{prop:t,label:t}})}))],2),n("Page",{ref:"pageButton",attrs:{current:t.form.page,page_size:t.form.page_size,total:t.total},on:{pageChange:t.gopage}})],1)])],1)},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[n("span",[t._v("信息管理>")]),t._v("问卷统计")])}],r=n("28f8"),o=(n("3441"),n("1bc78"),n("32ea"),n("fc02"),n("9973")),l=(n("4d28"),{components:{Page:o["a"]},data:function(){return{form:{},total:1,loading:!1,results:[],dialogTitle:"",dialogVisible:!1,analyseDataList:[],headers:[],cur_item:null}},filters:{getType:function(t){return"input"==t|"textarea"==t?"【填空题】":"radio"==t?"【单选题】":"checkbox"==t?"【多选题】":void 0}},methods:{gopage:function(t){t&&(this.form.page_size=t),this.form.page=this.$refs.pageButton.page,this.showItemResult()},downloadAll:function(){var t=this,e=this.$route.query.id,n=this.$route.query.type;this.$api.downloadAnalyseAll({message_id:e,type:n}).then((function(e){var n=document.createElement("a"),i=new Blob([e.data],{type:"application/vnd.ms-excel,charset=UTF-8"}),a=URL.createObjectURL(i),r=decodeURIComponent(e.headers["content-disposition"].split("=")[1]);console.log(r),n.download=r,n.style.display="none",n.href=a,document.body.appendChild(n),n.click(),document.body.removeChild(n),t.download_loading=!1}))},downloadItem:function(t){var e=this,n=this.$route.query.id,i=this.$route.query.type;this.$api.downloadAnalyseItem({message_id:n,type:i,item:t.label}).then((function(t){var n=document.createElement("a"),i=new Blob([t.data],{type:"application/vnd.ms-excel,charset=UTF-8"}),a=URL.createObjectURL(i),r=decodeURIComponent(t.headers["content-disposition"].split("=")[1]);console.log(r),n.download=r,n.style.display="none",n.href=a,document.body.appendChild(n),n.click(),document.body.removeChild(n),e.download_loading=!1}))},showItemResult:function(t){var e=this;this.dialogTitle='"'+t.label+'"答案详情';var n=this.$route.query.id,i=this.$route.query.type,a=this.form;a.message_id=n,a.type=i,a.item=t.label,this.$api.showAnalyseItem(a).then((function(t){var n=t.data.data;e.headers=Object.keys(n[0]),e.analyseDataList=n})),this.dialogVisible=!0,this.cur_item=t},search:function(){var t=this,e=this.cur_item,n=this.form,i=this.$route.query.id,a=this.$route.query.type;n.message_id=i,n.type=a,n.item=e.label,this.$api.showAnalyseItem(n).then((function(e){var n=e.data.data;t.headers=Object.keys(n[0]),t.analyseDataList=n}))},getData:function(){var t=this,e=this.$route.query.id,n=this.$route.query.type;this.$api.getMessageSurveyQuestionAnalyse({id:e,type:n}).then((function(e){t.results=e.data.data,t.results.forEach((function(e,n){t.$nextTick((function(){this.getEcharts(e,n)}))}))}))},getEcharts:function(t,e){var n,i=this.$echarts.init(document.getElementById("chartBar".concat(e))),a=this.$echarts.init(document.getElementById("chartPie".concat(e))),o=[],l=[],s=[],c=["#9379ff","#62A2FF","#FFD053","#FF9F41","#FF542C","#FE8463","#9BCA63","#FAD860","#F3A43B","#60C0DD","#D7504B","#C6E579","#F4E001","#F0805A","#26C0C0"],u=[];t.items.forEach((function(t,e){o.push({name:t.label,value:t.times,color:c[e],itemStyle:{normal:{label:{show:!0,color:c[e]},labelLine:{show:!0,color:c[e]}}}}),l.push(t.label),s.push({sale:t.sale,value:t.times,itemStyle:{color:c[e]}})})),o=o.filter((function(t){return 0!=t.value})),o.forEach((function(t,e){u.push(t.color)}));var d={title:{subtext:"填报次数"},color:["#5066FF"],tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"2%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:l,axisTick:{alignWithLabel:!0},axisLine:{lineStyle:{color:"#D4D8EE",width:2,type:"dotted"}},axisLabel:{formatter:function(t,e){var n=t.substring(0,6)+"...";return t.length>10?n:t},textStyle:{color:"#999999",fontSize:12},align:"center"}}],yAxis:[{type:"value",boundaryGap:["0%","20%"],axisTick:{show:!1},minInterval:1,axisLine:{show:!1},axisLabel:{show:!0,textStyle:{color:"#666666",fontSize:14}},splitLine:{show:!0,lineStyle:{type:"dashed"}}}],series:[{name:"次数",type:"bar",barWidth:"30px",data:s,itemStyle:{normal:{barBorderRadius:[10,10,10,10],label:{show:!0,position:"top",formatter:function(t){return t.data.sale?t.data.sale+"%":"0%"}}}}}]},p={color:u,tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},series:[(n={name:"访问来源",type:"pie",radius:"65%",data:o.sort((function(t,e){return t.value-e.value}))},Object(r["a"])(n,"data",o.sort((function(t,e){return t.value-e.value}))),Object(r["a"])(n,"animationType","scale"),Object(r["a"])(n,"animationEasing","elasticOut"),Object(r["a"])(n,"animationDelay",(function(t){return 200*Math.random()})),n)]};i.setOption(d),a.setOption(p)}},mounted:function(){var t=this;this.results.forEach((function(e,n){t.$nextTick((function(){this.getEcharts(e,n)}))}))},created:function(){this.getData()}}),s=l,c=(n("e674"),n("5d22")),u=Object(c["a"])(s,i,a,!1,null,null,null);e["default"]=u.exports},"129d":function(t,e,n){"use strict";n("a210")},1663:function(t,e,n){var i=n("212e"),a=n("3ab0");t.exports=function(t){return function(e,n){var r,o,l=String(a(e)),s=i(n),c=l.length;return s<0||s>=c?t?"":void 0:(r=l.charCodeAt(s),r<55296||r>56319||s+1===c||(o=l.charCodeAt(s+1))<56320||o>57343?t?l.charAt(s):r:t?l.slice(s,s+2):o-56320+(r-55296<<10)+65536)}}},"1bc78":function(t,e,n){for(var i=n("25ba"),a=n("93ca"),r=n("84e8"),o=n("0b34"),l=n("065d"),s=n("953d"),c=n("839a"),u=c("iterator"),d=c("toStringTag"),p=s.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=a(f),g=0;g<h.length;g++){var m,v=h[g],y=f[v],b=o[v],x=b&&b.prototype;if(x&&(x[u]||l(x,u,p),x[d]||l(x,d,v),s[v]=p,y))for(m in i)x[m]||r(x,m,i[m],!0)}},"28f8":function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return i}))},"32ea":function(t,e,n){var i=n("8078"),a=n("93ca");n("b2be")("keys",(function(){return function(t){return a(i(t))}}))},3441:function(t,e,n){"use strict";var i=n("e99b"),a=n("3250"),r=n("8078"),o=n("0926"),l=[].sort,s=[1,2,3];i(i.P+i.F*(o((function(){s.sort(void 0)}))||!o((function(){s.sort(null)}))||!n("95b6")(l)),"Array",{sort:function(t){return void 0===t?l.call(r(this)):l.call(r(this),a(t))}})},"43ec":function(t,e,n){"use strict";var i=n("1663")(!0);t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},"6bf8":function(t,e,n){"use strict";var i=n("a86f");t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"804d":function(t,e,n){var i=n("9cff"),a=n("cea2"),r=n("839a")("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[r])?!!e:"RegExp"==a(t))}},"95b6":function(t,e,n){"use strict";var i=n("0926");t.exports=function(t,e){return!!t&&i((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},9973:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-pagination",{attrs:{background:"","page-size":t.page_size?t.page_size:20,"current-page":t.current,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"total,sizes,prev, pager, next",total:t.total},on:{"current-change":t.getData,"size-change":t.handleSizeChange}})},a=[],r={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(t){this.page=t,this.$emit("pageChange")},handleSizeChange:function(t){this.$emit("pageChange",t)}},created:function(){}},o=r,l=(n("129d"),n("5d22")),s=Object(l["a"])(o,i,a,!1,null,null,null);e["a"]=s.exports},a210:function(t,e,n){},abef:function(t,e,n){},b2be:function(t,e,n){var i=n("e99b"),a=n("76e3"),r=n("0926");t.exports=function(t,e){var n=(a.Object||{})[t]||Object[t],o={};o[t]=e(n),i(i.S+i.F*r((function(){n(1)})),"Object",o)}},bf73:function(t,e,n){"use strict";var i=n("0353");n("e99b")({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},c46f:function(t,e,n){"use strict";n("bf73");var i=n("84e8"),a=n("065d"),r=n("0926"),o=n("3ab0"),l=n("839a"),s=n("0353"),c=l("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=l(t),f=!r((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=f?!r((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!e})):void 0;if(!f||!h||"replace"===t&&!u||"split"===t&&!d){var g=/./[p],m=n(o,p,""[t],(function(t,e,n,i,a){return e.exec===s?f&&!a?{done:!0,value:g.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}})),v=m[0],y=m[1];i(String.prototype,t,v),a(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},e674:function(t,e,n){"use strict";n("abef")},f417:function(t,e,n){"use strict";var i=n("d445"),a=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var r=n.call(t,e);if("object"!==typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==i(t))throw new TypeError("RegExp#exec called on incompatible receiver");return a.call(t,e)}},fc02:function(t,e,n){"use strict";var i=n("804d"),a=n("a86f"),r=n("1b0b"),o=n("43ec"),l=n("201c"),s=n("f417"),c=n("0353"),u=n("0926"),d=Math.min,p=[].push,f="split",h="length",g="lastIndex",m=4294967295,v=!u((function(){RegExp(m,"y")}));n("c46f")("split",2,(function(t,e,n,u){var y;return y="c"=="abbc"[f](/(b)*/)[1]||4!="test"[f](/(?:)/,-1)[h]||2!="ab"[f](/(?:ab)*/)[h]||4!="."[f](/(.?)(.?)/)[h]||"."[f](/()()/)[h]>1||""[f](/.?/)[h]?function(t,e){var a=String(this);if(void 0===t&&0===e)return[];if(!i(t))return n.call(a,t,e);var r,o,l,s=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,f=void 0===e?m:e>>>0,v=new RegExp(t.source,u+"g");while(r=c.call(v,a)){if(o=v[g],o>d&&(s.push(a.slice(d,r.index)),r[h]>1&&r.index<a[h]&&p.apply(s,r.slice(1)),l=r[0][h],d=o,s[h]>=f))break;v[g]===r.index&&v[g]++}return d===a[h]?!l&&v.test("")||s.push(""):s.push(a.slice(d)),s[h]>f?s.slice(0,f):s}:"0"[f](void 0,0)[h]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,i){var a=t(this),r=void 0==n?void 0:n[e];return void 0!==r?r.call(n,a,i):y.call(String(a),n,i)},function(t,e){var i=u(y,t,this,e,y!==n);if(i.done)return i.value;var c=a(t),p=String(this),f=r(c,RegExp),h=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(v?"y":"g"),b=new f(v?c:"^(?:"+c.source+")",g),x=void 0===e?m:e>>>0;if(0===x)return[];if(0===p.length)return null===s(b,p)?[p]:[];var w=0,S=0,_=[];while(S<p.length){b.lastIndex=v?S:0;var C,L=s(b,v?p:p.slice(S));if(null===L||(C=d(l(b.lastIndex+(v?0:S)),p.length))===w)S=o(p,S,h);else{if(_.push(p.slice(w,S)),_.length===x)return _;for(var k=1;k<=L.length-1;k++)if(_.push(L[k]),_.length===x)return _;S=w=C}}return _.push(p.slice(w)),_}]}))}}]);
  2. //# sourceMappingURL=chunk-09f53fd8.5ff6d749.js.map