gds-plus-design-vue 1.1.75 → 1.1.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2527,16 +2527,16 @@ export {
2527
2527
  At as b,
2528
2528
  xt as c,
2529
2529
  yt as d,
2530
- st as e,
2531
- mt as f,
2530
+ se as e,
2531
+ st as f,
2532
2532
  vt as g,
2533
- Ct as h,
2534
- ht as i,
2535
- tt as j,
2536
- ut as k,
2537
- lt as l,
2538
- it as m,
2539
- se as n,
2533
+ mt as h,
2534
+ Ct as i,
2535
+ ht as j,
2536
+ tt as k,
2537
+ ut as l,
2538
+ lt as m,
2539
+ it as n,
2540
2540
  oe as o,
2541
2541
  wt as p,
2542
2542
  ot as q,
@@ -1,4 +1,4 @@
1
- import { c as yt } from "./system.account.ae0822f1.mjs";
1
+ import { c as yt } from "./system.account.16b1763b.mjs";
2
2
  import { n as mt } from "./chartbi.48631362.mjs";
3
3
  var gt = { exports: {} }, dt = { exports: {} };
4
4
  /*!
@@ -1,5 +1,5 @@
1
1
  import { m as d, n as h } from "./chartbi.48631362.mjs";
2
- import { s as g } from "./system.account.ae0822f1.mjs";
2
+ import { s as g } from "./system.account.16b1763b.mjs";
3
3
  import { t as f } from "./messages.7e85146d.mjs";
4
4
  function p(t) {
5
5
  return window.axios({
@@ -1,6 +1,6 @@
1
1
  import { m as l, n } from "./chartbi.48631362.mjs";
2
2
  import { t as o } from "./messages.7e85146d.mjs";
3
- import { d as c } from "./system.notice.234d5e47.mjs";
3
+ import { d as c } from "./system.notice.9821e123.mjs";
4
4
  function u(t) {
5
5
  return window.axios({
6
6
  url: "/sysNotice/received",
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, a as sysUserOwnRole } from "./system.account.ae0822f1.mjs";
1
+ import { c as commonjsGlobal, a as sysUserOwnRole } from "./system.account.16b1763b.mjs";
2
2
  import { f as baseFkList } from "./messages.7e85146d.mjs";
3
3
  import { n as normalizeComponent } from "./chartbi.48631362.mjs";
4
4
  var md5 = { exports: {} };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("./system.fieldsecurity.d57edb47.js"),c=require("./chartbi.afd83839.js"),b=require("./messages.083c4ede.js"),y=require("./system.org.65452f67.js"),g=require("./system.account.78b852cd.js"),_={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.user.roleName",prop:"name",label:"\u89D2\u8272\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"}),showOverflowTooltip:!0},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",align:"left",renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"}),showOverflowTooltip:!0},{transKey:"gd.org.sort",prop:"sort",width:"200",label:"\u6392\u5E8F",align:"left"},{transKey:"gd.org.remark",prop:"remark",label:"\u5907\u6CE8",align:"left",showOverflowTooltip:!0}],formColumns:[{transKey:"gd.user.roleName",effectType:"input",prop:"name",label:"\u89D2\u8272\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.org.code",prop:"code",effectType:"input",label:"\u552F\u4E00\u7F16\u7801",placeholder:"\u8BF7\u8F93\u5165",disabled:!1,placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.org.sort",prop:"sort",effectType:"inputnumber",label:"\u6392\u5E8F",defaultValue:100,placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change",type:"number"}]},{transKey:"gd.org.remark",effectType:"textarea",prop:"remark",label:"\u5907\u6CE8",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[],autosize:{minRows:4,maxRows:6}}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u590D\u5236\u89D2\u8272",functionName:"copy",show:!0,transKey:"gd.user.copyRole",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysRole:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysRole:delete"},{displayName:"\u6388\u6743\u7528\u6237",functionName:"userAuthorizationMenu",show:!0,transKey:"gd.user.userAuthorization",icon:"el-icon-user",name:"sysRole:userMenu"},{displayName:"\u6388\u6743\u83DC\u5355",functionName:"grantRoleMenu",show:!0,transKey:"gd.user.menuRole",icon:"el-icon-monitor",name:"sysRole:grantMenu"},{displayName:"\u6388\u6743APP\u83DC\u5355",functionName:"grantRoleAppMenu",show:!0,transKey:"gd.user.menuRoleApp",icon:"el-icon-mobile-phone",name:"sysRole:grantMenu"},{displayName:"\u6388\u6743\u6570\u636E",functionName:"grantRoleGrant",show:!0,transKey:"gd.user.dataRole",icon:"el-icon-tickets",name:"sysRole:grantData"},{displayName:"\u6388\u6743\u89C6\u56FE/\u8868\u5355",functionName:"grantRoleVF",show:!0,transKey:"gd.user.menuRolevf",icon:"el-icon-setting",name:"sysRole:grantMenu"}],formButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],tableQueries:[{transKey:"gd.user.roleName",prop:"name",label:"\u89D2\u8272\u540D\u79F0",effectType:"input",rules:[]},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",effectType:"input",rules:[]}]}}};const K={data(){return{defaultProps:{children:"children",label:"title"},buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"800px",orgTreeData:[],checkedKeys:[]}},computed:{...c.mapGetters(["screenHeight","tableLists"])},methods:{handleSubmit(){const t=this.$refs.tree.getCheckedKeys();this.$emit("ok",Object.assign({...this.record},{checkedKeys:t})),this.closed()},getOrgData(){this.confirmLoading=!0,y.getOrgTree().then(t=>{t.success&&(this.orgTreeData=t.data,this.confirmLoading=!1)})},open(t){this.record=t,this.checkedKeys=t.checkedKeys,this.visible=!0,this.getOrgData()},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var k=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.rangeRole","\u6388\u6743\u8303\u56F4"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?s("el-tree",{ref:"tree",attrs:{data:e.orgTreeData,"show-checkbox":"","node-key":"id","default-expand-all":"","default-checked-keys":e.checkedKeys,props:e.defaultProps}}):e._e()],1)],2)],1)},w=[],$=c.normalizeComponent(K,k,w,!1,null,"1aca9ef6",null,null);const T=$.exports;const C={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",loadData:[],submitData:{},loadSoData:t=>(this.confirmLoading=!0,new Promise((e,s)=>{this.confirmLoading=!1,e({pageNo:1,pageSize:500,totalRows:0,rows:this.loadData})})),columns:[{transKey:"gd.btn.entity",prop:"sysCodeGenName",label:"\u5B9E\u4F53",align:"left",type:"slot",slotType:"sysCodeGenName",width:120},{transKey:"gd.btn.query",prop:"getgrantd",label:"\u67E5\u8BE2",align:"left",type:"slot",slotType:"getgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.add",prop:"addgrantd",label:"\u65B0\u589E",align:"left",type:"slot",slotType:"addgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.edit",prop:"editgrantd",label:"\u7F16\u8F91",align:"left",type:"slot",slotType:"editgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.del",prop:"delgrantd",label:"\u5220\u9664",align:"left",type:"slot",slotType:"delgrantd",width:270,showTooltip:!1},{transKey:"gd.relation.assignment",prop:"allocationgrantd",label:"\u5206\u6D3E",align:"left",type:"slot",slotType:"allocationgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.share",prop:"sharegrantd",label:"\u5171\u4EAB",align:"left",type:"slot",slotType:"sharegrantd",width:270,showTooltip:!1}],currentList:{}}},components:{RoleScope:T},computed:{height(){return this.screenHeight-(this.fullscreen?120:310)},...c.mapGetters(["primaryColor","screenHeight","tableLists","tableSize","tablePageSize"])},methods:{handleSubmit(){this.confirmLoading=!0;let t=this.$refs.table.tableData;t.map(e=>(e.addgrant=e.addgrantd.length>0?e.addgrantd.join(","):null,e.delgrant=e.delgrantd.length>0?e.delgrantd.join(","):null,e.editgrant=e.editgrantd.length>0?e.editgrantd.join(","):null,e.getgrant=e.getgrantd.length>0?e.getgrantd.join(","):null,e.sharegrant=e.sharegrantd.length>0?e.sharegrantd.join(","):null,e.allocationgrant=e.allocationgrantd.length>0?e.allocationgrantd.join(","):null,e)),y.saveOrgDetail(Object.assign({...this.submitData},{grants:t})).then(e=>{this.confirmLoading=!1,e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message)})},setRoleScop(t){this.confirmLoading=!0;const e=this.$refs.table.tableData;e[t.index][t.name]=[...t.checkedKeys].join(","),this.loadData=[...e],this.refresh(),this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F"))},openList(t,e,s){const n=this.$refs.table.tableData,i=`${t.prop.replace("grantd","")}custom`,a=n[s][i],o=a?a.split(",").map(Number):[];this.$refs.roleScope.open({index:s,item:t,checkedKeys:o,data:e,name:i})},getUserControlData(){this.confirmLoading=!0,y.getOrgDetail({roleId:this.record.id}).then(t=>{t.success?(t.data.grants.map(e=>(e.addgrantd=e.addgrant?e.addgrant.split(","):[],e.delgrantd=e.delgrant?e.delgrant.split(","):[],e.editgrantd=e.editgrant?e.editgrant.split(","):[],e.getgrantd=e.getgrant?e.getgrant.split(","):[],e.sharegrantd=e.sharegrant?e.sharegrant.split(","):[],e.allocationgrantd=e.allocationgrant?e.allocationgrant.split(","):[],e)),this.loadData=t.data.grants,this.submitData=t.data,this.$nextTick(()=>{setTimeout(()=>{this.refresh(),this.confirmLoading=!0},1e3),setTimeout(()=>{this.confirmLoading=!1},1200)})):(this.$message.error(t.message),this.confirmLoading=!1)})},open(t){this.record=t,this.visible=!0,this.getUserControlData()},closed(){this.fullscreen=!1,this.visible=!1},refresh(t=!0){this.$refs.table?this.$refs.table.refresh(t):console.log("err:\u89C6\u56FE\u672A\u52A0\u8F7D\uFF0C\u8BF7\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210\uFF01")},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var R=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"margin-top":"-12px"}},[e.visible?s("gd-tables",{ref:"table",attrs:{dataSource:e.loadSoData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.columns,height:e.height,filtering:!1,initialLoading:!1,showPagination:!1,rowKey:"sysCodeGenId",disabledRefresh:"",disabledColumnSettings:""},scopedSlots:e._u([e._l(e.columns,function(n){return{key:n.prop,fn:function({column:i,row:a,index:o}){return[n.prop==="sysCodeGenName"?s("div",[e._v(" "+e._s(e.$i18nt(`Dynamics.${a.transkey}`,a.syscodegenname))+" ")]):s("div",{staticClass:"grant-select"},[s("el-select",{staticStyle:{flex:"1"},attrs:{placeholder:e.$i18nt("gd.xlsxImport.mapFieldsTip","\u8BF7\u9009\u62E9\u6620\u5C04\u5B57\u6BB5"),filterable:"",clearable:"",multiple:""},model:{value:a[n.prop],callback:function(r){e.$set(a,n.prop,r)},expression:"row[item.prop]"}},[e._l(e.getDictionary("data_scope_type"),function(r){return[s("el-option",{attrs:{label:e.$i18nt(`Dynamics.${r.transkey}`,r.name),value:r.code}})]})],2),a[n.prop].includes("5")?s("el-button",{staticClass:"active-color flex-center",attrs:{type:"text"},on:{click:function(r){return e.openList(n,a,o)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.view","\u67E5\u770B"))+" ")]):e._e()],1)]}}})],null,!0)}):e._e()],1)],2),s("RoleScope",{ref:"roleScope",on:{ok:e.setRoleScop}})],1)},I=[],L=c.normalizeComponent(C,R,I,!1,null,"c46bea75",null,null);const S=L.exports;const x={name:"LayoutItem",props:{record:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},data(){return{}},computed:{fadeColord(){return this.fadeColor(this.primaryColor,.1)},menusType(){return this.record[0]?this.record[0].menusType:0},...c.mapGetters(["primaryColor"])},methods:{hasAll(t){return!(this.checkedKeys.filter(s=>t.menuBtnIds.includes(s)).length>=t.menuBtnIds.length)},checkedBtn(t,e){this.$emit("checkedBtn",t,e)},change(t,e){this.$emit("change",t,e)},open(t){this.$emit("open",t)},checked(t){return!!this.checkedKeys.filter(s=>s===t.id)[0]},fadeColor(t,e){let s=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),i=parseInt(t.substring(5,7),16);return`rgba(${s},${n},${i},${e})`}}};var N=function(){var e=this,s=e._self._c;return s("div",{style:{"--fadecolor":e.fadeColord}},[e._l(e.record,function(n){return[s("div",{staticClass:"list-item"},[e.menusType===0?s("i",{class:n.open?"el-icon-caret-bottom":"el-icon-caret-right",on:{click:function(i){return e.open(n)}}}):e._e(),e.menusType!==2?s("div",{staticClass:"item-name"},[s("el-checkbox",{attrs:{indeterminate:n.isIndeterminate},on:{change:function(i){return e.change(i,[n.id])}},model:{value:n.checked,callback:function(i){e.$set(n,"checked",i)},expression:"item.checked"}},[n.iconClass?s("i",{staticClass:"gd-icons",class:n.iconClass,staticStyle:{"font-size":"15px"}}):e._e(),e._v(" "+e._s(e.$i18nt(`Dynamics.${n.transkey}`,n.title))+" ")]),n.children&&n.children.length>0&&e.menusType===1?s("el-button",{staticStyle:{"margin-left":"12px",padding:"5px 15px"},attrs:{size:"mini"}},[e.hasAll(n)?s("span",{on:{click:function(i){return e.checkedBtn(n,1)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")]):s("span",{on:{click:function(i){return e.checkedBtn(n,0)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.cancel","\u53D6\u6D88"))+" ")])]):e._e()],1):e._e(),s("div",{staticClass:"item-data"},[n.children&&n.children.length>0&&n.children[0].menusType===2?s("div",{staticClass:"item-data-list"},[e._l(n.children,function(i){return[s("div",{staticClass:"item-name item-named",on:{click:function(a){return e.change(!i.checked,[i.id])}}},[i.checked?s("i",{staticClass:"gd-icons gd-icon-quanxuan active-color"}):s("div",{staticClass:"item-named-kuang"}),s("div",{staticClass:"item-named-title",class:i.checked?"active-color":""},[e._v(" "+e._s(e.$i18nt(`Dynamics.${i.transkey}`,i.title))+" ")])])]})],2):e._e()])]),n.children&&n.children.length>0&&n.children[0].menusType!==2?s("div",{staticClass:"list-more"},[n.open?s("LayoutItem",{attrs:{record:n.children,checkedKeys:e.checkedKeys},on:{open:e.open,change:e.change,checkedBtn:e.checkedBtn}}):e._e()],1):e._e()]})],2)},D=[],B=c.normalizeComponent(x,N,D,!1,null,"d151fae1",null,null);const v=B.exports;const F={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",menuTreeData:[],checkedKeys:[],list:[],allClose:!1,menuAll:[],systemMenuAll:[],allCheckedKeys:[],appsId:""}},computed:{isIndeterminate(){return this.allClose?!1:this.checkedKeys.length>0},...c.mapGetters(["screenHeight","tableLists"])},components:{LayoutItem:v},methods:{handleSubmit(){this.confirmLoading=!0,u.sysRoleGrantMenu({id:this.record.id,grantmenuidlist:this.checkedKeys}).then(t=>{t.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+t.message),this.confirmLoading=!1})},checkedItemBtn(t,e){let s=[...this.checkedKeys].filter(n=>!t.menuBtnIds.includes(n));e===1&&(s=s.concat(t.menuBtnIds)),this.checkedKeys=[...s],this.handleItem()},openItem(t){let e=[...this.menuTreeData];const s=n=>(n=n.filter((i,a)=>(i.id===t.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=s(i.children)),!0)),n);s(e),this.menuTreeData=[...e]},changeItem(t,e,s=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(l=>e.includes(l))[0];const i=this.list.filter(l=>e.includes(l.id))[0],a=s&&i?i.menuIds:[];if(t?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(l=>!e.includes(l)).filter(l=>!a.includes(l)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let o=[];this.findParent(this.menuTreeData,i,o);let r=[],d=[];o.forEach(l=>{this.checkedKeys.filter(f=>l.menuIds.includes(f)).length===l.menuIds.length&&l.menuIds.length>0&&!l.checked?r.push(l.id):d.push(l.id)}),r.forEach(l=>{this.changeItem(!0,[l],!1)}),d.forEach(l=>{this.changeItem(!1,[l],!1)})},handleItem(){let t=[...this.menuTreeData];const e=s=>(s=s.filter((n,i)=>{const a=this.checkedKeys.filter(o=>n.menuIds.includes(o));return this.checkedKeys.includes(n.id)?(n.checked=!0,n.isIndeterminate=!1):(n.checked=!1,n.isIndeterminate=a.length>0&&n.menuIds.length>0),n.children&&n.children.length>0&&(n.children=e(n.children)),!0}),s);e(t),this.menuTreeData=[...t],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(t){t?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getMenuTree(),this.expandedMenuKeys(),this.getMenuList()]).then(async t=>{let e=[],s=[];const n=r=>(r=r.filter((d,l)=>{const h=this.checkedKeys.filter(p=>d.id===p)[0];return d.open=!0,d.checked=d.type===1?!!h:!1,d.isIndeterminate=!1,d.menusType=d.type,e.push(d.id),s.push(d),d.children&&d.children.length>0&&(d.children=n(d.children)),!0}),r);let i=this.menuAll.filter(r=>!!this.systemMenuAll.filter(l=>l.id===r.id)[0]);await n(i),this.allCheckedKeys=e;let a=[];s.forEach((r,d)=>{const l=this.getMenuIds(r);s[d].menuIds=l.arr,s[d].menuBtnIds=l.btn,!(this.checkedKeys.filter(f=>l.arr.includes(f)).length===l.arr.length)&&l.arr.length>0&&a.push(r.id)}),this.list=s;const o=this.checkedKeys.filter(r=>e.includes(r)).filter(r=>!a.includes(r)).filter((r,d,l)=>l.indexOf(r)===d);this.checkedKeys=o,this.allClose=this.checkedKeys.length===e.length&&e.length>0,this.menuTreeData=[...i],this.handleItem(),this.confirmLoading=!1})},open(t,e){this.record=t,this.appsId=e||window.$systemInfo.id,this.visible=!0,this.init()},getMenuTree(){return g.SysMenuTreeForGrant({roleId:this.record.id}).then(t=>(t.code===200&&(this.menuAll=t.data),t))},expandedMenuKeys(){return u.sysRoleOwnMenu({id:this.record.id}).then(t=>(t.code===200&&(this.checkedKeys=t.data),t))},getMenuList(){let t={AppsId:this.appsId};return g.sysMenuListByAppsId(t).then(e=>(e.code===200&&(this.systemMenuAll=e.data),e))},getMenuIds(t){let e=[],s=[];const n=i=>(i=i.filter((a,o)=>(a.menusType!==2?e.push(a.id):s.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return t.children&&n(t.children),{arr:e,btn:s}},findParent(t,e,s){for(let n of t)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,s))return s.unshift(n),!0;return!1},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var M=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?s("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),s("template",{slot:"footer"},[s("div",{staticClass:"btoms"},[s("el-checkbox",{attrs:{disabled:e.confirmLoading,indeterminate:e.isIndeterminate},on:{change:e.changeAll},model:{value:e.allClose,callback:function(n){e.allClose=n},expression:"allClose"}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")])],1)])],2)],1)},A=[],O=c.normalizeComponent(F,M,A,!1,null,"da1c5456",null,null);const P=O.exports;const z={name:"GdUserRole",props:{height:{type:Number,default:100},openSelecteKeys:{type:Array,default:()=>[]},openMode:{type:String,default:"page"}},mixins:[b.tablesFilter],data(){return{transKey:"gd.btn.add",formLoading:!1,currentNode:null,loading:!0,orgTree:[],selectedRowKeys:[],selectedRows:[],queryParam:{},defaultProps:{children:"children",label:"title",value:"value"},defaultExpandedKeys:"",loadData:t=>g.getUserManage({roleId:this.openSelecteKeys[0]}).then(e=>(this.getRowId(e.data),{pageNo:1,pageSize:1e3,totalRows:0,rows:e.data})),disableBtn:[],fileList:[],needLoad:!1,infoData:{},isSendEmail:"",isSendEmailed:"",tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.user.name",prop:"name",label:"\u59D3\u540D",type:"slot",slotType:"name",align:"left",showOverflowTooltip:!0},{transKey:"gd.user.nickname",prop:"nickname",label:"\u6635\u79F0",align:"left",type:"slot",slotType:"nickname",showOverflowTooltip:!0},{transKey:"gd.user.sex",prop:"sex",label:"\u6027\u522B",align:"left",type:"slot",slotType:"sex",showOverflowTooltip:!0},{transKey:"gd.user.organization",prop:"orgname",label:"\u6240\u5C5E\u673A\u6784",align:"left",type:"slot",slotType:"orgname",showOverflowTooltip:!0},{transKey:"gd.user.status",prop:"status",label:"\u72B6\u6001",align:"left",type:"slot",slotType:"status",showOverflowTooltip:!0}],formColumnsuser:[{transKey:"gd.user.account",effectType:"input",prop:"account",label:"\u8D26\u53F7",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change",min:2}]},{transKey:"gd.user.name",prop:"name",effectType:"input",label:"\u59D3\u540D",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.sex",prop:"gender",effectType:"radio",label:"\u6027\u522B",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",dictTypeCode:"gender",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.birthday",prop:"birthday",effectType:"date",label:"\u751F\u65E5",placeholder:"\u8BF7\u8F93\u5165",valueFormat:"yyyy-MM-dd",placeholderTransKey:"gd.placeholder.select",rules:[]},{transKey:"gd.user.phone",effectType:"input",prop:"phone",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.email",effectType:"input",prop:"email",label:"\u90AE\u7BB1",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"},{type:"email",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u53F7!",transKey:"gd.account.emailTip"}]},{transKey:"gd.user.nickname",prop:"nickname",effectType:"input",label:"\u6635\u79F0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]},{transKey:"gd.user.tel",prop:"tel",effectType:"input",label:"\u7535\u8BDD",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]},{transKey:"gd.org.displayName",prop:"orgid",effectType:"selectTree",label:"\u6240\u5C5E\u673A\u6784",placeholder:"\u8BF7\u9009\u62E9",placeholderTransKey:"gd.placeholder.select",treeOptions:[],rules:[{required:!0,message:"\u8BF7\u9009\u62E9",transKey:"gd.placeholder.select",trigger:"change"}]},{transKey:"gd.user.PSDNeverExpire",prop:"psdneverexpire",effectType:"switch",label:"\u5BC6\u7801\u6C38\u4E0D\u8FC7\u671F",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysRole:delete"}],disabledRowId:[],sysCodeGenName:"sys_user"}},components:{},computed:{initialLoading(){return this.openMode==="page"},selectedKeep(){return this.openMode!=="page"},getQueryParam(){let t=new Map;for(let e in this.queryParam)t.set(e==="statecodes"?"searchctatus":e,this.queryParam[e]);return Object.fromEntries(t)},getFormColumns(){return this.formColumnsuser.filter(e=>(e.prop==="orgid"&&(e.treeOptions=[...this.orgTree]),!0))},getTableButtons(){return this.tableButtons.filter(t=>(t.show=!this.disableBtn.includes(t.displayName),!0))},getHeight(){return this.height},styled(){return`height:${this.height+76}px`},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getRowId(t){let e=[];t.filter(s=>!this.disabledRowId.includes(s.id)).forEach(s=>{e.push(s.id)}),this.disabledRowId=this.disabledRowId.concat(e)},saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},getOrgTree(){y.getOrgTree({}).then(t=>{if(t.code===200){const e=s=>(s=s.filter((n,i)=>(n.value=String(n.value),n.children&&n.children.length>0&&(n.children=e(n.children)),!0)),s);this.orgTree=e(t.data)}this.loading=!1})},handleNodeClick(t){this.queryParam.orgId===t.id?(delete this.queryParam.orgId,this.$nextTick(()=>{setTimeout(()=>{this.$refs.tree.setCurrentKey(null)},0)})):this.queryParam=Object.assign({...this.queryParam},{orgId:t.id}),this.refresh()},handleOk(){this.$refs.table.refresh()},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()},lookupSeled(t){if(t.fkData.length===0){this.$refs.engineSearch.closed();return}this.$refs.engineSearch.confirmLoading=!0,g.postbindUsersToRole({roleId:this.openSelecteKeys[0],userIdList:t.data}).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$refs.engineSearch.closed(),this.refresh()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message),this.$refs.engineSearch.confirmLoading=!1})},add(){this.$refs.engineSearch.open({fkEntityName:this.sysCodeGenName,val:[],effectType:"participants",isRelevance:!0})},del(){let t=this;if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(e,s,n)=>{if(e!=="confirm"){n();return}s.confirmButtonLoading=!0,s.cancelButtonLoading=!0,s.showCancelButton=!1,g.postunbindUsersFromRole({roleId:t.openSelecteKeys[0],userIdList:t.selectedRowKeys}).then(i=>{i.success?(t.$message.success(t.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")),t.disabledRowId=t.disabledRowId.filter(a=>!t.selectedRows.filter(r=>r.id===a)[0]),s.confirmButtonLoading=!1,s.cancelButtonLoading=!1,s.showCancelButton=!0,n(),t.refresh()):t.$message.error(t.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+i.message)})}})}},created(){}};var E=function(){var e=this,s=e._self._c;return s("div",{staticClass:"gd-page-view",staticStyle:{display:"flex",background:"rgb(245, 245, 245)"}},[s("div",{staticClass:"page-view-list"},[s("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.tableColumns,showPagination:!1,selectedRowKeys:e.selectedRowKeys,height:e.height,initialLoading:!1},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"operator",fn:function(){return[s("div",{staticClass:"gd-table-operator"},[s("div",{staticClass:"gd-table-operatorr"},[s("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"name",fn:function({column:n,row:i}){return[s("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.name)+" ")])]}},{key:"nickname",fn:function({column:n,row:i}){return[s("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.nickname)+" ")])]}},{key:"orgname",fn:function({column:n,row:i}){return[s("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.orgname)+" ")])]}},{key:"sex",fn:function({column:n,row:i}){return[s("span",[e._v(" "+e._s(e._f("dictType")("gender",i.sex))+" ")])]}},{key:"status",fn:function({column:n,row:i}){return[s("span",[e._v(" "+e._s(e._f("dictType")("state_code",i.status))+" ")])]}}])}),s("gd-search",{ref:"engineSearch",attrs:{appendToBody:!0,disabledRowId:e.disabledRowId},on:{lookupSeled:e.lookupSeled}})],1)])},q=[],G=c.normalizeComponent(z,E,q,!1,null,"e09158ba",null,null);const j=G.exports;const H={data(){return{buttons:[],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"90%",selectedRowKeys:[]}},components:{UserFormDate:j},computed:{height(){return this.screenHeight-(this.fullscreen?160:340)},...c.mapGetters(["screenHeight"])},methods:{handleSubmit(){this.closed(),this.$emit("ok")},open(t){this.record=t,this.visible=!0,this.selectedRowKeys=[t.id],this.$nextTick(()=>{setTimeout(()=>{this.$refs.userForm.refresh()},0)})},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},onSelectChange(t){this.selectedRowKeys=t},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var V=function(){var e=this,s=e._self._c;return s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"modal-append-to-body":!0,"append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.userAuthorization","\u6388\u6743\u7528\u6237"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?s("UserFormDate",{ref:"userForm",attrs:{height:e.height,openMode:"components",openSelecteKeys:e.selectedRowKeys},on:{onSelectChange:e.onSelectChange}}):e._e()],1)],2)},U=[],Q=c.normalizeComponent(H,V,U,!1,null,"085b1df5",null,null);const J=Q.exports;const W={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",menuTreeData:[],menuTreeDatad:[],checkedKeys:[],list:[],allClose:!1,menuAll:[],systemMenuAll:[],allCheckedKeys:[]}},computed:{isIndeterminate(){return this.allClose?!1:this.checkedKeys.length>0},...c.mapGetters(["screenHeight","tableLists"])},components:{LayoutItem:v},methods:{async handleSubmit(){const t=e=>(e=e.filter((s,n)=>{const i=this.checkedKeys.filter(a=>s.id===a)[0];return s.type=i?1:0,s.formlist&&s.formlist.length>0&&(s.formlist=t(s.formlist)),s.viewlist&&s.viewlist.length>0&&(s.viewlist=t(s.viewlist)),s.btnlist&&s.btnlist.length>0&&(s.btnlist=t(s.btnlist)),!0}),e);this.confirmLoading=!0,await t(this.menuAll),u.sysRoleRoleBindViewOnBtn({roleid:this.record.id,list:this.menuAll}).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message),this.confirmLoading=!1})},checkedItemBtn(t,e){let s=[...this.checkedKeys].filter(n=>!t.menuBtnIds.includes(n));e===1&&(s=s.concat(t.menuBtnIds)),this.checkedKeys=[...s],this.handleItem()},openItem(t){let e=[...this.menuTreeData];const s=n=>(n=n.filter((i,a)=>(i.id===t.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=s(i.children)),!0)),n);s(e),this.menuTreeData=[...e]},changeItem(t,e,s=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(l=>e.includes(l))[0];const i=this.list.filter(l=>e.includes(l.id))[0],a=s&&i?i.menuIds:[];if(t?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(l=>!e.includes(l)).filter(l=>!a.includes(l)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let o=[];this.findParent(this.menuTreeData,i,o);let r=[],d=[];o.forEach(l=>{this.checkedKeys.filter(f=>l.menuIds.includes(f)).length===l.menuIds.length&&l.menuIds.length>0&&!l.checked?r.push(l.id):d.push(l.id)}),r.forEach(l=>{this.changeItem(!0,[l],!1)}),d.forEach(l=>{this.changeItem(!1,[l],!1)})},handleItem(){let t=[...this.menuTreeData];const e=s=>(s=s.filter((n,i)=>{const a=this.checkedKeys.filter(o=>n.menuIds.includes(o));return this.checkedKeys.includes(n.id)?(n.checked=!0,n.isIndeterminate=!1):(n.checked=!1,n.isIndeterminate=a.length>0&&n.menuIds.length>0),n.children&&n.children.length>0&&(n.children=e(n.children)),!0}),s);e(t),this.menuTreeData=[...t],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(t){t?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getList()]).then(async t=>{this.confirmLoading=!1;let e=JSON.parse(JSON.stringify(this.menuTreeDatad)),s=[];const n=a=>(a=a.filter((o,r)=>{const d=this.checkedKeys.filter(l=>o.id===l)[0];return o.open=!0,o.checked=o.menusType===1?!!d:!1,o.isIndeterminate=!1,s.push(o),o.children&&o.children.length>0&&(o.children=n(o.children)),!0}),a);await n(e);let i=[];s.forEach((a,o)=>{const r=this.getMenuIds(a);s[o].menuIds=r.arr,s[o].menuBtnIds=r.btn,!(this.checkedKeys.filter(h=>r.arr.includes(h)).length===r.arr.length)&&r.arr.length>0&&i.push(a.id)}),this.list=s,this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0,this.menuTreeData=[...e],this.handleItem(),console.log(this.menuAll,"123")})},getList(){return u.sysRoleViewOnBtnList({roleId:this.record.id}).then(t=>{if(t.code===200){let e=[],s=[];const n=(a,o)=>(a=a.filter((r,d)=>{r.parentId=o,r.open=!0,r.checked=!1,r.isIndeterminate=!1,r.transkey=r.transkey?r.transkey:null,r.title=r.name,r.menusType=r.formlist&&r.viewlist?0:r.btnlist?1:2,s.push(r.id),r.type===1&&e.push(r.id);let l=[];return r.viewlist&&r.viewlist.length>0&&(r.viewlist.map(h=>(h.iconClass="gd-icon-shitumoshi",h)),l=l.concat(r.viewlist)),r.formlist&&r.formlist.length>0&&(r.formlist.map(h=>(h.iconClass="gd-icon-biaodanmoshi",h)),l=l.concat(r.formlist)),r.btnlist&&r.btnlist.length>0&&(l=l.concat(r.btnlist)),l.length>0&&(r.children=n(l,r.id)),!0}),a);this.menuAll=t.data.list;let i=JSON.parse(JSON.stringify(this.menuAll));n(i,0),this.checkedKeys=e,this.allCheckedKeys=s,this.menuTreeDatad=[...i]}return t})},getMenuIds(t){let e=[],s=[];const n=i=>(i=i.filter((a,o)=>(a.menusType!==2?e.push(a.id):s.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return t.children&&n(t.children),{arr:e,btn:s}},findParent(t,e,s){for(let n of t)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,s))return s.unshift(n),!0;return!1},open(t){this.record=t,this.visible=!0,this.init()},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var X=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?s("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),s("template",{slot:"footer"},[s("div",{staticClass:"btoms"},[s("el-checkbox",{attrs:{disabled:e.confirmLoading,indeterminate:e.isIndeterminate},on:{change:e.changeAll},model:{value:e.allClose,callback:function(n){e.allClose=n},expression:"allClose"}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")])],1)])],2)],1)},Y=[],Z=c.normalizeComponent(W,X,Y,!1,null,"2fa6bf14",null,null);const ee=Z.exports;const te={name:"GdRole",props:{height:{type:Number,default:100},openMode:{type:String,default:"page"},openSelecteKeys:{type:Array,default:()=>[]}},mixins:[b.tablesFilter,_],data(){return{appsId:"",transKey:"gd.btn.add",formLoading:!1,loading:!0,selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>(this.selectedKeep&&(this.selectedRowKeys=[...this.openSelecteKeys]),u.getRolePage(Object.assign(t,this.queryParam,{sysAppsId:window.$systemInfo.id})).then(e=>e.data))}},components:{RoleGrant:S,RoleMenu:P,RoleMenuViewForm:ee,UserAuthorization:J},computed:{getTableButtons(){return this.tableButtons.filter(t=>t.functionName==="grantRoleAppMenu"?!!this.appsId:!0)},initialLoading(){return this.openMode==="page"},selectedKeep(){return this.openMode!=="page"},getFormColumns(){return this.formColumns.filter(t=>(t.prop==="code"&&(t.disabled=this.transKey!=="gd.btn.add"),!(this.transKey==="gd.https.copy"&&t.prop==="code")))},getHeight(){return this.height},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getAppId(){g.getConfigInfoByCode({code:"App_Id"}).then(t=>{t.code===200&&(this.appsId=t.data?t.data.value:"")})},userAuthorizationMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.userAuthorization.open(this.selectedRows[0])},grantRoleMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenu.open(this.selectedRows[0])},grantRoleAppMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenu.open(this.selectedRows[0],this.appsId)},grantRoleGrant(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleGrant.open(this.selectedRows[0])},grantRoleVF(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenuViewForm.open(this.selectedRows[0])},saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(t,e,s)=>{this.delHand(t,e,s)}})},delHand(t,e,s){if(t!=="confirm"){s();return}let n=[];this.selectedRows.forEach(i=>{let a=u.sysRoleDelete(i).then(o=>o);n.push(a)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(n).then(i=>{const a=i.filter(o=>!o.success);a.length===0?this.$message.success(this.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")):this.$message.error(this.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+a[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},add(){this.transKey="gd.btn.add",this.$refs.editForm.open(null)},edit(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.editForm(this.selectedRows[0])},copy(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.transKey="gd.https.copy",this.$refs.editForm.open(Object.assign({...this.selectedRows[0]},{roleId:this.selectedRows[0].id}))},sbumit({data:t,record:e,btn:s},n,i){this.formLoading=!0;let a=e?this.transKey==="gd.https.copy"?u.sysRoleCopyRole:u.sysRoleEdit:u.sysRoleAddV2;const o=this.transKey!=="gd.https.edit"?Object.assign(t,{sysappsid:window.$systemInfo.id}):t;a(o).then(r=>{r.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),i(),this.refresh()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+r.message),this.formLoading=!1})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e,this.$emit("onSelectChange",t,e)},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}},created(){this.getAppId()}};var se=function(){var e=this,s=e._self._c;return s("div",{staticClass:"gd-page-view"},[s("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[s("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.tableColumns,selectedRowKeys:e.selectedRowKeys,height:e.getHeight,filtering:!0,selectedKeep:e.selectedKeep,initialLoading:e.initialLoading},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"name",fn:function({column:n,row:i}){return[s("gd-tooltip",{attrs:{rowKey:"name",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"operator",fn:function(){return[s("div",{staticClass:"gd-table-operator"},[s("div",{staticClass:"gd-table-operatorl"},[s("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.user.roleName","\u89D2\u8272\u540D"),clearable:""},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.refresh.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(n){e.$set(e.queryParam,"name",n)},expression:"queryParam.name"}}),s("div",{staticClass:"table-operator-search",on:{click:e.refresh}},[s("i",{staticClass:"el-input__icon el-icon-search"})])],1),s("div",{staticClass:"gd-table-operatorr"},[e.openMode==="page"?s("gd-btn-list",{attrs:{sysViewButtons:e.getTableButtons},on:{functionName:e.doEvent}}):e._e()],1)])]},proxy:!0},{key:"filtering",fn:function({colse:n,visible:i}){return[s("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.getHeight,queryParam:e.queryParam,colse:n,visible:i},on:{save:e.saveQueries}})]}}])})],1),s("gd-edit-form",{ref:"editForm",attrs:{formItemWidth:"90%",loading:e.formLoading,transKey:e.transKey,buttons:e.formButtons,columns:e.getFormColumns,labelPosition:e.labelPosition,formMode:e.formMode},on:{sbumit:e.sbumit}}),s("RoleGrant",{ref:"roleGrant",on:{ok:e.refresh}}),s("RoleMenu",{ref:"roleMenu",on:{ok:e.refresh}}),s("RoleMenuViewForm",{ref:"roleMenuViewForm",on:{ok:e.refresh}}),s("UserAuthorization",{ref:"userAuthorization",on:{ok:e.refresh}})],1)},ne=[],ie=c.normalizeComponent(te,se,ne,!1,null,"3c7b317a",null,null);const m=ie.exports;m.install=function(t){t.component(m.name,m)};exports.GDpackage=m;
@@ -2,8 +2,8 @@ import { s as v, a as _, b as K, c as k, g as w, d as $, e as T, f as C, h as R
2
2
  import { m as h, n as u } from "./chartbi.48631362.mjs";
3
3
  import { t as m } from "./messages.7e85146d.mjs";
4
4
  import { g as y, s as I, a as L } from "./system.org.b8d59e5d.mjs";
5
- import { S, b as x, g as N, p as D, d as F } from "./system.account.ae0822f1.mjs";
6
- const B = {
5
+ import { S, b as x, g as N, p as D, d as B, e as F } from "./system.account.16b1763b.mjs";
6
+ const M = {
7
7
  data() {
8
8
  return {
9
9
  tableColumns: [
@@ -155,6 +155,14 @@ const B = {
155
155
  icon: "el-icon-monitor",
156
156
  name: "sysRole:grantMenu"
157
157
  },
158
+ {
159
+ displayName: "\u6388\u6743APP\u83DC\u5355",
160
+ functionName: "grantRoleAppMenu",
161
+ show: !0,
162
+ transKey: "gd.user.menuRoleApp",
163
+ icon: "el-icon-mobile-phone",
164
+ name: "sysRole:grantMenu"
165
+ },
158
166
  {
159
167
  displayName: "\u6388\u6743\u6570\u636E",
160
168
  functionName: "grantRoleGrant",
@@ -196,7 +204,7 @@ const B = {
196
204
  };
197
205
  }
198
206
  };
199
- const M = {
207
+ const A = {
200
208
  data() {
201
209
  return {
202
210
  defaultProps: {
@@ -257,23 +265,23 @@ const M = {
257
265
  }
258
266
  }
259
267
  };
260
- var O = function() {
268
+ var P = function() {
261
269
  var e = this, s = e._self._c;
262
270
  return s("div", [s("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(n) {
263
271
  e.visible = n;
264
272
  }, closed: e.closed } }, [s("template", { slot: "title" }, [s("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.rangeRole", "\u6388\u6743\u8303\u56F4"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [e.visible ? s("el-tree", { ref: "tree", attrs: { data: e.orgTreeData, "show-checkbox": "", "node-key": "id", "default-expand-all": "", "default-checked-keys": e.checkedKeys, props: e.defaultProps } }) : e._e()], 1)], 2)], 1);
265
- }, P = [], A = /* @__PURE__ */ u(
266
- M,
267
- O,
273
+ }, O = [], E = /* @__PURE__ */ u(
274
+ A,
268
275
  P,
276
+ O,
269
277
  !1,
270
278
  null,
271
279
  "1aca9ef6",
272
280
  null,
273
281
  null
274
282
  );
275
- const E = A.exports;
276
- const z = {
283
+ const z = E.exports;
284
+ const q = {
277
285
  data() {
278
286
  return {
279
287
  buttons: [
@@ -369,7 +377,7 @@ const z = {
369
377
  currentList: {}
370
378
  };
371
379
  },
372
- components: { RoleScope: E },
380
+ components: { RoleScope: z },
373
381
  computed: {
374
382
  height() {
375
383
  return this.screenHeight - (this.fullscreen ? 120 : 310);
@@ -432,7 +440,7 @@ const z = {
432
440
  }
433
441
  }
434
442
  };
435
- var q = function() {
443
+ var G = function() {
436
444
  var e = this, s = e._self._c;
437
445
  return s("div", [s("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(n) {
438
446
  e.visible = n;
@@ -447,18 +455,18 @@ var q = function() {
447
455
  } } }, [e._v(" " + e._s(e.$i18nt("gd.btn.view", "\u67E5\u770B")) + " ")]) : e._e()], 1)];
448
456
  } };
449
457
  })], null, !0) }) : e._e()], 1)], 2), s("RoleScope", { ref: "roleScope", on: { ok: e.setRoleScop } })], 1);
450
- }, G = [], j = /* @__PURE__ */ u(
451
- z,
458
+ }, j = [], H = /* @__PURE__ */ u(
452
459
  q,
453
460
  G,
461
+ j,
454
462
  !1,
455
463
  null,
456
464
  "c46bea75",
457
465
  null,
458
466
  null
459
467
  );
460
- const H = j.exports;
461
- const V = {
468
+ const V = H.exports;
469
+ const U = {
462
470
  name: "LayoutItem",
463
471
  props: {
464
472
  record: {
@@ -504,7 +512,7 @@ const V = {
504
512
  }
505
513
  }
506
514
  };
507
- var U = function() {
515
+ var Q = function() {
508
516
  var e = this, s = e._self._c;
509
517
  return s("div", { style: { "--fadecolor": e.fadeColord } }, [e._l(e.record, function(n) {
510
518
  return [s("div", { staticClass: "list-item" }, [e.menusType === 0 ? s("i", { class: n.open ? "el-icon-caret-bottom" : "el-icon-caret-right", on: { click: function(i) {
@@ -523,18 +531,18 @@ var U = function() {
523
531
  } } }, [i.checked ? s("i", { staticClass: "gd-icons gd-icon-quanxuan active-color" }) : s("div", { staticClass: "item-named-kuang" }), s("div", { staticClass: "item-named-title", class: i.checked ? "active-color" : "" }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${i.transkey}`, i.title)) + " ")])])];
524
532
  })], 2) : e._e()])]), n.children && n.children.length > 0 && n.children[0].menusType !== 2 ? s("div", { staticClass: "list-more" }, [n.open ? s("LayoutItem", { attrs: { record: n.children, checkedKeys: e.checkedKeys }, on: { open: e.open, change: e.change, checkedBtn: e.checkedBtn } }) : e._e()], 1) : e._e()];
525
533
  })], 2);
526
- }, Q = [], J = /* @__PURE__ */ u(
527
- V,
534
+ }, J = [], W = /* @__PURE__ */ u(
528
535
  U,
529
536
  Q,
537
+ J,
530
538
  !1,
531
539
  null,
532
540
  "d151fae1",
533
541
  null,
534
542
  null
535
543
  );
536
- const b = J.exports;
537
- const W = {
544
+ const b = W.exports;
545
+ const X = {
538
546
  data() {
539
547
  return {
540
548
  buttons: [
@@ -670,25 +678,25 @@ const W = {
670
678
  }
671
679
  }
672
680
  };
673
- var X = function() {
681
+ var Y = function() {
674
682
  var e = this, s = e._self._c;
675
683
  return s("div", [s("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(n) {
676
684
  e.visible = n;
677
685
  }, closed: e.closed } }, [s("template", { slot: "title" }, [s("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.dataRole", "\u6388\u6743\u6570\u636E"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "min-height": "400px" } }, [e.visible ? s("LayoutItem", { attrs: { record: e.menuTreeData, checkedKeys: e.checkedKeys }, on: { open: e.openItem, change: e.changeItem, checkedBtn: e.checkedItemBtn } }) : e._e()], 1), s("template", { slot: "footer" }, [s("div", { staticClass: "btoms" }, [s("el-checkbox", { attrs: { disabled: e.confirmLoading, indeterminate: e.isIndeterminate }, on: { change: e.changeAll }, model: { value: e.allClose, callback: function(n) {
678
686
  e.allClose = n;
679
687
  }, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
680
- }, Y = [], Z = /* @__PURE__ */ u(
681
- W,
688
+ }, Z = [], ee = /* @__PURE__ */ u(
682
689
  X,
683
690
  Y,
691
+ Z,
684
692
  !1,
685
693
  null,
686
694
  "da1c5456",
687
695
  null,
688
696
  null
689
697
  );
690
- const ee = Z.exports;
691
- const te = {
698
+ const te = ee.exports;
699
+ const se = {
692
700
  name: "GdUserRole",
693
701
  props: {
694
702
  height: {
@@ -1041,7 +1049,7 @@ const te = {
1041
1049
  n();
1042
1050
  return;
1043
1051
  }
1044
- s.confirmButtonLoading = !0, s.cancelButtonLoading = !0, s.showCancelButton = !1, F({
1052
+ s.confirmButtonLoading = !0, s.cancelButtonLoading = !0, s.showCancelButton = !1, B({
1045
1053
  roleId: t.openSelecteKeys[0],
1046
1054
  userIdList: t.selectedRowKeys
1047
1055
  }).then((i) => {
@@ -1054,7 +1062,7 @@ const te = {
1054
1062
  created() {
1055
1063
  }
1056
1064
  };
1057
- var se = function() {
1065
+ var ne = function() {
1058
1066
  var e = this, s = e._self._c;
1059
1067
  return s("div", { staticClass: "gd-page-view", staticStyle: { display: "flex", background: "rgb(245, 245, 245)" } }, [s("div", { staticClass: "page-view-list" }, [s("gd-tables", { ref: "table", attrs: { dataSource: e.loadData, size: e.tableSize, pageSize: e.tablePageSize, columns: e.tableColumns, showPagination: !1, selectedRowKeys: e.selectedRowKeys, height: e.height, initialLoading: !1 }, on: { onChange: e.onSelectChange }, scopedSlots: e._u([{ key: "operator", fn: function() {
1060
1068
  return [s("div", { staticClass: "gd-table-operator" }, [s("div", { staticClass: "gd-table-operatorr" }, [s("gd-btn-list", { attrs: { sysViewButtons: e.tableButtons }, on: { functionName: e.doEvent } })], 1)])];
@@ -1069,18 +1077,18 @@ var se = function() {
1069
1077
  } }, { key: "status", fn: function({ column: n, row: i }) {
1070
1078
  return [s("span", [e._v(" " + e._s(e._f("dictType")("state_code", i.status)) + " ")])];
1071
1079
  } }]) }), s("gd-search", { ref: "engineSearch", attrs: { appendToBody: !0, disabledRowId: e.disabledRowId }, on: { lookupSeled: e.lookupSeled } })], 1)]);
1072
- }, ne = [], ie = /* @__PURE__ */ u(
1073
- te,
1080
+ }, ie = [], ae = /* @__PURE__ */ u(
1074
1081
  se,
1075
1082
  ne,
1083
+ ie,
1076
1084
  !1,
1077
1085
  null,
1078
1086
  "e09158ba",
1079
1087
  null,
1080
1088
  null
1081
1089
  );
1082
- const ae = ie.exports;
1083
- const re = {
1090
+ const re = ae.exports;
1091
+ const le = {
1084
1092
  data() {
1085
1093
  return {
1086
1094
  buttons: [],
@@ -1092,7 +1100,7 @@ const re = {
1092
1100
  selectedRowKeys: []
1093
1101
  };
1094
1102
  },
1095
- components: { UserFormDate: ae },
1103
+ components: { UserFormDate: re },
1096
1104
  computed: {
1097
1105
  height() {
1098
1106
  return this.screenHeight - (this.fullscreen ? 160 : 340);
@@ -1125,23 +1133,23 @@ const re = {
1125
1133
  }
1126
1134
  }
1127
1135
  };
1128
- var le = function() {
1136
+ var oe = function() {
1129
1137
  var e = this, s = e._self._c;
1130
1138
  return s("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "modal-append-to-body": !0, "append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(n) {
1131
1139
  e.visible = n;
1132
1140
  }, closed: e.closed } }, [s("template", { slot: "title" }, [s("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.userAuthorization", "\u6388\u6743\u7528\u6237"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [e.visible ? s("UserFormDate", { ref: "userForm", attrs: { height: e.height, openMode: "components", openSelecteKeys: e.selectedRowKeys }, on: { onSelectChange: e.onSelectChange } }) : e._e()], 1)], 2);
1133
- }, oe = [], de = /* @__PURE__ */ u(
1134
- re,
1141
+ }, de = [], ce = /* @__PURE__ */ u(
1135
1142
  le,
1136
1143
  oe,
1144
+ de,
1137
1145
  !1,
1138
1146
  null,
1139
1147
  "085b1df5",
1140
1148
  null,
1141
1149
  null
1142
1150
  );
1143
- const ce = de.exports;
1144
- const he = {
1151
+ const he = ce.exports;
1152
+ const ue = {
1145
1153
  data() {
1146
1154
  return {
1147
1155
  buttons: [
@@ -1285,25 +1293,25 @@ const he = {
1285
1293
  }
1286
1294
  }
1287
1295
  };
1288
- var ue = function() {
1296
+ var ge = function() {
1289
1297
  var e = this, s = e._self._c;
1290
1298
  return s("div", [s("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(n) {
1291
1299
  e.visible = n;
1292
1300
  }, closed: e.closed } }, [s("template", { slot: "title" }, [s("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.dataRole", "\u6388\u6743\u6570\u636E"), buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "min-height": "400px" } }, [e.visible ? s("LayoutItem", { attrs: { record: e.menuTreeData, checkedKeys: e.checkedKeys }, on: { open: e.openItem, change: e.changeItem, checkedBtn: e.checkedItemBtn } }) : e._e()], 1), s("template", { slot: "footer" }, [s("div", { staticClass: "btoms" }, [s("el-checkbox", { attrs: { disabled: e.confirmLoading, indeterminate: e.isIndeterminate }, on: { change: e.changeAll }, model: { value: e.allClose, callback: function(n) {
1293
1301
  e.allClose = n;
1294
1302
  }, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
1295
- }, ge = [], fe = /* @__PURE__ */ u(
1296
- he,
1303
+ }, fe = [], pe = /* @__PURE__ */ u(
1297
1304
  ue,
1298
1305
  ge,
1306
+ fe,
1299
1307
  !1,
1300
1308
  null,
1301
1309
  "2fa6bf14",
1302
1310
  null,
1303
1311
  null
1304
1312
  );
1305
- const pe = fe.exports;
1306
- const me = {
1313
+ const me = pe.exports;
1314
+ const ye = {
1307
1315
  name: "GdRole",
1308
1316
  props: {
1309
1317
  height: {
@@ -1319,9 +1327,10 @@ const me = {
1319
1327
  default: () => []
1320
1328
  }
1321
1329
  },
1322
- mixins: [m, B],
1330
+ mixins: [m, M],
1323
1331
  data() {
1324
1332
  return {
1333
+ appsId: "",
1325
1334
  transKey: "gd.btn.add",
1326
1335
  formLoading: !1,
1327
1336
  loading: !0,
@@ -1331,8 +1340,11 @@ const me = {
1331
1340
  loadData: (t) => (this.selectedKeep && (this.selectedRowKeys = [...this.openSelecteKeys]), w(Object.assign(t, this.queryParam, { sysAppsId: window.$systemInfo.id })).then((e) => e.data))
1332
1341
  };
1333
1342
  },
1334
- components: { RoleGrant: H, RoleMenu: ee, RoleMenuViewForm: pe, UserAuthorization: ce },
1343
+ components: { RoleGrant: V, RoleMenu: te, RoleMenuViewForm: me, UserAuthorization: he },
1335
1344
  computed: {
1345
+ getTableButtons() {
1346
+ return this.tableButtons.filter((t) => t.functionName === "grantRoleAppMenu" ? !!this.appsId : !0);
1347
+ },
1336
1348
  initialLoading() {
1337
1349
  return this.openMode === "page";
1338
1350
  },
@@ -1348,6 +1360,11 @@ const me = {
1348
1360
  ...h(["tablePageSize", "tableSize", "labelPosition", "formMode"])
1349
1361
  },
1350
1362
  methods: {
1363
+ getAppId() {
1364
+ F({ code: "App_Id" }).then((t) => {
1365
+ t.code === 200 && (this.appsId = t.data ? t.data.value : "");
1366
+ });
1367
+ },
1351
1368
  userAuthorizationMenu() {
1352
1369
  if (this.selectedRowKeys.length === 0) {
1353
1370
  this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
@@ -1370,6 +1387,17 @@ const me = {
1370
1387
  }
1371
1388
  this.$refs.roleMenu.open(this.selectedRows[0]);
1372
1389
  },
1390
+ grantRoleAppMenu() {
1391
+ if (this.selectedRowKeys.length === 0) {
1392
+ this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
1393
+ return;
1394
+ }
1395
+ if (this.selectedRowKeys.length > 1) {
1396
+ this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
1397
+ return;
1398
+ }
1399
+ this.$refs.roleMenu.open(this.selectedRows[0], this.appsId);
1400
+ },
1373
1401
  grantRoleGrant() {
1374
1402
  if (this.selectedRowKeys.length === 0) {
1375
1403
  this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
@@ -1477,9 +1505,12 @@ const me = {
1477
1505
  let e = t.item.functionName;
1478
1506
  this[e] && this[e]();
1479
1507
  }
1508
+ },
1509
+ created() {
1510
+ this.getAppId();
1480
1511
  }
1481
1512
  };
1482
- var ye = function() {
1513
+ var be = function() {
1483
1514
  var e = this, s = e._self._c;
1484
1515
  return s("div", { staticClass: "gd-page-view" }, [s("div", { staticClass: "page-view-list", staticStyle: { padding: "0px" } }, [s("gd-tables", { ref: "table", attrs: { dataSource: e.loadData, size: e.tableSize, pageSize: e.tablePageSize, columns: e.tableColumns, selectedRowKeys: e.selectedRowKeys, height: e.getHeight, filtering: !0, selectedKeep: e.selectedKeep, initialLoading: e.initialLoading }, on: { onChange: e.onSelectChange }, scopedSlots: e._u([{ key: "name", fn: function({ column: n, row: i }) {
1485
1516
  return [s("gd-tooltip", { attrs: { rowKey: "name", row: i, highlight: "" }, on: { click: e.editForm } })];
@@ -1488,21 +1519,21 @@ var ye = function() {
1488
1519
  return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.refresh.apply(null, arguments);
1489
1520
  } }, model: { value: e.queryParam.name, callback: function(n) {
1490
1521
  e.$set(e.queryParam, "name", n);
1491
- }, expression: "queryParam.name" } }), s("div", { staticClass: "table-operator-search", on: { click: e.refresh } }, [s("i", { staticClass: "el-input__icon el-icon-search" })])], 1), s("div", { staticClass: "gd-table-operatorr" }, [e.openMode === "page" ? s("gd-btn-list", { attrs: { sysViewButtons: e.tableButtons }, on: { functionName: e.doEvent } }) : e._e()], 1)])];
1522
+ }, expression: "queryParam.name" } }), s("div", { staticClass: "table-operator-search", on: { click: e.refresh } }, [s("i", { staticClass: "el-input__icon el-icon-search" })])], 1), s("div", { staticClass: "gd-table-operatorr" }, [e.openMode === "page" ? s("gd-btn-list", { attrs: { sysViewButtons: e.getTableButtons }, on: { functionName: e.doEvent } }) : e._e()], 1)])];
1492
1523
  }, proxy: !0 }, { key: "filtering", fn: function({ colse: n, visible: i }) {
1493
1524
  return [s("gd-table-queries-field", { attrs: { columns: e.tableQueries, height: e.getHeight, queryParam: e.queryParam, colse: n, visible: i }, on: { save: e.saveQueries } })];
1494
1525
  } }]) })], 1), s("gd-edit-form", { ref: "editForm", attrs: { formItemWidth: "90%", loading: e.formLoading, transKey: e.transKey, buttons: e.formButtons, columns: e.getFormColumns, labelPosition: e.labelPosition, formMode: e.formMode }, on: { sbumit: e.sbumit } }), s("RoleGrant", { ref: "roleGrant", on: { ok: e.refresh } }), s("RoleMenu", { ref: "roleMenu", on: { ok: e.refresh } }), s("RoleMenuViewForm", { ref: "roleMenuViewForm", on: { ok: e.refresh } }), s("UserAuthorization", { ref: "userAuthorization", on: { ok: e.refresh } })], 1);
1495
- }, be = [], ve = /* @__PURE__ */ u(
1496
- me,
1526
+ }, ve = [], _e = /* @__PURE__ */ u(
1497
1527
  ye,
1498
1528
  be,
1529
+ ve,
1499
1530
  !1,
1500
1531
  null,
1501
- "f2f32578",
1532
+ "3c7b317a",
1502
1533
  null,
1503
1534
  null
1504
1535
  );
1505
- const p = ve.exports;
1536
+ const p = _e.exports;
1506
1537
  p.install = function(t) {
1507
1538
  t.component(p.name, p);
1508
1539
  };
@@ -1,8 +1,8 @@
1
1
  import { g as C } from "./system.org.b8d59e5d.mjs";
2
- import { e as O, a as N, f as P, c as B, h as M, i as E, j as D, k as U, l as I, m as A, n as q, o as H, q as j, r as z, t as S } from "./system.account.ae0822f1.mjs";
2
+ import { f as O, a as N, h as P, c as B, i as M, j as E, k as D, l as U, m as I, n as A, e as q, o as H, q as j, r as z, t as S } from "./system.account.16b1763b.mjs";
3
3
  import { m as L, n as T } from "./chartbi.48631362.mjs";
4
4
  import { t as G } from "./messages.7e85146d.mjs";
5
- import { G as Q } from "./system.role.4d761921.mjs";
5
+ import { G as Q } from "./system.role.f2eff184.mjs";
6
6
  const V = {
7
7
  data() {
8
8
  return {