FastBee/docker/data/nginx/vue/static/js/chunk-e49dc704.b132606c.js
2025-07-07 09:21:15 +08:00

1 line
8.8 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e49dc704"],{"1cfd0":function(e,t,a){"use strict";a.d(t,"d",(function(){return n})),a.d(t,"e",(function(){return o})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return s})),a.d(t,"f",(function(){return l})),a.d(t,"b",(function(){return c}));var r=a("b775");function n(e){return Object(r["a"])({url:"/iot/newsCategory/list",method:"get",params:e})}function o(){return Object(r["a"])({url:"/iot/newsCategory/newsCategoryShortList",method:"get"})}function i(e){return Object(r["a"])({url:"/iot/newsCategory/"+e,method:"get"})}function s(e){return Object(r["a"])({url:"/iot/newsCategory",method:"post",data:e})}function l(e){return Object(r["a"])({url:"/iot/newsCategory",method:"put",data:e})}function c(e){return Object(r["a"])({url:"/iot/newsCategory/"+e,method:"delete"})}},"8e60":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:"分类名称",prop:"categoryName"}},[a("el-input",{attrs:{placeholder:"请输入分类名称",clearable:"",size:"small"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.categoryName,callback:function(t){e.$set(e.queryParams,"categoryName",t)},expression:"queryParams.categoryName"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:add"],expression:"['iot:newsCategory:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:edit"],expression:"['iot:newsCategory:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:remove"],expression:"['iot:newsCategory:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:export"],expression:"['iot:newsCategory:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),a("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.categoryList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{label:"分类编号",align:"center",prop:"categoryId"}}),a("el-table-column",{attrs:{label:"分类名称",align:"center",prop:"categoryName"}}),a("el-table-column",{attrs:{label:"显示顺序",align:"center",prop:"orderNum"}}),a("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.createTime,"{y}-{m}-{d}")))])]}}])}),a("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark","min-width":"200","header-align":"center"}}),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:query"],expression:"['iot:newsCategory:query']"}],attrs:{size:"mini",type:"text",icon:"el-icon-view"},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v("查看")]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:remove"],expression:"['iot:newsCategory:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"分类名称",prop:"categoryName"}},[a("el-input",{attrs:{placeholder:"请输入分类名称"},model:{value:e.form.categoryName,callback:function(t){e.$set(e.form,"categoryName",t)},expression:"form.categoryName"}})],1),a("el-form-item",{attrs:{label:"显示顺序",prop:"orderNum"}},[a("el-input",{attrs:{placeholder:"请输入显示顺序"},model:{value:e.form.orderNum,callback:function(t){e.$set(e.form,"orderNum",t)},expression:"form.orderNum"}})],1),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:edit"],expression:"['iot:newsCategory:edit']"},{name:"show",rawName:"v-show",value:e.form.categoryId,expression:"form.categoryId"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("修 改")]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:newsCategory:add"],expression:"['iot:newsCategory:add']"},{name:"show",rawName:"v-show",value:!e.form.categoryId,expression:"!form.categoryId"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("新 增")]),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},n=[],o=a("5530"),i=(a("d81d"),a("1cfd0")),s={name:"Category",data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,categoryList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,categoryName:null},form:{},rules:{categoryName:[{required:!0,message:"分类名字不能为空",trigger:"blur"}],orderNum:[{required:!0,message:"显示顺序不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(i["d"])(this.queryParams).then((function(t){e.categoryList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={categoryId:null,categoryName:null,orderNum:null,delFlag:null,createBy:null,createTime:null,updateBy:null,updateTime:null,remark:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.categoryId})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加新闻分类"},handleUpdate:function(e){var t=this;this.reset();var a=e.categoryId||this.ids;Object(i["c"])(a).then((function(e){t.form=e.data,t.open=!0,t.title="修改新闻分类"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.categoryId?Object(i["f"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):Object(i["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,a=e.categoryId||this.ids,r="";this.$modal.confirm('是否确认删除新闻分类编号为"'+a+'"的数据项?').then((function(){return Object(i["b"])(a).then((function(e){r=e.msg}))})).then((function(){t.getList(),t.$modal.msgSuccess(r)})).catch((function(){}))},handleExport:function(){this.download("iot/newsCategory/export",Object(o["a"])({},this.queryParams),"category_".concat((new Date).getTime(),".xlsx"))}}},l=s,c=a("2877"),u=Object(c["a"])(l,r,n,!1,null,null,null);t["default"]=u.exports}}]);