x-php-Admin/dist/static/js/229.523c3fa2.js
2024-01-05 16:08:59 +08:00

1 line
5.9 KiB
JavaScript

"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[229],{5229:function(e,l,t){t.r(l),t.d(l,{default:function(){return _}});var a=t(6808),i=t(9511);const n={class:"left-panel"},s={class:"right-panel"},o={class:"right-panel-search"},r=["value"],u=["value"],p=["value"],d=["value"];function c(e,l,t,c,m,h){const w=(0,a.up)("el-button"),f=(0,a.up)("el-input"),_=(0,a.up)("el-header"),b=(0,a.up)("el-table-column"),y=(0,a.up)("x-status-indicator"),g=(0,a.up)("el-badge"),W=(0,a.up)("el-link"),k=(0,a.up)("el-popconfirm"),v=(0,a.up)("el-button-group"),C=(0,a.up)("xTable"),$=(0,a.up)("el-main"),x=(0,a.up)("el-container"),S=(0,a.up)("column-dialog");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a.Wm)(x,{style:{padding:"10px 10px 6px 10px"}},{default:(0,a.w5)((()=>[(0,a.Wm)(x,{class:"container"},{default:(0,a.w5)((()=>[(0,a.Wm)(_,null,{default:(0,a.w5)((()=>[(0,a._)("div",n,[(0,a.Wm)(w,{type:"primary",icon:"el-icon-plus",onClick:h.add},null,8,["onClick"])]),(0,a._)("div",s,[(0,a._)("div",o,[(0,a.Wm)(f,{modelValue:m.search.keyword,"onUpdate:modelValue":l[0]||(l[0]=e=>m.search.keyword=e),placeholder:"名称,标识,备注",clearable:""},null,8,["modelValue"]),(0,a.Wm)(w,{type:"primary",icon:"el-icon-search",onClick:h.upsearch},null,8,["onClick"])])])])),_:1}),(0,a.Wm)($,{class:"nopadding"},{default:(0,a.w5)((()=>[(0,a.Wm)(C,{ref:"table",api:m.api,"row-key":"id",onSelectionChange:h.selectionChange,hideSetting:!0,remoteSort:"",remoteFilter:"",stripe:""},{default:(0,a.w5)((()=>[(0,a.Wm)(b,{type:"selection",width:"30"}),(0,a.Wm)(b,{label:"ID",prop:"id",width:"50"}),(0,a.Wm)(b,{label:"",prop:"status",width:"38"},{default:(0,a.w5)((e=>[1==e.row.status?((0,a.wg)(),(0,a.j4)(y,{key:0,pulse:"",type:"success"})):(0,a.kq)("",!0),0==e.row.status?((0,a.wg)(),(0,a.j4)(y,{key:1,pulse:"",type:"info"})):(0,a.kq)("",!0)])),_:1}),(0,a.Wm)(b,{label:"名称",prop:"title",minWidth:"100"},{default:(0,a.w5)((e=>[(0,a._)("input",{class:"el-input__inner",type:"text",readonly:"",value:e.row.title},null,8,r)])),_:1}),(0,a.Wm)(b,{label:"标识",prop:"title",minWidth:"100"},{default:(0,a.w5)((e=>[(0,a._)("input",{class:"el-input__inner",type:"text",readonly:"",value:e.row.name},null,8,u)])),_:1}),(0,a.Wm)(b,{label:"主键",prop:"key",width:"80"}),(0,a.Wm)(b,{label:"请求",prop:"views",width:"80"},{default:(0,a.w5)((l=>[(0,a.Wm)(W,{underline:!1,size:"small",onClick:t=>e.setImage(l.row)},{default:(0,a.w5)((()=>[(0,a.Wm)(g,{value:l.row.views,type:"primary"},null,8,["value"])])),_:2},1032,["onClick"])])),_:1}),(0,a.Wm)(b,{label:"Column",prop:"column",width:"80"},{default:(0,a.w5)((l=>[(0,a.Wm)(W,{underline:!1,size:"small",onClick:t=>e.setImage(l.row)},{default:(0,a.w5)((()=>[(0,a.Wm)(g,{value:l.row.column.length,type:"danger"},null,8,["value"])])),_:2},1032,["onClick"])])),_:1}),(0,a.Wm)(b,{label:"tabs",prop:"tabs",width:"80"},{default:(0,a.w5)((l=>[(0,a.Wm)(W,{underline:!1,size:"small",onClick:t=>e.setImage(l.row)},{default:(0,a.w5)((()=>[(0,a.Wm)(g,{value:l.row.tabs.length,type:"info"},null,8,["value"])])),_:2},1032,["onClick"])])),_:1}),(0,a.Wm)(b,{label:"操作",prop:"operationtype",width:"160"},{default:(0,a.w5)((e=>[(0,a._)("input",{class:"el-input__inner",type:"text",readonly:"",value:e.row.operationtype},null,8,p)])),_:1}),(0,a.Wm)(b,{label:"Api",prop:"api",width:"190"},{default:(0,a.w5)((e=>[(0,a._)("input",{class:"el-input__inner",type:"text",readonly:"",value:e.row.api},null,8,d)])),_:1}),(0,a.Wm)(b,{label:"添加时间",prop:"timestamp",width:"160"}),(0,a.Wm)(b,{label:"操作",fixed:"right",align:"left",width:"170"},{default:(0,a.w5)((e=>[(0,a.Wm)(v,null,{default:(0,a.w5)((()=>[(0,a.Wm)(k,{title:"确定复制吗?",onConfirm:l=>h.table_copy(e.row,e.$index)},{reference:(0,a.w5)((()=>[(0,a.Wm)(w,{type:"warning",size:"small"},{default:(0,a.w5)((()=>[(0,a.Uk)("复制")])),_:1})])),_:2},1032,["onConfirm"]),(0,a.Wm)(w,{type:"primary",size:"small",onClick:l=>h.table_edit(e.row,e.$index)},{default:(0,a.w5)((()=>[(0,a.Uk)("编辑")])),_:2},1032,["onClick"]),(0,a.Wm)(k,{title:"确定删除吗?",onConfirm:l=>h.table_del(e.row,e.$index)},{reference:(0,a.w5)((()=>[(0,a.Wm)(w,{type:"info",size:"small"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,i.zw)("删除"))])),_:1})])),_:2},1032,["onConfirm"])])),_:2},1024)])),_:1})])),_:1},8,["api","onSelectionChange"])])),_:1})])),_:1})])),_:1}),m.dialog.column?((0,a.wg)(),(0,a.j4)(S,{key:0,ref:"column",onSuccess:h.handleSuccess,onClosed:l[1]||(l[1]=e=>m.dialog.column=!1)},null,8,["onSuccess"])):(0,a.kq)("",!0)],64)}var m=t(1791),h={name:"tablegen",components:{columnDialog:m["default"]},data(){return{dialog:{column:!1},api:"table/lists",selection:[],search:{keyword:"",status:"0"}}},mounted(){},methods:{open(e){window.open(e.apartmentposter)},tabChange(e){this.search.status=e,this.$refs.table.reload(this.search)},upsearch(){this.$refs.table.reload(this.search)},add(){this.dialog.column=!0,this.$nextTick((()=>{this.$refs.column.open()}))},table_edit(e){this.dialog.column=!0,this.$nextTick((()=>{this.$refs.column.open("edit").setData(e)}))},async table_copy(e){var l=await this.$http.post("table/copy",{id:e.id});if(200==l.code)return this.$refs.table.reload({}),l.data&&this.table_edit(l.data),void this.$message.success("复制成功");this.$alert(l.message,"提示",{type:"error"})},async table_del(e,l){var t=await this.$http.post("table/delete",{id:e.id});if(200==t.code)return this.$refs.table.tableData.splice(l,1),void this.$message.success("删除成功");this.$alert(t.message,"提示",{type:"error"})},async batch_del(){this.$confirm(`确定下架选中的 ${this.selection.length} 项吗?`,"提示",{type:"warning"}).then((()=>{const e=this.$loading();this.selection.forEach((e=>{this.$refs.table.tableData.forEach(((l,t)=>{e.id===l.id&&this.$refs.table.tableData.splice(t,1)}))})),e.close(),this.$message.success("操作成功")})).catch((()=>{}))},selectionChange(e){this.selection=e},async handleSuccess(){this.$refs.table.reload({})}}},w=t(8700);const f=(0,w.Z)(h,[["render",c],["__scopeId","data-v-00d842c9"]]);var _=f}}]);