mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-02-13 17:30:27 +08:00
Deploying to gh-pages from @ pure-admin/vue-pure-admin@efb9211faa 🚀
This commit is contained in:
1
static/js/hook-C3saNhQ8.js
Normal file
1
static/js/hook-C3saNhQ8.js
Normal file
@@ -0,0 +1 @@
|
||||
var k=(l,m,s)=>new Promise((f,p)=>{var r=n=>{try{c(s.next(n))}catch(i){p(i)}},o=n=>{try{c(s.throw(n))}catch(i){p(i)}},c=n=>n.done?f(n.value):Promise.resolve(n.value).then(r,o);c((s=s.apply(l,m)).next())});import{m as C,b0 as H,f0 as F,H as R,aj as O,J as j,X as x,ai as z,l as d,f as P,a as J,a_ as N,r as V}from"./index-Cdx-WL5u.js";import{_ as X}from"./form.vue_vue_type_script_setup_true_lang-C0eZ4koO.js";import{e as q}from"./system-BAMo4vJa.js";import{u as A}from"./hooks-Ik_4gkti.js";import"./index-Wbnt88I6.js";function E(){const l=V({name:"",status:null}),m=d(),s=d([]),f=d(!0),{tagStyle:p}=A(),r=[{label:"部门名称",prop:"name",width:180,align:"left"},{label:"排序",prop:"sort",minWidth:70},{label:"状态",prop:"status",minWidth:100,cellRenderer:({row:a,props:e})=>P(J("el-tag"),{size:e.size,style:p.value(a.status)},{default:()=>[a.status===1?"启用":"停用"]})},{label:"创建时间",minWidth:200,prop:"createTime",formatter:({createTime:a})=>N(a).format("YYYY-MM-DD HH:mm:ss")},{label:"备注",prop:"remark",minWidth:320},{label:"操作",fixed:"right",width:210,slot:"operation"}];function o(a){}function c(a){a&&(a.resetFields(),n())}function n(){return k(this,null,function*(){f.value=!0;const{code:a,data:e}=yield q();if(a===0){let t=e;H(l.name)||(t=t.filter(u=>u.name.includes(l.name))),H(l.status)||(t=t.filter(u=>u.status===l.status)),s.value=F(t)}setTimeout(()=>{f.value=!1},500)})}function i(a){if(!a||!a.length)return;const e=[];for(let t=0;t<a.length;t++)a[t].disabled=a[t].status===0,i(a[t].children),e.push(a[t]);return e}function W(a="新增",e){var t,u,h,g,b,D,v,y;O({title:`${a}部门`,props:{formInline:{higherDeptOptions:i(z(s.value)),parentId:(t=e==null?void 0:e.parentId)!=null?t:0,name:(u=e==null?void 0:e.name)!=null?u:"",principal:(h=e==null?void 0:e.principal)!=null?h:"",phone:(g=e==null?void 0:e.phone)!=null?g:"",email:(b=e==null?void 0:e.email)!=null?b:"",sort:(D=e==null?void 0:e.sort)!=null?D:0,status:(v=e==null?void 0:e.status)!=null?v:1,remark:(y=e==null?void 0:e.remark)!=null?y:""}},width:"40%",draggable:!0,fullscreen:x(),fullscreenIcon:!0,closeOnClickModal:!1,contentRenderer:()=>j(X,{ref:m,formInline:null}),beforeSure:(S,{options:T})=>{const Y=m.value.getRef(),_=T.props.formInline;function I(){R(`您${a}了部门名称为${_.name}的这条数据`,{type:"success"}),S(),n()}Y.validate($=>{$&&I()})}})}function M(a){R(`您删除了部门名称为${a.name}的这条数据`,{type:"success"}),n()}return C(()=>{n()}),{form:l,loading:f,columns:r,dataList:s,onSearch:n,resetForm:c,openDialog:W,handleDelete:M,handleSelectionChange:o}}export{E as useDept};
|
||||
Reference in New Issue
Block a user