gds-plus-design-vue 1.1.78 → 1.1.79
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/{chartbi.48631362.mjs → chartbi.57f44d3e.mjs} +175 -175
- package/lib/{chartbi.afd83839.js → chartbi.94deb957.js} +10 -10
- package/lib/gd-initial.js +7 -7
- package/lib/gd-initial.mjs +664 -661
- package/lib/{main.03b24a05.js → main.0bc996b9.js} +1 -1
- package/lib/{main.eea30a23.js → main.1faff788.js} +1 -1
- package/lib/{main.91146343.mjs → main.6ec8214c.mjs} +6 -6
- package/lib/{main.bf19ab41.mjs → main.7155799c.mjs} +4 -4
- package/lib/{main.995a7509.mjs → main.91709b76.mjs} +10 -10
- package/lib/{main.f1e3ba71.js → main.f0373dec.js} +1 -1
- package/lib/{messages.7e85146d.mjs → messages.ae101ecd.mjs} +18 -18
- package/lib/{messages.083c4ede.js → messages.dc95e9ca.js} +5 -5
- package/lib/style.css +2 -2
- package/lib/{system.account.78b852cd.js → system.account.09d65732.js} +2 -2
- package/lib/{system.account.16b1763b.mjs → system.account.ced91d43.mjs} +10 -10
- package/lib/{system.config.9c46f279.mjs → system.config.00e549b8.mjs} +3 -3
- package/lib/{system.config.327aded6.js → system.config.373fe9dd.js} +1 -1
- package/lib/{system.datasource.8a0c7e0f.js → system.datasource.8bc7b3c5.js} +1 -1
- package/lib/{system.datasource.4b0951ba.mjs → system.datasource.e47ba035.mjs} +3 -3
- package/lib/{system.dict.65f25e4e.mjs → system.dict.28a0f526.mjs} +4 -4
- package/lib/{system.dict.72594c98.js → system.dict.aa93f41b.js} +1 -1
- package/lib/{system.duplicatechecking.2e9b8df8.js → system.duplicatechecking.77a40e04.js} +1 -1
- package/lib/{system.duplicatechecking.b05f1617.mjs → system.duplicatechecking.fa81b9ee.mjs} +22 -22
- package/lib/{system.email.591982bd.mjs → system.email.16bf5be6.mjs} +4 -4
- package/lib/{system.email.0899621c.js → system.email.9c7b59f9.js} +2 -2
- package/lib/{system.fieldsecurity.7de4ee1d.mjs → system.fieldsecurity.0b85487c.mjs} +10 -10
- package/lib/{system.fieldsecurity.d57edb47.js → system.fieldsecurity.14445e20.js} +1 -1
- package/lib/{system.file.b3558a8b.js → system.file.d5e18ffc.js} +1 -1
- package/lib/{system.file.f152d4fe.mjs → system.file.e706cecf.mjs} +4 -4
- package/lib/{system.log.f243e7d0.js → system.log.4ddc4031.js} +1 -1
- package/lib/{system.log.30e5157c.mjs → system.log.cc844d4f.mjs} +2 -2
- package/lib/{system.machine.332fb31c.js → system.machine.15cb8251.js} +1 -1
- package/lib/{system.machine.325b256e.mjs → system.machine.4c9db2b1.mjs} +2 -2
- package/lib/{system.notice.9821e123.mjs → system.notice.180c2ef2.mjs} +5 -5
- package/lib/{system.notice.540e97ca.js → system.notice.1d7542ae.js} +1 -1
- package/lib/{system.noticereceived.1fb75290.js → system.noticereceived.d8f128fe.js} +1 -1
- package/lib/{system.noticereceived.0f77a614.mjs → system.noticereceived.f8e0550a.mjs} +4 -4
- package/lib/{system.onlineuser.e0c261ed.js → system.onlineuser.6f9d9ab8.js} +1 -1
- package/lib/{system.onlineuser.90c08aef.mjs → system.onlineuser.99bd4e86.mjs} +2 -2
- package/lib/{system.org.65452f67.js → system.org.37d1d503.js} +1 -1
- package/lib/{system.org.b8d59e5d.mjs → system.org.b76023b7.mjs} +3 -3
- package/lib/{system.permissions.8b0d3c8c.js → system.permissions.1746ed40.js} +2 -2
- package/lib/{system.permissions.d74ca430.mjs → system.permissions.ea1e780d.mjs} +5 -5
- package/lib/{system.plugin.07b3c38e.js → system.plugin.2afed6da.js} +1 -1
- package/lib/{system.plugin.4911a33d.mjs → system.plugin.8ab6d913.mjs} +4 -4
- package/lib/{system.pos.c274f13c.mjs → system.pos.db7cc8b1.mjs} +3 -3
- package/lib/{system.pos.6ed35c39.js → system.pos.ef817301.js} +1 -1
- package/lib/{system.promptmanagement.67475aac.js → system.promptmanagement.db48f9a4.js} +1 -1
- package/lib/{system.promptmanagement.e9976712.mjs → system.promptmanagement.ea39e6d1.mjs} +4 -4
- package/lib/{system.role.f2eff184.mjs → system.role.06753a01.mjs} +13 -13
- package/lib/{system.role.6ce127e7.js → system.role.a871d4f1.js} +1 -1
- package/lib/{system.timers.ef6b6796.js → system.timers.2b286d7f.js} +2 -2
- package/lib/{system.timers.69f1792a.mjs → system.timers.d0f4b3d9.mjs} +16 -16
- package/lib/{system.translation.8f7e4144.js → system.translation.2e43f7a2.js} +1 -1
- package/lib/{system.translation.48ff0b03.mjs → system.translation.bb67cd46.mjs} +6 -6
- package/lib/{system.user.17234177.mjs → system.user.523944f3.mjs} +9 -9
- package/lib/{system.user.4924c331.js → system.user.c2cd86fd.js} +3 -3
- package/lib/{system.useraffiliation.f3c88a51.js → system.useraffiliation.4fc3c0aa.js} +1 -1
- package/lib/{system.useraffiliation.1e74fa9e.mjs → system.useraffiliation.761f4b55.mjs} +7 -7
- package/lib/{system.webresource.e9518d87.mjs → system.webresource.15e6ad21.mjs} +9 -9
- package/lib/{system.webresource.5049d97b.js → system.webresource.7018c9a3.js} +1 -1
- package/lib/{system.welcome.b109df88.js → system.welcome.14985d84.js} +1 -1
- package/lib/{system.welcome.3f1cce96.mjs → system.welcome.90e60cc9.mjs} +2 -2
- package/package.json +1 -1
- /package/lib/{element-theme-chalk.ae828c17.js → element-theme-chalk.dee12271.js} +0 -0
- /package/lib/{element-theme-chalk.35b1f600.mjs → element-theme-chalk.fbb1a631.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as n, n as r } from "./chartbi.
|
|
2
|
-
import { t as u } from "./messages.
|
|
1
|
+
import { m as n, n as r } from "./chartbi.57f44d3e.mjs";
|
|
2
|
+
import { t as u } from "./messages.ae101ecd.mjs";
|
|
3
3
|
function c(s) {
|
|
4
4
|
return window.axios({
|
|
5
5
|
url: "/SysPlugin/page",
|
|
@@ -793,7 +793,7 @@ var I = function() {
|
|
|
793
793
|
E,
|
|
794
794
|
!1,
|
|
795
795
|
null,
|
|
796
|
-
"
|
|
796
|
+
"79f366b1",
|
|
797
797
|
null,
|
|
798
798
|
null
|
|
799
799
|
);
|
|
@@ -932,7 +932,7 @@ var O = function() {
|
|
|
932
932
|
H,
|
|
933
933
|
!1,
|
|
934
934
|
null,
|
|
935
|
-
"
|
|
935
|
+
"c169d3b5",
|
|
936
936
|
null,
|
|
937
937
|
null
|
|
938
938
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as l, n as d } from "./chartbi.
|
|
2
|
-
import { t as u } from "./messages.
|
|
1
|
+
import { m as l, n as d } from "./chartbi.57f44d3e.mjs";
|
|
2
|
+
import { t as u } from "./messages.ae101ecd.mjs";
|
|
3
3
|
function c(t) {
|
|
4
4
|
return window.axios({
|
|
5
5
|
url: "/sysPos/page",
|
|
@@ -295,7 +295,7 @@ var y = function() {
|
|
|
295
295
|
b,
|
|
296
296
|
!1,
|
|
297
297
|
null,
|
|
298
|
-
"
|
|
298
|
+
"ae5c2b8d",
|
|
299
299
|
null,
|
|
300
300
|
null
|
|
301
301
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./chartbi.
|
|
1
|
+
"use strict";const l=require("./chartbi.94deb957.js"),h=require("./messages.dc95e9ca.js");function d(t){return window.axios({url:"/sysPos/page",method:"get",params:t})}function u(t){return window.axios({url:"/sysPos/add",method:"post",data:t})}function c(t){return window.axios({url:"/sysPos/edit",method:"post",data:t})}function g(t){return window.axios({url:"/sysPos/delete",method:"post",data:t})}const p={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.org.jobTitle",prop:"name",label:"\u804C\u4F4D\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"})},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",align:"left"},{transKey:"gd.org.sort",prop:"sort",width:"200",label:"\u6392\u5E8F",align:"left"},{transKey:"gd.org.remark",prop:"remark",type:"slot",slotType:"remark",label:"\u5907\u6CE8",align:"left"}],formColumns:[{transKey:"gd.org.jobTitle",effectType:"input",prop:"name",label:"\u804C\u4F4D\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",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:"sysPos:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysPos:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysPos:delete"}],formButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],tableQueries:[{transKey:"gd.org.jobTitle",prop:"name",label:"\u804C\u4F4D\u540D\u79F0",effectType:"input",rules:[]}]}}};const m={name:"GdPos",props:{height:{type:Number,default:100}},mixins:[h.tablesFilter,p],data(){return{transKey:"gd.btn.add",formLoading:!1,loading:!0,selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>d(Object.assign(t,this.queryParam)).then(e=>e.data)}},computed:{getHeight(){return this.height},...l.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(Object.assign({...t},{pid:t.pid==0?"0":t.pid}))},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(t,e,s)=>{this.delHand(t,e,s)}})},delHand(t,e,s){if(t!=="confirm"){s();return}let a=[];this.selectedRows.forEach(r=>{let o=g(r).then(n=>n);a.push(o)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(a).then(r=>{s();const o=r.filter(n=>!n.success);o.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")+o[0].message),this.handleOk(),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])},sbumit({data:t,record:e,btn:s},a,r){this.formLoading=!0,(e?c:u)(t).then(n=>{n.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),r(),this.handleOk()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+n.message),this.formLoading=!1})},handleOk(){this.$refs.table.refresh()},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}}};var f=function(){var e=this,s=e._self._c;return s("div",{staticClass:"gd-page-view"},[s("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[s("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.tableColumns,selectedRowKeys:e.selectedRowKeys,height:e.getHeight,filtering:!0},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"name",fn:function({column:a,row:r}){return[s("gd-tooltip",{attrs:{rowKey:"name",row:r,highlight:""},on:{click:e.editForm}})]}},{key:"remark",fn:function({column:a,row:r}){return[s("gd-tooltip",{attrs:{rowKey:"remark",row:r}})]}},{key:"operator",fn:function(){return[s("div",{staticClass:"gd-table-operator"},[s("div",{staticClass:"gd-table-operatorl"},[s("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.org.jobTitle","\u804C\u4F4D\u540D\u79F0"),clearable:""},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.refresh.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(a){e.$set(e.queryParam,"name",a)},expression:"queryParam.name"}}),s("div",{staticClass:"table-operator-search",on:{click:e.refresh}},[s("i",{staticClass:"el-input__icon el-icon-search"})])],1),s("div",{staticClass:"gd-table-operatorr"},[s("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"filtering",fn:function({colse:a,visible:r}){return[s("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.getHeight,queryParam:e.queryParam,colse:a,visible:r},on:{save:e.saveQueries}})]}}])})],1),s("gd-edit-form",{ref:"editForm",attrs:{formItemWidth:"90%",loading:e.formLoading,transKey:e.transKey,buttons:e.formButtons,columns:e.formColumns,labelPosition:e.labelPosition,formMode:e.formMode},on:{sbumit:e.sbumit}})],1)},y=[],b=l.normalizeComponent(m,f,y,!1,null,"ae5c2b8d",null,null);const i=b.exports;i.install=function(t){t.component(i.name,i)};exports.GDpackage=i;exports.sysPosAdd=u;exports.sysPosDelete=g;exports.sysPosEdit=c;exports.sysPosPage=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./chartbi.afd83839.js"),m=require("./messages.083c4ede.js");function p(a){return window.axios({url:"/sysTranslation/page",method:"get",params:a})}function h(a){return window.axios({url:"/sysTranslation/add",method:"post",data:a})}function c(){return window.axios({url:"/sysTranslation/GetAllLanguage",method:"get"})}function g(a){return window.axios({url:"/sysTranslation/edit",method:"post",data:a})}function y(a){return window.axios({url:"/sysTranslation/delete",method:"post",params:a})}function f(a){return window.axios({url:"/sysTranslation/DeleteByName",method:"post",params:a})}function b(a){return window.axios({url:"/sysTranslation/details",method:"get",params:a})}function w(){return window.axios({url:"/sysTranslation/cacheTranslation",method:"get"})}function _(){return window.axios({url:"/develop/DeployTranslation",method:"get"})}function $(a){return window.axios({url:"/sysTranslation/InitTranslation",method:"post",data:a})}function v(a){return window.axios({url:"/sysTranslation/ImportTranslation",method:"post",data:a})}function T(a){return window.axios({url:"/sysTranslation/ExportTranslation",method:"get",params:a,responseType:"blob"})}function D(a){return window.axios({url:"/sysHintcatalog/add",method:"post",data:a})}function u(a){return window.axios({url:"/sysHintcatalog/edit",method:"post",data:a})}function C(a){return window.axios({url:"/sysHintcatalog/detail",method:"get",params:a})}function x(a){return window.axios({url:"/sysHintcatalog/delete",method:"post",data:a})}function k(a){return window.axios({url:"/sysHintcatalog/page",method:"get",params:a})}const F={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.promptManagement.hintInfo",prop:"name",label:"\u63D0\u793A\u4FE1\u606F",width:"200",type:"slot",slotType:"name",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.promptManagement.hintCode",prop:"hintcode",width:"160",label:"\u63D0\u793A\u7F16\u7801",align:"left",showOverflowTooltip:!0},{transKey:"gd.promptManagement.hintSeverity",prop:"hintseverity",width:"160",label:"\u4E25\u91CD\u7A0B\u5EA6",type:"slot",slotType:"hintseverity",align:"left"},{transKey:"gd.promptManagement.systemCode",prop:"systemcode",width:"160",label:"\u6240\u5C5E\u7CFB\u7EDF",type:"slot",slotType:"systemcode",align:"left"},{transKey:"gd.promptManagement.typeCode",prop:"typecode",width:"160",label:"\u6240\u5C5E\u5206\u7C7B",type:"slot",slotType:"typecode",align:"left"},{transKey:"gd.promptManagement.moduleCode",prop:"modulecode",width:"160",label:"\u6240\u5C5E\u6A21\u5757",type:"slot",slotType:"modulecode",align:"left"},{transKey:"gd.promptManagement.hintDescription",prop:"hintdescription",width:"160",label:"\u63D0\u793A\u63CF\u8FF0",align:"left"},{transKey:"gd.promptManagement.parameters",prop:"parameters",width:"160",label:"\u53C2\u6570",align:"left"},{transKey:"gd.msg.sendRecord.updatedTime",prop:"updatedtime",width:"160",label:"\u66F4\u65B0\u65F6\u95F4",align:"center"},{transKey:"gd.msg.sendRecord.createdTime",prop:"createdtime",width:"160",label:"\u521B\u5EFA\u65F6\u95F4",align:"center"}],formColumns:[],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"promptManagement:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"promptManagement:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"promptManagement:delete"}],formButtons:[],tableQueries:[{transKey:"gd.promptManagement.hintInfo",prop:"name",label:"\u63D0\u793A\u4FE1\u606F",effectType:"input",rules:[],fkData:[]},{transKey:"gd.promptManagement.hintCode",prop:"hintcode",label:"\u63D0\u793A\u7F16\u7801",effectType:"input",rules:[],fkData:[]},{transKey:"gd.promptManagement.hintSeverity",prop:"hintseverity",label:"\u4E25\u91CD\u7A0B\u5EA6",effectType:"select",dictTypeCode:"severity_level",rules:[],fkData:[]},{transKey:"gd.promptManagement.systemCode",prop:"systemcode",label:"\u6240\u5C5E\u7CFB\u7EDF",effectType:"select",dictTypeCode:"source_system",rules:[],fkData:[]},{transKey:"gd.promptManagement.typeCode",prop:"typecode",label:"\u6240\u5C5E\u5206\u7C7B",effectType:"select",dictTypeCode:"source_category",rules:[],fkData:[]},{transKey:"gd.promptManagement.moduleCode",prop:"modulecode",label:"\u6240\u5C5E\u6A21\u5757",effectType:"select",dictTypeCode:"source_module",rules:[],fkData:[]}]}}};const S={data(){return{confirmLoading:!0,title:"",sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],type:1,fullScreen:!1,width:"1000px",ruleFormData:{name:"",hintseverity:"",hintcode:"",systemcode:"",typecode:"",modulecode:"",parameters:"",hintdescription:"",langs:""},rules:{hintcode:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],hintseverity:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],systemcode:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],typecode:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],modulecode:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}]},visible:!1,addData:null,viewId:"0",translationDetail:{name:"",langs:[]},sourcecategory:[],sourcemodule:[]}},components:{},computed:{modalStyle(){return this.fullScreen?{width:"100%",dialogStyle:{top:"0px"}}:{width:this.width,dialogStyle:{top:"30px"}}},...o.mapGetters(["screenHeight","tableLists"])},methods:{toggleFullscreen(){this.fullScreen=!this.fullScreen},copyData(){o.copyTextToClipboard(this.ruleFormData.hintcode,()=>{this.$message.success(this.$i18nt("gd.https.beenCopied","\u6570\u636E\u5DF2\u590D\u5236"))})},changeText(a){let e=[...this.translationDetail.langs];e.map(t=>(t.description=t.languagecode.replace(/-/g,"_")==="zh_CN"?a:t.description,t)),this.translationDetail.langs=[...e]},changeLanguage(a,e){e.languagecode.replace(/-/g,"_")==="zh_CN"&&(this.ruleFormData.name=a)},getAllLanguage(){this.confirmLoading=!0,c().then(a=>{let e=a.data;this.addData&&e.map(t=>{let s=this.addData.langs.filter(n=>n.code==t.languagecode)[0];return t.languagecode=t.languagecode.replace(/-/g,"_"),t.description=s===void 0?"":s.val,t}),this.translationDetail.langs=e,this.confirmLoading=!1})},getDictionary(a){return this.$options.filters.dictData(a)},getsourcecategory(a){this.sourcecategory=this.$options.filters.dictData("source_category").filter(e=>a.split(",").includes(e.name))},getsourcemodule(a){this.sourcemodule=this.$options.filters.dictData("source_module").filter(e=>a.split(",").includes(e.name))},changecode(a){let e=this.getDictionary("source_system"),t="";e.forEach(s=>{s.code==a&&(t=s.remark)}),this.sourcecategory=[],this.sourcemodule=[],this.ruleFormData.typecode="",this.ruleFormData.modulecode="",this.getsourcecategory(t)},changetypecode(a){let e="";this.sourcecategory.forEach(t=>{t.code==a&&(e=t.remark)}),this.getsourcemodule(e)},init(a){this.fullScreen=!1,this.confirmLoading=!1,this.visible=!0,this.type=a?2:1,this.title=a?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.sysViewButtons=[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],this.getAllLanguage(),a&&this.$nextTick(()=>{setTimeout(()=>{this.sysTranslationDetail(a.id)})})},sysTranslationDetail(a){this.confirmLoading=!0,C({id:a}).then(e=>{this.ruleFormData.name=e.data.name,this.ruleFormData.id=e.data.id,this.ruleFormData.hintseverity=String(e.data.hintseverity),this.ruleFormData.hintcode=e.data.hintcode,this.ruleFormData.hintdescription=e.data.hintdescription,this.ruleFormData.parameters=e.data.parameters,this.ruleFormData.systemcode=e.data.systemcode,this.changecode(this.ruleFormData.systemcode),this.ruleFormData.typecode=e.data.typecode,this.changetypecode(this.ruleFormData.typecode),this.ruleFormData.modulecode=e.data.modulecode;let t=e.data&&e.data.langs?e.data.langs:[];t.map(s=>(s.languagecode=s.languagecode.replace(/-/g,"_"),s)),this.translationDetail=Object.assign(e.data,{langs:t}),this.confirmLoading=!1})},add(a){this.confirmLoading=!0,delete a.id,D(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc")),this.$emit("ok",a),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(a){this.confirmLoading=!0,delete a.basicRecordTable,delete a.matchingRecordTable,u(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc")),this.$emit("ok",a),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleSubmit(){this.$refs.ruleForm.validate(a=>{if(a){const e={...this.ruleFormData,langs:this.translationDetail.langs||[],name:this.ruleFormData.name||this.translationDetail.name};this.type==1?this.add(e):this.edit(e)}})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={name:"",hintseverity:"",hintcode:"",systemcode:"",typecode:"",modulecode:"",parameters:"",hintdescription:"",langs:""},this.sourcecategory=[],this.sourcemodule=[],this.addData=null},doEvent(a){let e=a.item.functionName;this[e]()}}};var L=function(){var e=this,t=e._self._c;return t("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{fullscreen:e.fullScreen,width:e.width,visible:e.visible,footer:null,top:"80px","show-close":!1},on:{"update:visible":function(s){e.visible=s},closed:e.handleCancel}},[t("gd-modal-title",{attrs:{slot:"title",title:`${e.title}${e.$i18nt("gd.promptManagement.hintInfo","\u63D0\u793A\u4FE1\u606F")}`,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,closed:"handleCancel",showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[t("div",{staticClass:"setting-navs",class:e.fullScreen?"modal-bodyq":"modal-body"},[t("el-form",{ref:"ruleForm",attrs:{model:e.ruleFormData,rules:e.rules,"label-width":"120px"},nativeOn:{submit:function(s){s.preventDefault()}}},[t("el-row",{attrs:{gutter:24}},[e.type==2?t("el-col",{staticStyle:{display:"flex","align-items":"center"},attrs:{span:12}},[t("div",{staticClass:"copy-flex"},[t("el-form-item",{staticStyle:{"margin-bottom":"0 !important"},attrs:{label:e.$i18nt("gd.promptManagement.hintCode","\u63D0\u793A\u7F16\u7801"),prop:"hintcode"}},[t("el-input",{attrs:{disabled:e.type==2,placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.hintcode,callback:function(s){e.$set(e.ruleFormData,"hintcode",s)},expression:"ruleFormData['hintcode']"}})],1),t("el-button",{staticClass:"active-color",attrs:{type:"text"},on:{click:e.copyData}},[e._v(" "+e._s(e.$i18nt("gd.btn.copy","\u590D\u5236"))+" ")])],1)]):e._e(),t("el-col",{attrs:{span:12}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.hintSeverity","\u4E25\u91CD\u7A0B\u5EA6"),prop:"hintseverity"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:""},model:{value:e.ruleFormData.hintseverity,callback:function(s){e.$set(e.ruleFormData,"hintseverity",s)},expression:"ruleFormData['hintseverity']"}},e._l(e.getDictionary("severity_level"),function(s,n){return t("el-option",{key:n,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:24}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.hintInfo","\u63D0\u793A\u4FE1\u606F"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},on:{input:e.changeText},model:{value:e.ruleFormData.name,callback:function(s){e.$set(e.ruleFormData,"name",s)},expression:"ruleFormData['name']"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:8}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.systemCode","\u6240\u5C5E\u7CFB\u7EDF"),prop:"systemcode"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:""},on:{change:e.changecode},model:{value:e.ruleFormData.systemcode,callback:function(s){e.$set(e.ruleFormData,"systemcode",s)},expression:"ruleFormData['systemcode']"}},e._l(e.getDictionary("source_system"),function(s,n){return t("el-option",{key:n,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:8}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.typeCode","\u6240\u5C5E\u5206\u7C7B"),prop:"typecode"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:"",disabled:!e.ruleFormData.systemcode},on:{change:e.changetypecode},model:{value:e.ruleFormData.typecode,callback:function(s){e.$set(e.ruleFormData,"typecode",s)},expression:"ruleFormData['typecode']"}},e._l(e.sourcecategory,function(s,n){return t("el-option",{key:n,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:8}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.moduleCode","\u6240\u5C5E\u6A21\u5757"),prop:"modulecode"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:"",disabled:!e.ruleFormData.typecode},model:{value:e.ruleFormData.modulecode,callback:function(s){e.$set(e.ruleFormData,"modulecode",s)},expression:"ruleFormData['modulecode']"}},e._l(e.sourcemodule,function(s,n){return t("el-option",{key:n,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:24}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.parameters","\u53C2\u6570"),prop:"parameters"}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$i18nt("gd.placeholder.inputcontent","\u8BF7\u8F93\u5165\u5185\u5BB9"),autosize:{minRows:3,maxRows:20}},model:{value:e.ruleFormData.parameters,callback:function(s){e.$set(e.ruleFormData,"parameters",s)},expression:"ruleFormData['parameters']"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{staticStyle:{"margin-bottom":"0px !important"},attrs:{label:e.$i18nt("gd.promptManagement.hintDescription","\u63D0\u793A\u63CF\u8FF0")}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$i18nt("gd.placeholder.inputcontent","\u8BF7\u8F93\u5165\u5185\u5BB9"),autosize:{minRows:3,maxRows:20}},model:{value:e.ruleFormData.hintdescription,callback:function(s){e.$set(e.ruleFormData,"hintdescription",s)},expression:"ruleFormData['hintdescription']"}})],1)],1)],1),t("el-divider",{attrs:{dashed:""}}),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:24}},[e._l(this.translationDetail.langs,function(s){return[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:s.languagename}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),type:"textarea",autosize:""},on:{input:function(n){return e.changeLanguage(n,s)}},model:{value:s.description,callback:function(n){e.$set(s,"description",n)},expression:"item.description"}})],1)]})],2)],1)],1)],1)])],1)},K=[],B=o.normalizeComponent(S,L,K,!1,null,"64c01572",null,null);const M=B.exports;const R={props:{height:{type:Number,default:100}},name:"GdPromptManagement",mixins:[m.tablesFilter,F],components:{editForm:M},data(){return{selectedRowKeys:[],selectedRows:[],disableBtn:[],transKey:"gd.promptManagement.checkConfigurationRetryRule",formLoading:!1,currentNode:null,loadData:a=>k(Object.assign(a,this.getQueryParam)).then(e=>e.data),record:{},queryParam:{}}},computed:{getTableLists(){let a=[...this.tableLists];return a.forEach((e,t)=>{a[t].name=e.busname,a[t].code=e.id}),a},getTableQueries(){return this.tableQueries.forEach((a,e)=>{}),this.tableQueries},getHeight(){return this.height},getTableButtons(){return this.tableButtons.filter(a=>(a.show=!this.disableBtn.includes(a.displayName),!0))},getQueryParam(){let a=new Map;for(let e in this.queryParam)a.set(e,this.queryParam[e]);return Object.fromEntries(a)},...o.mapGetters(["tablePageSize","tableSize","labelPosition","formMode","tableLists"])},methods:{onSelectChange(a,e){if(this.selectedRows=e,this.selectedRowKeys=a,a.length===0){this.disableBtn=[];return}},query(){this.$refs.table.refresh(!0)},refresh(){this.$refs.table.refresh()},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.editForms(this.selectedRows[0])},editForms(a){this.$refs.editForm.init(a)},saveQueries(a){this.queryParam={...a},this.refresh()},add(){this.$refs.editForm.init(null)},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.readTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\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:(a,e,t)=>{this.delHand(a,e,t)}})},delHand(a,e,t){if(a!=="confirm"){t();return}let s=[],n=x({id:this.selectedRowKeys.join(",")}).then(i=>i);s.push(n),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(s).then(i=>{e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0,t();const r=i.filter(l=>!l.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),this.refresh()})},doEvent(a){let e=a.item.functionName;this[e]&&this[e]()},handleOk(){this.$refs.table.refresh()},dictSwitch(a,e){let t=this.$options.filters.dictData(e).filter(s=>s.code==a)[0];return t!=null&&t.colour?t.colour:null},enable(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.operateTip","\u8BF7\u9009\u62E9\u8981\u64CD\u4F5C\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.editStateCodes({row:this.selectedRows[0]})},deactivated(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.operateTip","\u8BF7\u9009\u62E9\u8981\u64CD\u4F5C\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.editStateCodes({row:this.selectedRows[0]})},editStateCodes({column:a,row:e}){if(e.dict_type==1){this.$message.error(this.$i18nt("gd.https.operableNoTip","\u4E0D\u53EF\u64CD\u4F5C!"));return}const t=e.statecodes!=1?this.$i18nt("gd.https.enableContent","\u662F\u5426\u505C\u7528\u9009\u4E2D\u6570\u636E?"):this.$i18nt("gd.https.deactivateContent","\u662F\u5426\u542F\u7528\u9009\u4E2D\u6570\u636E?"),s=e.statecodes!=1?this.$i18nt("gd.https.enableOk","\u786E\u8BA4\u505C\u7528"):this.$i18nt("gd.https.deactivateOk","\u786E\u8BA4\u542F\u7528");this.$confirm(t,this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:s,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:(n,i,r)=>{if(n!=="confirm"){r();return}i.confirmButtonLoading=!0,i.cancelButtonLoading=!0,i.showCancelButton=!1,u({id:e.id,stateCodes:e.statecodes==1?0:1}).then(l=>{r(),i.confirmButtonLoading=!1,i.cancelButtonLoading=!1,i.showCancelButton=!0,l.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.handleOk()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+l.message)})}})}}};var q=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,filtering:!0,height:e.getHeight},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"name",fn:function({column:s,row:n}){return[t("gd-tooltip",{attrs:{rowKey:"name",row:n,highlight:""},on:{click:e.editForms}})]}},{key:"createdtime",fn:function({column:s,row:n}){return[t("gd-tooltip",{attrs:{rowKey:"createdtime",row:n}})]}},{key:"updatedtime",fn:function({column:s,row:n}){return[t("gd-tooltip",{attrs:{rowKey:"updatedtime",row:n}})]}},{key:"hintseverity",fn:function(s){return[e.dictSwitch(s.row.hintseverity,"severity_level")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.hintseverity,"severity_level")}},[e._v(" "+e._s(e._f("dictType")("severity_level",s.row.hintseverity))+" ")]):t("span",[e._v(e._s(e._f("dictType")("severity_level",s.row.hintseverity)))])]}},{key:"systemcode",fn:function(s){return[e.dictSwitch(s.row.systemcode,"source_system")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.systemcode,"source_system")}},[e._v(" "+e._s(e._f("dictType")("source_system",s.row.systemcode))+" ")]):t("span",[e._v(e._s(e._f("dictType")("source_system",s.row.systemcode)))])]}},{key:"typecode",fn:function(s){return[e.dictSwitch(s.row.typecode,"source_category")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.typecode,"source_category")}},[e._v(" "+e._s(e._f("dictType")("source_category",s.row.typecode))+" ")]):t("span",[e._v(e._s(e._f("dictType")("source_category",s.row.typecode)))])]}},{key:"modulecode",fn:function(s){return[e.dictSwitch(s.row.modulecode,"source_module")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.modulecode,"source_module")}},[e._v(" "+e._s(e._f("dictType")("source_module",s.row.modulecode))+" ")]):t("span",[e._v(e._s(e._f("dictType")("source_module",s.row.modulecode)))])]}},{key:"operator",fn:function(){return[t("div",{staticClass:"gd-table-operator"},[t("div",{staticClass:"gd-table-operatorl",staticStyle:{"margin-right":"12px"}},[t("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.promptManagement.hintCode","\u63D0\u793A\u7F16\u7801"),clearable:""},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.query.apply(null,arguments)}},model:{value:e.queryParam.hintcode,callback:function(s){e.$set(e.queryParam,"hintcode",s)},expression:"queryParam.hintcode"}}),t("div",{staticClass:"table-operator-search",on:{click:e.query}},[t("i",{staticClass:"el-input__icon el-icon-search"})])],1),t("div",{staticClass:"gd-table-operatorl"},[t("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.promptManagement.hintInfo","\u63D0\u793A\u4FE1\u606F"),clearable:""},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.query.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(s){e.$set(e.queryParam,"name",s)},expression:"queryParam.name"}}),t("div",{staticClass:"table-operator-search",on:{click:e.query}},[t("i",{staticClass:"el-input__icon el-icon-search"})])],1),t("div",{staticClass:"gd-table-operatorr"},[t("gd-btn-list",{attrs:{sysViewButtons:e.getTableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"filtering",fn:function({colse:s,visible:n}){return[t("gd-table-queries-field",{attrs:{columns:e.getTableQueries,height:e.getHeight,queryParam:e.queryParam,colse:s,visible:n},on:{save:e.saveQueries}})]}}])})],1),t("editForm",{ref:"editForm",attrs:{table:e.record},on:{ok:e.handleOk}})],1)},N=[],O=o.normalizeComponent(R,q,N,!1,null,"d79aa2f3",null,null);const d=O.exports;d.install=function(a){a.component(d.name,d)};exports.GDpackage=d;exports.GetAllLanguage=c;exports.deployTranslation=_;exports.sysTranslationAdd=h;exports.sysTranslationCache=w;exports.sysTranslationDelName=f;exports.sysTranslationDelete=y;exports.sysTranslationDetail=b;exports.sysTranslationEdit=g;exports.sysTranslationExport=T;exports.sysTranslationImport=v;exports.sysTranslationInit=$;exports.sysTranslationPage=p;
|
|
1
|
+
"use strict";const o=require("./chartbi.94deb957.js"),m=require("./messages.dc95e9ca.js");function p(a){return window.axios({url:"/sysTranslation/page",method:"get",params:a})}function h(a){return window.axios({url:"/sysTranslation/add",method:"post",data:a})}function c(){return window.axios({url:"/sysTranslation/GetAllLanguage",method:"get"})}function g(a){return window.axios({url:"/sysTranslation/edit",method:"post",data:a})}function y(a){return window.axios({url:"/sysTranslation/delete",method:"post",params:a})}function f(a){return window.axios({url:"/sysTranslation/DeleteByName",method:"post",params:a})}function b(a){return window.axios({url:"/sysTranslation/details",method:"get",params:a})}function w(){return window.axios({url:"/sysTranslation/cacheTranslation",method:"get"})}function _(){return window.axios({url:"/develop/DeployTranslation",method:"get"})}function $(a){return window.axios({url:"/sysTranslation/InitTranslation",method:"post",data:a})}function v(a){return window.axios({url:"/sysTranslation/ImportTranslation",method:"post",data:a})}function T(a){return window.axios({url:"/sysTranslation/ExportTranslation",method:"get",params:a,responseType:"blob"})}function D(a){return window.axios({url:"/sysHintcatalog/add",method:"post",data:a})}function u(a){return window.axios({url:"/sysHintcatalog/edit",method:"post",data:a})}function C(a){return window.axios({url:"/sysHintcatalog/detail",method:"get",params:a})}function x(a){return window.axios({url:"/sysHintcatalog/delete",method:"post",data:a})}function k(a){return window.axios({url:"/sysHintcatalog/page",method:"get",params:a})}const F={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.promptManagement.hintInfo",prop:"name",label:"\u63D0\u793A\u4FE1\u606F",width:"200",type:"slot",slotType:"name",align:"left",fixed:!0,showOverflowTooltip:!0},{transKey:"gd.promptManagement.hintCode",prop:"hintcode",width:"160",label:"\u63D0\u793A\u7F16\u7801",align:"left",showOverflowTooltip:!0},{transKey:"gd.promptManagement.hintSeverity",prop:"hintseverity",width:"160",label:"\u4E25\u91CD\u7A0B\u5EA6",type:"slot",slotType:"hintseverity",align:"left"},{transKey:"gd.promptManagement.systemCode",prop:"systemcode",width:"160",label:"\u6240\u5C5E\u7CFB\u7EDF",type:"slot",slotType:"systemcode",align:"left"},{transKey:"gd.promptManagement.typeCode",prop:"typecode",width:"160",label:"\u6240\u5C5E\u5206\u7C7B",type:"slot",slotType:"typecode",align:"left"},{transKey:"gd.promptManagement.moduleCode",prop:"modulecode",width:"160",label:"\u6240\u5C5E\u6A21\u5757",type:"slot",slotType:"modulecode",align:"left"},{transKey:"gd.promptManagement.hintDescription",prop:"hintdescription",width:"160",label:"\u63D0\u793A\u63CF\u8FF0",align:"left"},{transKey:"gd.promptManagement.parameters",prop:"parameters",width:"160",label:"\u53C2\u6570",align:"left"},{transKey:"gd.msg.sendRecord.updatedTime",prop:"updatedtime",width:"160",label:"\u66F4\u65B0\u65F6\u95F4",align:"center"},{transKey:"gd.msg.sendRecord.createdTime",prop:"createdtime",width:"160",label:"\u521B\u5EFA\u65F6\u95F4",align:"center"}],formColumns:[],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"promptManagement:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"promptManagement:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"promptManagement:delete"}],formButtons:[],tableQueries:[{transKey:"gd.promptManagement.hintInfo",prop:"name",label:"\u63D0\u793A\u4FE1\u606F",effectType:"input",rules:[],fkData:[]},{transKey:"gd.promptManagement.hintCode",prop:"hintcode",label:"\u63D0\u793A\u7F16\u7801",effectType:"input",rules:[],fkData:[]},{transKey:"gd.promptManagement.hintSeverity",prop:"hintseverity",label:"\u4E25\u91CD\u7A0B\u5EA6",effectType:"select",dictTypeCode:"severity_level",rules:[],fkData:[]},{transKey:"gd.promptManagement.systemCode",prop:"systemcode",label:"\u6240\u5C5E\u7CFB\u7EDF",effectType:"select",dictTypeCode:"source_system",rules:[],fkData:[]},{transKey:"gd.promptManagement.typeCode",prop:"typecode",label:"\u6240\u5C5E\u5206\u7C7B",effectType:"select",dictTypeCode:"source_category",rules:[],fkData:[]},{transKey:"gd.promptManagement.moduleCode",prop:"modulecode",label:"\u6240\u5C5E\u6A21\u5757",effectType:"select",dictTypeCode:"source_module",rules:[],fkData:[]}]}}};const S={data(){return{confirmLoading:!0,title:"",sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],type:1,fullScreen:!1,width:"1000px",ruleFormData:{name:"",hintseverity:"",hintcode:"",systemcode:"",typecode:"",modulecode:"",parameters:"",hintdescription:"",langs:""},rules:{hintcode:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],name:[{required:!0,message:this.$i18nt("gd.btn.input","\u8BF7\u8F93\u5165"),trigger:"change"}],hintseverity:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],systemcode:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],typecode:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}],modulecode:[{required:!0,message:this.$i18nt("gd.btn.select","\u8BF7\u9009\u62E9"),trigger:"change"}]},visible:!1,addData:null,viewId:"0",translationDetail:{name:"",langs:[]},sourcecategory:[],sourcemodule:[]}},components:{},computed:{modalStyle(){return this.fullScreen?{width:"100%",dialogStyle:{top:"0px"}}:{width:this.width,dialogStyle:{top:"30px"}}},...o.mapGetters(["screenHeight","tableLists"])},methods:{toggleFullscreen(){this.fullScreen=!this.fullScreen},copyData(){o.copyTextToClipboard(this.ruleFormData.hintcode,()=>{this.$message.success(this.$i18nt("gd.https.beenCopied","\u6570\u636E\u5DF2\u590D\u5236"))})},changeText(a){let e=[...this.translationDetail.langs];e.map(t=>(t.description=t.languagecode.replace(/-/g,"_")==="zh_CN"?a:t.description,t)),this.translationDetail.langs=[...e]},changeLanguage(a,e){e.languagecode.replace(/-/g,"_")==="zh_CN"&&(this.ruleFormData.name=a)},getAllLanguage(){this.confirmLoading=!0,c().then(a=>{let e=a.data;this.addData&&e.map(t=>{let s=this.addData.langs.filter(n=>n.code==t.languagecode)[0];return t.languagecode=t.languagecode.replace(/-/g,"_"),t.description=s===void 0?"":s.val,t}),this.translationDetail.langs=e,this.confirmLoading=!1})},getDictionary(a){return this.$options.filters.dictData(a)},getsourcecategory(a){this.sourcecategory=this.$options.filters.dictData("source_category").filter(e=>a.split(",").includes(e.name))},getsourcemodule(a){this.sourcemodule=this.$options.filters.dictData("source_module").filter(e=>a.split(",").includes(e.name))},changecode(a){let e=this.getDictionary("source_system"),t="";e.forEach(s=>{s.code==a&&(t=s.remark)}),this.sourcecategory=[],this.sourcemodule=[],this.ruleFormData.typecode="",this.ruleFormData.modulecode="",this.getsourcecategory(t)},changetypecode(a){let e="";this.sourcecategory.forEach(t=>{t.code==a&&(e=t.remark)}),this.getsourcemodule(e)},init(a){this.fullScreen=!1,this.confirmLoading=!1,this.visible=!0,this.type=a?2:1,this.title=a?this.$i18nt("gd.https.edit"):this.$i18nt("gd.https.add"),this.sysViewButtons=[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],this.getAllLanguage(),a&&this.$nextTick(()=>{setTimeout(()=>{this.sysTranslationDetail(a.id)})})},sysTranslationDetail(a){this.confirmLoading=!0,C({id:a}).then(e=>{this.ruleFormData.name=e.data.name,this.ruleFormData.id=e.data.id,this.ruleFormData.hintseverity=String(e.data.hintseverity),this.ruleFormData.hintcode=e.data.hintcode,this.ruleFormData.hintdescription=e.data.hintdescription,this.ruleFormData.parameters=e.data.parameters,this.ruleFormData.systemcode=e.data.systemcode,this.changecode(this.ruleFormData.systemcode),this.ruleFormData.typecode=e.data.typecode,this.changetypecode(this.ruleFormData.typecode),this.ruleFormData.modulecode=e.data.modulecode;let t=e.data&&e.data.langs?e.data.langs:[];t.map(s=>(s.languagecode=s.languagecode.replace(/-/g,"_"),s)),this.translationDetail=Object.assign(e.data,{langs:t}),this.confirmLoading=!1})},add(a){this.confirmLoading=!0,delete a.id,D(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc")),this.$emit("ok",a),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail")+e.message)}).finally(e=>{this.confirmLoading=!1})},edit(a){this.confirmLoading=!0,delete a.basicRecordTable,delete a.matchingRecordTable,u(a).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.addSucc")),this.$emit("ok",a),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail")+e.message)}).finally(e=>{this.confirmLoading=!1})},handleSubmit(){this.$refs.ruleForm.validate(a=>{if(a){const e={...this.ruleFormData,langs:this.translationDetail.langs||[],name:this.ruleFormData.name||this.translationDetail.name};this.type==1?this.add(e):this.edit(e)}})},handleCancel(){this.visible=!1,this.confirmLoading=!1,this.$refs.ruleForm.resetFields(),this.ruleFormData={name:"",hintseverity:"",hintcode:"",systemcode:"",typecode:"",modulecode:"",parameters:"",hintdescription:"",langs:""},this.sourcecategory=[],this.sourcemodule=[],this.addData=null},doEvent(a){let e=a.item.functionName;this[e]()}}};var L=function(){var e=this,t=e._self._c;return t("el-dialog",{class:e.fullScreen?"gd-dialog":"gd-dialog gd-dialog-fangda",attrs:{fullscreen:e.fullScreen,width:e.width,visible:e.visible,footer:null,top:"80px","show-close":!1},on:{"update:visible":function(s){e.visible=s},closed:e.handleCancel}},[t("gd-modal-title",{attrs:{slot:"title",title:`${e.title}${e.$i18nt("gd.promptManagement.hintInfo","\u63D0\u793A\u4FE1\u606F")}`,fullscreen:e.fullScreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,closed:"handleCancel",showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[t("div",{staticClass:"setting-navs",class:e.fullScreen?"modal-bodyq":"modal-body"},[t("el-form",{ref:"ruleForm",attrs:{model:e.ruleFormData,rules:e.rules,"label-width":"120px"},nativeOn:{submit:function(s){s.preventDefault()}}},[t("el-row",{attrs:{gutter:24}},[e.type==2?t("el-col",{staticStyle:{display:"flex","align-items":"center"},attrs:{span:12}},[t("div",{staticClass:"copy-flex"},[t("el-form-item",{staticStyle:{"margin-bottom":"0 !important"},attrs:{label:e.$i18nt("gd.promptManagement.hintCode","\u63D0\u793A\u7F16\u7801"),prop:"hintcode"}},[t("el-input",{attrs:{disabled:e.type==2,placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:e.ruleFormData.hintcode,callback:function(s){e.$set(e.ruleFormData,"hintcode",s)},expression:"ruleFormData['hintcode']"}})],1),t("el-button",{staticClass:"active-color",attrs:{type:"text"},on:{click:e.copyData}},[e._v(" "+e._s(e.$i18nt("gd.btn.copy","\u590D\u5236"))+" ")])],1)]):e._e(),t("el-col",{attrs:{span:12}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.hintSeverity","\u4E25\u91CD\u7A0B\u5EA6"),prop:"hintseverity"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:""},model:{value:e.ruleFormData.hintseverity,callback:function(s){e.$set(e.ruleFormData,"hintseverity",s)},expression:"ruleFormData['hintseverity']"}},e._l(e.getDictionary("severity_level"),function(s,n){return t("el-option",{key:n,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:24}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.hintInfo","\u63D0\u793A\u4FE1\u606F"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},on:{input:e.changeText},model:{value:e.ruleFormData.name,callback:function(s){e.$set(e.ruleFormData,"name",s)},expression:"ruleFormData['name']"}})],1)],1)],1),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:8}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.systemCode","\u6240\u5C5E\u7CFB\u7EDF"),prop:"systemcode"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:""},on:{change:e.changecode},model:{value:e.ruleFormData.systemcode,callback:function(s){e.$set(e.ruleFormData,"systemcode",s)},expression:"ruleFormData['systemcode']"}},e._l(e.getDictionary("source_system"),function(s,n){return t("el-option",{key:n,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:8}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.typeCode","\u6240\u5C5E\u5206\u7C7B"),prop:"typecode"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:"",disabled:!e.ruleFormData.systemcode},on:{change:e.changetypecode},model:{value:e.ruleFormData.typecode,callback:function(s){e.$set(e.ruleFormData,"typecode",s)},expression:"ruleFormData['typecode']"}},e._l(e.sourcecategory,function(s,n){return t("el-option",{key:n,attrs:{value:s.code,label:e.$i18nt(`Dynamics.${s.transkey}`,s.name)}})}),1)],1)],1),t("el-col",{attrs:{span:8}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.moduleCode","\u6240\u5C5E\u6A21\u5757"),prop:"modulecode"}},[t("el-select",{ref:"refView",staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),filterable:"",disabled:!e.ruleFormData.typecode},model:{value:e.ruleFormData.modulecode,callback:function(s){e.$set(e.ruleFormData,"modulecode",s)},expression:"ruleFormData['modulecode']"}},e._l(e.sourcemodule,function(s,n){return t("el-option",{key:n,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:24}},[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:e.$i18nt("gd.promptManagement.parameters","\u53C2\u6570"),prop:"parameters"}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$i18nt("gd.placeholder.inputcontent","\u8BF7\u8F93\u5165\u5185\u5BB9"),autosize:{minRows:3,maxRows:20}},model:{value:e.ruleFormData.parameters,callback:function(s){e.$set(e.ruleFormData,"parameters",s)},expression:"ruleFormData['parameters']"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{staticStyle:{"margin-bottom":"0px !important"},attrs:{label:e.$i18nt("gd.promptManagement.hintDescription","\u63D0\u793A\u63CF\u8FF0")}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$i18nt("gd.placeholder.inputcontent","\u8BF7\u8F93\u5165\u5185\u5BB9"),autosize:{minRows:3,maxRows:20}},model:{value:e.ruleFormData.hintdescription,callback:function(s){e.$set(e.ruleFormData,"hintdescription",s)},expression:"ruleFormData['hintdescription']"}})],1)],1)],1),t("el-divider",{attrs:{dashed:""}}),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:24}},[e._l(this.translationDetail.langs,function(s){return[t("el-form-item",{staticStyle:{"margin-bottom":"12px"},attrs:{label:s.languagename}},[t("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),type:"textarea",autosize:""},on:{input:function(n){return e.changeLanguage(n,s)}},model:{value:s.description,callback:function(n){e.$set(s,"description",n)},expression:"item.description"}})],1)]})],2)],1)],1)],1)])],1)},K=[],B=o.normalizeComponent(S,L,K,!1,null,"7241ccf0",null,null);const M=B.exports;const R={props:{height:{type:Number,default:100}},name:"GdPromptManagement",mixins:[m.tablesFilter,F],components:{editForm:M},data(){return{selectedRowKeys:[],selectedRows:[],disableBtn:[],transKey:"gd.promptManagement.checkConfigurationRetryRule",formLoading:!1,currentNode:null,loadData:a=>k(Object.assign(a,this.getQueryParam)).then(e=>e.data),record:{},queryParam:{}}},computed:{getTableLists(){let a=[...this.tableLists];return a.forEach((e,t)=>{a[t].name=e.busname,a[t].code=e.id}),a},getTableQueries(){return this.tableQueries.forEach((a,e)=>{}),this.tableQueries},getHeight(){return this.height},getTableButtons(){return this.tableButtons.filter(a=>(a.show=!this.disableBtn.includes(a.displayName),!0))},getQueryParam(){let a=new Map;for(let e in this.queryParam)a.set(e,this.queryParam[e]);return Object.fromEntries(a)},...o.mapGetters(["tablePageSize","tableSize","labelPosition","formMode","tableLists"])},methods:{onSelectChange(a,e){if(this.selectedRows=e,this.selectedRowKeys=a,a.length===0){this.disableBtn=[];return}},query(){this.$refs.table.refresh(!0)},refresh(){this.$refs.table.refresh()},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.editForms(this.selectedRows[0])},editForms(a){this.$refs.editForm.init(a)},saveQueries(a){this.queryParam={...a},this.refresh()},add(){this.$refs.editForm.init(null)},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.readTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\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:(a,e,t)=>{this.delHand(a,e,t)}})},delHand(a,e,t){if(a!=="confirm"){t();return}let s=[],n=x({id:this.selectedRowKeys.join(",")}).then(i=>i);s.push(n),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(s).then(i=>{e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0,t();const r=i.filter(l=>!l.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),this.refresh()})},doEvent(a){let e=a.item.functionName;this[e]&&this[e]()},handleOk(){this.$refs.table.refresh()},dictSwitch(a,e){let t=this.$options.filters.dictData(e).filter(s=>s.code==a)[0];return t!=null&&t.colour?t.colour:null},enable(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.operateTip","\u8BF7\u9009\u62E9\u8981\u64CD\u4F5C\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.editStateCodes({row:this.selectedRows[0]})},deactivated(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.operateTip","\u8BF7\u9009\u62E9\u8981\u64CD\u4F5C\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.editStateCodes({row:this.selectedRows[0]})},editStateCodes({column:a,row:e}){if(e.dict_type==1){this.$message.error(this.$i18nt("gd.https.operableNoTip","\u4E0D\u53EF\u64CD\u4F5C!"));return}const t=e.statecodes!=1?this.$i18nt("gd.https.enableContent","\u662F\u5426\u505C\u7528\u9009\u4E2D\u6570\u636E?"):this.$i18nt("gd.https.deactivateContent","\u662F\u5426\u542F\u7528\u9009\u4E2D\u6570\u636E?"),s=e.statecodes!=1?this.$i18nt("gd.https.enableOk","\u786E\u8BA4\u505C\u7528"):this.$i18nt("gd.https.deactivateOk","\u786E\u8BA4\u542F\u7528");this.$confirm(t,this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:s,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:(n,i,r)=>{if(n!=="confirm"){r();return}i.confirmButtonLoading=!0,i.cancelButtonLoading=!0,i.showCancelButton=!1,u({id:e.id,stateCodes:e.statecodes==1?0:1}).then(l=>{r(),i.confirmButtonLoading=!1,i.cancelButtonLoading=!1,i.showCancelButton=!0,l.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.handleOk()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+l.message)})}})}}};var q=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,filtering:!0,height:e.getHeight},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"name",fn:function({column:s,row:n}){return[t("gd-tooltip",{attrs:{rowKey:"name",row:n,highlight:""},on:{click:e.editForms}})]}},{key:"createdtime",fn:function({column:s,row:n}){return[t("gd-tooltip",{attrs:{rowKey:"createdtime",row:n}})]}},{key:"updatedtime",fn:function({column:s,row:n}){return[t("gd-tooltip",{attrs:{rowKey:"updatedtime",row:n}})]}},{key:"hintseverity",fn:function(s){return[e.dictSwitch(s.row.hintseverity,"severity_level")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.hintseverity,"severity_level")}},[e._v(" "+e._s(e._f("dictType")("severity_level",s.row.hintseverity))+" ")]):t("span",[e._v(e._s(e._f("dictType")("severity_level",s.row.hintseverity)))])]}},{key:"systemcode",fn:function(s){return[e.dictSwitch(s.row.systemcode,"source_system")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.systemcode,"source_system")}},[e._v(" "+e._s(e._f("dictType")("source_system",s.row.systemcode))+" ")]):t("span",[e._v(e._s(e._f("dictType")("source_system",s.row.systemcode)))])]}},{key:"typecode",fn:function(s){return[e.dictSwitch(s.row.typecode,"source_category")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.typecode,"source_category")}},[e._v(" "+e._s(e._f("dictType")("source_category",s.row.typecode))+" ")]):t("span",[e._v(e._s(e._f("dictType")("source_category",s.row.typecode)))])]}},{key:"modulecode",fn:function(s){return[e.dictSwitch(s.row.modulecode,"source_module")?t("el-tag",{attrs:{color:e.dictSwitch(s.row.modulecode,"source_module")}},[e._v(" "+e._s(e._f("dictType")("source_module",s.row.modulecode))+" ")]):t("span",[e._v(e._s(e._f("dictType")("source_module",s.row.modulecode)))])]}},{key:"operator",fn:function(){return[t("div",{staticClass:"gd-table-operator"},[t("div",{staticClass:"gd-table-operatorl",staticStyle:{"margin-right":"12px"}},[t("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.promptManagement.hintCode","\u63D0\u793A\u7F16\u7801"),clearable:""},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.query.apply(null,arguments)}},model:{value:e.queryParam.hintcode,callback:function(s){e.$set(e.queryParam,"hintcode",s)},expression:"queryParam.hintcode"}}),t("div",{staticClass:"table-operator-search",on:{click:e.query}},[t("i",{staticClass:"el-input__icon el-icon-search"})])],1),t("div",{staticClass:"gd-table-operatorl"},[t("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.promptManagement.hintInfo","\u63D0\u793A\u4FE1\u606F"),clearable:""},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.query.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(s){e.$set(e.queryParam,"name",s)},expression:"queryParam.name"}}),t("div",{staticClass:"table-operator-search",on:{click:e.query}},[t("i",{staticClass:"el-input__icon el-icon-search"})])],1),t("div",{staticClass:"gd-table-operatorr"},[t("gd-btn-list",{attrs:{sysViewButtons:e.getTableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"filtering",fn:function({colse:s,visible:n}){return[t("gd-table-queries-field",{attrs:{columns:e.getTableQueries,height:e.getHeight,queryParam:e.queryParam,colse:s,visible:n},on:{save:e.saveQueries}})]}}])})],1),t("editForm",{ref:"editForm",attrs:{table:e.record},on:{ok:e.handleOk}})],1)},N=[],O=o.normalizeComponent(R,q,N,!1,null,"8986d472",null,null);const d=O.exports;d.install=function(a){a.component(d.name,d)};exports.GDpackage=d;exports.GetAllLanguage=c;exports.deployTranslation=_;exports.sysTranslationAdd=h;exports.sysTranslationCache=w;exports.sysTranslationDelName=f;exports.sysTranslationDelete=y;exports.sysTranslationDetail=b;exports.sysTranslationEdit=g;exports.sysTranslationExport=T;exports.sysTranslationImport=v;exports.sysTranslationInit=$;exports.sysTranslationPage=p;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as d, c as m, n as c } from "./chartbi.
|
|
2
|
-
import { t as p } from "./messages.
|
|
1
|
+
import { m as d, c as m, n as c } from "./chartbi.57f44d3e.mjs";
|
|
2
|
+
import { t as p } from "./messages.ae101ecd.mjs";
|
|
3
3
|
function K(a) {
|
|
4
4
|
return window.axios({
|
|
5
5
|
url: "/sysTranslation/page",
|
|
@@ -553,7 +553,7 @@ var $ = function() {
|
|
|
553
553
|
v,
|
|
554
554
|
!1,
|
|
555
555
|
null,
|
|
556
|
-
"
|
|
556
|
+
"7241ccf0",
|
|
557
557
|
null,
|
|
558
558
|
null
|
|
559
559
|
);
|
|
@@ -780,7 +780,7 @@ var x = function() {
|
|
|
780
780
|
k,
|
|
781
781
|
!1,
|
|
782
782
|
null,
|
|
783
|
-
"
|
|
783
|
+
"8986d472",
|
|
784
784
|
null,
|
|
785
785
|
null
|
|
786
786
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as v, a as _, b as K, c as k, g as w, d as $, e as T, f as C, h as R } from "./system.fieldsecurity.
|
|
2
|
-
import { m as h, n as u } from "./chartbi.
|
|
3
|
-
import { t as m } from "./messages.
|
|
4
|
-
import { g as y, s as I, a as L } from "./system.org.
|
|
5
|
-
import { S, b as x, g as N, p as D, d as B, e as F } from "./system.account.
|
|
1
|
+
import { s as v, a as _, b as K, c as k, g as w, d as $, e as T, f as C, h as R } from "./system.fieldsecurity.0b85487c.mjs";
|
|
2
|
+
import { m as h, n as u } from "./chartbi.57f44d3e.mjs";
|
|
3
|
+
import { t as m } from "./messages.ae101ecd.mjs";
|
|
4
|
+
import { g as y, s as I, a as L } from "./system.org.b76023b7.mjs";
|
|
5
|
+
import { S, b as x, g as N, p as D, d as B, e as F } from "./system.account.ced91d43.mjs";
|
|
6
6
|
const M = {
|
|
7
7
|
data() {
|
|
8
8
|
return {
|
|
@@ -276,7 +276,7 @@ var P = function() {
|
|
|
276
276
|
O,
|
|
277
277
|
!1,
|
|
278
278
|
null,
|
|
279
|
-
"
|
|
279
|
+
"2b164094",
|
|
280
280
|
null,
|
|
281
281
|
null
|
|
282
282
|
);
|
|
@@ -461,7 +461,7 @@ var G = function() {
|
|
|
461
461
|
j,
|
|
462
462
|
!1,
|
|
463
463
|
null,
|
|
464
|
-
"
|
|
464
|
+
"39b91bb5",
|
|
465
465
|
null,
|
|
466
466
|
null
|
|
467
467
|
);
|
|
@@ -537,7 +537,7 @@ var Q = function() {
|
|
|
537
537
|
J,
|
|
538
538
|
!1,
|
|
539
539
|
null,
|
|
540
|
-
"
|
|
540
|
+
"1aa1c23c",
|
|
541
541
|
null,
|
|
542
542
|
null
|
|
543
543
|
);
|
|
@@ -691,7 +691,7 @@ var Y = function() {
|
|
|
691
691
|
Z,
|
|
692
692
|
!1,
|
|
693
693
|
null,
|
|
694
|
-
"
|
|
694
|
+
"d82ecaae",
|
|
695
695
|
null,
|
|
696
696
|
null
|
|
697
697
|
);
|
|
@@ -1083,7 +1083,7 @@ var ne = function() {
|
|
|
1083
1083
|
ie,
|
|
1084
1084
|
!1,
|
|
1085
1085
|
null,
|
|
1086
|
-
"
|
|
1086
|
+
"da18e34e",
|
|
1087
1087
|
null,
|
|
1088
1088
|
null
|
|
1089
1089
|
);
|
|
@@ -1144,7 +1144,7 @@ var oe = function() {
|
|
|
1144
1144
|
de,
|
|
1145
1145
|
!1,
|
|
1146
1146
|
null,
|
|
1147
|
-
"
|
|
1147
|
+
"46b57430",
|
|
1148
1148
|
null,
|
|
1149
1149
|
null
|
|
1150
1150
|
);
|
|
@@ -1306,7 +1306,7 @@ var ge = function() {
|
|
|
1306
1306
|
fe,
|
|
1307
1307
|
!1,
|
|
1308
1308
|
null,
|
|
1309
|
-
"
|
|
1309
|
+
"e6593396",
|
|
1310
1310
|
null,
|
|
1311
1311
|
null
|
|
1312
1312
|
);
|
|
@@ -1529,7 +1529,7 @@ var be = function() {
|
|
|
1529
1529
|
ve,
|
|
1530
1530
|
!1,
|
|
1531
1531
|
null,
|
|
1532
|
-
"
|
|
1532
|
+
"7d4d8bc6",
|
|
1533
1533
|
null,
|
|
1534
1534
|
null
|
|
1535
1535
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("./system.fieldsecurity.d57edb47.js"),c=require("./chartbi.afd83839.js"),b=require("./messages.083c4ede.js"),y=require("./system.org.65452f67.js"),g=require("./system.account.78b852cd.js"),_={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.user.roleName",prop:"name",label:"\u89D2\u8272\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"}),showOverflowTooltip:!0},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",align:"left",renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"}),showOverflowTooltip:!0},{transKey:"gd.org.sort",prop:"sort",width:"200",label:"\u6392\u5E8F",align:"left"},{transKey:"gd.org.remark",prop:"remark",label:"\u5907\u6CE8",align:"left",showOverflowTooltip:!0}],formColumns:[{transKey:"gd.user.roleName",effectType:"input",prop:"name",label:"\u89D2\u8272\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.org.code",prop:"code",effectType:"input",label:"\u552F\u4E00\u7F16\u7801",placeholder:"\u8BF7\u8F93\u5165",disabled:!1,placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.org.sort",prop:"sort",effectType:"inputnumber",label:"\u6392\u5E8F",defaultValue:100,placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change",type:"number"}]},{transKey:"gd.org.remark",effectType:"textarea",prop:"remark",label:"\u5907\u6CE8",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[],autosize:{minRows:4,maxRows:6}}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u590D\u5236\u89D2\u8272",functionName:"copy",show:!0,transKey:"gd.user.copyRole",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysRole:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysRole:delete"},{displayName:"\u6388\u6743\u7528\u6237",functionName:"userAuthorizationMenu",show:!0,transKey:"gd.user.userAuthorization",icon:"el-icon-user",name:"sysRole:userMenu"},{displayName:"\u6388\u6743\u83DC\u5355",functionName:"grantRoleMenu",show:!0,transKey:"gd.user.menuRole",icon:"el-icon-monitor",name:"sysRole:grantMenu"},{displayName:"\u6388\u6743APP\u83DC\u5355",functionName:"grantRoleAppMenu",show:!0,transKey:"gd.user.menuRoleApp",icon:"el-icon-mobile-phone",name:"sysRole:grantMenu"},{displayName:"\u6388\u6743\u6570\u636E",functionName:"grantRoleGrant",show:!0,transKey:"gd.user.dataRole",icon:"el-icon-tickets",name:"sysRole:grantData"},{displayName:"\u6388\u6743\u89C6\u56FE/\u8868\u5355",functionName:"grantRoleVF",show:!0,transKey:"gd.user.menuRolevf",icon:"el-icon-setting",name:"sysRole:grantMenu"}],formButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],tableQueries:[{transKey:"gd.user.roleName",prop:"name",label:"\u89D2\u8272\u540D\u79F0",effectType:"input",rules:[]},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",effectType:"input",rules:[]}]}}};const K={data(){return{defaultProps:{children:"children",label:"title"},buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"800px",orgTreeData:[],checkedKeys:[]}},computed:{...c.mapGetters(["screenHeight","tableLists"])},methods:{handleSubmit(){const t=this.$refs.tree.getCheckedKeys();this.$emit("ok",Object.assign({...this.record},{checkedKeys:t})),this.closed()},getOrgData(){this.confirmLoading=!0,y.getOrgTree().then(t=>{t.success&&(this.orgTreeData=t.data,this.confirmLoading=!1)})},open(t){this.record=t,this.checkedKeys=t.checkedKeys,this.visible=!0,this.getOrgData()},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var k=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.rangeRole","\u6388\u6743\u8303\u56F4"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?s("el-tree",{ref:"tree",attrs:{data:e.orgTreeData,"show-checkbox":"","node-key":"id","default-expand-all":"","default-checked-keys":e.checkedKeys,props:e.defaultProps}}):e._e()],1)],2)],1)},w=[],$=c.normalizeComponent(K,k,w,!1,null,"1aca9ef6",null,null);const T=$.exports;const C={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",loadData:[],submitData:{},loadSoData:t=>(this.confirmLoading=!0,new Promise((e,s)=>{this.confirmLoading=!1,e({pageNo:1,pageSize:500,totalRows:0,rows:this.loadData})})),columns:[{transKey:"gd.btn.entity",prop:"sysCodeGenName",label:"\u5B9E\u4F53",align:"left",type:"slot",slotType:"sysCodeGenName",width:120},{transKey:"gd.btn.query",prop:"getgrantd",label:"\u67E5\u8BE2",align:"left",type:"slot",slotType:"getgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.add",prop:"addgrantd",label:"\u65B0\u589E",align:"left",type:"slot",slotType:"addgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.edit",prop:"editgrantd",label:"\u7F16\u8F91",align:"left",type:"slot",slotType:"editgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.del",prop:"delgrantd",label:"\u5220\u9664",align:"left",type:"slot",slotType:"delgrantd",width:270,showTooltip:!1},{transKey:"gd.relation.assignment",prop:"allocationgrantd",label:"\u5206\u6D3E",align:"left",type:"slot",slotType:"allocationgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.share",prop:"sharegrantd",label:"\u5171\u4EAB",align:"left",type:"slot",slotType:"sharegrantd",width:270,showTooltip:!1}],currentList:{}}},components:{RoleScope:T},computed:{height(){return this.screenHeight-(this.fullscreen?120:310)},...c.mapGetters(["primaryColor","screenHeight","tableLists","tableSize","tablePageSize"])},methods:{handleSubmit(){this.confirmLoading=!0;let t=this.$refs.table.tableData;t.map(e=>(e.addgrant=e.addgrantd.length>0?e.addgrantd.join(","):null,e.delgrant=e.delgrantd.length>0?e.delgrantd.join(","):null,e.editgrant=e.editgrantd.length>0?e.editgrantd.join(","):null,e.getgrant=e.getgrantd.length>0?e.getgrantd.join(","):null,e.sharegrant=e.sharegrantd.length>0?e.sharegrantd.join(","):null,e.allocationgrant=e.allocationgrantd.length>0?e.allocationgrantd.join(","):null,e)),y.saveOrgDetail(Object.assign({...this.submitData},{grants:t})).then(e=>{this.confirmLoading=!1,e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message)})},setRoleScop(t){this.confirmLoading=!0;const e=this.$refs.table.tableData;e[t.index][t.name]=[...t.checkedKeys].join(","),this.loadData=[...e],this.refresh(),this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F"))},openList(t,e,s){const n=this.$refs.table.tableData,i=`${t.prop.replace("grantd","")}custom`,a=n[s][i],o=a?a.split(",").map(Number):[];this.$refs.roleScope.open({index:s,item:t,checkedKeys:o,data:e,name:i})},getUserControlData(){this.confirmLoading=!0,y.getOrgDetail({roleId:this.record.id}).then(t=>{t.success?(t.data.grants.map(e=>(e.addgrantd=e.addgrant?e.addgrant.split(","):[],e.delgrantd=e.delgrant?e.delgrant.split(","):[],e.editgrantd=e.editgrant?e.editgrant.split(","):[],e.getgrantd=e.getgrant?e.getgrant.split(","):[],e.sharegrantd=e.sharegrant?e.sharegrant.split(","):[],e.allocationgrantd=e.allocationgrant?e.allocationgrant.split(","):[],e)),this.loadData=t.data.grants,this.submitData=t.data,this.$nextTick(()=>{setTimeout(()=>{this.refresh(),this.confirmLoading=!0},1e3),setTimeout(()=>{this.confirmLoading=!1},1200)})):(this.$message.error(t.message),this.confirmLoading=!1)})},open(t){this.record=t,this.visible=!0,this.getUserControlData()},closed(){this.fullscreen=!1,this.visible=!1},refresh(t=!0){this.$refs.table?this.$refs.table.refresh(t):console.log("err:\u89C6\u56FE\u672A\u52A0\u8F7D\uFF0C\u8BF7\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210\uFF01")},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var R=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"margin-top":"-12px"}},[e.visible?s("gd-tables",{ref:"table",attrs:{dataSource:e.loadSoData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.columns,height:e.height,filtering:!1,initialLoading:!1,showPagination:!1,rowKey:"sysCodeGenId",disabledRefresh:"",disabledColumnSettings:""},scopedSlots:e._u([e._l(e.columns,function(n){return{key:n.prop,fn:function({column:i,row:a,index:o}){return[n.prop==="sysCodeGenName"?s("div",[e._v(" "+e._s(e.$i18nt(`Dynamics.${a.transkey}`,a.syscodegenname))+" ")]):s("div",{staticClass:"grant-select"},[s("el-select",{staticStyle:{flex:"1"},attrs:{placeholder:e.$i18nt("gd.xlsxImport.mapFieldsTip","\u8BF7\u9009\u62E9\u6620\u5C04\u5B57\u6BB5"),filterable:"",clearable:"",multiple:""},model:{value:a[n.prop],callback:function(r){e.$set(a,n.prop,r)},expression:"row[item.prop]"}},[e._l(e.getDictionary("data_scope_type"),function(r){return[s("el-option",{attrs:{label:e.$i18nt(`Dynamics.${r.transkey}`,r.name),value:r.code}})]})],2),a[n.prop].includes("5")?s("el-button",{staticClass:"active-color flex-center",attrs:{type:"text"},on:{click:function(r){return e.openList(n,a,o)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.view","\u67E5\u770B"))+" ")]):e._e()],1)]}}})],null,!0)}):e._e()],1)],2),s("RoleScope",{ref:"roleScope",on:{ok:e.setRoleScop}})],1)},I=[],L=c.normalizeComponent(C,R,I,!1,null,"c46bea75",null,null);const S=L.exports;const x={name:"LayoutItem",props:{record:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},data(){return{}},computed:{fadeColord(){return this.fadeColor(this.primaryColor,.1)},menusType(){return this.record[0]?this.record[0].menusType:0},...c.mapGetters(["primaryColor"])},methods:{hasAll(t){return!(this.checkedKeys.filter(s=>t.menuBtnIds.includes(s)).length>=t.menuBtnIds.length)},checkedBtn(t,e){this.$emit("checkedBtn",t,e)},change(t,e){this.$emit("change",t,e)},open(t){this.$emit("open",t)},checked(t){return!!this.checkedKeys.filter(s=>s===t.id)[0]},fadeColor(t,e){let s=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),i=parseInt(t.substring(5,7),16);return`rgba(${s},${n},${i},${e})`}}};var N=function(){var e=this,s=e._self._c;return s("div",{style:{"--fadecolor":e.fadeColord}},[e._l(e.record,function(n){return[s("div",{staticClass:"list-item"},[e.menusType===0?s("i",{class:n.open?"el-icon-caret-bottom":"el-icon-caret-right",on:{click:function(i){return e.open(n)}}}):e._e(),e.menusType!==2?s("div",{staticClass:"item-name"},[s("el-checkbox",{attrs:{indeterminate:n.isIndeterminate},on:{change:function(i){return e.change(i,[n.id])}},model:{value:n.checked,callback:function(i){e.$set(n,"checked",i)},expression:"item.checked"}},[n.iconClass?s("i",{staticClass:"gd-icons",class:n.iconClass,staticStyle:{"font-size":"15px"}}):e._e(),e._v(" "+e._s(e.$i18nt(`Dynamics.${n.transkey}`,n.title))+" ")]),n.children&&n.children.length>0&&e.menusType===1?s("el-button",{staticStyle:{"margin-left":"12px",padding:"5px 15px"},attrs:{size:"mini"}},[e.hasAll(n)?s("span",{on:{click:function(i){return e.checkedBtn(n,1)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")]):s("span",{on:{click:function(i){return e.checkedBtn(n,0)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.cancel","\u53D6\u6D88"))+" ")])]):e._e()],1):e._e(),s("div",{staticClass:"item-data"},[n.children&&n.children.length>0&&n.children[0].menusType===2?s("div",{staticClass:"item-data-list"},[e._l(n.children,function(i){return[s("div",{staticClass:"item-name item-named",on:{click:function(a){return e.change(!i.checked,[i.id])}}},[i.checked?s("i",{staticClass:"gd-icons gd-icon-quanxuan active-color"}):s("div",{staticClass:"item-named-kuang"}),s("div",{staticClass:"item-named-title",class:i.checked?"active-color":""},[e._v(" "+e._s(e.$i18nt(`Dynamics.${i.transkey}`,i.title))+" ")])])]})],2):e._e()])]),n.children&&n.children.length>0&&n.children[0].menusType!==2?s("div",{staticClass:"list-more"},[n.open?s("LayoutItem",{attrs:{record:n.children,checkedKeys:e.checkedKeys},on:{open:e.open,change:e.change,checkedBtn:e.checkedBtn}}):e._e()],1):e._e()]})],2)},D=[],B=c.normalizeComponent(x,N,D,!1,null,"d151fae1",null,null);const v=B.exports;const F={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",menuTreeData:[],checkedKeys:[],list:[],allClose:!1,menuAll:[],systemMenuAll:[],allCheckedKeys:[],appsId:""}},computed:{isIndeterminate(){return this.allClose?!1:this.checkedKeys.length>0},...c.mapGetters(["screenHeight","tableLists"])},components:{LayoutItem:v},methods:{handleSubmit(){this.confirmLoading=!0,u.sysRoleGrantMenu({id:this.record.id,grantmenuidlist:this.checkedKeys}).then(t=>{t.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+t.message),this.confirmLoading=!1})},checkedItemBtn(t,e){let s=[...this.checkedKeys].filter(n=>!t.menuBtnIds.includes(n));e===1&&(s=s.concat(t.menuBtnIds)),this.checkedKeys=[...s],this.handleItem()},openItem(t){let e=[...this.menuTreeData];const s=n=>(n=n.filter((i,a)=>(i.id===t.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=s(i.children)),!0)),n);s(e),this.menuTreeData=[...e]},changeItem(t,e,s=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(l=>e.includes(l))[0];const i=this.list.filter(l=>e.includes(l.id))[0],a=s&&i?i.menuIds:[];if(t?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(l=>!e.includes(l)).filter(l=>!a.includes(l)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let o=[];this.findParent(this.menuTreeData,i,o);let r=[],d=[];o.forEach(l=>{this.checkedKeys.filter(f=>l.menuIds.includes(f)).length===l.menuIds.length&&l.menuIds.length>0&&!l.checked?r.push(l.id):d.push(l.id)}),r.forEach(l=>{this.changeItem(!0,[l],!1)}),d.forEach(l=>{this.changeItem(!1,[l],!1)})},handleItem(){let t=[...this.menuTreeData];const e=s=>(s=s.filter((n,i)=>{const a=this.checkedKeys.filter(o=>n.menuIds.includes(o));return this.checkedKeys.includes(n.id)?(n.checked=!0,n.isIndeterminate=!1):(n.checked=!1,n.isIndeterminate=a.length>0&&n.menuIds.length>0),n.children&&n.children.length>0&&(n.children=e(n.children)),!0}),s);e(t),this.menuTreeData=[...t],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(t){t?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getMenuTree(),this.expandedMenuKeys(),this.getMenuList()]).then(async t=>{let e=[],s=[];const n=r=>(r=r.filter((d,l)=>{const h=this.checkedKeys.filter(p=>d.id===p)[0];return d.open=!0,d.checked=d.type===1?!!h:!1,d.isIndeterminate=!1,d.menusType=d.type,e.push(d.id),s.push(d),d.children&&d.children.length>0&&(d.children=n(d.children)),!0}),r);let i=this.menuAll.filter(r=>!!this.systemMenuAll.filter(l=>l.id===r.id)[0]);await n(i),this.allCheckedKeys=e;let a=[];s.forEach((r,d)=>{const l=this.getMenuIds(r);s[d].menuIds=l.arr,s[d].menuBtnIds=l.btn,!(this.checkedKeys.filter(f=>l.arr.includes(f)).length===l.arr.length)&&l.arr.length>0&&a.push(r.id)}),this.list=s;const o=this.checkedKeys.filter(r=>e.includes(r)).filter(r=>!a.includes(r)).filter((r,d,l)=>l.indexOf(r)===d);this.checkedKeys=o,this.allClose=this.checkedKeys.length===e.length&&e.length>0,this.menuTreeData=[...i],this.handleItem(),this.confirmLoading=!1})},open(t,e){this.record=t,this.appsId=e||window.$systemInfo.id,this.visible=!0,this.init()},getMenuTree(){return g.SysMenuTreeForGrant({roleId:this.record.id}).then(t=>(t.code===200&&(this.menuAll=t.data),t))},expandedMenuKeys(){return u.sysRoleOwnMenu({id:this.record.id}).then(t=>(t.code===200&&(this.checkedKeys=t.data),t))},getMenuList(){let t={AppsId:this.appsId};return g.sysMenuListByAppsId(t).then(e=>(e.code===200&&(this.systemMenuAll=e.data),e))},getMenuIds(t){let e=[],s=[];const n=i=>(i=i.filter((a,o)=>(a.menusType!==2?e.push(a.id):s.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return t.children&&n(t.children),{arr:e,btn:s}},findParent(t,e,s){for(let n of t)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,s))return s.unshift(n),!0;return!1},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var M=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?s("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),s("template",{slot:"footer"},[s("div",{staticClass:"btoms"},[s("el-checkbox",{attrs:{disabled:e.confirmLoading,indeterminate:e.isIndeterminate},on:{change:e.changeAll},model:{value:e.allClose,callback:function(n){e.allClose=n},expression:"allClose"}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")])],1)])],2)],1)},A=[],O=c.normalizeComponent(F,M,A,!1,null,"da1c5456",null,null);const P=O.exports;const z={name:"GdUserRole",props:{height:{type:Number,default:100},openSelecteKeys:{type:Array,default:()=>[]},openMode:{type:String,default:"page"}},mixins:[b.tablesFilter],data(){return{transKey:"gd.btn.add",formLoading:!1,currentNode:null,loading:!0,orgTree:[],selectedRowKeys:[],selectedRows:[],queryParam:{},defaultProps:{children:"children",label:"title",value:"value"},defaultExpandedKeys:"",loadData:t=>g.getUserManage({roleId:this.openSelecteKeys[0]}).then(e=>(this.getRowId(e.data),{pageNo:1,pageSize:1e3,totalRows:0,rows:e.data})),disableBtn:[],fileList:[],needLoad:!1,infoData:{},isSendEmail:"",isSendEmailed:"",tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.user.name",prop:"name",label:"\u59D3\u540D",type:"slot",slotType:"name",align:"left",showOverflowTooltip:!0},{transKey:"gd.user.nickname",prop:"nickname",label:"\u6635\u79F0",align:"left",type:"slot",slotType:"nickname",showOverflowTooltip:!0},{transKey:"gd.user.sex",prop:"sex",label:"\u6027\u522B",align:"left",type:"slot",slotType:"sex",showOverflowTooltip:!0},{transKey:"gd.user.organization",prop:"orgname",label:"\u6240\u5C5E\u673A\u6784",align:"left",type:"slot",slotType:"orgname",showOverflowTooltip:!0},{transKey:"gd.user.status",prop:"status",label:"\u72B6\u6001",align:"left",type:"slot",slotType:"status",showOverflowTooltip:!0}],formColumnsuser:[{transKey:"gd.user.account",effectType:"input",prop:"account",label:"\u8D26\u53F7",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change",min:2}]},{transKey:"gd.user.name",prop:"name",effectType:"input",label:"\u59D3\u540D",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.sex",prop:"gender",effectType:"radio",label:"\u6027\u522B",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",dictTypeCode:"gender",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.birthday",prop:"birthday",effectType:"date",label:"\u751F\u65E5",placeholder:"\u8BF7\u8F93\u5165",valueFormat:"yyyy-MM-dd",placeholderTransKey:"gd.placeholder.select",rules:[]},{transKey:"gd.user.phone",effectType:"input",prop:"phone",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.email",effectType:"input",prop:"email",label:"\u90AE\u7BB1",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"},{type:"email",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u53F7!",transKey:"gd.account.emailTip"}]},{transKey:"gd.user.nickname",prop:"nickname",effectType:"input",label:"\u6635\u79F0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]},{transKey:"gd.user.tel",prop:"tel",effectType:"input",label:"\u7535\u8BDD",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]},{transKey:"gd.org.displayName",prop:"orgid",effectType:"selectTree",label:"\u6240\u5C5E\u673A\u6784",placeholder:"\u8BF7\u9009\u62E9",placeholderTransKey:"gd.placeholder.select",treeOptions:[],rules:[{required:!0,message:"\u8BF7\u9009\u62E9",transKey:"gd.placeholder.select",trigger:"change"}]},{transKey:"gd.user.PSDNeverExpire",prop:"psdneverexpire",effectType:"switch",label:"\u5BC6\u7801\u6C38\u4E0D\u8FC7\u671F",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysRole:delete"}],disabledRowId:[],sysCodeGenName:"sys_user"}},components:{},computed:{initialLoading(){return this.openMode==="page"},selectedKeep(){return this.openMode!=="page"},getQueryParam(){let t=new Map;for(let e in this.queryParam)t.set(e==="statecodes"?"searchctatus":e,this.queryParam[e]);return Object.fromEntries(t)},getFormColumns(){return this.formColumnsuser.filter(e=>(e.prop==="orgid"&&(e.treeOptions=[...this.orgTree]),!0))},getTableButtons(){return this.tableButtons.filter(t=>(t.show=!this.disableBtn.includes(t.displayName),!0))},getHeight(){return this.height},styled(){return`height:${this.height+76}px`},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getRowId(t){let e=[];t.filter(s=>!this.disabledRowId.includes(s.id)).forEach(s=>{e.push(s.id)}),this.disabledRowId=this.disabledRowId.concat(e)},saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},getOrgTree(){y.getOrgTree({}).then(t=>{if(t.code===200){const e=s=>(s=s.filter((n,i)=>(n.value=String(n.value),n.children&&n.children.length>0&&(n.children=e(n.children)),!0)),s);this.orgTree=e(t.data)}this.loading=!1})},handleNodeClick(t){this.queryParam.orgId===t.id?(delete this.queryParam.orgId,this.$nextTick(()=>{setTimeout(()=>{this.$refs.tree.setCurrentKey(null)},0)})):this.queryParam=Object.assign({...this.queryParam},{orgId:t.id}),this.refresh()},handleOk(){this.$refs.table.refresh()},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()},lookupSeled(t){if(t.fkData.length===0){this.$refs.engineSearch.closed();return}this.$refs.engineSearch.confirmLoading=!0,g.postbindUsersToRole({roleId:this.openSelecteKeys[0],userIdList:t.data}).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$refs.engineSearch.closed(),this.refresh()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message),this.$refs.engineSearch.confirmLoading=!1})},add(){this.$refs.engineSearch.open({fkEntityName:this.sysCodeGenName,val:[],effectType:"participants",isRelevance:!0})},del(){let t=this;if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(e,s,n)=>{if(e!=="confirm"){n();return}s.confirmButtonLoading=!0,s.cancelButtonLoading=!0,s.showCancelButton=!1,g.postunbindUsersFromRole({roleId:t.openSelecteKeys[0],userIdList:t.selectedRowKeys}).then(i=>{i.success?(t.$message.success(t.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")),t.disabledRowId=t.disabledRowId.filter(a=>!t.selectedRows.filter(r=>r.id===a)[0]),s.confirmButtonLoading=!1,s.cancelButtonLoading=!1,s.showCancelButton=!0,n(),t.refresh()):t.$message.error(t.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+i.message)})}})}},created(){}};var E=function(){var e=this,s=e._self._c;return s("div",{staticClass:"gd-page-view",staticStyle:{display:"flex",background:"rgb(245, 245, 245)"}},[s("div",{staticClass:"page-view-list"},[s("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.tableColumns,showPagination:!1,selectedRowKeys:e.selectedRowKeys,height:e.height,initialLoading:!1},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"operator",fn:function(){return[s("div",{staticClass:"gd-table-operator"},[s("div",{staticClass:"gd-table-operatorr"},[s("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"name",fn:function({column:n,row:i}){return[s("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.name)+" ")])]}},{key:"nickname",fn:function({column:n,row:i}){return[s("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.nickname)+" ")])]}},{key:"orgname",fn:function({column:n,row:i}){return[s("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.orgname)+" ")])]}},{key:"sex",fn:function({column:n,row:i}){return[s("span",[e._v(" "+e._s(e._f("dictType")("gender",i.sex))+" ")])]}},{key:"status",fn:function({column:n,row:i}){return[s("span",[e._v(" "+e._s(e._f("dictType")("state_code",i.status))+" ")])]}}])}),s("gd-search",{ref:"engineSearch",attrs:{appendToBody:!0,disabledRowId:e.disabledRowId},on:{lookupSeled:e.lookupSeled}})],1)])},q=[],G=c.normalizeComponent(z,E,q,!1,null,"e09158ba",null,null);const j=G.exports;const H={data(){return{buttons:[],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"90%",selectedRowKeys:[]}},components:{UserFormDate:j},computed:{height(){return this.screenHeight-(this.fullscreen?160:340)},...c.mapGetters(["screenHeight"])},methods:{handleSubmit(){this.closed(),this.$emit("ok")},open(t){this.record=t,this.visible=!0,this.selectedRowKeys=[t.id],this.$nextTick(()=>{setTimeout(()=>{this.$refs.userForm.refresh()},0)})},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},onSelectChange(t){this.selectedRowKeys=t},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var V=function(){var e=this,s=e._self._c;return s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"modal-append-to-body":!0,"append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.userAuthorization","\u6388\u6743\u7528\u6237"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?s("UserFormDate",{ref:"userForm",attrs:{height:e.height,openMode:"components",openSelecteKeys:e.selectedRowKeys},on:{onSelectChange:e.onSelectChange}}):e._e()],1)],2)},U=[],Q=c.normalizeComponent(H,V,U,!1,null,"085b1df5",null,null);const J=Q.exports;const W={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",menuTreeData:[],menuTreeDatad:[],checkedKeys:[],list:[],allClose:!1,menuAll:[],systemMenuAll:[],allCheckedKeys:[]}},computed:{isIndeterminate(){return this.allClose?!1:this.checkedKeys.length>0},...c.mapGetters(["screenHeight","tableLists"])},components:{LayoutItem:v},methods:{async handleSubmit(){const t=e=>(e=e.filter((s,n)=>{const i=this.checkedKeys.filter(a=>s.id===a)[0];return s.type=i?1:0,s.formlist&&s.formlist.length>0&&(s.formlist=t(s.formlist)),s.viewlist&&s.viewlist.length>0&&(s.viewlist=t(s.viewlist)),s.btnlist&&s.btnlist.length>0&&(s.btnlist=t(s.btnlist)),!0}),e);this.confirmLoading=!0,await t(this.menuAll),u.sysRoleRoleBindViewOnBtn({roleid:this.record.id,list:this.menuAll}).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message),this.confirmLoading=!1})},checkedItemBtn(t,e){let s=[...this.checkedKeys].filter(n=>!t.menuBtnIds.includes(n));e===1&&(s=s.concat(t.menuBtnIds)),this.checkedKeys=[...s],this.handleItem()},openItem(t){let e=[...this.menuTreeData];const s=n=>(n=n.filter((i,a)=>(i.id===t.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=s(i.children)),!0)),n);s(e),this.menuTreeData=[...e]},changeItem(t,e,s=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(l=>e.includes(l))[0];const i=this.list.filter(l=>e.includes(l.id))[0],a=s&&i?i.menuIds:[];if(t?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(l=>!e.includes(l)).filter(l=>!a.includes(l)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let o=[];this.findParent(this.menuTreeData,i,o);let r=[],d=[];o.forEach(l=>{this.checkedKeys.filter(f=>l.menuIds.includes(f)).length===l.menuIds.length&&l.menuIds.length>0&&!l.checked?r.push(l.id):d.push(l.id)}),r.forEach(l=>{this.changeItem(!0,[l],!1)}),d.forEach(l=>{this.changeItem(!1,[l],!1)})},handleItem(){let t=[...this.menuTreeData];const e=s=>(s=s.filter((n,i)=>{const a=this.checkedKeys.filter(o=>n.menuIds.includes(o));return this.checkedKeys.includes(n.id)?(n.checked=!0,n.isIndeterminate=!1):(n.checked=!1,n.isIndeterminate=a.length>0&&n.menuIds.length>0),n.children&&n.children.length>0&&(n.children=e(n.children)),!0}),s);e(t),this.menuTreeData=[...t],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(t){t?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getList()]).then(async t=>{this.confirmLoading=!1;let e=JSON.parse(JSON.stringify(this.menuTreeDatad)),s=[];const n=a=>(a=a.filter((o,r)=>{const d=this.checkedKeys.filter(l=>o.id===l)[0];return o.open=!0,o.checked=o.menusType===1?!!d:!1,o.isIndeterminate=!1,s.push(o),o.children&&o.children.length>0&&(o.children=n(o.children)),!0}),a);await n(e);let i=[];s.forEach((a,o)=>{const r=this.getMenuIds(a);s[o].menuIds=r.arr,s[o].menuBtnIds=r.btn,!(this.checkedKeys.filter(h=>r.arr.includes(h)).length===r.arr.length)&&r.arr.length>0&&i.push(a.id)}),this.list=s,this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0,this.menuTreeData=[...e],this.handleItem(),console.log(this.menuAll,"123")})},getList(){return u.sysRoleViewOnBtnList({roleId:this.record.id}).then(t=>{if(t.code===200){let e=[],s=[];const n=(a,o)=>(a=a.filter((r,d)=>{r.parentId=o,r.open=!0,r.checked=!1,r.isIndeterminate=!1,r.transkey=r.transkey?r.transkey:null,r.title=r.name,r.menusType=r.formlist&&r.viewlist?0:r.btnlist?1:2,s.push(r.id),r.type===1&&e.push(r.id);let l=[];return r.viewlist&&r.viewlist.length>0&&(r.viewlist.map(h=>(h.iconClass="gd-icon-shitumoshi",h)),l=l.concat(r.viewlist)),r.formlist&&r.formlist.length>0&&(r.formlist.map(h=>(h.iconClass="gd-icon-biaodanmoshi",h)),l=l.concat(r.formlist)),r.btnlist&&r.btnlist.length>0&&(l=l.concat(r.btnlist)),l.length>0&&(r.children=n(l,r.id)),!0}),a);this.menuAll=t.data.list;let i=JSON.parse(JSON.stringify(this.menuAll));n(i,0),this.checkedKeys=e,this.allCheckedKeys=s,this.menuTreeDatad=[...i]}return t})},getMenuIds(t){let e=[],s=[];const n=i=>(i=i.filter((a,o)=>(a.menusType!==2?e.push(a.id):s.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return t.children&&n(t.children),{arr:e,btn:s}},findParent(t,e,s){for(let n of t)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,s))return s.unshift(n),!0;return!1},open(t){this.record=t,this.visible=!0,this.init()},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var X=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?s("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),s("template",{slot:"footer"},[s("div",{staticClass:"btoms"},[s("el-checkbox",{attrs:{disabled:e.confirmLoading,indeterminate:e.isIndeterminate},on:{change:e.changeAll},model:{value:e.allClose,callback:function(n){e.allClose=n},expression:"allClose"}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")])],1)])],2)],1)},Y=[],Z=c.normalizeComponent(W,X,Y,!1,null,"2fa6bf14",null,null);const ee=Z.exports;const te={name:"GdRole",props:{height:{type:Number,default:100},openMode:{type:String,default:"page"},openSelecteKeys:{type:Array,default:()=>[]}},mixins:[b.tablesFilter,_],data(){return{appsId:"",transKey:"gd.btn.add",formLoading:!1,loading:!0,selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>(this.selectedKeep&&(this.selectedRowKeys=[...this.openSelecteKeys]),u.getRolePage(Object.assign(t,this.queryParam,{sysAppsId:window.$systemInfo.id})).then(e=>e.data))}},components:{RoleGrant:S,RoleMenu:P,RoleMenuViewForm:ee,UserAuthorization:J},computed:{getTableButtons(){return this.tableButtons.filter(t=>t.functionName==="grantRoleAppMenu"?!!this.appsId:!0)},initialLoading(){return this.openMode==="page"},selectedKeep(){return this.openMode!=="page"},getFormColumns(){return this.formColumns.filter(t=>(t.prop==="code"&&(t.disabled=this.transKey!=="gd.btn.add"),!(this.transKey==="gd.https.copy"&&t.prop==="code")))},getHeight(){return this.height},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getAppId(){g.getConfigInfoByCode({code:"App_Id"}).then(t=>{t.code===200&&(this.appsId=t.data?t.data.value:"")})},userAuthorizationMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.userAuthorization.open(this.selectedRows[0])},grantRoleMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenu.open(this.selectedRows[0])},grantRoleAppMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenu.open(this.selectedRows[0],this.appsId)},grantRoleGrant(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleGrant.open(this.selectedRows[0])},grantRoleVF(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenuViewForm.open(this.selectedRows[0])},saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(t,e,s)=>{this.delHand(t,e,s)}})},delHand(t,e,s){if(t!=="confirm"){s();return}let n=[];this.selectedRows.forEach(i=>{let a=u.sysRoleDelete(i).then(o=>o);n.push(a)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(n).then(i=>{const a=i.filter(o=>!o.success);a.length===0?this.$message.success(this.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")):this.$message.error(this.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+a[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},add(){this.transKey="gd.btn.add",this.$refs.editForm.open(null)},edit(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.editForm(this.selectedRows[0])},copy(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.transKey="gd.https.copy",this.$refs.editForm.open(Object.assign({...this.selectedRows[0]},{roleId:this.selectedRows[0].id}))},sbumit({data:t,record:e,btn:s},n,i){this.formLoading=!0;let a=e?this.transKey==="gd.https.copy"?u.sysRoleCopyRole:u.sysRoleEdit:u.sysRoleAddV2;const o=this.transKey!=="gd.https.edit"?Object.assign(t,{sysappsid:window.$systemInfo.id}):t;a(o).then(r=>{r.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),i(),this.refresh()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+r.message),this.formLoading=!1})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e,this.$emit("onSelectChange",t,e)},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}},created(){this.getAppId()}};var se=function(){var e=this,s=e._self._c;return s("div",{staticClass:"gd-page-view"},[s("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[s("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.tableColumns,selectedRowKeys:e.selectedRowKeys,height:e.getHeight,filtering:!0,selectedKeep:e.selectedKeep,initialLoading:e.initialLoading},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"name",fn:function({column:n,row:i}){return[s("gd-tooltip",{attrs:{rowKey:"name",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"operator",fn:function(){return[s("div",{staticClass:"gd-table-operator"},[s("div",{staticClass:"gd-table-operatorl"},[s("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.user.roleName","\u89D2\u8272\u540D"),clearable:""},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.refresh.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(n){e.$set(e.queryParam,"name",n)},expression:"queryParam.name"}}),s("div",{staticClass:"table-operator-search",on:{click:e.refresh}},[s("i",{staticClass:"el-input__icon el-icon-search"})])],1),s("div",{staticClass:"gd-table-operatorr"},[e.openMode==="page"?s("gd-btn-list",{attrs:{sysViewButtons:e.getTableButtons},on:{functionName:e.doEvent}}):e._e()],1)])]},proxy:!0},{key:"filtering",fn:function({colse:n,visible:i}){return[s("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.getHeight,queryParam:e.queryParam,colse:n,visible:i},on:{save:e.saveQueries}})]}}])})],1),s("gd-edit-form",{ref:"editForm",attrs:{formItemWidth:"90%",loading:e.formLoading,transKey:e.transKey,buttons:e.formButtons,columns:e.getFormColumns,labelPosition:e.labelPosition,formMode:e.formMode},on:{sbumit:e.sbumit}}),s("RoleGrant",{ref:"roleGrant",on:{ok:e.refresh}}),s("RoleMenu",{ref:"roleMenu",on:{ok:e.refresh}}),s("RoleMenuViewForm",{ref:"roleMenuViewForm",on:{ok:e.refresh}}),s("UserAuthorization",{ref:"userAuthorization",on:{ok:e.refresh}})],1)},ne=[],ie=c.normalizeComponent(te,se,ne,!1,null,"3c7b317a",null,null);const m=ie.exports;m.install=function(t){t.component(m.name,m)};exports.GDpackage=m;
|
|
1
|
+
"use strict";const u=require("./system.fieldsecurity.14445e20.js"),c=require("./chartbi.94deb957.js"),b=require("./messages.dc95e9ca.js"),y=require("./system.org.37d1d503.js"),g=require("./system.account.09d65732.js"),_={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.user.roleName",prop:"name",label:"\u89D2\u8272\u540D\u79F0",type:"slot",slotType:"name",align:"left",fixed:!0,renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"}),showOverflowTooltip:!0},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",align:"left",renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"}),showOverflowTooltip:!0},{transKey:"gd.org.sort",prop:"sort",width:"200",label:"\u6392\u5E8F",align:"left"},{transKey:"gd.org.remark",prop:"remark",label:"\u5907\u6CE8",align:"left",showOverflowTooltip:!0}],formColumns:[{transKey:"gd.user.roleName",effectType:"input",prop:"name",label:"\u89D2\u8272\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.org.code",prop:"code",effectType:"input",label:"\u552F\u4E00\u7F16\u7801",placeholder:"\u8BF7\u8F93\u5165",disabled:!1,placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.org.sort",prop:"sort",effectType:"inputnumber",label:"\u6392\u5E8F",defaultValue:100,placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change",type:"number"}]},{transKey:"gd.org.remark",effectType:"textarea",prop:"remark",label:"\u5907\u6CE8",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[],autosize:{minRows:4,maxRows:6}}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u590D\u5236\u89D2\u8272",functionName:"copy",show:!0,transKey:"gd.user.copyRole",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysRole:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysRole:delete"},{displayName:"\u6388\u6743\u7528\u6237",functionName:"userAuthorizationMenu",show:!0,transKey:"gd.user.userAuthorization",icon:"el-icon-user",name:"sysRole:userMenu"},{displayName:"\u6388\u6743\u83DC\u5355",functionName:"grantRoleMenu",show:!0,transKey:"gd.user.menuRole",icon:"el-icon-monitor",name:"sysRole:grantMenu"},{displayName:"\u6388\u6743APP\u83DC\u5355",functionName:"grantRoleAppMenu",show:!0,transKey:"gd.user.menuRoleApp",icon:"el-icon-mobile-phone",name:"sysRole:grantMenu"},{displayName:"\u6388\u6743\u6570\u636E",functionName:"grantRoleGrant",show:!0,transKey:"gd.user.dataRole",icon:"el-icon-tickets",name:"sysRole:grantData"},{displayName:"\u6388\u6743\u89C6\u56FE/\u8868\u5355",functionName:"grantRoleVF",show:!0,transKey:"gd.user.menuRolevf",icon:"el-icon-setting",name:"sysRole:grantMenu"}],formButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],tableQueries:[{transKey:"gd.user.roleName",prop:"name",label:"\u89D2\u8272\u540D\u79F0",effectType:"input",rules:[]},{transKey:"gd.org.code",prop:"code",label:"\u552F\u4E00\u7F16\u7801",effectType:"input",rules:[]}]}}};const K={data(){return{defaultProps:{children:"children",label:"title"},buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"800px",orgTreeData:[],checkedKeys:[]}},computed:{...c.mapGetters(["screenHeight","tableLists"])},methods:{handleSubmit(){const t=this.$refs.tree.getCheckedKeys();this.$emit("ok",Object.assign({...this.record},{checkedKeys:t})),this.closed()},getOrgData(){this.confirmLoading=!0,y.getOrgTree().then(t=>{t.success&&(this.orgTreeData=t.data,this.confirmLoading=!1)})},open(t){this.record=t,this.checkedKeys=t.checkedKeys,this.visible=!0,this.getOrgData()},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var k=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.rangeRole","\u6388\u6743\u8303\u56F4"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?s("el-tree",{ref:"tree",attrs:{data:e.orgTreeData,"show-checkbox":"","node-key":"id","default-expand-all":"","default-checked-keys":e.checkedKeys,props:e.defaultProps}}):e._e()],1)],2)],1)},w=[],$=c.normalizeComponent(K,k,w,!1,null,"2b164094",null,null);const T=$.exports;const C={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",loadData:[],submitData:{},loadSoData:t=>(this.confirmLoading=!0,new Promise((e,s)=>{this.confirmLoading=!1,e({pageNo:1,pageSize:500,totalRows:0,rows:this.loadData})})),columns:[{transKey:"gd.btn.entity",prop:"sysCodeGenName",label:"\u5B9E\u4F53",align:"left",type:"slot",slotType:"sysCodeGenName",width:120},{transKey:"gd.btn.query",prop:"getgrantd",label:"\u67E5\u8BE2",align:"left",type:"slot",slotType:"getgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.add",prop:"addgrantd",label:"\u65B0\u589E",align:"left",type:"slot",slotType:"addgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.edit",prop:"editgrantd",label:"\u7F16\u8F91",align:"left",type:"slot",slotType:"editgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.del",prop:"delgrantd",label:"\u5220\u9664",align:"left",type:"slot",slotType:"delgrantd",width:270,showTooltip:!1},{transKey:"gd.relation.assignment",prop:"allocationgrantd",label:"\u5206\u6D3E",align:"left",type:"slot",slotType:"allocationgrantd",width:270,showTooltip:!1},{transKey:"gd.btn.share",prop:"sharegrantd",label:"\u5171\u4EAB",align:"left",type:"slot",slotType:"sharegrantd",width:270,showTooltip:!1}],currentList:{}}},components:{RoleScope:T},computed:{height(){return this.screenHeight-(this.fullscreen?120:310)},...c.mapGetters(["primaryColor","screenHeight","tableLists","tableSize","tablePageSize"])},methods:{handleSubmit(){this.confirmLoading=!0;let t=this.$refs.table.tableData;t.map(e=>(e.addgrant=e.addgrantd.length>0?e.addgrantd.join(","):null,e.delgrant=e.delgrantd.length>0?e.delgrantd.join(","):null,e.editgrant=e.editgrantd.length>0?e.editgrantd.join(","):null,e.getgrant=e.getgrantd.length>0?e.getgrantd.join(","):null,e.sharegrant=e.sharegrantd.length>0?e.sharegrantd.join(","):null,e.allocationgrant=e.allocationgrantd.length>0?e.allocationgrantd.join(","):null,e)),y.saveOrgDetail(Object.assign({...this.submitData},{grants:t})).then(e=>{this.confirmLoading=!1,e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message)})},setRoleScop(t){this.confirmLoading=!0;const e=this.$refs.table.tableData;e[t.index][t.name]=[...t.checkedKeys].join(","),this.loadData=[...e],this.refresh(),this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F"))},openList(t,e,s){const n=this.$refs.table.tableData,i=`${t.prop.replace("grantd","")}custom`,a=n[s][i],o=a?a.split(",").map(Number):[];this.$refs.roleScope.open({index:s,item:t,checkedKeys:o,data:e,name:i})},getUserControlData(){this.confirmLoading=!0,y.getOrgDetail({roleId:this.record.id}).then(t=>{t.success?(t.data.grants.map(e=>(e.addgrantd=e.addgrant?e.addgrant.split(","):[],e.delgrantd=e.delgrant?e.delgrant.split(","):[],e.editgrantd=e.editgrant?e.editgrant.split(","):[],e.getgrantd=e.getgrant?e.getgrant.split(","):[],e.sharegrantd=e.sharegrant?e.sharegrant.split(","):[],e.allocationgrantd=e.allocationgrant?e.allocationgrant.split(","):[],e)),this.loadData=t.data.grants,this.submitData=t.data,this.$nextTick(()=>{setTimeout(()=>{this.refresh(),this.confirmLoading=!0},1e3),setTimeout(()=>{this.confirmLoading=!1},1200)})):(this.$message.error(t.message),this.confirmLoading=!1)})},open(t){this.record=t,this.visible=!0,this.getUserControlData()},closed(){this.fullscreen=!1,this.visible=!1},refresh(t=!0){this.$refs.table?this.$refs.table.refresh(t):console.log("err:\u89C6\u56FE\u672A\u52A0\u8F7D\uFF0C\u8BF7\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210\uFF01")},getDictionary(t){return this.$options.filters.dictData(t)},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var R=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"margin-top":"-12px"}},[e.visible?s("gd-tables",{ref:"table",attrs:{dataSource:e.loadSoData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.columns,height:e.height,filtering:!1,initialLoading:!1,showPagination:!1,rowKey:"sysCodeGenId",disabledRefresh:"",disabledColumnSettings:""},scopedSlots:e._u([e._l(e.columns,function(n){return{key:n.prop,fn:function({column:i,row:a,index:o}){return[n.prop==="sysCodeGenName"?s("div",[e._v(" "+e._s(e.$i18nt(`Dynamics.${a.transkey}`,a.syscodegenname))+" ")]):s("div",{staticClass:"grant-select"},[s("el-select",{staticStyle:{flex:"1"},attrs:{placeholder:e.$i18nt("gd.xlsxImport.mapFieldsTip","\u8BF7\u9009\u62E9\u6620\u5C04\u5B57\u6BB5"),filterable:"",clearable:"",multiple:""},model:{value:a[n.prop],callback:function(r){e.$set(a,n.prop,r)},expression:"row[item.prop]"}},[e._l(e.getDictionary("data_scope_type"),function(r){return[s("el-option",{attrs:{label:e.$i18nt(`Dynamics.${r.transkey}`,r.name),value:r.code}})]})],2),a[n.prop].includes("5")?s("el-button",{staticClass:"active-color flex-center",attrs:{type:"text"},on:{click:function(r){return e.openList(n,a,o)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.view","\u67E5\u770B"))+" ")]):e._e()],1)]}}})],null,!0)}):e._e()],1)],2),s("RoleScope",{ref:"roleScope",on:{ok:e.setRoleScop}})],1)},I=[],L=c.normalizeComponent(C,R,I,!1,null,"39b91bb5",null,null);const S=L.exports;const x={name:"LayoutItem",props:{record:{type:Array,default:()=>[]},checkedKeys:{type:Array,default:()=>[]}},data(){return{}},computed:{fadeColord(){return this.fadeColor(this.primaryColor,.1)},menusType(){return this.record[0]?this.record[0].menusType:0},...c.mapGetters(["primaryColor"])},methods:{hasAll(t){return!(this.checkedKeys.filter(s=>t.menuBtnIds.includes(s)).length>=t.menuBtnIds.length)},checkedBtn(t,e){this.$emit("checkedBtn",t,e)},change(t,e){this.$emit("change",t,e)},open(t){this.$emit("open",t)},checked(t){return!!this.checkedKeys.filter(s=>s===t.id)[0]},fadeColor(t,e){let s=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),i=parseInt(t.substring(5,7),16);return`rgba(${s},${n},${i},${e})`}}};var N=function(){var e=this,s=e._self._c;return s("div",{style:{"--fadecolor":e.fadeColord}},[e._l(e.record,function(n){return[s("div",{staticClass:"list-item"},[e.menusType===0?s("i",{class:n.open?"el-icon-caret-bottom":"el-icon-caret-right",on:{click:function(i){return e.open(n)}}}):e._e(),e.menusType!==2?s("div",{staticClass:"item-name"},[s("el-checkbox",{attrs:{indeterminate:n.isIndeterminate},on:{change:function(i){return e.change(i,[n.id])}},model:{value:n.checked,callback:function(i){e.$set(n,"checked",i)},expression:"item.checked"}},[n.iconClass?s("i",{staticClass:"gd-icons",class:n.iconClass,staticStyle:{"font-size":"15px"}}):e._e(),e._v(" "+e._s(e.$i18nt(`Dynamics.${n.transkey}`,n.title))+" ")]),n.children&&n.children.length>0&&e.menusType===1?s("el-button",{staticStyle:{"margin-left":"12px",padding:"5px 15px"},attrs:{size:"mini"}},[e.hasAll(n)?s("span",{on:{click:function(i){return e.checkedBtn(n,1)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")]):s("span",{on:{click:function(i){return e.checkedBtn(n,0)}}},[e._v(" "+e._s(e.$i18nt("gd.btn.cancel","\u53D6\u6D88"))+" ")])]):e._e()],1):e._e(),s("div",{staticClass:"item-data"},[n.children&&n.children.length>0&&n.children[0].menusType===2?s("div",{staticClass:"item-data-list"},[e._l(n.children,function(i){return[s("div",{staticClass:"item-name item-named",on:{click:function(a){return e.change(!i.checked,[i.id])}}},[i.checked?s("i",{staticClass:"gd-icons gd-icon-quanxuan active-color"}):s("div",{staticClass:"item-named-kuang"}),s("div",{staticClass:"item-named-title",class:i.checked?"active-color":""},[e._v(" "+e._s(e.$i18nt(`Dynamics.${i.transkey}`,i.title))+" ")])])]})],2):e._e()])]),n.children&&n.children.length>0&&n.children[0].menusType!==2?s("div",{staticClass:"list-more"},[n.open?s("LayoutItem",{attrs:{record:n.children,checkedKeys:e.checkedKeys},on:{open:e.open,change:e.change,checkedBtn:e.checkedBtn}}):e._e()],1):e._e()]})],2)},D=[],B=c.normalizeComponent(x,N,D,!1,null,"1aa1c23c",null,null);const v=B.exports;const F={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",menuTreeData:[],checkedKeys:[],list:[],allClose:!1,menuAll:[],systemMenuAll:[],allCheckedKeys:[],appsId:""}},computed:{isIndeterminate(){return this.allClose?!1:this.checkedKeys.length>0},...c.mapGetters(["screenHeight","tableLists"])},components:{LayoutItem:v},methods:{handleSubmit(){this.confirmLoading=!0,u.sysRoleGrantMenu({id:this.record.id,grantmenuidlist:this.checkedKeys}).then(t=>{t.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+t.message),this.confirmLoading=!1})},checkedItemBtn(t,e){let s=[...this.checkedKeys].filter(n=>!t.menuBtnIds.includes(n));e===1&&(s=s.concat(t.menuBtnIds)),this.checkedKeys=[...s],this.handleItem()},openItem(t){let e=[...this.menuTreeData];const s=n=>(n=n.filter((i,a)=>(i.id===t.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=s(i.children)),!0)),n);s(e),this.menuTreeData=[...e]},changeItem(t,e,s=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(l=>e.includes(l))[0];const i=this.list.filter(l=>e.includes(l.id))[0],a=s&&i?i.menuIds:[];if(t?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(l=>!e.includes(l)).filter(l=>!a.includes(l)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let o=[];this.findParent(this.menuTreeData,i,o);let r=[],d=[];o.forEach(l=>{this.checkedKeys.filter(p=>l.menuIds.includes(p)).length===l.menuIds.length&&l.menuIds.length>0&&!l.checked?r.push(l.id):d.push(l.id)}),r.forEach(l=>{this.changeItem(!0,[l],!1)}),d.forEach(l=>{this.changeItem(!1,[l],!1)})},handleItem(){let t=[...this.menuTreeData];const e=s=>(s=s.filter((n,i)=>{const a=this.checkedKeys.filter(o=>n.menuIds.includes(o));return this.checkedKeys.includes(n.id)?(n.checked=!0,n.isIndeterminate=!1):(n.checked=!1,n.isIndeterminate=a.length>0&&n.menuIds.length>0),n.children&&n.children.length>0&&(n.children=e(n.children)),!0}),s);e(t),this.menuTreeData=[...t],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(t){t?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getMenuTree(),this.expandedMenuKeys(),this.getMenuList()]).then(async t=>{let e=[],s=[];const n=r=>(r=r.filter((d,l)=>{const h=this.checkedKeys.filter(f=>d.id===f)[0];return d.open=!0,d.checked=d.type===1?!!h:!1,d.isIndeterminate=!1,d.menusType=d.type,e.push(d.id),s.push(d),d.children&&d.children.length>0&&(d.children=n(d.children)),!0}),r);let i=this.menuAll.filter(r=>!!this.systemMenuAll.filter(l=>l.id===r.id)[0]);await n(i),this.allCheckedKeys=e;let a=[];s.forEach((r,d)=>{const l=this.getMenuIds(r);s[d].menuIds=l.arr,s[d].menuBtnIds=l.btn,!(this.checkedKeys.filter(p=>l.arr.includes(p)).length===l.arr.length)&&l.arr.length>0&&a.push(r.id)}),this.list=s;const o=this.checkedKeys.filter(r=>e.includes(r)).filter(r=>!a.includes(r)).filter((r,d,l)=>l.indexOf(r)===d);this.checkedKeys=o,this.allClose=this.checkedKeys.length===e.length&&e.length>0,this.menuTreeData=[...i],this.handleItem(),this.confirmLoading=!1})},open(t,e){this.record=t,this.appsId=e||window.$systemInfo.id,this.visible=!0,this.init()},getMenuTree(){return g.SysMenuTreeForGrant({roleId:this.record.id}).then(t=>(t.code===200&&(this.menuAll=t.data),t))},expandedMenuKeys(){return u.sysRoleOwnMenu({id:this.record.id}).then(t=>(t.code===200&&(this.checkedKeys=t.data),t))},getMenuList(){let t={AppsId:this.appsId};return g.sysMenuListByAppsId(t).then(e=>(e.code===200&&(this.systemMenuAll=e.data),e))},getMenuIds(t){let e=[],s=[];const n=i=>(i=i.filter((a,o)=>(a.menusType!==2?e.push(a.id):s.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return t.children&&n(t.children),{arr:e,btn:s}},findParent(t,e,s){for(let n of t)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,s))return s.unshift(n),!0;return!1},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var M=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?s("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),s("template",{slot:"footer"},[s("div",{staticClass:"btoms"},[s("el-checkbox",{attrs:{disabled:e.confirmLoading,indeterminate:e.isIndeterminate},on:{change:e.changeAll},model:{value:e.allClose,callback:function(n){e.allClose=n},expression:"allClose"}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")])],1)])],2)],1)},A=[],O=c.normalizeComponent(F,M,A,!1,null,"d82ecaae",null,null);const P=O.exports;const z={name:"GdUserRole",props:{height:{type:Number,default:100},openSelecteKeys:{type:Array,default:()=>[]},openMode:{type:String,default:"page"}},mixins:[b.tablesFilter],data(){return{transKey:"gd.btn.add",formLoading:!1,currentNode:null,loading:!0,orgTree:[],selectedRowKeys:[],selectedRows:[],queryParam:{},defaultProps:{children:"children",label:"title",value:"value"},defaultExpandedKeys:"",loadData:t=>g.getUserManage({roleId:this.openSelecteKeys[0]}).then(e=>(this.getRowId(e.data),{pageNo:1,pageSize:1e3,totalRows:0,rows:e.data})),disableBtn:[],fileList:[],needLoad:!1,infoData:{},isSendEmail:"",isSendEmailed:"",tableColumns:[{type:"selection",width:"60",fixed:!0},{transKey:"gd.user.name",prop:"name",label:"\u59D3\u540D",type:"slot",slotType:"name",align:"left",showOverflowTooltip:!0},{transKey:"gd.user.nickname",prop:"nickname",label:"\u6635\u79F0",align:"left",type:"slot",slotType:"nickname",showOverflowTooltip:!0},{transKey:"gd.user.sex",prop:"sex",label:"\u6027\u522B",align:"left",type:"slot",slotType:"sex",showOverflowTooltip:!0},{transKey:"gd.user.organization",prop:"orgname",label:"\u6240\u5C5E\u673A\u6784",align:"left",type:"slot",slotType:"orgname",showOverflowTooltip:!0},{transKey:"gd.user.status",prop:"status",label:"\u72B6\u6001",align:"left",type:"slot",slotType:"status",showOverflowTooltip:!0}],formColumnsuser:[{transKey:"gd.user.account",effectType:"input",prop:"account",label:"\u8D26\u53F7",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change",min:2}]},{transKey:"gd.user.name",prop:"name",effectType:"input",label:"\u59D3\u540D",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.sex",prop:"gender",effectType:"radio",label:"\u6027\u522B",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",dictTypeCode:"gender",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.birthday",prop:"birthday",effectType:"date",label:"\u751F\u65E5",placeholder:"\u8BF7\u8F93\u5165",valueFormat:"yyyy-MM-dd",placeholderTransKey:"gd.placeholder.select",rules:[]},{transKey:"gd.user.phone",effectType:"input",prop:"phone",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.email",effectType:"input",prop:"email",label:"\u90AE\u7BB1",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"},{type:"email",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u53F7!",transKey:"gd.account.emailTip"}]},{transKey:"gd.user.nickname",prop:"nickname",effectType:"input",label:"\u6635\u79F0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]},{transKey:"gd.user.tel",prop:"tel",effectType:"input",label:"\u7535\u8BDD",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]},{transKey:"gd.org.displayName",prop:"orgid",effectType:"selectTree",label:"\u6240\u5C5E\u673A\u6784",placeholder:"\u8BF7\u9009\u62E9",placeholderTransKey:"gd.placeholder.select",treeOptions:[],rules:[{required:!0,message:"\u8BF7\u9009\u62E9",transKey:"gd.placeholder.select",trigger:"change"}]},{transKey:"gd.user.PSDNeverExpire",prop:"psdneverexpire",effectType:"switch",label:"\u5BC6\u7801\u6C38\u4E0D\u8FC7\u671F",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysRole:add"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysRole:delete"}],disabledRowId:[],sysCodeGenName:"sys_user"}},components:{},computed:{initialLoading(){return this.openMode==="page"},selectedKeep(){return this.openMode!=="page"},getQueryParam(){let t=new Map;for(let e in this.queryParam)t.set(e==="statecodes"?"searchctatus":e,this.queryParam[e]);return Object.fromEntries(t)},getFormColumns(){return this.formColumnsuser.filter(e=>(e.prop==="orgid"&&(e.treeOptions=[...this.orgTree]),!0))},getTableButtons(){return this.tableButtons.filter(t=>(t.show=!this.disableBtn.includes(t.displayName),!0))},getHeight(){return this.height},styled(){return`height:${this.height+76}px`},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getRowId(t){let e=[];t.filter(s=>!this.disabledRowId.includes(s.id)).forEach(s=>{e.push(s.id)}),this.disabledRowId=this.disabledRowId.concat(e)},saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},getOrgTree(){y.getOrgTree({}).then(t=>{if(t.code===200){const e=s=>(s=s.filter((n,i)=>(n.value=String(n.value),n.children&&n.children.length>0&&(n.children=e(n.children)),!0)),s);this.orgTree=e(t.data)}this.loading=!1})},handleNodeClick(t){this.queryParam.orgId===t.id?(delete this.queryParam.orgId,this.$nextTick(()=>{setTimeout(()=>{this.$refs.tree.setCurrentKey(null)},0)})):this.queryParam=Object.assign({...this.queryParam},{orgId:t.id}),this.refresh()},handleOk(){this.$refs.table.refresh()},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()},lookupSeled(t){if(t.fkData.length===0){this.$refs.engineSearch.closed();return}this.$refs.engineSearch.confirmLoading=!0,g.postbindUsersToRole({roleId:this.openSelecteKeys[0],userIdList:t.data}).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$refs.engineSearch.closed(),this.refresh()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message),this.$refs.engineSearch.confirmLoading=!1})},add(){this.$refs.engineSearch.open({fkEntityName:this.sysCodeGenName,val:[],effectType:"participants",isRelevance:!0})},del(){let t=this;if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(e,s,n)=>{if(e!=="confirm"){n();return}s.confirmButtonLoading=!0,s.cancelButtonLoading=!0,s.showCancelButton=!1,g.postunbindUsersFromRole({roleId:t.openSelecteKeys[0],userIdList:t.selectedRowKeys}).then(i=>{i.success?(t.$message.success(t.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")),t.disabledRowId=t.disabledRowId.filter(a=>!t.selectedRows.filter(r=>r.id===a)[0]),s.confirmButtonLoading=!1,s.cancelButtonLoading=!1,s.showCancelButton=!0,n(),t.refresh()):t.$message.error(t.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+i.message)})}})}},created(){}};var E=function(){var e=this,s=e._self._c;return s("div",{staticClass:"gd-page-view",staticStyle:{display:"flex",background:"rgb(245, 245, 245)"}},[s("div",{staticClass:"page-view-list"},[s("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.tableColumns,showPagination:!1,selectedRowKeys:e.selectedRowKeys,height:e.height,initialLoading:!1},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"operator",fn:function(){return[s("div",{staticClass:"gd-table-operator"},[s("div",{staticClass:"gd-table-operatorr"},[s("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"name",fn:function({column:n,row:i}){return[s("span",{staticClass:"active-color",staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.name)+" ")])]}},{key:"nickname",fn:function({column:n,row:i}){return[s("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.nickname)+" ")])]}},{key:"orgname",fn:function({column:n,row:i}){return[s("span",{staticStyle:{cursor:"pointer"}},[e._v(" "+e._s(i.orgname)+" ")])]}},{key:"sex",fn:function({column:n,row:i}){return[s("span",[e._v(" "+e._s(e._f("dictType")("gender",i.sex))+" ")])]}},{key:"status",fn:function({column:n,row:i}){return[s("span",[e._v(" "+e._s(e._f("dictType")("state_code",i.status))+" ")])]}}])}),s("gd-search",{ref:"engineSearch",attrs:{appendToBody:!0,disabledRowId:e.disabledRowId},on:{lookupSeled:e.lookupSeled}})],1)])},q=[],G=c.normalizeComponent(z,E,q,!1,null,"da18e34e",null,null);const j=G.exports;const H={data(){return{buttons:[],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"90%",selectedRowKeys:[]}},components:{UserFormDate:j},computed:{height(){return this.screenHeight-(this.fullscreen?160:340)},...c.mapGetters(["screenHeight"])},methods:{handleSubmit(){this.closed(),this.$emit("ok")},open(t){this.record=t,this.visible=!0,this.selectedRowKeys=[t.id],this.$nextTick(()=>{setTimeout(()=>{this.$refs.userForm.refresh()},0)})},closed(){this.fullscreen=!1,this.visible=!1},toggleFullscreen(){this.fullscreen=!this.fullscreen},onSelectChange(t){this.selectedRowKeys=t},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var V=function(){var e=this,s=e._self._c;return s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"modal-append-to-body":!0,"append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.userAuthorization","\u6388\u6743\u7528\u6237"),fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?s("UserFormDate",{ref:"userForm",attrs:{height:e.height,openMode:"components",openSelecteKeys:e.selectedRowKeys},on:{onSelectChange:e.onSelectChange}}):e._e()],1)],2)},U=[],Q=c.normalizeComponent(H,V,U,!1,null,"46b57430",null,null);const J=Q.exports;const W={data(){return{buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],record:{},visible:!1,confirmLoading:!1,fullscreen:!1,width:"94%",menuTreeData:[],menuTreeDatad:[],checkedKeys:[],list:[],allClose:!1,menuAll:[],systemMenuAll:[],allCheckedKeys:[]}},computed:{isIndeterminate(){return this.allClose?!1:this.checkedKeys.length>0},...c.mapGetters(["screenHeight","tableLists"])},components:{LayoutItem:v},methods:{async handleSubmit(){const t=e=>(e=e.filter((s,n)=>{const i=this.checkedKeys.filter(a=>s.id===a)[0];return s.type=i?1:0,s.formlist&&s.formlist.length>0&&(s.formlist=t(s.formlist)),s.viewlist&&s.viewlist.length>0&&(s.viewlist=t(s.viewlist)),s.btnlist&&s.btnlist.length>0&&(s.btnlist=t(s.btnlist)),!0}),e);this.confirmLoading=!0,await t(this.menuAll),u.sysRoleRoleBindViewOnBtn({roleid:this.record.id,list:this.menuAll}).then(e=>{e.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.closed()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+e.message),this.confirmLoading=!1})},checkedItemBtn(t,e){let s=[...this.checkedKeys].filter(n=>!t.menuBtnIds.includes(n));e===1&&(s=s.concat(t.menuBtnIds)),this.checkedKeys=[...s],this.handleItem()},openItem(t){let e=[...this.menuTreeData];const s=n=>(n=n.filter((i,a)=>(i.id===t.id&&(i.open=!i.open),i.children&&i.children.length>0&&(i.children=s(i.children)),!0)),n);s(e),this.menuTreeData=[...e]},changeItem(t,e,s=!0){let n=[...this.checkedKeys];this.checkedKeys.filter(l=>e.includes(l))[0];const i=this.list.filter(l=>e.includes(l.id))[0],a=s&&i?i.menuIds:[];if(t?n=this.checkedKeys.concat(e).concat(a):n=this.checkedKeys.filter(l=>!e.includes(l)).filter(l=>!a.includes(l)),this.checkedKeys=[...n],this.handleItem(),i.menusType===2)return;let o=[];this.findParent(this.menuTreeData,i,o);let r=[],d=[];o.forEach(l=>{this.checkedKeys.filter(p=>l.menuIds.includes(p)).length===l.menuIds.length&&l.menuIds.length>0&&!l.checked?r.push(l.id):d.push(l.id)}),r.forEach(l=>{this.changeItem(!0,[l],!1)}),d.forEach(l=>{this.changeItem(!1,[l],!1)})},handleItem(){let t=[...this.menuTreeData];const e=s=>(s=s.filter((n,i)=>{const a=this.checkedKeys.filter(o=>n.menuIds.includes(o));return this.checkedKeys.includes(n.id)?(n.checked=!0,n.isIndeterminate=!1):(n.checked=!1,n.isIndeterminate=a.length>0&&n.menuIds.length>0),n.children&&n.children.length>0&&(n.children=e(n.children)),!0}),s);e(t),this.menuTreeData=[...t],this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0},changeAll(t){t?this.checkedKeys=[...this.allCheckedKeys]:this.checkedKeys=[],this.handleItem()},init(){this.confirmLoading=!0,Promise.all([this.getList()]).then(async t=>{this.confirmLoading=!1;let e=JSON.parse(JSON.stringify(this.menuTreeDatad)),s=[];const n=a=>(a=a.filter((o,r)=>{const d=this.checkedKeys.filter(l=>o.id===l)[0];return o.open=!0,o.checked=o.menusType===1?!!d:!1,o.isIndeterminate=!1,s.push(o),o.children&&o.children.length>0&&(o.children=n(o.children)),!0}),a);await n(e);let i=[];s.forEach((a,o)=>{const r=this.getMenuIds(a);s[o].menuIds=r.arr,s[o].menuBtnIds=r.btn,!(this.checkedKeys.filter(h=>r.arr.includes(h)).length===r.arr.length)&&r.arr.length>0&&i.push(a.id)}),this.list=s,this.allClose=this.checkedKeys.length===this.allCheckedKeys.length&&this.allCheckedKeys.length>0,this.menuTreeData=[...e],this.handleItem(),console.log(this.menuAll,"123")})},getList(){return u.sysRoleViewOnBtnList({roleId:this.record.id}).then(t=>{if(t.code===200){let e=[],s=[];const n=(a,o)=>(a=a.filter((r,d)=>{r.parentId=o,r.open=!0,r.checked=!1,r.isIndeterminate=!1,r.transkey=r.transkey?r.transkey:null,r.title=r.name,r.menusType=r.formlist&&r.viewlist?0:r.btnlist?1:2,s.push(r.id),r.type===1&&e.push(r.id);let l=[];return r.viewlist&&r.viewlist.length>0&&(r.viewlist.map(h=>(h.iconClass="gd-icon-shitumoshi",h)),l=l.concat(r.viewlist)),r.formlist&&r.formlist.length>0&&(r.formlist.map(h=>(h.iconClass="gd-icon-biaodanmoshi",h)),l=l.concat(r.formlist)),r.btnlist&&r.btnlist.length>0&&(l=l.concat(r.btnlist)),l.length>0&&(r.children=n(l,r.id)),!0}),a);this.menuAll=t.data.list;let i=JSON.parse(JSON.stringify(this.menuAll));n(i,0),this.checkedKeys=e,this.allCheckedKeys=s,this.menuTreeDatad=[...i]}return t})},getMenuIds(t){let e=[],s=[];const n=i=>(i=i.filter((a,o)=>(a.menusType!==2?e.push(a.id):s.push(a.id),a.children&&a.children.length>0&&(a.children=n(a.children)),!0)),i);return t.children&&n(t.children),{arr:e,btn:s}},findParent(t,e,s){for(let n of t)if(n.id===e.parentId||n.children&&n.children.length>0&&this.findParent(n.children,e,s))return s.unshift(n),!0;return!1},open(t){this.record=t,this.visible=!0,this.init()},closed(){this.fullscreen=!1,this.visible=!1,this.menuTreeData=[],this.checkedKeys=[]},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(t){const e=t.item.functionName;this[e]&&this[e]()}}};var X=function(){var e=this,s=e._self._c;return s("div",[s("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(n){e.visible=n},closed:e.closed}},[s("template",{slot:"title"},[s("gd-modal-title",{attrs:{title:e.$i18nt("gd.user.dataRole","\u6388\u6743\u6570\u636E"),buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen}})],1),s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}],staticStyle:{"min-height":"400px"}},[e.visible?s("LayoutItem",{attrs:{record:e.menuTreeData,checkedKeys:e.checkedKeys},on:{open:e.openItem,change:e.changeItem,checkedBtn:e.checkedItemBtn}}):e._e()],1),s("template",{slot:"footer"},[s("div",{staticClass:"btoms"},[s("el-checkbox",{attrs:{disabled:e.confirmLoading,indeterminate:e.isIndeterminate},on:{change:e.changeAll},model:{value:e.allClose,callback:function(n){e.allClose=n},expression:"allClose"}},[e._v(" "+e._s(e.$i18nt("gd.btn.selectAll","\u5168\u9009"))+" ")])],1)])],2)],1)},Y=[],Z=c.normalizeComponent(W,X,Y,!1,null,"e6593396",null,null);const ee=Z.exports;const te={name:"GdRole",props:{height:{type:Number,default:100},openMode:{type:String,default:"page"},openSelecteKeys:{type:Array,default:()=>[]}},mixins:[b.tablesFilter,_],data(){return{appsId:"",transKey:"gd.btn.add",formLoading:!1,loading:!0,selectedRowKeys:[],selectedRows:[],queryParam:{},loadData:t=>(this.selectedKeep&&(this.selectedRowKeys=[...this.openSelecteKeys]),u.getRolePage(Object.assign(t,this.queryParam,{sysAppsId:window.$systemInfo.id})).then(e=>e.data))}},components:{RoleGrant:S,RoleMenu:P,RoleMenuViewForm:ee,UserAuthorization:J},computed:{getTableButtons(){return this.tableButtons.filter(t=>t.functionName==="grantRoleAppMenu"?!!this.appsId:!0)},initialLoading(){return this.openMode==="page"},selectedKeep(){return this.openMode!=="page"},getFormColumns(){return this.formColumns.filter(t=>(t.prop==="code"&&(t.disabled=this.transKey!=="gd.btn.add"),!(this.transKey==="gd.https.copy"&&t.prop==="code")))},getHeight(){return this.height},...c.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{getAppId(){g.getConfigInfoByCode({code:"App_Id"}).then(t=>{t.code===200&&(this.appsId=t.data?t.data.value:"")})},userAuthorizationMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.userAuthorization.open(this.selectedRows[0])},grantRoleMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenu.open(this.selectedRows[0])},grantRoleAppMenu(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenu.open(this.selectedRows[0],this.appsId)},grantRoleGrant(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleGrant.open(this.selectedRows[0])},grantRoleVF(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.$refs.roleMenuViewForm.open(this.selectedRows[0])},saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(t){this.transKey="gd.btn.edit",this.$refs.editForm.open(t)},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(t,e,s)=>{this.delHand(t,e,s)}})},delHand(t,e,s){if(t!=="confirm"){s();return}let n=[];this.selectedRows.forEach(i=>{let a=u.sysRoleDelete(i).then(o=>o);n.push(a)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(n).then(i=>{const a=i.filter(o=>!o.success);a.length===0?this.$message.success(this.$i18nt("gd.https.delSucc","\u5220\u9664\u6210\u529F")):this.$message.error(this.$i18nt("gd.https.delFail","\u5220\u9664\u5931\u8D25")+a[0].message),s(),this.refresh(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},add(){this.transKey="gd.btn.add",this.$refs.editForm.open(null)},edit(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.editForm(this.selectedRows[0])},copy(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.transKey="gd.https.copy",this.$refs.editForm.open(Object.assign({...this.selectedRows[0]},{roleId:this.selectedRows[0].id}))},sbumit({data:t,record:e,btn:s},n,i){this.formLoading=!0;let a=e?this.transKey==="gd.https.copy"?u.sysRoleCopyRole:u.sysRoleEdit:u.sysRoleAddV2;const o=this.transKey!=="gd.https.edit"?Object.assign(t,{sysappsid:window.$systemInfo.id}):t;a(o).then(r=>{r.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),i(),this.refresh()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+r.message),this.formLoading=!1})},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e,this.$emit("onSelectChange",t,e)},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}},created(){this.getAppId()}};var se=function(){var e=this,s=e._self._c;return s("div",{staticClass:"gd-page-view"},[s("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[s("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.tableColumns,selectedRowKeys:e.selectedRowKeys,height:e.getHeight,filtering:!0,selectedKeep:e.selectedKeep,initialLoading:e.initialLoading},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"name",fn:function({column:n,row:i}){return[s("gd-tooltip",{attrs:{rowKey:"name",row:i,highlight:""},on:{click:e.editForm}})]}},{key:"operator",fn:function(){return[s("div",{staticClass:"gd-table-operator"},[s("div",{staticClass:"gd-table-operatorl"},[s("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.user.roleName","\u89D2\u8272\u540D"),clearable:""},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.refresh.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(n){e.$set(e.queryParam,"name",n)},expression:"queryParam.name"}}),s("div",{staticClass:"table-operator-search",on:{click:e.refresh}},[s("i",{staticClass:"el-input__icon el-icon-search"})])],1),s("div",{staticClass:"gd-table-operatorr"},[e.openMode==="page"?s("gd-btn-list",{attrs:{sysViewButtons:e.getTableButtons},on:{functionName:e.doEvent}}):e._e()],1)])]},proxy:!0},{key:"filtering",fn:function({colse:n,visible:i}){return[s("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.getHeight,queryParam:e.queryParam,colse:n,visible:i},on:{save:e.saveQueries}})]}}])})],1),s("gd-edit-form",{ref:"editForm",attrs:{formItemWidth:"90%",loading:e.formLoading,transKey:e.transKey,buttons:e.formButtons,columns:e.getFormColumns,labelPosition:e.labelPosition,formMode:e.formMode},on:{sbumit:e.sbumit}}),s("RoleGrant",{ref:"roleGrant",on:{ok:e.refresh}}),s("RoleMenu",{ref:"roleMenu",on:{ok:e.refresh}}),s("RoleMenuViewForm",{ref:"roleMenuViewForm",on:{ok:e.refresh}}),s("UserAuthorization",{ref:"userAuthorization",on:{ok:e.refresh}})],1)},ne=[],ie=c.normalizeComponent(te,se,ne,!1,null,"7d4d8bc6",null,null);const m=ie.exports;m.install=function(t){t.component(m.name,m)};exports.GDpackage=m;
|