chunk-e09b3bea.6a4d73d0.js 5.2 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e09b3bea"],{"626e":function(t,e,n){"use strict";var i=n("6904");n.n(i).a},6904:function(t,e,n){},7991:function(t,e,n){"use strict";n.r(e);var i=n("2f62"),s=n("c4c8");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a={name:"ensure",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"服务条款",key:"name",minWidth:100},{title:"图标",slot:"image",minWidth:100},{title:"内容描述",slot:"desc",minWidth:100},{title:"使用商品",key:"product_count",minWidth:100},{title:"是否显示",slot:"status",minWidth:100},{title:"排序",key:"sort",minWidth:100},{title:"创建时间",key:"add_time",minWidth:130},{title:"操作",slot:"action",fixed:"right",minWidth:120}],ensureFrom:{page:1,limit:15,name:""},list:[],total:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(n,!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{ensureSearchs:function(){this.ensureFrom.page=1,this.list=[],this.getList()},showBnt:function(t){var e=this,n={id:t.id,is_show:t.status};Object(s.n)(n).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))},add:function(){var t=this;this.$modalForm(Object(s.J)()).then((function(){return t.getList()}))},getList:function(){var t=this;this.loading=!0,Object(s.I)(this.ensureFrom).then((function(e){var n=e.data;t.list=n.list,t.total=n.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.ensureFrom.page=t,this.getList()},edit:function(t){var e=this;this.$modalForm(Object(s.K)(t)).then((function(){return e.getList()}))},del:function(t,e,n){var i=this,s={title:e,num:n,url:"product/ensure/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(s).then((function(t){i.$Message.success(t.msg),i.list.splice(n,1),i.list.length||(i.ensureFrom.page=1==i.ensureFrom.page?1:i.ensureFrom.page-1),i.getList()})).catch((function(t){i.$Message.error(t.msg)}))}}},l=(n("626e"),n("2877")),c=Object(l.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[n("div",{staticClass:"new_card_pd"},[n("Form",{ref:"ensureFrom",attrs:{inline:"",model:t.ensureFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{attrs:{gutter:24,type:"flex",justify:"end"}},[n("Col",{attrs:{span:"24"}},[n("FormItem",{attrs:{label:"搜索:"}},[n("Input",{staticClass:"input-add",attrs:{placeholder:"请输入服务条款、ID"},model:{value:t.ensureFrom.name,callback:function(e){t.$set(t.ensureFrom,"name",e)},expression:"ensureFrom.name"}}),n("Button",{attrs:{type:"primary"},on:{click:t.ensureSearchs}},[t._v("查询")])],1)],1)],1)],1)],1)]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Row",{attrs:{type:"flex"}},[n("Col",t._b({},"Col",t.grid,!1),[n("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加保障服务")])],1)],1),n("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.list,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return t.index,[n("viewer",[n("div",{staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})])])]}},{key:"status",fn:function(e){var i=e.row;return e.index,[n("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.showBnt(i)}},model:{value:i.status,callback:function(e){t.$set(i,"status",e)},expression:"row.status"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"desc",fn:function(e){var i=e.row;return e.index,[n("Tooltip",{attrs:{"max-width":"200",placement:"bottom"}},[n("span",{staticClass:"line2"},[t._v(t._s(i.desc))]),n("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(i.desc))])])]}},{key:"action",fn:function(e){var i=e.row,s=e.index;return[n("a",{on:{click:function(e){return t.edit(i.id)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.del(i,"删除保障服务",s)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.ensureFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"65d1fb54",null);e.default=c.exports}}]);