1 |
- webpackJsonp([37],{cZHE:function(t,e){},xaWc:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{loading:!1,page:1,pages:0,total:0,page_size:20,tableData:[],height:""}},created:function(){this.height=document.documentElement.clientHeight-200>400?document.documentElement.clientHeight-200:400,this.init(1)},methods:{welcomeMsg_del:function(t){var e=this;this.$confirm("确定"+(1==t.enable?"禁用":"启用")+"【"+t.name+"】?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$loading(e.$loadingConfig),e.$axios.get(e.URL.BASEURL+e.URL.welcomeMsg_updateStatus,{params:{rule_id:t.rule_id,status:1==t.enable?0:1}}).then(function(t){t=t.data;e.$loading(e.$loadingConfig).close(),t&&0==t.errno?(e.$message({message:"操作成功!",type:"success"}),e.init(1)):e.$message({message:t.err,type:"warning"})}).catch(function(){e.$loading(e.$loadingConfig).close()})}).catch(function(){})},goDetail:function(t){this.$router.push({path:"/welcom_message_edit/"+t})},createWelcom:function(){this.$router.push({path:"/welcom_message_create"})},init:function(t){var e=this;this.page=t||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.welcomeMsg_lists,{params:{page:this.page,page_size:this.page_size}}).then(function(t){t=t.data;e.loading=!1,t&&0==t.errno?(e.tableData=t.rst.data,e.total=t.rst.pageInfo.total,e.pages=t.rst.pageInfo.pages):4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.loading=!1})},handleCurrentChange:function(t){this.init(t)}}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"tableInfo"},[a("div",[a("div",{staticClass:"flex"},[a("div",{staticClass:"totalCustom"},[t._v("\n 共有"),a("span",[t._v(t._s(t.total))]),t._v("条欢迎语\n ")])])]),t._v(" "),a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.createWelcom}},[t._v("新建欢迎语")])],1)]),t._v(" "),a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:t.height,data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"欢迎语标题","show-overflow-tooltip":"",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"创建人",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"customerServiceTagBox"},[a("div",{staticClass:"creator"},[t._v("\n "+t._s(e.row.creator)+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"使用成员",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.is_for_all?a("div",[t._v("全部员工")]):[a("div",{staticClass:"customerServiceTagBox biaoqian"},t._l(e.row.user_list,function(e){return a("div",{key:e,staticClass:"customerServiceTag"},[a("i",{staticClass:"el-icon-s-custom"}),t._v("\n "+t._s(e)+"\n ")])}),0)]]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"updated_at",label:"更新时间","show-overflow-tooltip":"",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"创建时间","show-overflow-tooltip":"",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"是否可用","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(0==e.row.enable?"否":"是"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"flex",staticStyle:{"justify-content":"center"}},[a("div",{class:["pointer",1==e.row.enable?"c-FF604D":"c-007AFF"],staticStyle:{margin:"0 6px"},on:{click:function(a){return t.welcomeMsg_del(e.row)}}},[t._v("\n "+t._s(1==e.row.enable?"禁用":"启用")+"\n ")]),t._v(" "),a("div",{staticClass:"c-00B38A pointer",staticStyle:{margin:"0 6px"},on:{click:function(a){return t.goDetail(e.row.rule_id)}}},[t._v("\n 编辑\n ")])])]}}])})],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var s=a("VU/8")(n,i,!1,function(t){a("cZHE")},"data-v-f566f5d2",null);e.default=s.exports}});
|