chunk-b28763d8.0b7587a5.js 6.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b28763d8"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),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 r(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(t,e,n){var i=o(),s=t-i,u=20,c=0;e="undefined"===typeof e?500:e;var l=function t(){c+=u;var o=Math.easeInOutQuad(c,i,s,e);r(o),c<e?a(t):n&&"function"===typeof n&&n()};l()}},"948d":function(t,e,n){"use strict";n("a29a")},a29a:function(t,e,n){},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"},[t.$helpers.permission("/operateManager/questionOperation/create")?n("el-button",{staticClass:"newBand",attrs:{type:"primary"},on:{click:function(e){return t.onQuestionOperation("create")}}},[t._v("添加问卷")]):t._e(),t._v(" "),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(" "),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.status?"开启":"关闭")+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},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("/operateManager/questionOperation/update")&&!e.row.status?n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.onQuestionOperation("update",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)])},r=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h2",[n("div",{staticClass:"squrt"}),t._v("问卷管理\n ")])}],o=(n("386d"),n("96cf"),n("1da1")),i=n("5530"),s=n("333d"),u=n("a92a"),c={name:"branchSetting",components:{pagination:s["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}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;Object(u["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(o["a"])(regeneratorRuntime.mark((function t(e,n){var a,r=this;return regeneratorRuntime.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(o["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.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(u["e"])({topicId:e.id,status:n});case 4:r.$message.success(a+"成功"),r.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()}}},l=c,p=(n("948d"),n("2877")),d=Object(p["a"])(l,a,r,!1,null,"fd68e1a2",null);e["default"]=d.exports},a92a:function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return u}));var a=n("829b"),r=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/queryPage",params:t,method:"get"})},o=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/getDetail",params:t,method:"get"})},i=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/add",data:t,method:"post"})},s=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/update",data:t,method:"post"})},u=function(t){return Object(a["a"])({url:"/api-web/questionnaireTopic/updateStatus",data:t,method:"post",requestType:"form"})}}}]);