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 line
8.7 KiB
1 line
8.7 KiB
4 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-eb4cffc4"],{"02f6":function(t,o,e){"use strict";e.r(o);var s=e("2f62"),r=e("c4c8");function a(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);o&&(s=s.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,s)}return e}function i(t,o,e){return o in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}var l={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:function(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?a(e,!0).forEach((function(o){i(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(e).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}({},Object(s.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(r.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(r.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(r.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(r.u)(t).then((function(t){o.form=t.data,o.modals=!0}))},del:function(t,o,e){var s=this,r={title:o,num:e,url:"product/words/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(r).then((function(t){s.$Message.success(t.msg),s.hotWordsForm.page,s.getList()})).catch((function(t){s.$Message.error(t.msg)}))}}},n=(e("0f02"),e("2877")),c=Object(n.a)(l,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"hotWordsForm",attrs:{model:t.hotWordsForm,"label-width":110,"label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{attrs:{gutter:24,type:"flex",justify:"end"}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"搜索:"}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入服务条款、ID"},model:{value:t.hotWordsForm.name,callback:function(o){t.$set(t.hotWordsForm,"name",o)},expression:"hotWordsForm.name"}}),e("Button",{attrs:{type:"primary"},on:{click:t.hotSearchs}},[t._v("查询")])],1)],1)],1)]
|