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
16 KiB
1 lines
16 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e57a5"],{"953f":function(e,t,i){"use strict";i.r(t);var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[i("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.creditGoodsCategory.name")},model:{value:e.queryParams.model.name,callback:function(t){e.$set(e.queryParams.model,"name",t)},expression:"queryParams.model.name"}}),i("el-date-picker",{staticClass:"filter-item search-item date-range-item",attrs:{"range-separator":null,"end-placeholder":"结束日期",format:"yyyy-MM-dd HH:mm:ss","start-placeholder":"开始日期",type:"daterange","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.queryParams.timeRange,callback:function(t){e.$set(e.queryParams,"timeRange",t)},expression:"queryParams.timeRange"}}),i("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.search}},[e._v(" "+e._s(e.$t("table.search"))+" ")]),i("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"warning"},on:{click:e.reset}},[e._v(" "+e._s(e.$t("table.reset"))+" ")]),i("el-button",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoodsCategory:add"],expression:"['creditGoodsCategory:add']"}],staticClass:"filter-item",attrs:{plain:"",type:"danger"},on:{click:e.add}},[e._v(" "+e._s(e.$t("table.add"))+" ")]),i("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["creditGoodsCategory:delete","creditGoodsCategory:export","creditGoodsCategory:import"],expression:"['creditGoodsCategory:delete', 'creditGoodsCategory:export',\n 'creditGoodsCategory:import']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[i("el-button",[e._v(" "+e._s(e.$t("table.more"))),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoodsCategory:delete"],expression:"['creditGoodsCategory:delete']"}],nativeOn:{click:function(t){return e.batchDelete(t)}}},[e._v(" "+e._s(e.$t("table.delete"))+" ")]),i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoodsCategory:export"],expression:"['creditGoodsCategory:export']"}],nativeOn:{click:function(t){return e.exportExcel(t)}}},[e._v(" "+e._s(e.$t("table.export"))+" ")]),i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoodsCategory:export"],expression:"['creditGoodsCategory:export']"}],nativeOn:{click:function(t){return e.exportExcelPreview(t)}}},[e._v(" "+e._s(e.$t("table.exportPreview"))+" ")]),i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoodsCategory:import"],expression:"['creditGoodsCategory:import']"}],nativeOn:{click:function(t){return e.importExcel(t)}}},[e._v(" "+e._s(e.$t("table.import"))+" ")])],1)],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:e.tableKey,ref:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData.records,border:"",fit:"","row-key":"id"},on:{"cell-click":e.cellClick,"filter-change":e.filterChange,"selection-change":e.onSelectChange,"sort-change":e.sortChange}},[i("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),i("el-table-column",{attrs:{label:e.$t("table.creditGoodsCategory.parentId"),"show-overflow-tooltip":!0,align:"center",prop:"parentId",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.parentId))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoodsCategory.name"),"show-overflow-tooltip":!0,align:"center",prop:"name",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.name))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoodsCategory.miniShow"),"show-overflow-tooltip":!0,align:"center",prop:"miniShow",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.miniShow))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoodsCategory.sortOrder"),"show-overflow-tooltip":!0,align:"center",prop:"sortOrder",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.sortOrder))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoodsCategory.isDelete"),"show-overflow-tooltip":!0,align:"center",prop:"isDelete",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.isDelete))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.createTime"),align:"center",prop:"createTime",sortable:"custom",width:"170px"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.createTime))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.operation"),align:"center","column-key":"operation","class-name":"small-padding fixed-width",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[i("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditGoodsCategory:add"],expression:"['creditGoodsCategory:add']"}],staticClass:"el-icon-copy-document table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.copy(s)}}}),i("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditGoodsCategory:update"],expression:"['creditGoodsCategory:update']"}],staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.edit(s)}}}),i("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditGoodsCategory:delete"],expression:"['creditGoodsCategory:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.singleDelete(s)}}}),i("el-link",{directives:[{name:"has-no-permission",rawName:"v-has-no-permission",value:["creditGoodsCategory:update","creditGoodsCategory:copy","creditGoodsCategory:delete"],expression:"['creditGoodsCategory:update', 'creditGoodsCategory:copy', 'creditGoodsCategory:delete']"}],staticClass:"no-perm"},[e._v(" "+e._s(e.$t("tips.noPermission"))+" ")])]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:e.queryParams.size,page:e.queryParams.current,total:Number(e.tableData.total)},on:{"update:limit":function(t){return e.$set(e.queryParams,"size",t)},"update:page":function(t){return e.$set(e.queryParams,"current",t)},pagination:e.fetch}}),i("creditGoodsCategory-edit",{ref:"edit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type},on:{close:e.editClose,success:e.editSuccess}}),i("creditGoodsCategory-import",{ref:"import",attrs:{"dialog-visible":e.fileImport.isVisible,type:e.fileImport.type,action:e.fileImport.action,accept:".xls,.xlsx"},on:{close:e.importClose,success:e.importSuccess}}),i("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:"预览",width:"80%",top:"50px",visible:e.preview.isVisible},on:{"update:visible":function(t){return e.$set(e.preview,"isVisible",t)}}},[i("el-scrollbar",[i("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},o=[],a=(i("4160"),i("caad"),i("d81d"),i("d3b7"),i("ac1f"),i("2532"),i("841c"),i("1276"),i("159b"),i("5530")),r=i("333d"),n=i("a888"),l=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:e.title,type:e.type,visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[i("el-form",{ref:"form",attrs:{model:e.creditGoodsCategory,rules:e.rules,"label-position":"right","label-width":"100px"}},[i("el-form-item",{attrs:{label:e.$t("table.creditGoodsCategory.name"),prop:"name"}},[i("el-input",{attrs:{type:"",placeholder:"分类名"},model:{value:e.creditGoodsCategory.name,callback:function(t){e.$set(e.creditGoodsCategory,"name",t)},expression:"creditGoodsCategory.name"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoodsCategory.miniShow"),prop:"miniShow"}},[i("el-input",{attrs:{type:"",placeholder:"小程序是否显示:1-显示,0-不显示"},model:{value:e.creditGoodsCategory.miniShow,callback:function(t){e.$set(e.creditGoodsCategory,"miniShow",t)},expression:"creditGoodsCategory.miniShow"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoodsCategory.sortOrder"),prop:"sortOrder"}},[i("el-input",{attrs:{type:"",placeholder:"显示顺序"},model:{value:e.creditGoodsCategory.sortOrder,callback:function(t){e.$set(e.creditGoodsCategory,"sortOrder",t)},expression:"creditGoodsCategory.sortOrder"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoodsCategory.isDelete"),prop:"isDelete"}},[i("el-input",{attrs:{type:"",placeholder:"逻辑删除:1-删除 0-未删除"},model:{value:e.creditGoodsCategory.isDelete,callback:function(t){e.$set(e.creditGoodsCategory,"isDelete",t)},expression:"creditGoodsCategory.isDelete"}})],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),i("el-button",{attrs:{disabled:e.confirmDisabled,plain:"",type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("common.confirm"))+" ")])],1)],1)},c=[],d=i("29fa"),m={name:"CreditGoodsCategoryEdit",directives:{elDragDialog:n["a"]},components:{},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){return{confirmDisabled:!1,creditGoodsCategory:this.initCreditGoodsCategory(),screenWidth:0,width:this.initWidth(),rules:{},enums:{},dicts:{}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return this.$t("common."+this.type)}},watch:{},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{initCreditGoodsCategory:function(){return{id:"",parentId:0,name:"",miniShow:null,sortOrder:null,isDelete:null}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},setCreditGoodsCategory:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this;t.dicts=e["dicts"],t.enums=e["enums"],e["row"]&&(t.creditGoodsCategory=Object(a["a"])({},e["row"]))},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.confirmDisabled=!1,this.creditGoodsCategory=this.initCreditGoodsCategory()},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.editSubmit()}))},editSubmit:function(){var e=this;"edit"===e.type?e.update():e.save()},save:function(){var e=this;e.confirmDisabled=!0,d["a"].save(this.creditGoodsCategory).then((function(t){var i=t.data;i.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.$emit("success"))})).finally((function(){return e.confirmDisabled=!1}))},update:function(){var e=this,t=this;t.confirmDisabled=!0,d["a"].update(this.creditGoodsCategory).then((function(i){var s=i.data;s.isSuccess&&(t.isVisible=!1,t.$message({message:e.$t("tips.updateSuccess"),type:"success"}),t.$emit("success"))})).finally((function(){return t.confirmDisabled=!1}))}}},u=m,p=i("2877"),h=Object(p["a"])(u,l,c,!1,null,"0b1d53e5",null),f=h.exports,y=i("6188"),g=(i("fa7d"),i("1771")),b={name:"CreditGoodsCategoryManage",directives:{elDragDialog:n["a"]},components:{Pagination:r["a"],CreditGoodsCategoryEdit:f,CreditGoodsCategoryImport:y["a"]},filters:{},data:function(){return{dialog:{isVisible:!1,type:"add"},preview:{isVisible:!1,context:""},fileImport:{isVisible:!1,type:"import",action:"".concat("/api","/creditGoodsCategory/import")},tableKey:0,queryParams:Object(g["e"])(),selection:[],loading:!1,tableData:{total:0},enums:{},dicts:{}}},computed:{},watch:{},mounted:function(){this.fetch();var e=[],t=[];Object(g["f"])(e,this.enums,"store"),Object(g["b"])(t,this.dicts)},methods:{editClose:function(){this.dialog.isVisible=!1},editSuccess:function(){this.search()},onSelectChange:function(e){this.selection=e},search:function(){this.fetch(Object(a["a"])({},this.queryParams))},reset:function(){this.queryParams=Object(g["e"])(),this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},exportExcelPreview:function(){var e=this;this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出数据",d["a"].preview(this.queryParams).then((function(t){var i=t.data;e.preview.isVisible=!0,e.preview.context=i.data}))},exportExcel:function(){this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出数据",d["a"].export(this.queryParams).then((function(e){Object(g["a"])(e)}))},importExcel:function(){this.fileImport.type="upload",this.fileImport.isVisible=!0,this.$refs.import.setModel(!1)},importSuccess:function(){this.search()},importClose:function(){this.fileImport.isVisible=!1},singleDelete:function(e){this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(e,!0),this.batchDelete()},batchDelete:function(){var e=this;this.selection.length?this.$confirm(this.$t("tips.confirmDelete"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){var t=e.selection.map((function(e){return e.id}));e.delete(t)})).catch((function(){e.clearSelections()})):this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(e){var t=this;d["a"].delete({ids:e}).then((function(e){var i=e.data;i.isSuccess&&(t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.search())}))},add:function(){this.dialog.type="add",this.dialog.isVisible=!0,this.$refs.edit.setCreditGoodsCategory({enums:this.enums,dicts:this.dicts})},copy:function(e){this.$refs.edit.setCreditGoodsCategory({row:e,enums:this.enums,dicts:this.dicts}),this.dialog.type="copy",this.dialog.isVisible=!0},edit:function(e){this.$refs.edit.setCreditGoodsCategory({row:e,enums:this.enums,dicts:this.dicts}),this.dialog.type="edit",this.dialog.isVisible=!0},fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.current=t.current?t.current:this.queryParams.current,this.queryParams.size=t.size?t.size:this.queryParams.size,d["a"].page(this.queryParams).then((function(t){var i=t.data;i.isSuccess&&(e.tableData=i.data)})).finally((function(){return e.loading=!1}))},sortChange:function(e){this.queryParams.sort=e.prop,this.queryParams.order=e.order,this.queryParams.sort&&this.search()},filterChange:function(e){for(var t in e)if(t.includes(".")){var i={};i[t.split(".")[1]]=e[t][0],this.queryParams.model[t.split(".")[0]]=i}else this.queryParams.model[t]=e[t][0];this.search()},cellClick:function(e,t){var i=this;if("operation"!==t["columnKey"]){var s=!1;this.selection.forEach((function(t){t.id===e.id&&(s=!0,i.$refs.table.toggleRowSelection(e))})),s||this.$refs.table.toggleRowSelection(e,!0)}}}},v=b,C=Object(p["a"])(v,s,o,!1,null,"148f71d9",null);t["default"]=C.exports}}]); |