gds-plus-design-vue 1.2.2 → 1.2.3
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.
- package/lib/gd-initial.js +17 -15
- package/lib/gd-initial.mjs +13935 -9453
- package/lib/{main.86fe06d4.mjs → main.05252737.mjs} +2 -2
- package/lib/{main.d091d06d.js → main.458dc0a0.js} +1 -1
- package/lib/{main.2415a49a.js → main.4aebe1c9.js} +1 -1
- package/lib/main.9801708f.js +1 -0
- package/lib/{main.b2d0a309.mjs → main.a30b25d6.mjs} +11 -11
- package/lib/{main.2cddfbbd.mjs → main.eb4b260e.mjs} +2 -2
- package/lib/{messages.2fff74f3.js → messages.30e41348.js} +5 -5
- package/lib/{messages.d8abe18d.mjs → messages.a1335b0f.mjs} +165 -150
- package/lib/style.css +2 -2
- package/lib/{system.account.8ea53681.js → system.account.1ff630c9.js} +1 -1
- package/lib/{system.account.9bc40d08.mjs → system.account.20f9e450.mjs} +9 -9
- package/lib/{system.config.c6e30213.js → system.config.532ab3b8.js} +1 -1
- package/lib/{system.config.8223d495.mjs → system.config.c85c05e9.mjs} +1 -1
- package/lib/{system.datasource.fd6a4e76.js → system.datasource.272f1add.js} +1 -1
- package/lib/{system.datasource.57233650.mjs → system.datasource.f64a59de.mjs} +1 -1
- package/lib/{system.dict.8f95218b.mjs → system.dict.565d69ca.mjs} +3 -3
- package/lib/{system.dict.a24f33b0.js → system.dict.a23e8cdf.js} +1 -1
- package/lib/{system.duplicatechecking.6b706948.mjs → system.duplicatechecking.268544dd.mjs} +1 -1
- package/lib/{system.duplicatechecking.39293985.js → system.duplicatechecking.f66790d1.js} +1 -1
- package/lib/{system.email.a2d9a307.js → system.email.00a93855.js} +1 -1
- package/lib/{system.email.dae988be.mjs → system.email.ada25702.mjs} +1 -1
- package/lib/{system.fieldsecurity.02627a7a.mjs → system.fieldsecurity.d14384cc.mjs} +126 -78
- package/lib/system.fieldsecurity.ede73621.js +1 -0
- package/lib/{system.file.0fa095a9.mjs → system.file.a23b3c83.mjs} +3 -3
- package/lib/system.file.aa567566.js +1 -0
- package/lib/{system.log.acb64505.mjs → system.log.8a9f4a4d.mjs} +1 -1
- package/lib/{system.log.c07ae5db.js → system.log.b3666991.js} +1 -1
- package/lib/system.notice.5fb1485e.js +1 -0
- package/lib/system.notice.6d0aa32c.mjs +1674 -0
- package/lib/{system.noticereceived.1aa70b65.mjs → system.noticereceived.70963f1b.mjs} +32 -24
- package/lib/system.noticereceived.e5ef5883.js +1 -0
- package/lib/{system.onlineuser.1c428d05.js → system.onlineuser.99e4de37.js} +1 -1
- package/lib/{system.onlineuser.3d848a32.mjs → system.onlineuser.c58fb6ce.mjs} +1 -1
- package/lib/system.org.56151be8.js +1 -0
- package/lib/{system.org.fcf96d1e.mjs → system.org.638db6d1.mjs} +17 -68
- package/lib/{system.permissions.23f5b097.mjs → system.permissions.aa0cc0d6.mjs} +2 -2
- package/lib/{system.permissions.a1a9505c.js → system.permissions.fcd56f67.js} +1 -1
- package/lib/{system.plugin.b6de4673.js → system.plugin.b17efa53.js} +1 -1
- package/lib/{system.plugin.e37f9dbc.mjs → system.plugin.beb44900.mjs} +1 -1
- package/lib/{system.pos.1a01fc97.mjs → system.pos.699e8dd6.mjs} +1 -1
- package/lib/{system.pos.a4fb19b0.js → system.pos.e8d9c488.js} +1 -1
- package/lib/{system.promptmanagement.290958b1.js → system.promptmanagement.109a07f5.js} +1 -1
- package/lib/{system.promptmanagement.36a65c51.mjs → system.promptmanagement.2ce3e426.mjs} +1 -1
- package/lib/{system.role.68de93ef.mjs → system.role.230b1445.mjs} +845 -354
- package/lib/system.role.f0d4082c.js +1 -0
- package/lib/{system.sumberrules.dd6299e8.js → system.sumberrules.38017ad1.js} +1 -1
- package/lib/{system.sumberrules.cdef9308.mjs → system.sumberrules.fa1aab86.mjs} +1 -1
- package/lib/{system.team.53d64006.js → system.team.3826e252.js} +1 -1
- package/lib/{system.team.ee652fe4.mjs → system.team.aeaede22.mjs} +1 -1
- package/lib/{system.teammembers.4a3dc336.js → system.teammembers.29128f16.js} +1 -1
- package/lib/{system.teammembers.26a2ba81.mjs → system.teammembers.2e3309c3.mjs} +2 -2
- package/lib/{system.timers.4efa8a7d.mjs → system.timers.0ec63785.mjs} +1 -1
- package/lib/{system.timers.b9424204.js → system.timers.b62568ad.js} +1 -1
- package/lib/{system.translation.21d2fd8b.js → system.translation.887fa90d.js} +1 -1
- package/lib/{system.translation.0a9399b4.mjs → system.translation.e71455aa.mjs} +2 -2
- package/lib/{system.user.4fcfdf99.mjs → system.user.84227a85.mjs} +4 -4
- package/lib/{system.user.d48a08db.js → system.user.bed5f82a.js} +1 -1
- package/lib/{system.useraffiliation.a59ce45b.js → system.useraffiliation.7ec0fcae.js} +1 -1
- package/lib/{system.useraffiliation.fb002239.mjs → system.useraffiliation.b3f03a33.mjs} +2 -2
- package/lib/{system.webresource.4df01c92.mjs → system.webresource.e6cb9173.mjs} +2 -2
- package/lib/{system.webresource.3366cc29.js → system.webresource.f8b78dd0.js} +1 -1
- package/locale/en_US.js +68 -18
- package/locale/id_ID.js +67 -17
- package/locale/vi_VN.js +67 -17
- package/locale/zh_CN.js +67 -17
- package/package.json +1 -1
- package/lib/main.4c447fc3.js +0 -1
- package/lib/system.fieldsecurity.a0cec24d.js +0 -1
- package/lib/system.file.d695ab37.js +0 -1
- package/lib/system.notice.5ae50bd4.mjs +0 -641
- package/lib/system.notice.f18578ae.js +0 -1
- package/lib/system.noticereceived.bfa98a9b.js +0 -1
- package/lib/system.org.5bb36f9c.js +0 -1
- package/lib/system.role.88100f66.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("./system.fieldsecurity.ede73621.js"),c=require("./chartbi.06e48153.js"),b=require("./messages.30e41348.js"),y=require("./system.notice.5fb1485e.js"),g=require("./system.account.1ff630c9.js"),k={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:(s,...e)=>this.renderHeader(s,...e,{effectType:"input"}),showOverflowTooltip:!0},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",align:"left",renderHeader:(s,...e)=>this.renderHeader(s,...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\u6587\u6863",functionName:"documentAuthorizationMenu",show:!0,transKey:"gd.user.documentAuthorization",icon:"el-icon-document",name:"sysRole:documentMenu"},{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 w={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 s=this.$refs.tree.getCheckedKeys();this.$emit("ok",Object.assign({...this.record},{checkedKeys:s})),this.closed()},getOrgData(){this.confirmLoading=!0,y.getOrgTree().then(s=>{s.success&&(this.orgTreeData=s.data,this.confirmLoading=!1)})},open(s){this.record=s,this.checkedKeys=s.checkedKeys,this.visible=!0,this.getOrgData()},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(s){const e=s.item.functionName;this[e]&&this[e]()}}};var $=function(){var e=this,t=e._self._c;return t("div",[t("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}},[t("template",{slot:"title"},[t("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),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?t("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)},K=[],C=c.normalizeComponent(w,$,K,!1,null,"2b164094",null,null);const T=C.exports;const R={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:s=>(this.confirmLoading=!0,new Promise((e,t)=>{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 s=this.$refs.table.tableData;s.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:s})).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(s){this.confirmLoading=!0;const e=this.$refs.table.tableData;e[s.index][s.name]=[...s.checkedKeys].join(","),this.loadData=[...e],this.refresh(),this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F"))},openList(s,e,t){const n=this.$refs.table.tableData,i=`${s.prop.replace("grantd","")}custom`,a=n[t][i],l=a?a.split(",").map(Number):[];this.$refs.roleScope.open({index:t,item:s,checkedKeys:l,data:e,name:i})},getUserControlData(){this.confirmLoading=!0,y.getOrgDetail({roleId:this.record.id}).then(s=>{s.success?(s.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=s.data.grants,this.submitData=s.data,this.$nextTick(()=>{setTimeout(()=>{this.refresh(),this.confirmLoading=!0},1e3),setTimeout(()=>{this.confirmLoading=!1},1200)})):(this.$message.error(s.message),this.confirmLoading=!1)})},open(s){this.record=s,this.visible=!0,this.getUserControlData()},closed(){this.fullscreen=!1,this.visible=!1},refresh(s=!0){this.$refs.table?this.$refs.table.refresh(s):console.log("err:\u89C6\u56FE\u672A\u52A0\u8F7D\uFF0C\u8BF7\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210\uFF01")},getDictionary(s){return this.$options.filters.dictData(s)},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(s){const e=s.item.functionName;this[e]&&this[e]()}}};var L=function(){var e=this,t=e._self._c;return t("div",[t("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}},[t("template",{slot:"title"},[t("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),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"margin-top":"-12px"}},[e.visible?t("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:l}){return[n.prop==="sysCodeGenName"?t("div",[e._v(" "+e._s(e.$i18nt(`Dynamics.${a.transkey}`,a.syscodegenname))+" ")]):t("div",{staticClass:"grant-select"},[t("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[t("el-option",{attrs:{label:e.$i18nt(`Dynamics.${r.transkey}`,r.name),value:r.code}})]})],2),a[n.prop].includes("5")?t("el-button",{staticClass:"active-color flex-center",attrs:{type:"text"},on:{click:function(r){return e.openList(n,a,l)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.view","\u67E5\u770B"))+" ")]):e._e()],1)]}}})],null,!0)}):e._e()],1)],2),t("RoleScope",{ref:"roleScope",on:{ok:e.setRoleScop}})],1)},I=[],S=c.normalizeComponent(R,L,I,!1,null,"39b91bb5",null,null);const x=S.exports;const D={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(s){return!(this.checkedKeys.filter(t=>s.menuBtnIds.includes(t)).length>=s.menuBtnIds.length)},checkedBtn(s,e){this.$emit("checkedBtn",s,e)},change(s,e){this.$emit("change",s,e)},open(s){this.$emit("open",s)},checked(s){return!!this.checkedKeys.filter(t=>t===s.id)[0]},fadeColor(s,e){let t=parseInt(s.substring(1,3),16),n=parseInt(s.substring(3,5),16),i=parseInt(s.substring(5,7),16);return`rgba(${t},${n},${i},${e})`}}};var N=function(){var e=this,t=e._self._c;return t("div",{style:{"--fadecolor":e.fadeColord}},[e._l(e.record,function(n){return[t("div",{staticClass:"list-item"},[e.menusType===0?t("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?t("div",{staticClass:"item-name"},[t("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?t("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?t("el-button",{staticStyle:{"margin-left":"12px",padding:"5px 15px"},attrs:{size:"mini"}},[e.hasAll(n)?t("span",{on:{click:function(i){return e.checkedBtn(n,1)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")]):t("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(),t("div",{staticClass:"item-data"},[n.children&&n.children.length>0&&n.children[0].menusType===2?t("div",{staticClass:"item-data-list"},[e._l(n.children,function(i){return[t("div",{staticClass:"item-name item-named",on:{click:function(a){return e.change(!i.checked,[i.id])}}},[i.checked?t("i",{staticClass:"gd-icons gd-icon-quanxuan active-color"}):t("div",{staticClass:"item-named-kuang"}),t("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?t("div",{staticClass:"list-more"},[n.open?t("LayoutItem",{attrs:{record:n.children,checkedKeys:e.checkedKeys},on:{open:e.open,change:e.change,checkedBtn:e.checkedBtn}}):e._e()],1):e._e()]})],2)},P=[],B=c.normalizeComponent(D,N,P,!1,null,"53cbc9f1",null,null);const _=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:_},methods:{handleSubmit(){this.confirmLoading=!0,h.sysRoleGrantMenu({id:this.record.id,grantmenuidlist:this.checkedKeys}).then(s=>{s.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")+s.message),this.confirmLoading=!1})},checkedItemBtn(s,e){let t=[...this.checkedKeys].filter(n=>!s.menuBtnIds.includes(n));e===1&&(t=t.concat(s.menuBtnIds)),this.checkedKeys=[...t],this.handleItem()},openItem(s){let e=[...this.menuTreeData];const t=n=>(n=n.filter((i,a)=>(i.id===s.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=t(i.children)),!0)),n);t(e),this.menuTreeData=[...e]},changeItem(s,e,t=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(o=>e.includes(o))[0];const i=this.list.filter(o=>e.includes(o.id))[0],a=t&&i?i.menuIds:[];if(s?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(o=>!e.includes(o)).filter(o=>!a.includes(o)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let l=[];this.findParent(this.menuTreeData,i,l);let r=[],d=[];l.forEach(o=>{this.checkedKeys.filter(f=>o.menuIds.includes(f)).length===o.menuIds.length&&o.menuIds.length>0&&!o.checked?r.push(o.id):d.push(o.id)}),r.forEach(o=>{this.changeItem(!0,[o],!1)}),d.forEach(o=>{this.changeItem(!1,[o],!1)})},handleItem(){let s=[...this.menuTreeData];const e=t=>(t=t.filter((n,i)=>{const a=this.checkedKeys.filter(l=>n.menuIds.includes(l));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}),t);e(s),this.menuTreeData=[...s],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(s){s?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getMenuTree(),this.expandedMenuKeys(),this.getMenuList()]).then(async s=>{let e=[],t=[];const n=r=>(r=r.filter((d,o)=>{const u=this.checkedKeys.filter(p=>d.id===p)[0];return d.open=!0,d.checked=d.type===1?!!u:!1,d.isIndeterminate=!1,d.menusType=d.type,e.push(d.id),t.push(d),d.children&&d.children.length>0&&(d.children=n(d.children)),!0}),r);let i=this.menuAll.filter(r=>!!this.systemMenuAll.filter(o=>o.id===r.id)[0]);await n(i),this.allCheckedKeys=e;let a=[];t.forEach((r,d)=>{const o=this.getMenuIds(r);t[d].menuIds=o.arr,t[d].menuBtnIds=o.btn,!(this.checkedKeys.filter(f=>o.arr.includes(f)).length===o.arr.length)&&o.arr.length>0&&a.push(r.id)}),this.list=t;const l=this.checkedKeys.filter(r=>e.includes(r)).filter(r=>!a.includes(r)).filter((r,d,o)=>o.indexOf(r)===d);this.checkedKeys=l,this.allClose=this.checkedKeys.length===e.length&&e.length>0,this.menuTreeData=[...i],this.handleItem(),this.confirmLoading=!1})},open(s,e){this.record=s,this.appsId=e||window.$systemInfo.id,this.visible=!0,this.init()},getMenuTree(){return g.SysMenuTreeForGrant({roleId:this.record.id}).then(s=>(s.code===200&&(this.menuAll=s.data),s))},expandedMenuKeys(){return h.sysRoleOwnMenu({id:this.record.id}).then(s=>(s.code===200&&(this.checkedKeys=s.data),s))},getMenuList(){let s={AppsId:this.appsId};return g.sysMenuListByAppsId(s).then(e=>(e.code===200&&(this.systemMenuAll=e.data),e))},getMenuIds(s){let e=[],t=[];const n=i=>(i=i.filter((a,l)=>(a.menusType!==2?e.push(a.id):t.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return s.children&&n(s.children),{arr:e,btn:t}},findParent(s,e,t){for(let n of s)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,t))return t.unshift(n),!0;return!1},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(s){const e=s.item.functionName;this[e]&&this[e]()}}};var M=function(){var e=this,t=e._self._c;return t("div",[t("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}},[t("template",{slot:"title"},[t("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),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?t("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),t("template",{slot:"footer"},[t("div",{staticClass:"btoms"},[t("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,"d82ecaae",null,null);const E=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:s=>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 s=new Map;for(let e in this.queryParam)s.set(e==="statecodes"?"searchctatus":e,this.queryParam[e]);return Object.fromEntries(s)},getFormColumns(){return this.formColumnsuser.filter(e=>(e.prop==="orgid"&&(e.treeOptions=[...this.orgTree]),!0))},getTableButtons(){return this.tableButtons.filter(s=>(s.show=!this.disableBtn.includes(s.displayName),!0))},getHeight(){return this.height},styled(){return`height:${this.height+76}px`},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getRowId(s){let e=[];s.filter(t=>!this.disabledRowId.includes(t.id)).forEach(t=>{e.push(t.id)}),this.disabledRowId=this.disabledRowId.concat(e)},saveQueries(s){this.queryParam={...s},this.refresh()},refresh(){this.$refs.table.refresh()},getOrgTree(){y.getOrgTree({}).then(s=>{if(s.code===200){const e=t=>(t=t.filter((n,i)=>(n.value=String(n.value),n.children&&n.children.length>0&&(n.children=e(n.children)),!0)),t);this.orgTree=e(s.data)}this.loading=!1})},handleNodeClick(s){this.queryParam.orgId===s.id?(delete this.queryParam.orgId,this.$nextTick(()=>{setTimeout(()=>{this.$refs.tree.setCurrentKey(null)},0)})):this.queryParam=Object.assign({...this.queryParam},{orgId:s.id}),this.refresh()},handleOk(){this.$refs.table.refresh()},onSelectChange(s,e){this.selectedRowKeys=s,this.selectedRows=e},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()},lookupSeled(s){if(s.fkData.length===0){this.$refs.engineSearch.closed();return}this.$refs.engineSearch.confirmLoading=!0,g.postbindUsersToRole({roleId:this.openSelecteKeys[0],userIdList:s.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 s=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,t,n)=>{if(e!=="confirm"){n();return}t.confirmButtonLoading=!0,t.cancelButtonLoading=!0,t.showCancelButton=!1,g.postunbindUsersFromRole({roleId:s.openSelecteKeys[0],userIdList:s.selectedRowKeys}).then(i=>{i.success?(s.$message.success(s.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")),s.disabledRowId=s.disabledRowId.filter(a=>!s.selectedRows.filter(r=>r.id===a)[0]),t.confirmButtonLoading=!1,t.cancelButtonLoading=!1,t.showCancelButton=!0,n(),s.refresh()):s.$message.error(s.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+i.message)})}})}},created(){}};var j=function(){var e=this,t=e._self._c;return t("div",{staticClass:"gd-page-view",staticStyle:{display:"flex",background:"rgb(245, 245, 245)"}},[t("div",{staticClass:"page-view-list"},[t("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[t("div",{staticClass:"gd-table-operator"},[t("div",{staticClass:"gd-table-operatorr"},[t("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"name",fn:function({column:n,row:i}){return[t("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.name)+" ")])]}},{key:"nickname",fn:function({column:n,row:i}){return[t("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.nickname)+" ")])]}},{key:"orgname",fn:function({column:n,row:i}){return[t("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.orgname)+" ")])]}},{key:"sex",fn:function({column:n,row:i}){return[t("span",[e._v(" "+e._s(e._f("dictType")("gender",i.gender))+" ")])]}},{key:"status",fn:function({column:n,row:i}){return[t("span",[e._v(" "+e._s(e._f("dictType")("state_code",i.statecodes))+" ")])]}}])}),t("gd-search",{ref:"engineSearch",attrs:{appendToBody:!0,disabledRowId:e.disabledRowId},on:{lookupSeled:e.lookupSeled}})],1)])},q=[],G=c.normalizeComponent(z,j,q,!1,null,"e9dd56ab",null,null);const v=G.exports;const V={data(){return{buttons:[],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"90%",selectedRowKeys:[]}},components:{UserFormDate:v},computed:{height(){return this.screenHeight-(this.fullscreen?160:340)},...c.mapGetters(["screenHeight"])},methods:{handleSubmit(){this.closed(),this.$emit("ok")},open(s){this.record=s,this.visible=!0,this.selectedRowKeys=[s.id],this.$nextTick(()=>{setTimeout(()=>{this.$refs.userForm.refresh()},0)})},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},onSelectChange(s){this.selectedRowKeys=s},doEvent(s){const e=s.item.functionName;this[e]&&this[e]()}}};var H=function(){var e=this,t=e._self._c;return t("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}},[t("template",{slot:"title"},[t("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),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?t("UserFormDate",{ref:"userForm",attrs:{height:e.height,openMode:"components",openSelecteKeys:e.selectedRowKeys},on:{onSelectChange:e.onSelectChange}}):e._e()],1)],2)},U=[],J=c.normalizeComponent(V,H,U,!1,null,"46b57430",null,null);const Q=J.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:"80%",selectedPath:"/",pathDialogVisible:!1,tempSelectedPath:"",folderTree:[],treeProps:{label:"name",children:"children"},permissions:{ReadMetaData:"allow",ManagePrem:"deny"},cardList:[{name:"\u901A\u7528\u6743\u9650",transkey:"gd.user.generalPermissions",id:"1",list:[{value:"",name:"\u67E5\u770B",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_readmetadata_Name",code:"readmetadata",icon:"el-icon-view"},{value:"",name:"\u91CD\u547D\u540D",code:"rename",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_rename_Name",icon:"el-icon-edit"},{value:"",name:"\u5220\u9664",code:"delete",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_delete_Name",icon:"el-icon-delete-solid"},{value:"",name:"\u7BA1\u7406\u6743\u9650",code:"manageprem",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_manageprem_Name",icon:"el-icon-user-solid"},{value:"",name:"\u79FB\u52A8",code:"move",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_move_Name",icon:"el-icon-rank"}]},{name:"\u6587\u4EF6\u5939\u7279\u6B8A\u6743\u9650",transkey:"gd.user.folderSpecialPermissions",id:"2",list:[{value:"",name:"\u521B\u5EFA\u6587\u4EF6",code:"createfile",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_createfile_Name",icon:"el-icon-document-add"},{value:"",name:"\u521B\u5EFA\u5B50\u6587\u4EF6\u5939",code:"createsubfolder",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_createsubfolder_Name",icon:"el-icon-folder-add"}]},{name:"\u6587\u4EF6\u7279\u6B8A\u6743\u9650",transkey:"gd.user.fileSpecialPermissions",id:"3",list:[{value:"",name:"\u4E0B\u8F7D",code:"download",transkey:"Sys_Tables_sys_doc_role_premissions_Fields_download_Name",icon:"el-icon-download"}]}],restaurants:[],objectId:"0",currentPermissions:[],id:""}},components:{UserFormDate:v},computed:{height(){return this.screenHeight-(this.fullscreen?160:340)},...c.mapGetters(["screenHeight"])},methods:{querySearch(s,e){var t=this.restaurants,n=s?t.filter(this.createFilter(s)):t;e(n)},createFilter(s){return e=>e.name.toLowerCase().indexOf(s.toLowerCase())===0},handleSelect(s){console.log(s)},keyuprefresh(){},buildTree(s){const e=s.find(a=>a.parentid===null);if(!e)throw new Error("No root node found (parentid: null)");const t={};s.forEach(a=>{t[a.id]={name:a.name,id:a.id,children:[]}}),s.forEach(a=>{if(a.parentid===null)return;const l=t[a.parentid];l?l.children.some(r=>r.id===a.id)||l.children.push(t[a.id]):t[e.id].children.push(t[a.id])});function n(a){a.children&&a.children.length>0&&(a.children.sort((l,r)=>l.name.localeCompare(r.name)),a.children.forEach(l=>n(l)))}const i={name:e.name,id:e.id,children:t[e.id].children};return n(i),[i]},handleSubmit(){this.id!=""?this.edit():this.add()},add(){const e=this.currentPermissions.map(t=>{const n=t.list.reduce((i,a)=>(i[a.code]=a.value,i),{});return{...t,...n}}).map(({list:t,...n})=>n);this.confirmLoading=!0,h.docObjectsRolesGrantDocsPermission(e).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})},edit(){const e=this.currentPermissions.map(t=>{const n=t.list.reduce((i,a)=>(i[a.code]=a.value,i),{});return{...t,...n}}).map(({list:t,...n})=>n);console.log(e),this.confirmLoading=!0,h.docObjectsRolesBatchEdit(e).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})},open(s){this.record=s,this.visible=!0,this.getallTree(),this.getDetail(s)},getDetail(s){h.sysDocObjectsRolesGetByRoleId({roleId:s.id}).then(e=>{if(e.code==200&&(this.currentPermissions=[],this.$refs.elTreeRef&&this.$refs.elTreeRef.setCheckedKeys([]),e.data.length>0)){this.id=e.data[0].id,this.currentPermissions=[];const t=e.data.map(i=>{const a=[{name:"\u67E5\u770B",code:"readmetadata",value:i.readmetadata},{name:"\u91CD\u547D\u540D",code:"rename",value:i.rename},{name:"\u5220\u9664",code:"delete",value:i.delete},{name:"\u7BA1\u7406\u6743\u9650",code:"manageprem",value:i.manageprem},{name:"\u79FB\u52A8",code:"move",value:i.move},{name:"\u521B\u5EFA\u6587\u4EF6",code:"createfile",value:i.createfile},{name:"\u521B\u5EFA\u5B50\u6587\u4EF6\u5939",code:"createsubfolder",value:i.createsubfolder},{name:"\u4E0B\u8F7D",code:"download",value:i.download}];return{id:i.id,name:i.name,ischeck:!1,sysdocobjectid:i.sysdocobjectid,sysroleid:i.sysroleid,list:a}});this.currentPermissions=t,this.handlePermissionClick(this.currentPermissions[0]);const n=t.map(i=>i.sysdocobjectid);this.$refs.elTreeRef&&this.$refs.elTreeRef.setCheckedKeys(n)}})},getallTree(){h.sysDocObjectsAllDocList().then(s=>{if(s.code==200){this.restaurants=s.data;const e=this.buildTree(JSON.parse(JSON.stringify(s.data)));this.folderTree=e,this.selectedPath="/"+s.data[0].name}})},closed(){this.cardList.forEach(s=>{Array.isArray(s.list)&&s.list.forEach(e=>{e.value=""})}),this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(s){const e=s.item.functionName;this[e]&&this[e]()},openPathDialog(){this.pathDialogVisible=!0,this.tempSelectedPath=this.selectedPath},delList(s){console.log(s);let e=this;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,n,i)=>{if(t!=="confirm"){i();return}n.confirmButtonLoading=!0,n.cancelButtonLoading=!0,n.showCancelButton=!1,s.id===0?e.$message.success(e.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")):h.docObjectsRolesDel({ids:s.id}).then(a=>{n.confirmButtonLoading=!1,n.cancelButtonLoading=!1,n.showCancelButton=!0,a.success?e.$message.success(e.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")):e.$message.error(e.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+a.message)}),i(),e.currentPermissions=e.currentPermissions.filter(a=>a.sysdocobjectid!==s.sysdocobjectid),e.currentPermissions.length==0&&e.cardList.forEach(a=>{Array.isArray(a.list)&&a.list.forEach(l=>{l.value=""})}),e.cancelNodeCheck(s.sysdocobjectid)}})},cancelNodeCheck(s){const e=this.$refs.elTreeRef;e&&e.setChecked(s,!1)},handlecheck(s){console.log(s)},handleDirectoryCheck(s,e){const t=s.id,n=JSON.parse(JSON.stringify(this.currentPermissions)).filter(i=>i.sysdocobjectid===s.id);if(e&&n.length===0){const i={sysdocobjectid:t,sysroleid:this.record.id,name:s.name,ischeck:!0,id:0,list:[{name:"\u67E5\u770B",code:"readmetadata",value:""},{name:"\u91CD\u547D\u540D",code:"rename",value:""},{name:"\u5220\u9664",code:"delete",value:""},{name:"\u7BA1\u7406\u6743\u9650",code:"manageprem",value:""},{name:"\u79FB\u52A8",code:"move",value:""},{name:"\u521B\u5EFA\u6587\u4EF6",code:"createfile",value:""},{name:"\u521B\u5EFA\u5B50\u6587\u4EF6\u5939",code:"createsubfolder",value:""},{name:"\u4E0B\u8F7D",code:"download",value:""}]};this.currentPermissions.push(i),this.currentPermissions.forEach(a=>{a.ischeck=!1,a.sysdocobjectid===t&&(a.ischeck=!0)}),this.cardList.forEach(a=>{Array.isArray(a.list)&&a.list.forEach(l=>{l.value=""})})}else if(!e&&n.length>0&&this.currentPermissions.length>0){let i=this;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:(a,l,r)=>{if(a!=="confirm"){r(),setTimeout(()=>{this.$nextTick(()=>{this.$refs.elTreeRef.setChecked(s.id,!0)})});return}l.confirmButtonLoading=!0,l.cancelButtonLoading=!0,l.showCancelButton=!1,n[0].id===0?i.$message.success(i.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")):h.docObjectsRolesDel({ids:n[0].id}).then(d=>{l.confirmButtonLoading=!1,l.cancelButtonLoading=!1,l.showCancelButton=!0,d.success?i.$message.success(i.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")):i.$message.error(i.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+d.message)}),r(),this.nextclickdel(t)}})}},nextclickdel(s){this.currentPermissions=this.currentPermissions.filter(t=>t.sysdocobjectid!==s),this.currentPermissions.forEach(t=>{t.ischeck=!1}),this.currentPermissions[this.currentPermissions.length-1].ischeck=!0;const e={};this.currentPermissions[this.currentPermissions.length-1].list.forEach(t=>{e[t.name]=t.value}),this.cardList.forEach(t=>{Array.isArray(t.list)&&t.list.forEach(n=>{const i=e[n.name];i!==void 0&&i!==""&&i!==null&&(n.value=i.toString())})})},handleNodeClick(s,e){this.objectId=s.id;let t=[],n=e;for(;n;)t.unshift(n.data.name),n=n.parent;this.tempSelectedPath=""+t.join("/")},handlePermissionClick(s){this.currentPermissions.forEach(t=>{t.ischeck=!1}),s.ischeck=!0;const e={};s.list.forEach(t=>{e[t.name]=t.value}),this.cardList.forEach(t=>{Array.isArray(t.list)&&t.list.forEach(n=>{const i=e[n.name];i!=null&&(n.value=i.toString())})})},confirmPath(){this.selectedPath=this.tempSelectedPath,this.pathDialogVisible=!1},handleReadMetaDataChange(s,e){s.target.tagName==="INPUT"&&s.target.type==="radio"&&(e.value===""?e.value=s.target.value:e.value=null,setTimeout(()=>{if(this.currentPermissions.length>0){const t=this.currentPermissions.find(n=>n.ischeck);if(t){const n=t.list.find(i=>i.name===e.name);n&&(n.value=e.value)}}},10))}}};var X=function(){var e=this,t=e._self._c;return t("div",[t("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:"30px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[t("template",{slot:"title"},[t("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.documentAuthorization","\u6388\u6743\u6587\u6863"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),t("div",{staticClass:"main-layout"},[t("div",{staticClass:"directory-tree-section"},[t("div",{staticClass:"section-header"},[e._v("\u9009\u62E9\u76EE\u5F55")]),t("el-tree",{ref:"elTreeRef",attrs:{"check-strictly":"",data:e.folderTree,"node-key":"id","show-checkbox":"",props:e.treeProps},on:{"check-change":e.handleDirectoryCheck,"node-click":e.handleNodeClick}})],1),t("div",[t("div",{staticClass:"preview-card"},[t("div",{staticClass:"card-header"},[t("span",[e._v("\u6743\u9650\u9884\u89C8")])]),t("div",{staticClass:"permission-tags"},e._l(e.currentPermissions,function(n){return t("div",{key:n.sysdocobjectid,staticClass:"permission-tags-item",class:{checked:n.ischeck},on:{click:function(i){return e.handlePermissionClick(n)}}},[e._v(" "+e._s(n.name)+" "),t("div",{staticClass:"permission-tags-item-content"},e._l(n.list,function(i,a){return t("div",{key:a},[t("span",[e._v(e._s(i.name))]),i.value=="1"?t("el-tag",[e._v(e._s(e.$i18nt("gd.user.allow","\u5141\u8BB8")))]):e._e(),i.value=="2"?t("el-tag",{attrs:{type:"danger"}},[e._v(e._s(e.$i18nt("gd.user.refuse","\u62D2\u7EDD")))]):e._e()],1)}),0),t("i",{staticClass:"el-icon-close del-btn",on:{click:function(i){return e.delList(n)}}})])}),0)]),t("div",[t("div",{staticClass:"permission-section"},[t("h3",[e._v(e._s(e.$i18nt("gd.user.setOperationPermissions","\u8BBE\u7F6E\u64CD\u4F5C\u6743\u9650")))]),e._l(e.cardList,function(n,i){return t("div",{key:i},[t("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[t("h4",[e._v(e._s(e.$i18nt(n.transkey,n.name)))])]),t("div",{staticClass:"permission-list"},[t("div",{staticClass:"permission-category"},e._l(n.list,function(a,l){return t("el-card",{key:l,staticClass:"permission-item",attrs:{shadow:"hover"}},[t("div",{staticClass:"perm-info"},[t("i",{staticClass:"gd-icons active-color",class:a.icon,staticStyle:{"font-size":"14px","margin-right":"10px"}}),t("div",{staticClass:"perm-name"},[e._v(e._s(e.$i18nt(`Dynamics.${a.transkey}`,a.name))+" ")])]),t("div",{staticClass:"perm-actions"},[t("el-radio-group",{nativeOn:{click:function(r){return e.handleReadMetaDataChange(r,a)}},model:{value:a.value,callback:function(r){e.$set(a,"value",r)},expression:"items.value"}},[t("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.$i18nt("gd.user.allow","\u5141\u8BB8")))]),t("el-radio",{attrs:{label:"2"}},[e._v(e._s(e.$i18nt("gd.user.refuse","\u62D2\u7EDD")))])],1)],1)])}),1)])])})],2)])])])],2)],1)},Y=[],Z=c.normalizeComponent(W,X,Y,!1,null,"5fe0b6ad",null,null);const ee=Z.exports;const te={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:_},methods:{async handleSubmit(){const s=e=>(e=e.filter((t,n)=>{const i=this.checkedKeys.filter(a=>t.id===a)[0];return t.type=i?1:0,t.formlist&&t.formlist.length>0&&(t.formlist=s(t.formlist)),t.viewlist&&t.viewlist.length>0&&(t.viewlist=s(t.viewlist)),t.btnlist&&t.btnlist.length>0&&(t.btnlist=s(t.btnlist)),!0}),e);this.confirmLoading=!0,await s(this.menuAll),h.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(s,e){let t=[...this.checkedKeys].filter(n=>!s.menuBtnIds.includes(n));e===1&&(t=t.concat(s.menuBtnIds)),this.checkedKeys=[...t],this.handleItem()},openItem(s){let e=[...this.menuTreeData];const t=n=>(n=n.filter((i,a)=>(i.id===s.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=t(i.children)),!0)),n);t(e),this.menuTreeData=[...e]},changeItem(s,e,t=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(o=>e.includes(o))[0];const i=this.list.filter(o=>e.includes(o.id))[0],a=t&&i?i.menuIds:[];if(s?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(o=>!e.includes(o)).filter(o=>!a.includes(o)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let l=[];this.findParent(this.menuTreeData,i,l);let r=[],d=[];l.forEach(o=>{this.checkedKeys.filter(f=>o.menuIds.includes(f)).length===o.menuIds.length&&o.menuIds.length>0&&!o.checked?r.push(o.id):d.push(o.id)}),r.forEach(o=>{this.changeItem(!0,[o],!1)}),d.forEach(o=>{this.changeItem(!1,[o],!1)})},handleItem(){let s=[...this.menuTreeData];const e=t=>(t=t.filter((n,i)=>{const a=this.checkedKeys.filter(l=>n.menuIds.includes(l));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}),t);e(s),this.menuTreeData=[...s],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(s){s?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getList()]).then(async s=>{this.confirmLoading=!1;let e=JSON.parse(JSON.stringify(this.menuTreeDatad)),t=[];const n=a=>(a=a.filter((l,r)=>{const d=this.checkedKeys.filter(o=>l.id===o)[0];return l.open=!0,l.checked=l.menusType===1?!!d:!1,l.isIndeterminate=!1,t.push(l),l.children&&l.children.length>0&&(l.children=n(l.children)),!0}),a);await n(e);let i=[];t.forEach((a,l)=>{const r=this.getMenuIds(a);t[l].menuIds=r.arr,t[l].menuBtnIds=r.btn,!(this.checkedKeys.filter(u=>r.arr.includes(u)).length===r.arr.length)&&r.arr.length>0&&i.push(a.id)}),this.list=t,this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0,this.menuTreeData=[...e],this.handleItem(),console.log(this.menuAll,"123")})},getList(){return h.sysRoleViewOnBtnList({roleId:this.record.id}).then(s=>{if(s.code===200){let e=[],t=[];const n=(a,l)=>(a=a.filter((r,d)=>{r.parentId=l,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,t.push(r.id),r.type===1&&e.push(r.id);let o=[];return r.viewlist&&r.viewlist.length>0&&(r.viewlist.map(u=>(u.iconClass="gd-icon-shitumoshi",u)),o=o.concat(r.viewlist)),r.formlist&&r.formlist.length>0&&(r.formlist.map(u=>(u.iconClass="gd-icon-biaodanmoshi",u)),o=o.concat(r.formlist)),r.btnlist&&r.btnlist.length>0&&(o=o.concat(r.btnlist)),o.length>0&&(r.children=n(o,r.id)),!0}),a);this.menuAll=s.data.list;let i=JSON.parse(JSON.stringify(this.menuAll));n(i,0),this.checkedKeys=e,this.allCheckedKeys=t,this.menuTreeDatad=[...i]}return s})},getMenuIds(s){let e=[],t=[];const n=i=>(i=i.filter((a,l)=>(a.menusType!==2?e.push(a.id):t.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return s.children&&n(s.children),{arr:e,btn:t}},findParent(s,e,t){for(let n of s)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,t))return t.unshift(n),!0;return!1},open(s){this.record=s,this.visible=!0,this.init()},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(s){const e=s.item.functionName;this[e]&&this[e]()}}};var se=function(){var e=this,t=e._self._c;return t("div",[t("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}},[t("template",{slot:"title"},[t("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),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?t("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),t("template",{slot:"footer"},[t("div",{staticClass:"btoms"},[t("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)},ne=[],ie=c.normalizeComponent(te,se,ne,!1,null,"e6593396",null,null);const ae=ie.exports;const re={name:"GdRole",props:{height:{type:Number,default:100},openMode:{type:String,default:"page"},openSelecteKeys:{type:Array,default:()=>[]}},mixins:[b.tablesFilter,k],data(){return{appsId:"",transKey:"gd.btn.add",formLoading:!1,loading:!0,selectedRowKeys:[],selectedRows:[],queryParam:{},allRowData:[],loadData:s=>(this.selectedKeep&&(this.selectedRowKeys=[...this.openSelecteKeys]),h.getRolePage(Object.assign(s,this.queryParam,{sysAppsId:window.$systemInfo.id})).then(e=>(this.allRowData=e.data,e.data))),isDoc:""}},components:{RoleGrant:x,RoleMenu:E,RoleMenuViewForm:ae,UserAuthorization:Q,DocumentAuthorization:ee},computed:{getTableButtons(){return this.tableButtons.filter(s=>s.functionName==="grantRoleAppMenu"?!!this.appsId:s.functionName==="documentAuthorizationMenu"?this.isDoc==1:!0)},initialLoading(){return this.openMode==="page"},selectedKeep(){return this.openMode!=="page"},getFormColumns(){return this.formColumns.filter(s=>(s.prop==="code"&&(s.disabled=this.transKey!=="gd.btn.add"),!(this.transKey==="gd.https.copy"&&s.prop==="code")))},getHeight(){return this.height},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getConfigInfo(){let s={code:"GDS_Enable_Doc_Premissions"};g.getConfigInfoByCode(s).then(e=>{e.code===200&&(this.isDoc=e.data.value)})},getAppId(){g.getConfigInfoByCode({code:"App_Id"}).then(s=>{s.code===200&&(this.appsId=s.data?s.data.value:"")})},documentAuthorizationMenu(){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.documentAuthorization.open(this.selectedRows[0])},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(s){this.queryParam={...s},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(s){this.transKey="gd.btn.edit",this.$refs.editForm.open(s)},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:(s,e,t)=>{this.delHand(s,e,t)}})},delHand(s,e,t){if(s!=="confirm"){t();return}let n=[];this.selectedRows.forEach(i=>{let a=h.sysRoleDelete(i).then(l=>l);n.push(a)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(n).then(i=>{const a=i.filter(l=>!l.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),t(),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:s,record:e,btn:t},n,i){this.formLoading=!0;let a=e?this.transKey==="gd.https.copy"?h.sysRoleCopyRole:h.sysRoleEdit:h.sysRoleAddV2;const l=this.transKey!=="gd.https.edit"?Object.assign(s,{sysappsid:window.$systemInfo.id}):s;a(l).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(s,e){this.selectedRowKeys=s,this.selectedRows=e,this.$emit("onSelectChange",s,e,this.allRowData)},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()}},created(){this.getAppId(),this.getConfigInfo()}};var le=function(){var e=this,t=e._self._c;return t("div",{staticClass:"gd-page-view"},[t("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[t("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[t("gd-tooltip",{attrs:{rowKey:"name",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"operator",fn:function(){return[t("div",{staticClass:"gd-table-operator"},[t("div",{staticClass:"gd-table-operatorl"},[t("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"}}),t("div",{staticClass:"table-operator-search",on:{click:e.refresh}},[t("i",{staticClass:"el-input__icon el-icon-search"})])],1),t("div",{staticClass:"gd-table-operatorr"},[e.openMode==="page"?t("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[t("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.getHeight,queryParam:e.queryParam,colse:n,visible:i},on:{save:e.saveQueries}})]}}])})],1),t("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}}),t("RoleGrant",{ref:"roleGrant",on:{ok:e.refresh}}),t("RoleMenu",{ref:"roleMenu",on:{ok:e.refresh}}),t("RoleMenuViewForm",{ref:"roleMenuViewForm",on:{ok:e.refresh}}),t("UserAuthorization",{ref:"userAuthorization",on:{ok:e.refresh}}),t("DocumentAuthorization",{ref:"documentAuthorization",on:{ok:e.refresh}})],1)},oe=[],de=c.normalizeComponent(re,le,oe,!1,null,"00f39bc6",null,null);const m=de.exports;m.install=function(s){s.component(m.name,m)};exports.GDpackage=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./chartbi.06e48153.js"),d=require("./messages.2fff74f3.js");function c(a){return window.axios({url:"/SysNumberRules/page",method:"get",params:a})}function u(a){return window.axios({url:"/sysNumberRules/add",method:"post",data:a})}function p(a){return window.axios({url:"/sysNumberRules/edit",method:"post",data:a})}function m(a){return window.axios({url:"/sysNumberRules/delete",method:"post",data:a})}const g={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.msg.sendRecord.name",prop:"name",label:"\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.process.tableSort",prop:"sysCodeGenId",label:"\u8868\u540D\u79F0",type:"slot",slotType:"sysCodeGenId",align:"left"},{transKey:"gd.process.tableSort",prop:"columnid",label:"\u5B57\u6BB5",type:"slot",slotType:"columnid",align:"left"},{transKey:"gd.process.tableSort",prop:"nextseqno",label:"\u4E0B\u4E00\u6D41\u6C34\u53F7",align:"left"},{transKey:"gd.flow.state",prop:"statecodes",label:"\u72B6\u6001",type:"slot",slotType:"statecodes",align:"left"}],formColumns:[{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.msg.sendRecord.msgTemplate",effectType:"selectFkMultiple",prop:"syscodegenid",label:"\u7F16\u53F7\u8868",placeholder:"\u8BF7\u9009\u62E9",placeholderTransKey:"gd.placeholder.select",fkEntityName:"sys_code_gen",disabled:!1,multiple:!1,rules:[]}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysSumberrules:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysSumberrules:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysSumberrules:delete"}],tableQueries:[{transKey:"gd.org.name",prop:"name",label:"\u540D\u79F0",effectType:"input",rules:[]}],formButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}]}}};const f={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0}},data(){return{confirmLoading:!1,visible:!1,fullScreen:!1,title:"",width:"50%",sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],prefixtype:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],nextseqno:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}]},ruleFormData:{id:"",name:"",prefixtype:"",prefix:"",dateformat:"",seqtype:"",seqrange:"",seqlength:void 0,postfixtype:"",postfix:"",nextseqno:"",separatorch:"",syscodegenid:"",columnid:""},dataList:[],columnList:[],disabled:!0,type:1}},methods:{lookup(){this.disabled},open(a){this.visible=!0,this.fullScreen=!1,this.title=a?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.type=a?2:1,a&&this.getSetData(a)},getSetData(a){let e={id:a.id,name:a.name,prefixtype:a.prefixtype.toString(),prefix:a.prefix,dateformat:a.dateformat||a.dateformat==0?a.dateformat.toString():"",seqtype:a.seqtype||a.seqtype==0?a.seqtype.toString():"",seqrange:a.seqrange?a.seqrange.toString():"",seqlength:a.seqlength,postfixtype:a.postfixtype||a.postfixtype==0?a.postfixtype.toString():"",postfix:a.postfix,nextseqno:a.nextseqno?a.nextseqno.toString():"",separatorch:a.separatorch||a.separatorch==0?a.separatorch.toString():"",syscodegenid:a.syscodegen?a.syscodegenid:"",columnid:a.syscodegenconfig?a.columnid:""};this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=e},0)}),this.getFkDada(a)},getFkDada(a){let e=[];if(a.syscodegenid){let t=this.searchData({id:a.syscodegenid,fkEntityName:"sys_code_gen"},"syscodegenid");e.push(t)}if(a.columnid){let t=this.searchData({id:a.columnid,fkEntityName:"sys_code_gen_config"},"columnid");e.push(t)}Promise.all(e).then(t=>{t.forEach(s=>{s.prop=="syscodegenid"&&(this.dataList=s.res.data?s.res.data:[]),s.prop=="columnid"&&(this.columnList=s.res.data?s.res.data:[])})})},searchData(a,e){return d.baseFkList(a).then(t=>({res:t,data:a,prop:e}))},handleSubmit(){this.$refs.ruleForm.validate(a=>{if(a){let e={...this.ruleFormData};this.type==1?this.add(e):this.edit(e)}})},add(a){this.confirmLoading=!0,delete a.id,u(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(a){this.confirmLoading=!0,p(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},getDictionary(a){return this.$options.filters.dictData(a)},toggleFullscreen(){this.fullScreen=!this.fullScreen},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={name:"",prefixtype:"",prefix:"",dateformat:"",seqtype:"",seqrange:"",seqlength:void 0,postfixtype:"",postfix:"",nextseqno:"",separatorch:"",syscodegenid:"",columnid:""}},doEvent(a){let e=a.item.functionName;this[e]&&this[e]()}}};var h=function(){var e=this,t=e._self._c;return t("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(s){e.visible=s},closed:e.handleCancel}},[t("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[t("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[t("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(s){s.preventDefault()}}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.name","\u540D\u79F0"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.name,callback:function(s){e.$set(e.ruleFormData,"name",s)},expression:"ruleFormData.name"}})],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.prefixType","\u524D\u7F00\u7C7B\u578B"),prop:"prefixtype"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.prefixtype,callback:function(s){e.$set(e.ruleFormData,"prefixtype",s)},expression:"ruleFormData.prefixtype"}},e._l(e.getDictionary("prefix_type"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.prefix","\u524D\u7F00"),prop:"prefix"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.prefix,callback:function(s){e.$set(e.ruleFormData,"prefix",s)},expression:"ruleFormData.prefix"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.dateFormat","\u65E5\u671F\u683C\u5F0F"),prop:"dateformat"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.dateformat,callback:function(s){e.$set(e.ruleFormData,"dateformat",s)},expression:"ruleFormData.dateformat"}},e._l(e.getDictionary("dateformat"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.seqType","\u6D41\u6C34\u53F7\u7C7B\u578B"),prop:"seqtype"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.seqtype,callback:function(s){e.$set(e.ruleFormData,"seqtype",s)},expression:"ruleFormData.seqtype"}},e._l(e.getDictionary("seqtype"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.seqRange","\u6D41\u6C34\u53F7\u8303\u56F4"),prop:"seqrange"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.seqrange,callback:function(s){e.$set(e.ruleFormData,"seqrange",s)},expression:"ruleFormData.seqrange"}},e._l(e.getDictionary("seqrange"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.seqLength","\u6D41\u6C34\u53F7\u957F\u5EA6"),prop:"seqlength"}},[t("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.input"),"controls-position":"right",min:0,max:10},model:{value:e.ruleFormData.seqlength,callback:function(s){e.$set(e.ruleFormData,"seqlength",s)},expression:"ruleFormData.seqlength"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.postfixType","\u540E\u7F00\u7C7B\u578B"),prop:"postfixtype"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.postfixtype,callback:function(s){e.$set(e.ruleFormData,"postfixtype",s)},expression:"ruleFormData.postfixtype"}},e._l(e.getDictionary("postfix_type"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.postfix","\u540E\u7F00"),prop:"postfix"}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.input")},model:{value:e.ruleFormData.postfix,callback:function(s){e.$set(e.ruleFormData,"postfix",s)},expression:"ruleFormData.postfix"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.nextSeqNo","\u4E0B\u4E00\u6D41\u6C34\u53F7"),prop:"nextseqno"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.nextseqno,callback:function(s){e.$set(e.ruleFormData,"nextseqno",s)},expression:"ruleFormData.nextseqno"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.separatorCh","\u5206\u9694\u7B26"),prop:"separatorch"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.separatorch,callback:function(s){e.$set(e.ruleFormData,"separatorch",s)},expression:"ruleFormData.separatorch"}},e._l(e.getDictionary("separator"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.sysCodeGenId","\u7F16\u53F7\u8868"),prop:"syscodegenid"}},[t("div",{staticClass:"cao_about"},[t("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:e.disabled},model:{value:e.ruleFormData.syscodegenid,callback:function(s){e.$set(e.ruleFormData,"syscodegenid",s)},expression:"ruleFormData.syscodegenid"}},e._l(e.dataList,function(s){return t("el-option",{key:s.id,attrs:{label:s.name,value:s.id}})}),1),t("div",{staticClass:"cao_setting"},[t("i",{staticClass:"el-input__icon el-icon-search cao_setting-disabled",on:{click:function(s){return e.lookup("syscodegenid",e.ruleFormData.syscodegenid)}}})])],1)])],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.columnId","\u7F16\u53F7\u5B57\u6BB5"),prop:"columnid"}},[t("div",{staticClass:"cao_about"},[t("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:e.disabled},model:{value:e.ruleFormData.columnid,callback:function(s){e.$set(e.ruleFormData,"columnid",s)},expression:"ruleFormData.columnid"}},e._l(e.columnList,function(s){return t("el-option",{key:s.id,attrs:{label:s.name,value:s.id}})}),1),t("div",{staticClass:"cao_setting"},[t("i",{staticClass:"el-input__icon el-icon-search cao_setting-disabled",on:{click:function(s){return e.lookup("columnid",e.ruleFormData.columnid)}}})])],1)])],1)],1)],1),t("el-divider"),t("div",{staticClass:"remarks_title"},[e._v(" "+e._s(e.$i18nt("gd.numberingRules.remarks","\u793A\u4F8B:{\u56FA\u5B9A\u524D\u7F00/ \u968F\u673A\u524D\u7F00}{ \u5E74\u6708\u65E5 }{ \u6D41\u6C34\u53F7, \u6D41\u6C34\u53F7\u7C7B\u578B(\u4E3B/ \u5B50, \u5B9E\u4F53 /), \u6D41\u6C34\u53F7\u8303\u56F4(\u5168\u5C40 / \u65E5\u671F\u5185)}{ \u56FA\u5B9A\u540E\u7F00 / \u968F\u673A\u540E\u7F00 } Acc202206130001zzz"))+" ")])],1)])],1)},y=[],b=o.normalizeComponent(f,h,y,!1,null,"c510bf8e",null,null);const $=b.exports;const _={name:"GdSumberrules",mixins:[d.tablesFilter,g],props:{height:{type:Number,default:100}},data(){return{formLoading:!1,transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:a=>c(this.getQueryParam).then(e=>({pageNo:1,pageSize:100,totalRows:0,rows:e.map(s=>{let l=this.tableLists.filter(r=>r.id===s.syscodegenid)[0];return Object.assign(s,{syscodegen:l})})}))}},computed:{getQueryParam(){let a=new Map;for(let e in this.queryParam)this.queryParam[e]!==""&&a.set(e,this.queryParam[e]);return Object.fromEntries(a)},getHeight(){return this.height},...o.mapGetters(["tablePageSize","tableSize","labelPosition","formMode","tableLists"])},components:{editForm:$},methods:{saveQueries(a){this.queryParam={...a},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(a){this.transKey="gd.btn.edit",this.$refs.editForm.open(a)},add(){this.$refs.editForm.open()},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])},handleOk(){this.refresh()},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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:(a,e,t)=>{this.delHand(a,e,t)}})},delHand(a,e,t){if(a!=="confirm"){t();return}let s=[];this.selectedRows.forEach(l=>{let r=m(l).then(i=>i);s.push(r)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(s).then(l=>{const r=l.filter(i=>!i.success);r.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")+r[0].message),t(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(a,e){this.selectedRowKeys=a,this.selectedRows=e},doEvent(a){let e=a.item.functionName;this[e]&&this[e]()},dictSwitch(a,e){let t=this.$options.filters.dictData(e).filter(s=>s.code==a)[0];return t!=null&&t.colour?t.colour:null}}};var x=function(){var e=this,t=e._self._c;return t("div",{staticClass:"gd-page-view"},[t("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[t("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,showPagination:!1},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"operator",fn:function(){return[t("div",{staticClass:"gd-table-operator"},[t("div",{staticClass:"gd-table-operatorr"},[t("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"name",fn:function({column:s,row:l}){return[t("gd-tooltip",{attrs:{rowKey:"name",row:l,highlight:""},on:{click:e.editForm}})]}},{key:"sysCodeGenId",fn:function({column:s,row:l}){return[l.syscodegen?t("span",[e._v(" "+e._s(e.$i18nt(`Dynamics.${l.syscodegen.transkey}`,l.syscodegen.busname))+" ")]):e._e()]}},{key:"columnid",fn:function({column:s,row:l}){return[l.syscodegenconfig?t("span",[e._v(" "+e._s(e.$i18nt(`Dynamics.${l.syscodegenconfig.transkey}`,l.syscodegenconfig.name))+" ")]):e._e()]}},{key:"statecodes",fn:function(s){return[e.dictSwitch(s.row.statecodes,"state_code")?t("el-tag",{staticStyle:{"border-color":"transparent"},attrs:{effect:"dark",color:e.dictSwitch(s.row.statecodes,"state_code")}},[e._v(" "+e._s(e._f("dictType")("state_code",s.row.statecodes))+" ")]):t("span",[e._v(e._s(e._f("dictType")("state_code",s.row.statecodes)))])]}},{key:"filtering",fn:function({colse:s,visible:l}){return[t("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.height,queryParam:e.queryParam,colse:s,visible:l},on:{save:e.saveQueries}})]}}])})],1),t("editForm",{ref:"editForm",attrs:{openPermissions:!0},on:{ok:e.handleOk}})],1)},v=[],w=o.normalizeComponent(_,x,v,!1,null,"4481d39a",null,null);const n=w.exports;n.install=function(a){a.component(n.name,n)};exports.GDpackage=n;
|
|
1
|
+
"use strict";const o=require("./chartbi.06e48153.js"),d=require("./messages.30e41348.js");function c(a){return window.axios({url:"/SysNumberRules/page",method:"get",params:a})}function u(a){return window.axios({url:"/sysNumberRules/add",method:"post",data:a})}function p(a){return window.axios({url:"/sysNumberRules/edit",method:"post",data:a})}function m(a){return window.axios({url:"/sysNumberRules/delete",method:"post",data:a})}const g={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.msg.sendRecord.name",prop:"name",label:"\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.process.tableSort",prop:"sysCodeGenId",label:"\u8868\u540D\u79F0",type:"slot",slotType:"sysCodeGenId",align:"left"},{transKey:"gd.process.tableSort",prop:"columnid",label:"\u5B57\u6BB5",type:"slot",slotType:"columnid",align:"left"},{transKey:"gd.process.tableSort",prop:"nextseqno",label:"\u4E0B\u4E00\u6D41\u6C34\u53F7",align:"left"},{transKey:"gd.flow.state",prop:"statecodes",label:"\u72B6\u6001",type:"slot",slotType:"statecodes",align:"left"}],formColumns:[{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.msg.sendRecord.msgTemplate",effectType:"selectFkMultiple",prop:"syscodegenid",label:"\u7F16\u53F7\u8868",placeholder:"\u8BF7\u9009\u62E9",placeholderTransKey:"gd.placeholder.select",fkEntityName:"sys_code_gen",disabled:!1,multiple:!1,rules:[]}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysSumberrules:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysSumberrules:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysSumberrules:delete"}],tableQueries:[{transKey:"gd.org.name",prop:"name",label:"\u540D\u79F0",effectType:"input",rules:[]}],formButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}]}}};const f={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0}},data(){return{confirmLoading:!1,visible:!1,fullScreen:!1,title:"",width:"50%",sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],prefixtype:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],nextseqno:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}]},ruleFormData:{id:"",name:"",prefixtype:"",prefix:"",dateformat:"",seqtype:"",seqrange:"",seqlength:void 0,postfixtype:"",postfix:"",nextseqno:"",separatorch:"",syscodegenid:"",columnid:""},dataList:[],columnList:[],disabled:!0,type:1}},methods:{lookup(){this.disabled},open(a){this.visible=!0,this.fullScreen=!1,this.title=a?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.type=a?2:1,a&&this.getSetData(a)},getSetData(a){let e={id:a.id,name:a.name,prefixtype:a.prefixtype.toString(),prefix:a.prefix,dateformat:a.dateformat||a.dateformat==0?a.dateformat.toString():"",seqtype:a.seqtype||a.seqtype==0?a.seqtype.toString():"",seqrange:a.seqrange?a.seqrange.toString():"",seqlength:a.seqlength,postfixtype:a.postfixtype||a.postfixtype==0?a.postfixtype.toString():"",postfix:a.postfix,nextseqno:a.nextseqno?a.nextseqno.toString():"",separatorch:a.separatorch||a.separatorch==0?a.separatorch.toString():"",syscodegenid:a.syscodegen?a.syscodegenid:"",columnid:a.syscodegenconfig?a.columnid:""};this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=e},0)}),this.getFkDada(a)},getFkDada(a){let e=[];if(a.syscodegenid){let t=this.searchData({id:a.syscodegenid,fkEntityName:"sys_code_gen"},"syscodegenid");e.push(t)}if(a.columnid){let t=this.searchData({id:a.columnid,fkEntityName:"sys_code_gen_config"},"columnid");e.push(t)}Promise.all(e).then(t=>{t.forEach(s=>{s.prop=="syscodegenid"&&(this.dataList=s.res.data?s.res.data:[]),s.prop=="columnid"&&(this.columnList=s.res.data?s.res.data:[])})})},searchData(a,e){return d.baseFkList(a).then(t=>({res:t,data:a,prop:e}))},handleSubmit(){this.$refs.ruleForm.validate(a=>{if(a){let e={...this.ruleFormData};this.type==1?this.add(e):this.edit(e)}})},add(a){this.confirmLoading=!0,delete a.id,u(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(a){this.confirmLoading=!0,p(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},getDictionary(a){return this.$options.filters.dictData(a)},toggleFullscreen(){this.fullScreen=!this.fullScreen},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={name:"",prefixtype:"",prefix:"",dateformat:"",seqtype:"",seqrange:"",seqlength:void 0,postfixtype:"",postfix:"",nextseqno:"",separatorch:"",syscodegenid:"",columnid:""}},doEvent(a){let e=a.item.functionName;this[e]&&this[e]()}}};var h=function(){var e=this,t=e._self._c;return t("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(s){e.visible=s},closed:e.handleCancel}},[t("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[t("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[t("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(s){s.preventDefault()}}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.name","\u540D\u79F0"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.name,callback:function(s){e.$set(e.ruleFormData,"name",s)},expression:"ruleFormData.name"}})],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.prefixType","\u524D\u7F00\u7C7B\u578B"),prop:"prefixtype"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.prefixtype,callback:function(s){e.$set(e.ruleFormData,"prefixtype",s)},expression:"ruleFormData.prefixtype"}},e._l(e.getDictionary("prefix_type"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.prefix","\u524D\u7F00"),prop:"prefix"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.prefix,callback:function(s){e.$set(e.ruleFormData,"prefix",s)},expression:"ruleFormData.prefix"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.dateFormat","\u65E5\u671F\u683C\u5F0F"),prop:"dateformat"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.dateformat,callback:function(s){e.$set(e.ruleFormData,"dateformat",s)},expression:"ruleFormData.dateformat"}},e._l(e.getDictionary("dateformat"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.seqType","\u6D41\u6C34\u53F7\u7C7B\u578B"),prop:"seqtype"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.seqtype,callback:function(s){e.$set(e.ruleFormData,"seqtype",s)},expression:"ruleFormData.seqtype"}},e._l(e.getDictionary("seqtype"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.seqRange","\u6D41\u6C34\u53F7\u8303\u56F4"),prop:"seqrange"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.seqrange,callback:function(s){e.$set(e.ruleFormData,"seqrange",s)},expression:"ruleFormData.seqrange"}},e._l(e.getDictionary("seqrange"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.seqLength","\u6D41\u6C34\u53F7\u957F\u5EA6"),prop:"seqlength"}},[t("el-input-number",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.input"),"controls-position":"right",min:0,max:10},model:{value:e.ruleFormData.seqlength,callback:function(s){e.$set(e.ruleFormData,"seqlength",s)},expression:"ruleFormData.seqlength"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.postfixType","\u540E\u7F00\u7C7B\u578B"),prop:"postfixtype"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.postfixtype,callback:function(s){e.$set(e.ruleFormData,"postfixtype",s)},expression:"ruleFormData.postfixtype"}},e._l(e.getDictionary("postfix_type"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.postfix","\u540E\u7F00"),prop:"postfix"}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.input")},model:{value:e.ruleFormData.postfix,callback:function(s){e.$set(e.ruleFormData,"postfix",s)},expression:"ruleFormData.postfix"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.nextSeqNo","\u4E0B\u4E00\u6D41\u6C34\u53F7"),prop:"nextseqno"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.nextseqno,callback:function(s){e.$set(e.ruleFormData,"nextseqno",s)},expression:"ruleFormData.nextseqno"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.separatorCh","\u5206\u9694\u7B26"),prop:"separatorch"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.separatorch,callback:function(s){e.$set(e.ruleFormData,"separatorch",s)},expression:"ruleFormData.separatorch"}},e._l(e.getDictionary("separator"),function(s,l){return t("el-option",{key:l,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.sysCodeGenId","\u7F16\u53F7\u8868"),prop:"syscodegenid"}},[t("div",{staticClass:"cao_about"},[t("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:e.disabled},model:{value:e.ruleFormData.syscodegenid,callback:function(s){e.$set(e.ruleFormData,"syscodegenid",s)},expression:"ruleFormData.syscodegenid"}},e._l(e.dataList,function(s){return t("el-option",{key:s.id,attrs:{label:s.name,value:s.id}})}),1),t("div",{staticClass:"cao_setting"},[t("i",{staticClass:"el-input__icon el-icon-search cao_setting-disabled",on:{click:function(s){return e.lookup("syscodegenid",e.ruleFormData.syscodegenid)}}})])],1)])],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.numberingRules.columnId","\u7F16\u53F7\u5B57\u6BB5"),prop:"columnid"}},[t("div",{staticClass:"cao_about"},[t("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:e.disabled},model:{value:e.ruleFormData.columnid,callback:function(s){e.$set(e.ruleFormData,"columnid",s)},expression:"ruleFormData.columnid"}},e._l(e.columnList,function(s){return t("el-option",{key:s.id,attrs:{label:s.name,value:s.id}})}),1),t("div",{staticClass:"cao_setting"},[t("i",{staticClass:"el-input__icon el-icon-search cao_setting-disabled",on:{click:function(s){return e.lookup("columnid",e.ruleFormData.columnid)}}})])],1)])],1)],1)],1),t("el-divider"),t("div",{staticClass:"remarks_title"},[e._v(" "+e._s(e.$i18nt("gd.numberingRules.remarks","\u793A\u4F8B:{\u56FA\u5B9A\u524D\u7F00/ \u968F\u673A\u524D\u7F00}{ \u5E74\u6708\u65E5 }{ \u6D41\u6C34\u53F7, \u6D41\u6C34\u53F7\u7C7B\u578B(\u4E3B/ \u5B50, \u5B9E\u4F53 /), \u6D41\u6C34\u53F7\u8303\u56F4(\u5168\u5C40 / \u65E5\u671F\u5185)}{ \u56FA\u5B9A\u540E\u7F00 / \u968F\u673A\u540E\u7F00 } Acc202206130001zzz"))+" ")])],1)])],1)},y=[],b=o.normalizeComponent(f,h,y,!1,null,"c510bf8e",null,null);const $=b.exports;const _={name:"GdSumberrules",mixins:[d.tablesFilter,g],props:{height:{type:Number,default:100}},data(){return{formLoading:!1,transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:a=>c(this.getQueryParam).then(e=>({pageNo:1,pageSize:100,totalRows:0,rows:e.map(s=>{let l=this.tableLists.filter(r=>r.id===s.syscodegenid)[0];return Object.assign(s,{syscodegen:l})})}))}},computed:{getQueryParam(){let a=new Map;for(let e in this.queryParam)this.queryParam[e]!==""&&a.set(e,this.queryParam[e]);return Object.fromEntries(a)},getHeight(){return this.height},...o.mapGetters(["tablePageSize","tableSize","labelPosition","formMode","tableLists"])},components:{editForm:$},methods:{saveQueries(a){this.queryParam={...a},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(a){this.transKey="gd.btn.edit",this.$refs.editForm.open(a)},add(){this.$refs.editForm.open()},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])},handleOk(){this.refresh()},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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:(a,e,t)=>{this.delHand(a,e,t)}})},delHand(a,e,t){if(a!=="confirm"){t();return}let s=[];this.selectedRows.forEach(l=>{let r=m(l).then(i=>i);s.push(r)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(s).then(l=>{const r=l.filter(i=>!i.success);r.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")+r[0].message),t(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(a,e){this.selectedRowKeys=a,this.selectedRows=e},doEvent(a){let e=a.item.functionName;this[e]&&this[e]()},dictSwitch(a,e){let t=this.$options.filters.dictData(e).filter(s=>s.code==a)[0];return t!=null&&t.colour?t.colour:null}}};var x=function(){var e=this,t=e._self._c;return t("div",{staticClass:"gd-page-view"},[t("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[t("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,showPagination:!1},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"operator",fn:function(){return[t("div",{staticClass:"gd-table-operator"},[t("div",{staticClass:"gd-table-operatorr"},[t("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"name",fn:function({column:s,row:l}){return[t("gd-tooltip",{attrs:{rowKey:"name",row:l,highlight:""},on:{click:e.editForm}})]}},{key:"sysCodeGenId",fn:function({column:s,row:l}){return[l.syscodegen?t("span",[e._v(" "+e._s(e.$i18nt(`Dynamics.${l.syscodegen.transkey}`,l.syscodegen.busname))+" ")]):e._e()]}},{key:"columnid",fn:function({column:s,row:l}){return[l.syscodegenconfig?t("span",[e._v(" "+e._s(e.$i18nt(`Dynamics.${l.syscodegenconfig.transkey}`,l.syscodegenconfig.name))+" ")]):e._e()]}},{key:"statecodes",fn:function(s){return[e.dictSwitch(s.row.statecodes,"state_code")?t("el-tag",{staticStyle:{"border-color":"transparent"},attrs:{effect:"dark",color:e.dictSwitch(s.row.statecodes,"state_code")}},[e._v(" "+e._s(e._f("dictType")("state_code",s.row.statecodes))+" ")]):t("span",[e._v(e._s(e._f("dictType")("state_code",s.row.statecodes)))])]}},{key:"filtering",fn:function({colse:s,visible:l}){return[t("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.height,queryParam:e.queryParam,colse:s,visible:l},on:{save:e.saveQueries}})]}}])})],1),t("editForm",{ref:"editForm",attrs:{openPermissions:!0},on:{ok:e.handleOk}})],1)},v=[],w=o.normalizeComponent(_,x,v,!1,null,"4481d39a",null,null);const n=w.exports;n.install=function(a){a.component(n.name,n)};exports.GDpackage=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./chartbi.06e48153.js"),l=require("./messages.2fff74f3.js");function p(t){return window.axios({url:"/sysTeam/page",method:"get",params:t})}function g(t){return window.axios({url:"/sysTeam/add",method:"post",data:t})}function y(t){return window.axios({url:"/sysTeam/edit",method:"post",data:t})}function b(t){return window.axios({url:"/sysTeam/delete",method:"post",data:t})}function _(t){return window.axios({url:"/sysTeam/detail",method:"get",params:t})}function m(t){return window.axios({url:"/sysTeam/members",method:"get",params:t})}function c(t){return window.axios({url:"/sysTeam/member/add",method:"post",data:t})}function u(t){return window.axios({url:"/sysTeam/member/edit",method:"post",data:t})}function h(t){return window.axios({url:"/sysTeam/member/delete",method:"post",data:t})}function f(t){return window.axios({url:"/sysTeam/member/detail",method:"get",params:t})}const w={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.team.name",prop:"name",label:"\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.team.amdmin",prop:"administratorid",label:"\u7BA1\u7406\u5458",type:"slot",slotType:"administratorid",align:"left"},{transKey:"gd.team.teamtype",prop:"teamtype",label:"\u56E2\u961F\u7C7B\u578B",type:"slot",slotType:"teamtype",align:"left"},{transKey:"gd.team.describe",prop:"description",label:"\u63CF\u8FF0",align:"left"},{transKey:"gd.team.createdTime",prop:"createdtime",label:"\u521B\u5EFA\u65F6\u95F4",align:"left"}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysTeam:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysTeam:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysTeam:delete"}]}}},$={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.team.name",prop:"sys_teamid",label:"\u540D\u79F0",type:"slot",slotType:"sys_teamid",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.team.member",prop:"sys_userid",label:"\u6210\u5458",type:"slot",slotType:"sys_userid",align:"left"}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysTeam:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysTeam:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysTeam:delete"}]}}};const v={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0},sys_teamid:{type:Number,default:0},typeAdd:{type:Number,default:1},openMode:{type:Number,default:1}},data(){return{width:"50%",visible:!1,fullScreen:!1,sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],title:"",confirmLoading:!1,type:1,rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}]},ruleFormData:{id:"",sys_userid:"",sys_teamid:""},dataList:[],columnList:[],ownerid:"",firstLoading:!1,firstLoading1:!1}},computed:{disableds(){return this.typeAdd==2}},methods:{lookupSeled(t){this.dataList=[...t.fkData],this.$set(this.ruleFormData,"sys_userid",t.data[0])},lookup(t){let e={effectType:"fk",fkEntityName:"sys_user",val:t||[]};this.$refs.msgSearch.open(e)},open(t){this.visible=!0,this.fullScreen=!1,this.title=t?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.type=t?2:1,this.typeAdd==2&&this.searchData(this.sys_teamid),t&&this.getDetail(t.id)},getDetail(t){t!=""&&(this.dataList=[],f({id:t}).then(e=>{if(e.code==200){let s=e.data;this.dataList.push({id:s.sys_userid,name:s.username}),this.columnList.push({id:s.sys_teamid,name:s.teamname});let a={id:s.id,sys_userid:s.sys_userid,sys_teamid:s.sys_teamid};this.firstLoading=!0,this.firstLoading1=!0,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=a},0)})}}))},searchData(t){this.columnList=[],l.baseFkList({fkEntityName:"sys_team",id:t}).then(e=>{e.code==200&&(this.ruleFormData.sys_teamid=t,this.columnList=e.data.length>0?e.data:[])})},searchList(){this.firstLoading||(this.adminClick(""),this.firstLoading=!0)},adminClick(t){this.dataList=[],this.fetching=!0,l.baseFkList({fkEntityName:"sys_user",name:t}).then(e=>{e.code==200&&(this.dataList=e.data)})},searchList1(){this.firstLoading1||(this.userClick(""),this.firstLoading1=!0)},userClick(t){this.columnList=[],this.fetching=!0,l.baseFkList({fkEntityName:"sys_team",name:t}).then(e=>{e.code==200&&(this.columnList=e.data)})},handleSubmit(){this.$refs.ruleForm.validate(t=>{t&&(this.type==1?this.add(this.ruleFormData):this.edit(this.ruleFormData))})},add(t){this.confirmLoading=!0,delete t.id,c(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(t){this.confirmLoading=!0,u(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.firstLoading=!1,this.firstLoading1=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={sys_userid:"",sys_teamid:""}},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullScreen=!this.fullScreen},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var k=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[s("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[s("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[s("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(a){a.preventDefault()}}},[s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.member","\u7528\u6237"),prop:"sys_userid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.adminClick},on:{focus:e.searchList},model:{value:e.ruleFormData.sys_userid,callback:function(a){e.$set(e.ruleFormData,"sys_userid",a)},expression:"ruleFormData.sys_userid"}},e._l(e.dataList,function(a,i){return s("el-option",{key:a.id+"&"+i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(a){return e.lookup(e.ruleFormData.sys_userid)}}})])],1)])],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.team","\u56E2\u961F"),prop:"sys_teamid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:e.disableds,"remote-method":e.userClick},on:{focus:e.searchList1},model:{value:e.ruleFormData.sys_teamid,callback:function(a){e.$set(e.ruleFormData,"sys_teamid",a)},expression:"ruleFormData.sys_teamid"}},e._l(e.columnList,function(a,i){return s("el-option",{key:a.id+"&"+i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{lookup:function(a){e.ruleFormData.sys_teamid}}})])],1)])],1)],1)],1)],1)])],1),s("gd-search",{ref:"msgSearch",attrs:{appendToBody:!0},on:{lookupSeled:e.lookupSeled}})],1)},F=[],L=o.normalizeComponent(v,k,F,!1,null,"0613082f",null,null);const T=L.exports;const C={name:"GdTeamMembers",mixins:[l.tablesFilter,$],props:{height:{type:Number,default:100},sys_teamid:{type:Number,default:0},type:{type:Number,default:1},openMode:{type:Number,default:1}},data(){return{transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>m(Object.assign(t,this.getQueryParam,{SysTeamId:this.sys_teamid})).then(e=>(console.log(e),e.data))}},computed:{getHeight(){return this.height},getQueryParam(){let t=new Map;for(let e in this.queryParam)if(this.queryParam[e]&&(e==="msgStatus"||e==="sendType"))t.set(e,this.queryParam[e].join(","));else if(this.queryParam[e]&&(e==="actualOn"||e==="createdTime"||e==="scheduledStartedOn")){if(this.queryParam[e].length>0){let s=this.queryParam[e],a=s[0].split(" ")[0],i=s[1].split(" ")[0];t.set(`${e}Start`,`${a} 00:00:00`),t.set(`${e}End`,`${i} 23:59:59`)}}else t.set(e,this.queryParam[e]);return Object.fromEntries(t)},...o.mapGetters(["tablePageSize","tableSize","screenHeight","labelPosition","formMode"])},components:{editForm:T},watch:{type(t,e){this.$refs.table&&this.$refs.table.refresh()},sys_teamid(t,e){this.$refs.table&&this.$refs.table.refresh()}},methods:{editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},add(){this.$refs.editForm.open()},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])},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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 a=[];this.selectedRows.forEach(i=>{let n=h({id:i.id}).then(r=>r);a.push(n)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(a).then(i=>{const n=i.filter(r=>!r.success);n.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")+n[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},handleOk(){this.refresh()},refresh(){this.$refs.table.refresh()},dictSwitch(t,e){let s=this.$options.filters.dictData(e).filter(a=>a.code==t)[0];return s!=null&&s.colour?s.colour:null},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var D=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:!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:"sys_teamid",fn:function({column:a,row:i}){return[s("gd-tooltip",{attrs:{rowKey:"teamname",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"sys_userid",fn:function({column:a,row:i}){return[i.sys_userid?s("span",[e._v(" "+e._s(i.username)+" ")]):e._e()]}}])})],1),s("editForm",{ref:"editForm",attrs:{openPermissions:!0,sys_teamid:e.sys_teamid,typeAdd:e.type,openMode:e.openMode},on:{ok:e.handleOk}})],1)},S=[],x=o.normalizeComponent(C,D,S,!1,null,"65460067",null,null);const B=x.exports;const N={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0}},data(){return{width:"60%",visible:!1,fullScreen:!1,sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],confirmLoading:!1,type:0,rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],administratorid:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}]},ruleFormData:{id:"",name:"",administratorid:"",teamtype:"2",description:""},dataList:[],columnList:[],ownerid:"",firstLoading:!1}},computed:{detailShow(){return!!this.ruleFormData.id},title(){return this.ruleFormData.id?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add")}},components:{teamMemberDetail:B},methods:{lookupSeled(t){this.dataList=[...t.fkData],this.$set(this.ruleFormData,"administratorid",t.data[0])},lookup(t){let e={effectType:"fk",fkEntityName:"sys_user",val:t||[]};this.$refs.msgSearch.open(e)},open(t){this.visible=!0,this.fullScreen=!1,this.type=t?2:1,this.ruleFormData.id=t?t.id:"",t&&this.getDetail(t.id)},getDetail(t){t!=""&&(this.dataList=[],_({id:t}).then(e=>{if(e.code==200){let s=e.data;this.dataList.push({id:s.administratorid,name:s.administratorname}),this.columnList.push({id:s.ownerid,name:s.ownername});let a={id:s.id,name:s.name,teamtype:s.teamtype?s.teamtype.toString():"",description:s.description,administratorid:s.administratorid};this.firstLoading=!0,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=a,this.ownerid=s.ownerid},0)})}}))},searchData(t){this.dataList=[],l.baseFkList({fkEntityName:"sys_user",id:t.administratorid}).then(e=>{e.code==200&&(this.firstLoading=!0,e.data.length>0?this.dataList=e.data:this.dataList.push({id:t.administratorid,name:t.administratorname}))})},searchList(){this.firstLoading||(this.adminClick(""),this.firstLoading=!0)},adminClick(t){this.dataList=[],this.fetching=!0,l.baseFkList({fkEntityName:"sys_user",name:t}).then(e=>{e.code==200&&(this.dataList=e.data)})},handleSubmit(){this.$refs.ruleForm.validate(t=>{t&&(console.log(this.type),this.type==1?this.add(this.ruleFormData):this.edit(this.ruleFormData))})},add(t){this.confirmLoading=!0,delete t.id,g(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.ruleFormData.id=e.data,this.type=2,this.getDetail(e.data)):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(t){this.confirmLoading=!0,y(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={id:"",name:"",administratorid:"",teamtype:"2",description:""},this.ownerid="",this.type=1},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullScreen=!this.fullScreen},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var K=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[s("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[s("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[s("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(a){a.preventDefault()}}},[s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.name","\u540D\u79F0"),prop:"name"}},[s("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.name,callback:function(a){e.$set(e.ruleFormData,"name",a)},expression:"ruleFormData.name"}})],1)],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.teamtype","\u56E2\u961F\u7C7B\u578B"),prop:"teamtype"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.teamtype,callback:function(a){e.$set(e.ruleFormData,"teamtype",a)},expression:"ruleFormData.teamtype"}},e._l(e.getDictionary("teamtype"),function(a,i){return s("el-option",{key:i,attrs:{value:a.code,label:e.$i18nt(`Dynamics.${a.transkey}`,a.name)}})}),1)],1)],1)],1),s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.amdmin","\u7BA1\u7406\u5458"),prop:"administratorid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.adminClick},on:{focus:e.searchList},model:{value:e.ruleFormData.administratorid,callback:function(a){e.$set(e.ruleFormData,"administratorid",a)},expression:"ruleFormData.administratorid"}},e._l(e.dataList,function(a,i){return s("el-option",{key:a.id+"&"+i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(a){return e.lookup(e.ruleFormData.administratorid)}}})])],1)])],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.owner","\u8D1F\u8D23\u4EBA")}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:""},model:{value:e.ownerid,callback:function(a){e.ownerid=a},expression:"ownerid"}},e._l(e.columnList,function(a,i){return s("el-option",{key:i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search cao_setting-disabled"})])],1)])],1)],1),s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.describe","\u63CF\u8FF0"),prop:"description"}},[s("el-input",{attrs:{type:"textarea",rows:4,placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.description,callback:function(a){e.$set(e.ruleFormData,"description",a)},expression:"ruleFormData.description"}})],1)],1)],1)],1)],1),e.detailShow?s("el-card",{attrs:{shadow:"never"}},[s("div",[e._v(e._s(e.$i18nt("gd.team.teamMember","\u56E2\u961F\u6210\u5458")))]),s("teamMemberDetail",{attrs:{sys_teamid:Number(e.ruleFormData.id),type:e.type,openMode:2,height:200}})],1):e._e()],1)],1),s("gd-search",{ref:"msgSearch",attrs:{appendToBody:!0},on:{lookupSeled:e.lookupSeled}})],1)},P=[],R=o.normalizeComponent(N,K,P,!1,null,"837be327",null,null);const E=R.exports;const M={name:"GdTeam",mixins:[l.tablesFilter,w],props:{height:{type:Number,default:100}},data(){return{transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>p(Object.assign(t,this.getQueryParam)).then(e=>e.data)}},components:{editForm:E},computed:{getHeight(){return this.height},getQueryParam(){let t=new Map;for(let e in this.queryParam)if(this.queryParam[e]&&(e==="msgStatus"||e==="sendType"))t.set(e,this.queryParam[e].join(","));else if(this.queryParam[e]&&(e==="actualOn"||e==="createdTime"||e==="scheduledStartedOn")){if(this.queryParam[e].length>0){let s=this.queryParam[e],a=s[0].split(" ")[0],i=s[1].split(" ")[0];t.set(`${e}Start`,`${a} 00:00:00`),t.set(`${e}End`,`${i} 23:59:59`)}}else t.set(e,this.queryParam[e]);return Object.fromEntries(t)},...o.mapGetters(["tablePageSize","tableSize","screenHeight","labelPosition","formMode"])},methods:{editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},add(){this.$refs.editForm.open()},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])},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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 a=[];this.selectedRows.forEach(i=>{let n=b({id:i.id}).then(r=>r);a.push(n)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(a).then(i=>{const n=i.filter(r=>!r.success);n.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")+n[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},handleOk(){this.refresh()},refresh(){this.$refs.table.refresh()},dictSwitch(t,e){let s=this.$options.filters.dictData(e).filter(a=>a.code==t)[0];return s!=null&&s.colour?s.colour:null},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var O=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:!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:a,row:i}){return[s("gd-tooltip",{attrs:{rowKey:"name",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"administratorid",fn:function({column:a,row:i}){return[i.administratorname?s("span",[e._v(" "+e._s(i.administratorname)+" ")]):e._e()]}},{key:"teamtype",fn:function(a){return[e.dictSwitch(a.row.teamtype,"teamtype")?s("el-tag",{style:e._f("dictColor")("teamtype",a.row.teamtype),attrs:{effect:"dark"}},[e._v(" "+e._s(e._f("dictType")("teamtype",a.row.teamtype))+" ")]):s("span",[e._v(e._s(e._f("dictType")("teamtype",a.row.teamtype)))])]}}])})],1),s("editForm",{ref:"editForm",attrs:{openPermissions:!0},on:{ok:e.handleOk}})],1)},q=[],z=o.normalizeComponent(M,O,q,!1,null,"f62d65e6",null,null);const d=z.exports;d.install=function(t){t.component(d.name,d)};exports.GDpackage=d;exports.sysTeamMemberAdd=c;exports.sysTeamMemberDel=h;exports.sysTeamMemberDetail=f;exports.sysTeamMemberEdit=u;exports.sysTeamMembers=m;
|
|
1
|
+
"use strict";const o=require("./chartbi.06e48153.js"),l=require("./messages.30e41348.js");function p(t){return window.axios({url:"/sysTeam/page",method:"get",params:t})}function g(t){return window.axios({url:"/sysTeam/add",method:"post",data:t})}function y(t){return window.axios({url:"/sysTeam/edit",method:"post",data:t})}function b(t){return window.axios({url:"/sysTeam/delete",method:"post",data:t})}function _(t){return window.axios({url:"/sysTeam/detail",method:"get",params:t})}function m(t){return window.axios({url:"/sysTeam/members",method:"get",params:t})}function c(t){return window.axios({url:"/sysTeam/member/add",method:"post",data:t})}function u(t){return window.axios({url:"/sysTeam/member/edit",method:"post",data:t})}function h(t){return window.axios({url:"/sysTeam/member/delete",method:"post",data:t})}function f(t){return window.axios({url:"/sysTeam/member/detail",method:"get",params:t})}const w={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.team.name",prop:"name",label:"\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.team.amdmin",prop:"administratorid",label:"\u7BA1\u7406\u5458",type:"slot",slotType:"administratorid",align:"left"},{transKey:"gd.team.teamtype",prop:"teamtype",label:"\u56E2\u961F\u7C7B\u578B",type:"slot",slotType:"teamtype",align:"left"},{transKey:"gd.team.describe",prop:"description",label:"\u63CF\u8FF0",align:"left"},{transKey:"gd.team.createdTime",prop:"createdtime",label:"\u521B\u5EFA\u65F6\u95F4",align:"left"}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysTeam:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysTeam:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysTeam:delete"}]}}},$={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.team.name",prop:"sys_teamid",label:"\u540D\u79F0",type:"slot",slotType:"sys_teamid",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.team.member",prop:"sys_userid",label:"\u6210\u5458",type:"slot",slotType:"sys_userid",align:"left"}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysTeam:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysTeam:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysTeam:delete"}]}}};const v={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0},sys_teamid:{type:Number,default:0},typeAdd:{type:Number,default:1},openMode:{type:Number,default:1}},data(){return{width:"50%",visible:!1,fullScreen:!1,sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],title:"",confirmLoading:!1,type:1,rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}]},ruleFormData:{id:"",sys_userid:"",sys_teamid:""},dataList:[],columnList:[],ownerid:"",firstLoading:!1,firstLoading1:!1}},computed:{disableds(){return this.typeAdd==2}},methods:{lookupSeled(t){this.dataList=[...t.fkData],this.$set(this.ruleFormData,"sys_userid",t.data[0])},lookup(t){let e={effectType:"fk",fkEntityName:"sys_user",val:t||[]};this.$refs.msgSearch.open(e)},open(t){this.visible=!0,this.fullScreen=!1,this.title=t?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.type=t?2:1,this.typeAdd==2&&this.searchData(this.sys_teamid),t&&this.getDetail(t.id)},getDetail(t){t!=""&&(this.dataList=[],f({id:t}).then(e=>{if(e.code==200){let s=e.data;this.dataList.push({id:s.sys_userid,name:s.username}),this.columnList.push({id:s.sys_teamid,name:s.teamname});let a={id:s.id,sys_userid:s.sys_userid,sys_teamid:s.sys_teamid};this.firstLoading=!0,this.firstLoading1=!0,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=a},0)})}}))},searchData(t){this.columnList=[],l.baseFkList({fkEntityName:"sys_team",id:t}).then(e=>{e.code==200&&(this.ruleFormData.sys_teamid=t,this.columnList=e.data.length>0?e.data:[])})},searchList(){this.firstLoading||(this.adminClick(""),this.firstLoading=!0)},adminClick(t){this.dataList=[],this.fetching=!0,l.baseFkList({fkEntityName:"sys_user",name:t}).then(e=>{e.code==200&&(this.dataList=e.data)})},searchList1(){this.firstLoading1||(this.userClick(""),this.firstLoading1=!0)},userClick(t){this.columnList=[],this.fetching=!0,l.baseFkList({fkEntityName:"sys_team",name:t}).then(e=>{e.code==200&&(this.columnList=e.data)})},handleSubmit(){this.$refs.ruleForm.validate(t=>{t&&(this.type==1?this.add(this.ruleFormData):this.edit(this.ruleFormData))})},add(t){this.confirmLoading=!0,delete t.id,c(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(t){this.confirmLoading=!0,u(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.firstLoading=!1,this.firstLoading1=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={sys_userid:"",sys_teamid:""}},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullScreen=!this.fullScreen},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var k=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[s("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[s("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[s("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(a){a.preventDefault()}}},[s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.member","\u7528\u6237"),prop:"sys_userid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.adminClick},on:{focus:e.searchList},model:{value:e.ruleFormData.sys_userid,callback:function(a){e.$set(e.ruleFormData,"sys_userid",a)},expression:"ruleFormData.sys_userid"}},e._l(e.dataList,function(a,i){return s("el-option",{key:a.id+"&"+i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(a){return e.lookup(e.ruleFormData.sys_userid)}}})])],1)])],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.team","\u56E2\u961F"),prop:"sys_teamid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:e.disableds,"remote-method":e.userClick},on:{focus:e.searchList1},model:{value:e.ruleFormData.sys_teamid,callback:function(a){e.$set(e.ruleFormData,"sys_teamid",a)},expression:"ruleFormData.sys_teamid"}},e._l(e.columnList,function(a,i){return s("el-option",{key:a.id+"&"+i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{lookup:function(a){e.ruleFormData.sys_teamid}}})])],1)])],1)],1)],1)],1)])],1),s("gd-search",{ref:"msgSearch",attrs:{appendToBody:!0},on:{lookupSeled:e.lookupSeled}})],1)},F=[],L=o.normalizeComponent(v,k,F,!1,null,"0613082f",null,null);const T=L.exports;const C={name:"GdTeamMembers",mixins:[l.tablesFilter,$],props:{height:{type:Number,default:100},sys_teamid:{type:Number,default:0},type:{type:Number,default:1},openMode:{type:Number,default:1}},data(){return{transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>m(Object.assign(t,this.getQueryParam,{SysTeamId:this.sys_teamid})).then(e=>(console.log(e),e.data))}},computed:{getHeight(){return this.height},getQueryParam(){let t=new Map;for(let e in this.queryParam)if(this.queryParam[e]&&(e==="msgStatus"||e==="sendType"))t.set(e,this.queryParam[e].join(","));else if(this.queryParam[e]&&(e==="actualOn"||e==="createdTime"||e==="scheduledStartedOn")){if(this.queryParam[e].length>0){let s=this.queryParam[e],a=s[0].split(" ")[0],i=s[1].split(" ")[0];t.set(`${e}Start`,`${a} 00:00:00`),t.set(`${e}End`,`${i} 23:59:59`)}}else t.set(e,this.queryParam[e]);return Object.fromEntries(t)},...o.mapGetters(["tablePageSize","tableSize","screenHeight","labelPosition","formMode"])},components:{editForm:T},watch:{type(t,e){this.$refs.table&&this.$refs.table.refresh()},sys_teamid(t,e){this.$refs.table&&this.$refs.table.refresh()}},methods:{editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},add(){this.$refs.editForm.open()},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])},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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 a=[];this.selectedRows.forEach(i=>{let n=h({id:i.id}).then(r=>r);a.push(n)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(a).then(i=>{const n=i.filter(r=>!r.success);n.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")+n[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},handleOk(){this.refresh()},refresh(){this.$refs.table.refresh()},dictSwitch(t,e){let s=this.$options.filters.dictData(e).filter(a=>a.code==t)[0];return s!=null&&s.colour?s.colour:null},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var D=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:!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:"sys_teamid",fn:function({column:a,row:i}){return[s("gd-tooltip",{attrs:{rowKey:"teamname",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"sys_userid",fn:function({column:a,row:i}){return[i.sys_userid?s("span",[e._v(" "+e._s(i.username)+" ")]):e._e()]}}])})],1),s("editForm",{ref:"editForm",attrs:{openPermissions:!0,sys_teamid:e.sys_teamid,typeAdd:e.type,openMode:e.openMode},on:{ok:e.handleOk}})],1)},S=[],x=o.normalizeComponent(C,D,S,!1,null,"65460067",null,null);const B=x.exports;const N={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0}},data(){return{width:"60%",visible:!1,fullScreen:!1,sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],confirmLoading:!1,type:0,rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],administratorid:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}]},ruleFormData:{id:"",name:"",administratorid:"",teamtype:"2",description:""},dataList:[],columnList:[],ownerid:"",firstLoading:!1}},computed:{detailShow(){return!!this.ruleFormData.id},title(){return this.ruleFormData.id?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add")}},components:{teamMemberDetail:B},methods:{lookupSeled(t){this.dataList=[...t.fkData],this.$set(this.ruleFormData,"administratorid",t.data[0])},lookup(t){let e={effectType:"fk",fkEntityName:"sys_user",val:t||[]};this.$refs.msgSearch.open(e)},open(t){this.visible=!0,this.fullScreen=!1,this.type=t?2:1,this.ruleFormData.id=t?t.id:"",t&&this.getDetail(t.id)},getDetail(t){t!=""&&(this.dataList=[],_({id:t}).then(e=>{if(e.code==200){let s=e.data;this.dataList.push({id:s.administratorid,name:s.administratorname}),this.columnList.push({id:s.ownerid,name:s.ownername});let a={id:s.id,name:s.name,teamtype:s.teamtype?s.teamtype.toString():"",description:s.description,administratorid:s.administratorid};this.firstLoading=!0,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=a,this.ownerid=s.ownerid},0)})}}))},searchData(t){this.dataList=[],l.baseFkList({fkEntityName:"sys_user",id:t.administratorid}).then(e=>{e.code==200&&(this.firstLoading=!0,e.data.length>0?this.dataList=e.data:this.dataList.push({id:t.administratorid,name:t.administratorname}))})},searchList(){this.firstLoading||(this.adminClick(""),this.firstLoading=!0)},adminClick(t){this.dataList=[],this.fetching=!0,l.baseFkList({fkEntityName:"sys_user",name:t}).then(e=>{e.code==200&&(this.dataList=e.data)})},handleSubmit(){this.$refs.ruleForm.validate(t=>{t&&(console.log(this.type),this.type==1?this.add(this.ruleFormData):this.edit(this.ruleFormData))})},add(t){this.confirmLoading=!0,delete t.id,g(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.ruleFormData.id=e.data,this.type=2,this.getDetail(e.data)):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(t){this.confirmLoading=!0,y(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={id:"",name:"",administratorid:"",teamtype:"2",description:""},this.ownerid="",this.type=1},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullScreen=!this.fullScreen},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var K=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(a){e.visible=a},closed:e.handleCancel}},[s("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[s("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[s("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(a){a.preventDefault()}}},[s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.name","\u540D\u79F0"),prop:"name"}},[s("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.name,callback:function(a){e.$set(e.ruleFormData,"name",a)},expression:"ruleFormData.name"}})],1)],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.teamtype","\u56E2\u961F\u7C7B\u578B"),prop:"teamtype"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.teamtype,callback:function(a){e.$set(e.ruleFormData,"teamtype",a)},expression:"ruleFormData.teamtype"}},e._l(e.getDictionary("teamtype"),function(a,i){return s("el-option",{key:i,attrs:{value:a.code,label:e.$i18nt(`Dynamics.${a.transkey}`,a.name)}})}),1)],1)],1)],1),s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.amdmin","\u7BA1\u7406\u5458"),prop:"administratorid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.adminClick},on:{focus:e.searchList},model:{value:e.ruleFormData.administratorid,callback:function(a){e.$set(e.ruleFormData,"administratorid",a)},expression:"ruleFormData.administratorid"}},e._l(e.dataList,function(a,i){return s("el-option",{key:a.id+"&"+i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(a){return e.lookup(e.ruleFormData.administratorid)}}})])],1)])],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.owner","\u8D1F\u8D23\u4EBA")}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,disabled:""},model:{value:e.ownerid,callback:function(a){e.ownerid=a},expression:"ownerid"}},e._l(e.columnList,function(a,i){return s("el-option",{key:i,attrs:{label:a.name,value:a.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search cao_setting-disabled"})])],1)])],1)],1),s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.describe","\u63CF\u8FF0"),prop:"description"}},[s("el-input",{attrs:{type:"textarea",rows:4,placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.description,callback:function(a){e.$set(e.ruleFormData,"description",a)},expression:"ruleFormData.description"}})],1)],1)],1)],1)],1),e.detailShow?s("el-card",{attrs:{shadow:"never"}},[s("div",[e._v(e._s(e.$i18nt("gd.team.teamMember","\u56E2\u961F\u6210\u5458")))]),s("teamMemberDetail",{attrs:{sys_teamid:Number(e.ruleFormData.id),type:e.type,openMode:2,height:200}})],1):e._e()],1)],1),s("gd-search",{ref:"msgSearch",attrs:{appendToBody:!0},on:{lookupSeled:e.lookupSeled}})],1)},P=[],R=o.normalizeComponent(N,K,P,!1,null,"837be327",null,null);const E=R.exports;const M={name:"GdTeam",mixins:[l.tablesFilter,w],props:{height:{type:Number,default:100}},data(){return{transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>p(Object.assign(t,this.getQueryParam)).then(e=>e.data)}},components:{editForm:E},computed:{getHeight(){return this.height},getQueryParam(){let t=new Map;for(let e in this.queryParam)if(this.queryParam[e]&&(e==="msgStatus"||e==="sendType"))t.set(e,this.queryParam[e].join(","));else if(this.queryParam[e]&&(e==="actualOn"||e==="createdTime"||e==="scheduledStartedOn")){if(this.queryParam[e].length>0){let s=this.queryParam[e],a=s[0].split(" ")[0],i=s[1].split(" ")[0];t.set(`${e}Start`,`${a} 00:00:00`),t.set(`${e}End`,`${i} 23:59:59`)}}else t.set(e,this.queryParam[e]);return Object.fromEntries(t)},...o.mapGetters(["tablePageSize","tableSize","screenHeight","labelPosition","formMode"])},methods:{editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},add(){this.$refs.editForm.open()},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])},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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 a=[];this.selectedRows.forEach(i=>{let n=b({id:i.id}).then(r=>r);a.push(n)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(a).then(i=>{const n=i.filter(r=>!r.success);n.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")+n[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},handleOk(){this.refresh()},refresh(){this.$refs.table.refresh()},dictSwitch(t,e){let s=this.$options.filters.dictData(e).filter(a=>a.code==t)[0];return s!=null&&s.colour?s.colour:null},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var O=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:!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:a,row:i}){return[s("gd-tooltip",{attrs:{rowKey:"name",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"administratorid",fn:function({column:a,row:i}){return[i.administratorname?s("span",[e._v(" "+e._s(i.administratorname)+" ")]):e._e()]}},{key:"teamtype",fn:function(a){return[e.dictSwitch(a.row.teamtype,"teamtype")?s("el-tag",{style:e._f("dictColor")("teamtype",a.row.teamtype),attrs:{effect:"dark"}},[e._v(" "+e._s(e._f("dictType")("teamtype",a.row.teamtype))+" ")]):s("span",[e._v(e._s(e._f("dictType")("teamtype",a.row.teamtype)))])]}}])})],1),s("editForm",{ref:"editForm",attrs:{openPermissions:!0},on:{ok:e.handleOk}})],1)},q=[],z=o.normalizeComponent(M,O,q,!1,null,"f62d65e6",null,null);const d=z.exports;d.install=function(t){t.component(d.name,d)};exports.GDpackage=d;exports.sysTeamMemberAdd=c;exports.sysTeamMemberDel=h;exports.sysTeamMemberDetail=f;exports.sysTeamMemberEdit=u;exports.sysTeamMembers=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("./chartbi.06e48153.js"),n=require("./system.team.53d64006.js"),r=require("./messages.2fff74f3.js"),u={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.team.name",prop:"sys_teamid",label:"\u540D\u79F0",type:"slot",slotType:"sys_teamid",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.team.member",prop:"sys_userid",label:"\u6210\u5458",type:"slot",slotType:"sys_userid",align:"left"}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysTeam:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysTeam:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysTeam:delete"}]}}};const m={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0}},data(){return{width:"60%",visible:!1,fullScreen:!1,sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],title:"",confirmLoading:!1,type:1,rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}]},ruleFormData:{id:"",sys_userid:"",sys_teamid:""},dataList:[],columnList:[],ownerid:"",firstLoading:!1,firstLoading1:!1}},methods:{lookupSeled(t){t.table.tablename=="sys_team"?(this.columnList=[...t.fkData],this.$set(this.ruleFormData,"sys_teamid",t.data[0])):t.table.tablename=="sys_user"&&(this.dataList=[...t.fkData],this.$set(this.ruleFormData,"sys_userid",t.data[0]))},lookup(t,e){let s={effectType:"fk",fkEntityName:e==1?"sys_user":"sys_team",val:t||[]};this.$refs.msgSearch.open(s)},open(t){this.visible=!0,this.fullScreen=!1,this.title=t?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.type=t?2:1,t&&this.getDetail(t.id)},getDetail(t){t!=""&&(this.dataList=[],n.sysTeamMemberDetail({id:t}).then(e=>{if(e.code==200){let s=e.data;this.dataList.push({id:s.sys_userid,name:s.username}),this.columnList.push({id:s.sys_teamid,name:s.teamname});let i={id:s.id,sys_userid:s.sys_userid,sys_teamid:s.sys_teamid};this.firstLoading=!0,this.firstLoading1=!0,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=i},0)})}}))},searchData(t){this.dataList=[],r.baseFkList({fkEntityName:"sys_user",id:t.administratorid}).then(e=>{e.code==200&&(this.firstLoading=!0,e.data.length>0?this.dataList=e.data:this.dataList.push({id:t.administratorid,name:t.administratorname}))})},searchList(){this.firstLoading||(this.adminClick(""),this.firstLoading=!0)},adminClick(t){this.dataList=[],this.fetching=!0,r.baseFkList({fkEntityName:"sys_user",name:t}).then(e=>{e.code==200&&(this.dataList=e.data)})},searchList1(){this.firstLoading1||(this.userClick(""),this.firstLoading1=!0)},userClick(t){this.columnList=[],this.fetching=!0,r.baseFkList({fkEntityName:"sys_team",name:t}).then(e=>{e.code==200&&(this.columnList=e.data)})},handleSubmit(){this.$refs.ruleForm.validate(t=>{t&&(this.type==1?this.add(this.ruleFormData):this.edit(this.ruleFormData))})},add(t){this.confirmLoading=!0,delete t.id,n.sysTeamMemberAdd(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(t){this.confirmLoading=!0,n.sysTeamMemberEdit(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.firstLoading=!1,this.firstLoading1=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={sys_userid:"",sys_teamid:""}},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullScreen=!this.fullScreen},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var h=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(i){e.visible=i},closed:e.handleCancel}},[s("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[s("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[s("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(i){i.preventDefault()}}},[s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.member","\u7528\u6237"),prop:"sys_userid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.adminClick},on:{focus:e.searchList},model:{value:e.ruleFormData.sys_userid,callback:function(i){e.$set(e.ruleFormData,"sys_userid",i)},expression:"ruleFormData.sys_userid"}},e._l(e.dataList,function(i,a){return s("el-option",{key:i.id+"&"+a,attrs:{label:i.name,value:i.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(i){return e.lookup(e.ruleFormData.sys_userid,1)}}})])],1)])],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.team","\u56E2\u961F"),prop:"sys_teamid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.userClick},on:{focus:e.searchList1},model:{value:e.ruleFormData.sys_teamid,callback:function(i){e.$set(e.ruleFormData,"sys_teamid",i)},expression:"ruleFormData.sys_teamid"}},e._l(e.columnList,function(i,a){return s("el-option",{key:i.id+"&"+a,attrs:{label:i.name,value:i.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(i){return e.lookup(e.ruleFormData.sys_teamid,2)}}})])],1)])],1)],1)],1)],1)])],1),s("gd-search",{ref:"msgSearch",attrs:{appendToBody:!0},on:{lookupSeled:e.lookupSeled}})],1)},f=[],g=c.normalizeComponent(m,h,f,!1,null,"4b8d68cf",null,null);const p=g.exports;const y={name:"GdTeamMembers",mixins:[r.tablesFilter,u],props:{height:{type:Number,default:100}},data(){return{transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>this.getList(t).then(e=>e)}},computed:{getHeight(){return this.height},getQueryParam(){let t=new Map;for(let e in this.queryParam)if(this.queryParam[e]&&(e==="msgStatus"||e==="sendType"))t.set(e,this.queryParam[e].join(","));else if(this.queryParam[e]&&(e==="actualOn"||e==="createdTime"||e==="scheduledStartedOn")){if(this.queryParam[e].length>0){let s=this.queryParam[e],i=s[0].split(" ")[0],a=s[1].split(" ")[0];t.set(`${e}Start`,`${i} 00:00:00`),t.set(`${e}End`,`${a} 23:59:59`)}}else t.set(e,this.queryParam[e]);return Object.fromEntries(t)},...c.mapGetters(["tablePageSize","tableSize","screenHeight","labelPosition","formMode"])},components:{editForm:p},methods:{getList(t){return n.sysTeamMembers(Object.assign(t,this.getQueryParam)).then(e=>{if(e.code==200)return e.data})},editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},add(){this.$refs.editForm.open()},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])},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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 i=[];this.selectedRows.forEach(a=>{let l=n.sysTeamMemberDel({id:a.id}).then(d=>d);i.push(l)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(i).then(a=>{const l=a.filter(d=>!d.success);l.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")+l[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},handleOk(){this.refresh()},refresh(){this.$refs.table.refresh()},dictSwitch(t,e){let s=this.$options.filters.dictData(e).filter(i=>i.code==t)[0];return s!=null&&s.colour?s.colour:null},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var _=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:!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:"sys_teamid",fn:function({column:i,row:a}){return[s("gd-tooltip",{attrs:{rowKey:"teamname",row:a,highlight:""},on:{click:e.editForm}})]}},{key:"sys_userid",fn:function({column:i,row:a}){return[a.sys_userid?s("span",[e._v(" "+e._s(a.username)+" ")]):e._e()]}}])})],1),s("editForm",{ref:"editForm",attrs:{openPermissions:!0},on:{ok:e.handleOk}})],1)},b=[],$=c.normalizeComponent(y,_,b,!1,null,"d9f498cd",null,null);const o=$.exports;o.install=function(t){t.component(o.name,o)};exports.GDpackage=o;
|
|
1
|
+
"use strict";const c=require("./chartbi.06e48153.js"),n=require("./system.team.3826e252.js"),r=require("./messages.30e41348.js"),u={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.team.name",prop:"sys_teamid",label:"\u540D\u79F0",type:"slot",slotType:"sys_teamid",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.team.member",prop:"sys_userid",label:"\u6210\u5458",type:"slot",slotType:"sys_userid",align:"left"}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysTeam:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysTeam:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysTeam:delete"}]}}};const m={props:{modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!0}},data(){return{width:"60%",visible:!1,fullScreen:!1,sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],title:"",confirmLoading:!1,type:1,rules:{name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}]},ruleFormData:{id:"",sys_userid:"",sys_teamid:""},dataList:[],columnList:[],ownerid:"",firstLoading:!1,firstLoading1:!1}},methods:{lookupSeled(t){t.table.tablename=="sys_team"?(this.columnList=[...t.fkData],this.$set(this.ruleFormData,"sys_teamid",t.data[0])):t.table.tablename=="sys_user"&&(this.dataList=[...t.fkData],this.$set(this.ruleFormData,"sys_userid",t.data[0]))},lookup(t,e){let s={effectType:"fk",fkEntityName:e==1?"sys_user":"sys_team",val:t||[]};this.$refs.msgSearch.open(s)},open(t){this.visible=!0,this.fullScreen=!1,this.title=t?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.type=t?2:1,t&&this.getDetail(t.id)},getDetail(t){t!=""&&(this.dataList=[],n.sysTeamMemberDetail({id:t}).then(e=>{if(e.code==200){let s=e.data;this.dataList.push({id:s.sys_userid,name:s.username}),this.columnList.push({id:s.sys_teamid,name:s.teamname});let i={id:s.id,sys_userid:s.sys_userid,sys_teamid:s.sys_teamid};this.firstLoading=!0,this.firstLoading1=!0,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData=i},0)})}}))},searchData(t){this.dataList=[],r.baseFkList({fkEntityName:"sys_user",id:t.administratorid}).then(e=>{e.code==200&&(this.firstLoading=!0,e.data.length>0?this.dataList=e.data:this.dataList.push({id:t.administratorid,name:t.administratorname}))})},searchList(){this.firstLoading||(this.adminClick(""),this.firstLoading=!0)},adminClick(t){this.dataList=[],this.fetching=!0,r.baseFkList({fkEntityName:"sys_user",name:t}).then(e=>{e.code==200&&(this.dataList=e.data)})},searchList1(){this.firstLoading1||(this.userClick(""),this.firstLoading1=!0)},userClick(t){this.columnList=[],this.fetching=!0,r.baseFkList({fkEntityName:"sys_team",name:t}).then(e=>{e.code==200&&(this.columnList=e.data)})},handleSubmit(){this.$refs.ruleForm.validate(t=>{t&&(this.type==1?this.add(this.ruleFormData):this.edit(this.ruleFormData))})},add(t){this.confirmLoading=!0,delete t.id,n.sysTeamMemberAdd(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u65B0\u589E\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail","\u65B0\u589E\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(t){this.confirmLoading=!0,n.sysTeamMemberEdit(t).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.editSucc","\u7F16\u8F91\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.editFail","\u7F16\u8F91\u5931\u8D25: ")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.firstLoading=!1,this.firstLoading1=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={sys_userid:"",sys_teamid:""}},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullScreen=!this.fullScreen},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var h=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{width:e.width,visible:e.visible,fullscreen:e.fullScreen,footer:null,top:"80px","modal-append-to-body":e.modalAppendToBody,"append-to-body":e.appendToBody,"close-on-click-modal":!1,"show-close":!1},on:{"update:visible":function(i){e.visible=i},closed:e.handleCancel}},[s("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,closed:"handleCancel"},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[s("div",{class:e.fullScreen?"modal-bodyq":"modal-body"},[s("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleFormData,"label-width":"100px"},nativeOn:{submit:function(i){i.preventDefault()}}},[s("el-row",{attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.member","\u7528\u6237"),prop:"sys_userid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.adminClick},on:{focus:e.searchList},model:{value:e.ruleFormData.sys_userid,callback:function(i){e.$set(e.ruleFormData,"sys_userid",i)},expression:"ruleFormData.sys_userid"}},e._l(e.dataList,function(i,a){return s("el-option",{key:i.id+"&"+a,attrs:{label:i.name,value:i.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(i){return e.lookup(e.ruleFormData.sys_userid,1)}}})])],1)])],1),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$i18nt("gd.team.team","\u56E2\u961F"),prop:"sys_teamid"}},[s("div",{staticClass:"cao_about"},[s("el-select",{staticClass:"cao_input",attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),"reserve-keyword":"",filterable:"",remote:"",clearable:"","collapse-tags":!0,"remote-method":e.userClick},on:{focus:e.searchList1},model:{value:e.ruleFormData.sys_teamid,callback:function(i){e.$set(e.ruleFormData,"sys_teamid",i)},expression:"ruleFormData.sys_teamid"}},e._l(e.columnList,function(i,a){return s("el-option",{key:i.id+"&"+a,attrs:{label:i.name,value:i.id}})}),1),s("div",{staticClass:"cao_setting"},[s("i",{staticClass:"el-input__icon el-icon-search",on:{click:function(i){return e.lookup(e.ruleFormData.sys_teamid,2)}}})])],1)])],1)],1)],1)],1)])],1),s("gd-search",{ref:"msgSearch",attrs:{appendToBody:!0},on:{lookupSeled:e.lookupSeled}})],1)},f=[],g=c.normalizeComponent(m,h,f,!1,null,"4b8d68cf",null,null);const p=g.exports;const y={name:"GdTeamMembers",mixins:[r.tablesFilter,u],props:{height:{type:Number,default:100}},data(){return{transKey:"gd.btn.add",selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>this.getList(t).then(e=>e)}},computed:{getHeight(){return this.height},getQueryParam(){let t=new Map;for(let e in this.queryParam)if(this.queryParam[e]&&(e==="msgStatus"||e==="sendType"))t.set(e,this.queryParam[e].join(","));else if(this.queryParam[e]&&(e==="actualOn"||e==="createdTime"||e==="scheduledStartedOn")){if(this.queryParam[e].length>0){let s=this.queryParam[e],i=s[0].split(" ")[0],a=s[1].split(" ")[0];t.set(`${e}Start`,`${i} 00:00:00`),t.set(`${e}End`,`${a} 23:59:59`)}}else t.set(e,this.queryParam[e]);return Object.fromEntries(t)},...c.mapGetters(["tablePageSize","tableSize","screenHeight","labelPosition","formMode"])},components:{editForm:p},methods:{getList(t){return n.sysTeamMembers(Object.assign(t,this.getQueryParam)).then(e=>{if(e.code==200)return e.data})},editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},add(){this.$refs.editForm.open()},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])},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\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.$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 i=[];this.selectedRows.forEach(a=>{let l=n.sysTeamMemberDel({id:a.id}).then(d=>d);i.push(l)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(i).then(a=>{const l=a.filter(d=>!d.success);l.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")+l[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},handleOk(){this.refresh()},refresh(){this.$refs.table.refresh()},dictSwitch(t,e){let s=this.$options.filters.dictData(e).filter(i=>i.code==t)[0];return s!=null&&s.colour?s.colour:null},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var _=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:!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:"sys_teamid",fn:function({column:i,row:a}){return[s("gd-tooltip",{attrs:{rowKey:"teamname",row:a,highlight:""},on:{click:e.editForm}})]}},{key:"sys_userid",fn:function({column:i,row:a}){return[a.sys_userid?s("span",[e._v(" "+e._s(a.username)+" ")]):e._e()]}}])})],1),s("editForm",{ref:"editForm",attrs:{openPermissions:!0},on:{ok:e.handleOk}})],1)},b=[],$=c.normalizeComponent(y,_,b,!1,null,"d9f498cd",null,null);const o=$.exports;o.install=function(t){t.component(o.name,o)};exports.GDpackage=o;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as d, m as c } from "./chartbi.cdd1e365.mjs";
|
|
2
|
-
import { s as u, a as m, b as h, c as f, d as g } from "./system.team.
|
|
3
|
-
import { f as r, t as p } from "./messages.
|
|
2
|
+
import { s as u, a as m, b as h, c as f, d as g } from "./system.team.aeaede22.mjs";
|
|
3
|
+
import { f as r, t as p } from "./messages.a1335b0f.mjs";
|
|
4
4
|
const y = {
|
|
5
5
|
data() {
|
|
6
6
|
return {
|