/*!
 *  build: vue-admin-beautiful 
 *  vue-admin-beautiful author: chuzhixin 1204505056@qq.com 
 *  vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 
 *  time: 2024-10-10 11:14:28
 */
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7f47872b"],{1967:function(e,t,a){"use strict";a.r(t);var o=a("f2bf");const n={class:"manage-container"};function r(e,t,a,r,c,i){const l=Object(o["resolveComponent"])("el-button"),d=Object(o["resolveComponent"])("vab-query-form"),u=Object(o["resolveComponent"])("el-table-column"),s=Object(o["resolveComponent"])("el-table"),h=Object(o["resolveComponent"])("el-pagination"),p=Object(o["resolveComponent"])("vab-query-form-right-panel"),g=Object(o["resolveDirective"])("loading");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",n,[Object(o["createVNode"])(d,null,{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(l,{type:"primary",onClick:i.handleAdd},{default:Object(o["withCtx"])(()=>t[0]||(t[0]=[Object(o["createTextVNode"])("添加组")])),_:1},8,["onClick"])]),_:1}),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createBlock"])(s,{data:c.groupData,border:"",stripe:"",style:{width:"100%"}},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(u,{prop:"id",label:"ID",width:"60",align:"center"}),Object(o["createVNode"])(u,{prop:"name",label:"组名称1",width:"120",align:"center"}),Object(o["createVNode"])(u,{prop:"createTime",label:e.$t("grouping.cjsj"),width:"200",align:"center"},null,8,["label"]),Object(o["createVNode"])(u,{prop:"updateTime",label:e.$t("grouping.gxsj"),width:"200",align:"center"},null,8,["label"]),Object(o["createVNode"])(u,{fixed:"right",label:e.$t("defalult.cz"),align:"center"},{default:Object(o["withCtx"])(({row:t})=>[Object(o["createVNode"])(l,{type:"text",onClick:e=>i.handleDelete(t)},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("defalult.sc")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[g,c.listLoading]]),Object(o["createVNode"])(d,null,{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(p,null,{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(h,{background:c.background,"current-page":c.queryForm.page,layout:c.layout,"page-size":c.queryForm.size,total:c.total,onCurrentChange:i.handleCurrentChange,onSizeChange:i.handleSizeChange},null,8,["background","current-page","layout","page-size","total","onCurrentChange","onSizeChange"])]),_:1})]),_:1})])}var c=a("23ba"),i={name:"Index",components:{},data(){return{groupData:[],lazy:!0,activeName:"first",layout:"total, sizes, prev, pager, next, jumper",total:0,input:"",textarea:"",list:[],background:!0,listLoading:!0,elementLoadingText:"正在加载...",queryForm:{page:1,size:20,name:""}}},computed:{height(){return 500}},created(){this.fetchData()},methods:{async fetchData(){this.listLoading=!0;const{data:e,total:t}=await Object(c["getList"])(this.queryForm);this.projectData=e.items,this.total=t,setTimeout(()=>{this.listLoading=!1},500)},handleAdd(){this.$refs["edit"].showEdit()},handleEdit(e){this.$refs["edit"].showEdit(e)},handleQuery(){this.queryForm.page=1,this.fetchData()},handleSizeChange(e){this.queryForm.size=e,this.fetchData()},handleCurrentChange(e){this.queryForm.page=e,this.fetchData()},handleDelete(e){const t=this;e.id&&this.$confirm("你确定要删除当前项吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const{msg:a}=Object(c["doDelete"])([e.id]);this.$message({type:"success",message:void 0==a?"删除成功":a}),setTimeout((function(){t.fetchData()}),1e3)}).catch(()=>{this.$message({type:"info",message:"已取消删除"})})}}},l=(a("a9a2"),a("d959")),d=a.n(l);const u=d()(i,[["render",r]]);t["default"]=u},"23ba":function(e,t,a){"use strict";a.r(t),a.d(t,"getList",(function(){return n})),a.d(t,"doDelete",(function(){return r})),a.d(t,"remove",(function(){return c})),a.d(t,"doAdd",(function(){return i}));var o=a("b775");function n(e){let t="?page="+e.page+"&size="+e.size;return void 0!=e.name&&""!=e.name&&(t+="&name="+e.name),Object(o["default"])({url:"/iot/project/group/select"+t,method:"get",data:e})}function r(e){return Object(o["default"])({url:"/iot/project/group/remove?groupId="+e.groupId,method:"post",data:e})}function c(e){return Object(o["default"])({url:"/iot/project/group/remove?groupId="+e.groupId,method:"post",data:e})}function i(e){return Object(o["default"])({url:"/iot/project/group/saveOrUpdate",method:"post",data:e})}},"2a73":function(e,t,a){e.exports={"menu-color":"hsla(0,0%,27%,.95)","menu-color-active":"hsla(208,100%,55%,.95)","menu-background":"#fff","gallery-second-menu-background":"#fff"}},a9a2:function(e,t,a){"use strict";a("2a73")}}]);