chunk-4139.a9e256cf.js 5.9 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4139"],{"8qUG":function(t,e,a){},ADef:function(t,e,a){"use strict";a.r(e);var s=a("14Xm"),l=a.n(s),n=a("QbLZ"),r=a.n(n),i=a("D3Ub"),o=a.n(i),c={data:function(){return{search_form:{name:"",tool_bar_type:"",status:""},options_status:[{value:0,label:"关闭"},{value:1,label:"开启"}],options_type:[{value:0,label:"关键词回复"},{value:1,label:"跳转链接"}],tableData:[],current_page:1,total:1,per_page:1}},created:function(){},mounted:function(){this.getToolbarList(1)},components:{yun_service_side:a("2gMQ").a},methods:{btnEdit:function(t){this.$router.push(this.fun.getUrl("serviceChatToolsEdit",{},{id:t}))},getToolbarList:function(t){var e=this;return o()(l.a.mark(function a(){var s;return l.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,$http.pc_post("plugin/YunChat/toolbarGetList",r()({page:t},e.search_form));case 2:(s=a.sent).result?(e.tableData=s.data.data,e.total=s.data.total,e.per_page=s.data.per_page,e.current_page=s.data.current_page):e.$message.error(s.msg);case 4:case"end":return a.stop()}},a,e)}))()},search:function(t){this.getToolbarList(t)},changeStatus:function(t){var e=this;return o()(l.a.mark(function a(){var s;return l.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,$http.pc_post("plugin/YunChat/toolbarChangeStatus",{id:t});case 2:(s=a.sent).result?e.$message.success(s.msg):e.$message.error(s.msg);case 4:case"end":return a.stop()}},a,e)}))()},btnDel:function(t){var e=this;return o()(l.a.mark(function a(){var s;return l.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,$http.pc_post("plugin/YunChat/toolbarDelete",{id:t});case 2:(s=a.sent).result?(e.$message.success(s.msg),location.reload()):e.$message.error(s.msg);case 4:case"end":return a.stop()}},a,e)}))()}}},u=(a("ypQY"),a("KHd+")),p=Object(u.a)(c,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"all"},[a("yun_service_side",{attrs:{defaultActive:"serviceChatToolsList"}}),t._v(" "),a("div",{staticStyle:{width:"calc(100% - 150px)"},attrs:{id:"app"}},[a("div",{staticClass:"vue-crumbs"},[t._v("\n 在线客服 > 聊天工具栏\n ")]),t._v(" "),a("div",{staticClass:"vue-head"},[a("div",{staticClass:"vue-main-title",staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"vue-main-title-left"}),t._v(" "),a("div",{staticClass:"vue-main-title-content"},[t._v("聊天工具栏")]),t._v(" "),a("div",{staticClass:"vue-main-title-button"},[a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"small"},on:{click:function(e){t.btnEdit("")}}},[t._v("添加")])],1)]),t._v(" "),a("div",{staticClass:"vue-search"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.search_form}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"标题"},model:{value:t.search_form.name,callback:function(e){t.$set(t.search_form,"name",e)},expression:"search_form.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"类型"},model:{value:t.search_form.tool_bar_type,callback:function(e){t.$set(t.search_form,"tool_bar_type",e)},expression:"search_form.tool_bar_type"}},t._l(t.options_type,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"状态"},model:{value:t.search_form.status,callback:function(e){t.$set(t.search_form,"status",e)},expression:"search_form.status"}},t._l(t.options_status,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.search(1)}}},[t._v("搜索")])],1)],1)],1)]),t._v(" "),a("div",{staticClass:"vue-main"},[a("div",{staticClass:"vue-main-title"},[a("div",{staticClass:"vue-main-title-left"}),t._v(" "),a("div",{staticClass:"vue-main-title-content",staticStyle:{display:"contents"}},[t._v("聊天工具栏")]),t._v(" "),a("div",{staticStyle:{"text-align":"left","font-size":"12px",color:"#999","margin-left":"30px"}},[a("span",{staticStyle:{"vertical-align":"sub"}},[t._v("数量:"+t._s(t.total))])])]),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"id",label:"ID",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"display_order",label:"排序",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"type",label:"类型",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0==e.row.type?"关键词回复":"链接跳转"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(a){t.changeStatus(e.row.id)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-edit",staticStyle:{color:"#606266"},on:{click:function(a){t.btnEdit(e.row.id)}}}),t._v(" "),a("i",{staticClass:"el-icon-delete-solid",on:{click:function(a){t.btnDel(e.row.id)}}})]}}])})],1)],1),t._v(" "),t.total>0?a("div",{staticClass:"vue-page"},[a("el-row",[a("el-col",{attrs:{align:"right"}},[a("el-pagination",{attrs:{layout:"prev, pager, next,jumper",total:t.total,"page-size":t.per_page,"current-page":t.current_page,background:""},on:{"current-change":t.search}})],1)],1)],1):t._e()])],1)},[],!1,null,"2631b2dc",null);p.options.__file="chat_toolsList.vue";e.default=p.exports},ypQY:function(t,e,a){"use strict";var s=a("8qUG");a.n(s).a}}]);