2 lines
9.5 KiB
JavaScript
2 lines
9.5 KiB
JavaScript
import{E as x,a as Q,b as X}from"./element-plus-53a783a7.js";import"./vue-20eed888.js";import{u as Z,b as ee}from"./index-03a63030.js";import{u as ae}from"./vue-i18n-d6e8419a.js";import{s as N,b as $,a as L,d as te,c as le}from"./systemidentifier-26774e0a.js";import{d as ie,G as re,r as i,k as l,ah as w,ai as I,o as oe,c as se,e as y,P as k,u as g,L as D,a as S,U as _,i as M,F as ne}from"./@vue-e95c845e.js";import{_ as ue}from"./y9plugin-components-412bad23.js";import"./lodash-es-2e98bc53.js";import"./@vueuse-409d7ed5.js";import"./@element-plus-57b52633.js";import"./@popperjs-c75af06c.js";import"./@ctrl-f8748455.js";import"./dayjs-e13f206c.js";import"./axios-db0ed51e.js";import"./async-validator-20f92749.js";import"./memoize-one-297ddbcb.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-606f2ab9.js";import"./lodash-11751b8b.js";import"./pinia-22d008e7.js";import"./nprogress-e9cc33fd.js";import"./vue-router-e03c3082.js";/* empty css *//* empty css *//* empty css */import"./y9plugin-sso-6f4b3ca3.js";import"./y9plugin-watermark-e18d3181.js";import"./@intlify-d4a3a758.js";import"./v-viewer-decd5d79.js";import"./viewerjs-c43574b2.js";import"./vxe-table-3ccf2bcd.js";import"./xe-utils-90392958.js";import"./dom-zindex-d72a3c32.js";import"./request-6d47a533.js";const pe=ie({__name:"index",setup(me){const b=re("sizeObjInfo"),P=Z(),{t:a}=ae();i();const F=i({}),O=i();i(!1),i("配置权限值"),i(),i(),i(),i(),i(),i(),i(!0),i(),i();const z=i([]);let s=i({headerBackground:!0,pageConfig:{background:!1,currentPage:1,pageSize:5,total:0,pageSizeOpts:[5,10,15,20,30,40,1e3]},columns:[{type:"index",title:l(()=>a("序号")),width:80,fixed:"left"},{title:l(()=>a("名称")),key:"name"},{title:l(()=>a("类型")),key:"parameterType",render:e=>e.parameterType=="0"?w("span",a("单位")):w("span",a("系统"))},{title:l(()=>a("排序")),key:"sort"},{title:l(()=>a("操作")),width:300,fixed:"right",render:e=>w("div",[w("span",{onClick:()=>{K(e.id,e.parameterType)}},a("详情")),w("span",{class:"leftMargin",onClick:()=>{J(e.id,e.parameterType)}},a("编辑")),w("span",{class:"leftMargin",onClick:()=>{Y(e.id)}},a("删除"))])}],tableData:[]});const W=i({filtersValueCallBack:e=>{F.value=e},itemList:[{type:"input",value:"",key:"name",label:l(()=>a("名称")),labelWidth:"82px",span:P.device==="mobile"?24:6},{type:"select",value:"",key:"parameterType",label:l(()=>a("数据类型")),labelWidth:"82px",span:P.device==="mobile"?24:6,props:{options:[{label:"单位",value:"0"},{label:"系统",value:"1"}]}},{type:"slot",slotName:"slotSearch",span:6},{type:"slot",slotName:"slotBtns",span:P.device==="mobile"?24:6,justify:"flex-end"}],showBorder:!0,borderRadio:"4px"});async function C(){s.value.loading=!0,F.value.page=s.value.pageConfig.currentPage,F.value.limit=s.value.pageConfig.pageSize;let e=await le(F.value);s.value.tableData=e.data||[],s.value.pageConfig.total=e.count||0,s.value.loading=!1}function U(e){s.value.tableData=[],s.value.pageConfig.pageSize=e,C()}function V(e){s.value.tableData=[],s.value.pageConfig.currentPage=e,C()}function j(){s.value.pageConfig.currentPage=1,s.value.pageConfig.pageSize=15,s.value.tableData=[],C()}function A(){O.value.elTableFilterRef.onReset(),s.value.pageConfig.currentPage=1,s.value.pageConfig.pageSize=15,s.value.tableData=[],F.value={},C()}function G(){s.value.pageConfig.currentPage=1,s.value.pageConfig.pageSize=15,s.value.tableData=[],C()}G();const R=i(),B=i(),q=(e,t,n)=>{let o=ee("number",t,!0);o.valid?n():n(new Error(o.msg))};let d=i({show:!1,title:l(()=>a("新增权限配置")),showFooter:!0,onOkLoading:!0,onOk:e=>new Promise(async(t,n)=>{var u;await((u=R.value)==null?void 0:u.elFormRef).validate(async p=>{if(p){let r=R.value.model,c=new FormData;for(let f in r)r[f]!=null&&f!="createTime"&&f!="updateTime"&&c.append(f,r[f]);(await N(c)).code==0&&(x({message:"数据保存成功",type:"success"}),t(),C()),n()}else n()})})}),m=i({show:!1,title:l(()=>a("新增系统信息")),showFooter:!0,onOkLoading:!0,onOk:e=>new Promise(async(t,n)=>{var u;await((u=B.value)==null?void 0:u.elFormRef).validate(async p=>{if(p){let r=B.value.model;for(let f of z.value)r.pid==f.value&&(r.pname=f.label);let c=new FormData;for(let f in r)r[f]!=null&&f!="createTime"&&f!="updateTime"&&c.append(f,r[f]);(await N(c)).code==0&&(x({message:"数据保存成功",type:"success"}),t(),C()),n()}else n()})}),visibleChange:e=>{e||(z.value=[])}});const v=i("单位名称");let T=i({model:{isPrimary:"Y",parameterType:"0"},rules:{name:[{required:!0,message:l(()=>a(v.value+"不能为空")),trigger:"blur"}],fieldName:[{required:!0,message:l(()=>a("参数key不能为空")),trigger:"blur"}],isTree:[{required:!0,message:l(()=>a("是否树形不能为空")),trigger:"blur"}],sort:[{required:!0,message:l(()=>a("排序不能为空")),trigger:"blur"},{validator:q,trigger:"blur"}]},itemList:[{type:"input",label:l(()=>a(v.value)),prop:"name"},{type:"input",label:l(()=>a("排序")),prop:"sort",props:{type:"number",max:999,min:0}}],descriptionsFormConfig:{labelWidth:"200px",labelAlign:"center"}}),h=i({model:{parameterType:"1"},rules:{name:[{required:!0,message:l(()=>a(v.value+"不能为空")),trigger:"blur"}],pid:[{required:!0,message:l(()=>a("单位名称不能为空")),trigger:"blur"}],isTree:[{required:!0,message:l(()=>a("是否树形不能为空")),trigger:"blur"}],sort:[{required:!0,message:l(()=>a("排序不能为空")),trigger:"blur"},{validator:q,trigger:"blur"}]},itemList:[{type:"input",label:l(()=>a(v.value)),prop:"name"},{type:"select",prop:"pid",label:l(()=>a("单位名称")),props:{options:z.value}},{type:"input",label:l(()=>a("排序")),prop:"sort",props:{type:"number",max:999,min:0}}],descriptionsFormConfig:{labelWidth:"200px",labelAlign:"center"}});function E(e){if(e=="0"){d.value.title=l(()=>a("新增单位信息")),v.value="单位名称",T.value.model={parameterType:e};for(let t of T.value.itemList)t.props==null?t.props={disabled:!1}:t.props.disabled=!1;d.value.okText="保存",d.value.show=!0}else m.value.title=l(()=>a("新增系统信息")),L({parameterType:"0"}).then(n=>{for(let o of n.data){let u={label:o.name,value:o.id};z.value.push(u)}v.value="系统名称",m.value.model={parameterType:e};for(let o of h.value.itemList)o.props==null?o.props={disabled:!1}:o.props.disabled=!1,o.prop=="pid"&&(o.props.options=z.value);m.value.okText="保存",m.value.show=!0})}async function J(e,t){let o=await $({id:e});if(t=="0"){T.value.model=o.data;for(let u of T.value.itemList)u.props==null?u.props={disabled:!1}:u.props.disabled=!1;v.value="单位名称",d.value.title=l(()=>a("编辑单位信息")),d.value.okText="保存",d.value.show=!0}else{h.value.model=o.data;for(let p of h.value.itemList)p.props==null?p.props={disabled:!1}:p.props.disabled=!1;L({parameterType:"0"}).then(p=>{for(let r of p.data){let c={label:r.name,value:r.id};z.value.push(c)}v.value="系统名称",m.value.title=l(()=>a("编辑系统信息")),m.value.okText="保存",m.value.show=!0})}}async function K(e,t){let o=await $({id:e});if(t=="0"){T.value.model=o.data;for(let u of T.value.itemList)u.props==null?u.props={disabled:!0}:u.props.disabled=!0;v.value="单位名称",d.value.okText=!1,d.value.title=l(()=>a("查看单位信息")),d.value.show=!0}else{h.value.model=o.data;for(let p of h.value.itemList)p.props==null?p.props={disabled:!0}:p.props.disabled=!0;L({parameterType:"0"}).then(p=>{for(let r of p.data){let c={label:r.name,value:r.id};z.value.push(c)}v.value="系统名称",m.value.okText=!1,m.value.title=l(()=>a("查看系统信息")),m.value.show=!0})}}async function Y(e){Q.confirm("是否确认删除这条数据","删除数据确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",draggable:!0}).then(()=>{te({id:e}).then(n=>{n.status=="success"?(x({type:"info",message:"删除成功"}),C()):x({type:"warning",message:"删除失败"+n.msg})})}).catch(()=>{})}return(e,t)=>{const n=X,o=I("y9Table"),u=I("y9Form"),p=I("y9Dialog");return oe(),se(ne,null,[y(o,{config:g(s),filterConfig:W.value,onOnCurrPageChange:V,ref_key:"filterRef",ref:O,onOnPageSizeChange:U},{slotSearch:k(()=>[y(n,{size:g(b).buttonSize,style:D({fontSize:g(b).baseFontSize}),class:"global-btn-main",type:"primary",onClick:j},{default:k(()=>[t[4]||(t[4]=S("i",{class:"ri-search-line"},null,-1)),S("span",null,_(e.$t("查询")),1)]),_:1},8,["size","style"]),y(n,{size:g(b).buttonSize,style:D({fontSize:g(b).baseFontSize}),class:"el-button el-button--default global-btn-third",onClick:A},{default:k(()=>[t[5]||(t[5]=S("i",{class:"ri-refresh-line"},null,-1)),S("span",null,_(e.$t("重置")),1)]),_:1},8,["size","style"])]),slotBtns:k(()=>[y(n,{size:g(b).buttonSize,style:D({fontSize:g(b).baseFontSize}),class:"global-btn-main",type:"primary",onClick:t[0]||(t[0]=r=>E("0"))},{default:k(()=>[t[6]||(t[6]=S("i",{class:"ri-add-line"},null,-1)),S("span",null,_(e.$t("录入单位")),1)]),_:1},8,["size","style"]),y(n,{size:g(b).buttonSize,style:D({fontSize:g(b).baseFontSize}),class:"global-btn-main",type:"primary",onClick:t[1]||(t[1]=r=>E("1"))},{default:k(()=>[t[7]||(t[7]=S("i",{class:"ri-add-line"},null,-1)),S("span",null,_(e.$t("录入系统")),1)]),_:1},8,["size","style"])]),_:1},8,["config","filterConfig"]),y(p,{config:g(d),"onUpdate:config":t[2]||(t[2]=r=>M(d)?d.value=r:d=r)},{default:k(()=>[y(u,{ref_key:"ruleFormRef",ref:R,config:g(T)},null,8,["config"])]),_:1},8,["config"]),y(p,{config:g(m),"onUpdate:config":t[3]||(t[3]=r=>M(m)?m.value=r:m=r)},{default:k(()=>[y(u,{ref_key:"ruleFormSystemRef",ref:B,config:g(h)},null,8,["config"])]),_:1},8,["config"])],64)}}});const Ge=ue(pe,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/systemidentifier/index.vue"]]);export{Ge as default};
|