1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-28bd6e9c"],{"2fb4":function(e,t,l){"use strict";l.r(t);var a=l("7a23"),o=l("3ef4"),c=l("92c2");const d={class:"dialog-footer"},r=Object(a["createTextVNode"])("取消"),u=Object(a["createTextVNode"])("保存");var b={__name:"roles",props:{modelValue:{type:Boolean,required:!0},deptId:{type:String,required:!0}},emits:["update:modelValue","updateRole"],setup(e,{emit:t}){const l=e,b=Object(a["ref"])(!1),n=()=>{t("update:modelValue",!1)},i=Object(a["ref"])(null),O=Object(a["ref"])([]),j=e=>{O.value=e},p=()=>{const e=O.value.map(e=>e.id);let a={deptId:l.deptId,roleIds:e};b.value=!0,Object(c["z"])(a).then(e=>{o["a"].success("操作成功"),t("updateRole")}).finally(()=>{b.value=!1}),n()},s=Object(a["ref"])([]),m=async()=>{const e=await Object(c["D"])({current:1,size:9999,deptId:l.deptId});s.value=e.records.map(e=>e.roleId);const t=[];h.value.forEach(e=>{-1!=s.value.indexOf(e.id)&&t.push(e)}),v(t)},v=e=>{e?e.forEach(e=>{i.value.toggleRowSelection(e,!0)}):i.value.clearSelection()},h=Object(a["ref"])([]),V=async()=>{const e={page:1,size:999},t=await Object(c["o"])(e);h.value=null===t||void 0===t?void 0:t.records,m()};return Object(a["watch"])(()=>l.deptId,e=>{e&&V()}),(t,l)=>{const o=Object(a["resolveComponent"])("el-table-column"),c=Object(a["resolveComponent"])("el-table"),O=Object(a["resolveComponent"])("el-button"),s=Object(a["resolveComponent"])("el-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{title:"配置角色","model-value":e.modelValue,onClose:n},{footer:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",d,[Object(a["createVNode"])(O,{onClick:n},{default:Object(a["withCtx"])(()=>[r]),_:1}),Object(a["createVNode"])(O,{type:"primary",loading:b.value,onClick:p},{default:Object(a["withCtx"])(()=>[u]),_:1},8,["loading"])])]),default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{"max-height":"380px",ref_key:"multipleTableRef",ref:i,data:h.value,style:{width:"100%"},onSelectionChange:j},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(o,{type:"selection",width:"55"}),Object(a["createVNode"])(o,{property:"orderNo",label:"角色编号"}),Object(a["createVNode"])(o,{property:"roleName",label:"角色名称"}),Object(a["createVNode"])(o,{prop:"xtZhxgsj",label:"更新时间"},{default:Object(a["withCtx"])(({row:e})=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.$filters.dateFilter(e.xtZhxgsj)),1)]),_:1})]),_:1},8,["data"])]),_:1},8,["model-value"])}}};const n=b;var i=n,O=l("6605");const j=e=>(Object(a["pushScopeId"])("data-v-1c071720"),e=e(),Object(a["popScopeId"])(),e),p={class:"titleBox"},s=j(()=>Object(a["createElementVNode"])("div",{class:"title"},"部门管理",-1)),m={class:"btnBox"},v=j(()=>Object(a["createElementVNode"])("span",null,"新增",-1)),h=Object(a["createTextVNode"])("查询"),V=Object(a["createTextVNode"])(" 重置 "),w={class:"tabBox"},f=Object(a["createTextVNode"])("编辑"),x=Object(a["createTextVNode"])("添加下级"),N=Object(a["createTextVNode"])("绑定角色"),g=Object(a["createTextVNode"])("删除"),C={key:0,class:"dialog"},_={class:"head_box"},k={class:"title"},y=Object(a["createTextVNode"])("保存"),B=Object(a["createTextVNode"])("保存"),T=Object(a["createTextVNode"])("关闭");var z={__name:"index",setup(e){const{proxy:t}=Object(a["getCurrentInstance"])(),{D_BZ_BMYWLX:l,D_BZ_BMDJ:d,D_BZ_BMLX:r}=t.$dict("D_BZ_BMYWLX","D_BZ_BMDJ","D_BZ_BMLX"),u=Object(a["ref"])(0),b=Object(a["ref"])(null),n=Object(a["ref"])(),j=(Object(O["c"])(),Object(a["ref"])(0)),z=(Object(a["ref"])({}),Object(a["ref"])({deptname:"",deptcode:""})),U=Object(a["ref"])(""),E=Object(a["ref"])(""),q=(Object(a["ref"])(),Object(a["ref"])(!1)),I=Object(a["ref"])(!0),D=Object(a["ref"])({orgNo:1}),L=Object(a["ref"])([]),M=Object(a["ref"])(!1),S=Object(a["ref"])(!1);function J(e,t,l){z.value.parentid=e.id,Object(c["B"])(z.value).then(e=>{l(e)})}const R=async()=>{const e=z.value;M.value=!0;const t=await Object(c["B"])(e);L.value=t,M.value=!1,j.value=Number(t.total)},Z=()=>{L.value=[],z.value={deptname:"",dept
|