徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
9.3 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-880db0ac"],{"02f6":function(t,o,e){"use strict";e.r(o);var r=e("2f62"),s=e("c4c8");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,r)}return e}function n(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?a(Object(e),!0).forEach((function(o){l(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function l(t,o,e){return(o=function(t){var o=function(t,o){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,o||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"==i(o)?o:o+""}(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}var c={name:"hotWord",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"热词",slot:"name",minWidth:100},{title:"是否显示",slot:"is_show",minWidth:100},{title:"排序",key:"sort",minWidth:100},{title:"创建时间",key:"add_time",minWidth:130},{title:"操作",slot:"action",fixed:"right",minWidth:120}],hotWordsForm:{page:1,limit:15,name:""},list:[],total:0,modals:!1,form:{name:"",color:"#666",bg_color:"#f5f5f5",border_color:"transparent",sort:0,is_show:1,icon:"",is_search:0},checkSelect:[],modalPic:!1,rules:{name:[{required:!0,message:"请输入热词名称",trigger:"blur"},{min:2,max:6,message:"长度在 2 到 6 个字符",trigger:"blur"}]},isEdit:!1,word_id:0}},components:{uploadPictures:e("b0e7").a},computed:n(n({},Object(r.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{hotSearchs:function(){this.hotWordsForm.page=1,this.list=[],this.getList()},showBnt:function(t){var o=this,e={id:t.id,is_show:t.is_show};Object(s.Bb)(e).then((function(t){o.$Message.success(t.msg)})).catch((function(t){o.$Message.error(t.msg)}))},add:function(){this.modals=!0},modalPicTap:function(){this.modalPic=!0},getPic:function(t){this.modalPic=!1,this.form.icon=t.att_dir},delImage:function(){this.form.icon=""},addWordsConfirm:function(){var t=this;this.$refs.form.validate((function(o){o&&Object(s.t)(t.isEdit?t.word_id:0,t.form).then((function(o){t.$Message.success(o.msg),t.modals=!1,t.cancel(),t.hotWordsForm.page=1,t.getList()})).catch((function(o){t.$Message.error(o.msg)}))}))},cancel:function(){this.form={name:"",color:"#4f4f4f",bg_color:"#f4f4f4",sort:0,is_show:1,icon:"",is_search:0},this.isEdit=!1},getList:function(){var t=this;this.loading=!0,Object(s.v)(this.hotWordsForm).then((function(o){var e=o.data;t.list=e.list,t.total=e.count,t.loading=!1})).catch((function(o){t.loading=!1,t.$Message.error(o.msg)}))},pageChange:function(t){this.hotWordsForm.page=t,this.getList()},edit:function(t){var o=this;this.isEdit=!0,this.word_id=t,Object(s.u)(t).then((function(t){o.form=t.data,o.modals=!0}))},del:function(t,o,e){var r=this,s={title:o,num:e,url:"product/words/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(s).then((function(t){r.$Message.success(t.msg),r.hotWordsForm.page,r.getList()})).catch((function(t){r.$Message.error(t.msg)}))}}},m=(e("29f6"),e("2877")),d=Object(m.a)(c,(function(){var t=this,o=t._self._c;return o("div",[o("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[o("div",{staticClass:"new_card_pd"},[o("Form",{ref:"hotWordsForm",attrs:{model:t.hotWordsForm,"label-width":110,"label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[o("Row",{attrs:{gutter:24,type:"flex",justify:"end"}},[o("Col",{attrs:{span:"24"}},[o("FormItem",{attrs:{label:"搜索:"}},[o("Input",{staticClass:"input-add",attrs:{placeholder:"请输入服务条款、ID"},model:{value:t.hotWordsForm.name,callback:function(o){t.$set(t.hotWordsForm,"name",o)},expression:"hotWordsForm.name"}}),o("Button",{attrs:{type:"primary"},on:{click:t.hotSearchs}},[t._v("查询")])],1)],1)],1)],1)],1)]),o("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[o("Row",{attrs:{type:"flex"}},[o("Col",t._b({},"Col",t.grid,!1),[o("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加热词")])],1)],1),o("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:"name",fn:function(e){var r=e.row;return e.index,[o("div",{staticClass:"words_tag",style:{backgroundColor:r.bg_color,color:r.color,border:r.border_color?"1px solid "+r.border_color:"none"}},[r.icon?o("img",{attrs:{src:r.icon,alt:""}}):t._e(),o("span",[t._v(t._s(r.name))])])]}},{key:"is_show",fn:function(e){var r=e.row;return e.index,[o("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(o){return t.showBnt(r)}},model:{value:r.is_show,callback:function(o){t.$set(r,"is_show",o)},expression:"row.is_show"}},[o("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),o("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(e){var r=e.row,s=e.index;return[o("a",{on:{click:function(o){return t.edit(r.id)}}},[t._v("编辑")]),o("Divider",{attrs:{type:"vertical"}}),o("a",{on:{click:function(o){return t.del(r,"删除热词",s)}}},[t._v("删除")])]}}])}),o("div",{staticClass:"acea-row row-right page"},[o("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.hotWordsForm.limit},on:{"on-change":t.pageChange}})],1)],1),o("Modal",{attrs:{closable:"",title:"添加热词","mask-closable":!1,"z-index":10,width:"560"},on:{"on-cancel":t.cancel,"on-ok":t.addWordsConfirm},model:{value:t.modals,callback:function(o){t.modals=o},expression:"modals"}},[o("div",[o("Form",{ref:"form",attrs:{size:"small",rules:t.rules,model:t.form,"label-width":100}},[o("FormItem",{attrs:{label:"热词名称:",prop:"name"}},[o("Input",{staticClass:"w-420",model:{value:t.form.name,callback:function(o){t.$set(t.form,"name",o)},expression:"form.name"}})],1),o("FormItem",{attrs:{label:"高级设置:"}},[o("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.form.is_search,callback:function(o){t.$set(t.form,"is_search",o)},expression:"form.is_search"}},[o("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),o("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1),t.form.is_search?o("FormItem",{attrs:{label:"字体颜色:"}},[o("ColorPicker",{attrs:{alpha:""},model:{value:t.form.color,callback:function(o){t.$set(t.form,"color",o)},expression:"form.color"}}),o("p",{staticClass:"desc"},[t._v("若未设置颜色,则为默认色")])],1):t._e(),t.form.is_search?o("FormItem",{attrs:{label:"背景颜色:"}},[o("ColorPicker",{attrs:{alpha:""},model:{value:t.form.bg_color,callback:function(o){t.$set(t.form,"bg_color",o)},expression:"form.bg_color"}}),o("p",{staticClass:"desc"},[t._v("若未设置颜色,则为默认色")])],1):t._e(),t.form.is_search?o("FormItem",{attrs:{label:"边框颜色:"}},[o("ColorPicker",{attrs:{alpha:""},model:{value:t.form.border_color,callback:function(o){t.$set(t.form,"border_color",o)},expression:"form.border_color"}}),o("p",{staticClass:"desc"},[t._v("若未设置颜色,则无边框")])],1):t._e(),t.form.is_search?o("FormItem",{attrs:{label:"上传图标"}},[t.form.icon?o("div",{staticClass:"upload-list"},[o("div",{staticClass:"upload-item"},[o("img",{attrs:{src:t.form.icon}}),o("Button",{attrs:{shape:"circle",icon:"ios-close"},on:{click:t.delImage}})],1)]):o("Button",{staticClass:"upload-select",attrs:{type:"dashed",icon:"ios-add"},on:{click:function(o){return t.modalPicTap("dan","image",1)}}}),o("p",{staticClass:"desc"},[t._v("建议尺寸:32px*32px,若未上传则只展示文字")])],1):t._e(),o("FormItem",{attrs:{label:"排序"}},[o("InputNumber",{staticClass:"selWidth",attrs:{min:0,max:999},model:{value:t.form.sort,callback:function(o){t.$set(t.form,"sort",o)},expression:"form.sort"}})],1),o("FormItem",{attrs:{label:"是否开启:"}},[o("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.form.is_show,callback:function(o){t.$set(t.form,"is_show",o)},expression:"form.is_show"}},[o("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),o("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1)],1)]),o("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传图标","mask-closable":!1,"z-index":500},model:{value:t.modalPic,callback:function(o){t.modalPic=o},expression:"modalPic"}},[t.modalPic?o("uploadPictures",{attrs:{isChoice:"单选"},on:{getPic:t.getPic}}):t._e()],1)],1)}),[],!1,null,"5219367d",null);o.default=d.exports},"29f6":function(t,o,e){"use strict";e("c9086")},c9086:function(t,o,e){}}]);