1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65428178"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(t,e,n){var s=r(),i=t-s,c=20,u=0;e="undefined"===typeof e?500:e;var l=function t(){u+=c;var r=Math.easeInOutQuad(u,s,i,e);o(r),u<e?a(t):n&&"function"===typeof n&&n()};l()}},"773d":function(t,e,n){"use strict";n("8367")},8367:function(t,e,n){},"9d64":function(t,e,n){t.exports=n.p+"static/img/logo.ae7b11a3.png"},a459:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"m-container"},[t._m(0),t._v(" "),n("div",{staticClass:"m-core"},[n("save-form",{ref:"searchForm",attrs:{inline:!0,model:t.searchForm},on:{submit:t.search,reset:t.onReSet}},[n("el-form-item",{attrs:{prop:"search"}},[n("el-input",{attrs:{type:"text",clearable:"",placeholder:"问卷编号或名称"},model:{value:t.searchForm.search,callback:function(e){t.$set(t.searchForm,"search",e)},expression:"searchForm.search"}})],1),t._v(" "),n("el-form-item",{attrs:{prop:"status"}},[n("el-select",{attrs:{filterable:"",placeholder:"请选择问卷状态",clearable:""},model:{value:t.searchForm.status,callback:function(e){t.$set(t.searchForm,"status",e)},expression:"searchForm.status"}},[n("el-option",{attrs:{label:"启用",value:1}}),t._v(" "),n("el-option",{attrs:{label:"停用",value:0}})],1)],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"danger","native-type":"submit"}},[t._v("搜索")]),t._v(" "),n("el-button",{attrs:{"native-type":"reset",type:"primary"}},[t._v("重置")])],1)],1),t._v(" "),t.$helpers.permission("/operateManager/questionOperation/create")?n("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(e){return t.onQuestionOperation("create")}}},[t._v("\n 添加问卷\n ")]):t._e(),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"id",label:"问卷编号"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("copy-text",[t._v(t._s(e.row.id))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"title",label:"问卷名称"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("overflow-text",{attrs:{text:t.row.title}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"status",label:"逐题回答"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.commitType?"是":"否")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"status",label:"是否需要登录"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.loginFlag?"是":"否")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"status",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.status?"开启":"关闭")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.$helpers.permission("/operateManager/questionOperation/detail")?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onQuestionOperation("look",e.row)}}},[t._v("详情")]):t._e(),t._v(" "),t.$helpers.permission(e.row.status?"questionnaireTopic/updateStatus/stop":"questionnaireTopic/updateStatus/start")?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onOperation(e.row)}}},[t._v(t._s(e.row.status?"停用":"启用"))]):t._e(),t._v(" "),t.$helpers.permission("questionnaireUserResult/export")?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.exportQuestionnaire(e.row)}}},[t._v("导出")]):t._e(),t._v(" "),t.$helpers.permission("/userAskList")?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.lookAsk(e.row)}}},[t._v("答题详情")]):t._e(),t._v(" "),e.row.status?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.getCode(e.row)}}},[t._v("问卷二维码")]):t._e()]}}])})],1),t._v(" "),n("pagination",{attrs:{sync:"",total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:total":function(e){return t.$set(t.pageInfo,"total",e)},"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1)],1),t._v(" "),n("qr-code",{attrs:{title:"问卷二维码",codeUrl:t.codeUrl},model:{value:t.qrcodeStatus,callback:function(e){t.qrcodeStatus=e},expression:"qrcodeStatus"}})],1)},o=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h2",[n("div",{staticClass:"squrt"}),t._v("\n 问卷管理\n ")])}],r=(n("386d"),n("c7eb")),s=(n("96cf"),n("1da1")),i=n("5530"),c=n("333d"),u=n("641c"),l=n("61f7"),p=n("adb21"),d=n("e3eb"),f=n.n(d),m=n("4328"),b=n.n(m),h=n("a92a"),g={name:"branchSetting",components:{pagination:c["a"],QrCode:u["a"]},data:function(){return{searchForm:{search:null,status:null},tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},organId:null,qrcodeStatus:!1,codeUrl:""}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;Object(h["c"])(Object(i["a"])({rows:this.pageInfo.limit,page:this.pageInfo.page},this.searchForm)).then((function(e){200==e.code&&e.data&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},onQuestionOperation:function(t,e){var n="问卷";"create"==t?n="添加"+n:"update"==t?n="修改"+n:"look"==t&&(n="查看"+n);var a={type:t};"update"!=t&&"look"!=t||(a.id=e.id),this.$router.push({path:"/operateManager/questionOperations",query:a},(function(t){t.meta.title=n}))},onOperation:function(){var t=Object(s["a"])(Object(r["a"])().mark((function t(e,n){var a,o=this;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=e.status?"停用":"启用",this.$confirm("是否".concat(a,"该问卷?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(s["a"])(Object(r["a"])().mark((function t(){var n;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,n=e.status?0:1,t.next=4,Object(h["e"])({topicId:e.id,status:n});case 4:o.$message.success(a+"成功"),o.getList(),t.next=10;break;case 8:t.prev=8,t.t0=t["catch"](0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])}))));case 2:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),search:function(){this.pageInfo.page=1,this.getList()},onReSet:function(){this.$refs["searchForm"].resetFields(),this.search()},lookAsk:function(t){this.$router.push({path:"/operateManager/userAskList",query:{id:t.id,name:t.title,loginFlag:t.loginFlag}})},getCode:function(t){var e=Object(l["e"])();1==t.loginFlag?e+="/#/questionLogin?topicId=".concat(t.id):e+="/#/question?topicId=".concat(t.id),this.codeUrl=e,this.qrcodeStatus=!0},exportQuestionnaire:function(t){Object(p["a"])(this,{url:"/api-web/questionnaireUserResult/export",params:b.a.stringify(f()({topicId:t.id})),fileName:"".concat(t.title,"导出.xls"),method:"post"},"确定导出问卷")}}},v=g,_=(n("773d"),n("2877")),w=Object(_["a"])(v,a,o,!1,null,"f9b04a32",null);e["default"]=w.exports},a92a:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return s})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return u}));var a=n("829b"),o=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/queryPage",params:t,method:"get"})},r=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/getDetail",params:t,method:"get"})},s=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/add",data:t,method:"post"})},i=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/update",data:t,method:"post"})},c=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/updateStatus",data:t,method:"post",requestType:"form"})},u=function(t){return Object(a["a"])({url:"/api-web/questionnaireUserResult/queryResultPage",data:t,params:t,method:"get"})}},adb21:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n("bc3a"),o=n.n(a),r=(n("4328"),n("5f87")),s=n("3908"),i=n("e3eb"),c=n.n(i),u=function(t,e,n,a){var i=e.url,u={method:e.method?e.method:"get",headers:{Authorization:Object(r["b"])(),tenantId:Object(r["a"])()},url:i,responseType:"blob"};"post"==u.method?u.data=e.params:u.params=e.params,t.$confirm(n||"您确定下载模板","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){s["a"].startLoading(),o()(c()(u)).then((function(n){var o=new Blob([n.data],{type:"application/vnd.ms-excel;charset=utf-8"}),r=new Response(o).text();r.then((function(n){if(-1!=n.indexOf("code")){var r=JSON.parse(n);if(403==r.code)return t.$message.error("登录过期,请重新登录!"),void setTimeout((function(){t.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);200==r.code?t.$message.success(r.msg):t.$message.error(r.msg),a&&a()}else{var s=URL.createObjectURL(o),i=document.createElement("a"),c=e.fileName||"导出文件.xls";i.href=s,i.setAttribute("download",c),document.body.appendChild(i),i.click(),a&&a()}})),s["a"].endLoading()})).catch((function(e){console.log(e),t.$message.error("下载失败,请联系管理员"),s["a"].endLoading()}))})).catch((function(){}))}}}]);
|