water-ldht/dist/static/js/chunk-4f39d204.ba0d2e36.js

7 lines
6.6 KiB
JavaScript
Raw Normal View History

2024-11-01 16:58:10 +08:00
/*!
* build: vue-admin-beautiful
* vue-admin-beautiful author: chuzhixin 1204505056@qq.com
* vue-admin-beautiful QQ Group(QQ群): 9724353191139183756
* time: 2024-10-10 11:14:28
*/
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4f39d204","chunk-087d292f"],{"23ba":function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return r})),o.d(t,"doDelete",(function(){return a})),o.d(t,"remove",(function(){return l})),o.d(t,"doAdd",(function(){return c}));var i=o("b775");function r(e){let t="?page="+e.page+"&size="+e.size;return void 0!=e.name&&""!=e.name&&(t+="&name="+e.name),Object(i["default"])({url:"/iot/project/group/select"+t,method:"get",data:e})}function a(e){return Object(i["default"])({url:"/iot/project/group/remove?groupId="+e.groupId,method:"post",data:e})}function l(e){return Object(i["default"])({url:"/iot/project/group/remove?groupId="+e.groupId,method:"post",data:e})}function c(e){return Object(i["default"])({url:"/iot/project/group/saveOrUpdate",method:"post",data:e})}},"5e1c":function(e,t,o){"use strict";o.r(t);var i=o("f2bf");const r={class:"manage-container"};function a(e,t,o,a,l,c){const s=Object(i["resolveComponent"])("el-button"),d=Object(i["resolveComponent"])("vab-query-form"),n=Object(i["resolveComponent"])("el-table-column"),u=Object(i["resolveComponent"])("el-table"),m=Object(i["resolveComponent"])("group-edit"),h=Object(i["resolveComponent"])("el-dialog");return Object(i["openBlock"])(),Object(i["createBlock"])(h,{modelValue:l.dialogFormVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>l.dialogFormVisible=e),title:l.title,width:"500px",onClose:c.close},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",r,[Object(i["createVNode"])(d,null,{default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(s,{type:"primary",onClick:c.handleAdd},{default:Object(i["withCtx"])(()=>t[1]||(t[1]=[Object(i["createTextVNode"])("添加组")])),_:1},8,["onClick"])]),_:1}),Object(i["createVNode"])(u,{data:l.groupData,border:"",stripe:"",style:{width:"100%"}},{default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(n,{prop:"id",label:"ID",width:"60",align:"center"}),Object(i["createVNode"])(n,{prop:"name",label:e.$t("grouping.zmc"),width:"120",align:"center"},null,8,["label"]),Object(i["createVNode"])(n,{fixed:"right",label:e.$t("defalult.cz"),align:"center"},{default:Object(i["withCtx"])(({row:t})=>[Object(i["createVNode"])(s,{type:"text",onClick:e=>c.handleDelete(t)},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.$t("defalult.sc")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"]),Object(i["createVNode"])(m,{ref:"edit",onRefreshGroup:c.RefreshGroup},null,8,["onRefreshGroup"])])]),_:1},8,["modelValue","title","onClose"])}var l=o("23ba"),c=o("9e4b"),s={name:"Group",components:{groupEdit:c["default"]},data(){return{groupData:[],lazy:!0,activeName:"first",layout:"total, sizes, prev, pager, next, jumper",title:"",dialogFormVisible:!1,total:0,input:"",textarea:"",projectId:"",list:[],background:!0,listLoading:!0,elementLoadingText:"正在加载..."}},computed:{height(){return 500}},created(){},methods:{async fetchData(){this.listLoading=!0;const e={projectId:this.projectId},{data:t}=await Object(l["getList"])(e);this.groupData=t,setTimeout(()=>{this.listLoading=!1},500)},showGroup(e){this.projectId=e.id,this.dialogFormVisible=!0,this.fetchData()},RefreshGroup(e){this.projectId=e,this.fetchData()},handleAdd(){this.$refs["edit"].showEdit(this.projectId)},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()},close(){this.dialogFormVisible=!1,this.$emit("fetch-data")},handleDelete(e){const t=this;e.id&&this.$confirm("你确定要删除当前项吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const{msg:o}=Object(l["doDelete"])({groupId:e.id});this.$message({type:"success",message:void 0==o?"删除成功":o}),setTimeout((function(){t.fetchData()}),1e3)}).catch(()=>{this.$message({type:"info",message:"已取消删除"})})}}},d=o("d959"),n=o.n(d);const u=n()(s,[["render",a]]);t["default"]=u}