upp-platform-core 1.0.9 → 1.0.10
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/index.js +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"vue";import{Message as t,MessageBox as n,Notification as o,Loading as i}from"element-ui";import r from"axios";import{saveAs as s}from"file-saver";import a from"@/utils/errorCode";import{blobValidate as l}from"@/utils/commonSettings";import c from"@/config/host";import d from"clipboard";import u from"jsencrypt/bin/jsencrypt";import h from"lodash/debounce";var m={install:function(e,{componentPath:t,store:n}){e.prototype.$changePage=function(e,o={},i={}){const r=n.getters["permission/menuPath"][t[e]];r?this.$router.push({name:r,params:o,query:i}):this.$message.error("您没有该页面的权限!")},e.prototype.$tabClose=function(e,t,o){window.opener?window.close():e?(n.commit("tabRouter/subtractCurrentTabRouter",{path:this.$route.path,routerIdx:n.getters["tabRouter/tabRouterList"].findIndex((e=>e.path===this.$route.path))}),this.$changePage(e,t,o)):this.$router.go(-1)}}};function p(e,t){for(const n in t)try{t[n].constructor===Object?e[n]=p(e[n],t[n]):e[n]=t[n]}catch(o){e[n]=t[n]}return e}class f{constructor(e,t,n){this.label=e,this.value=t,this.raw=n}}const g=["label","name","title"],A=["value","id","uid","key"];function v(e,...t){return t.find((t=>Object.prototype.hasOwnProperty.call(e,t)))}const b={metas:{"*":{request:()=>Promise.resolve([]),responseConverter:function(e,t){const n=e.content instanceof Array?e.content:e;return void 0===n?(console.error(`no dict data of "${t.type}" found in the response`),[]):n.map((e=>function(e,t){const n=v(e,t.labelField,...g),o=v(e,t.valueField,...A);return new f(e[n],e[o],e)}(e,t)))},labelField:"label",valueField:"value"}},DEFAULT_LABEL_FIELDS:g,DEFAULT_VALUE_FIELDS:A};function y(e){p(b,e)}class C{constructor(e){this.type=e.type,this.request=e.request,this.responseConverter=e.responseConverter,this.labelField=e.labelField,this.valueField=e.valueField,this.lazy=!0===e.lazy}}C.parse=function(e){let t=null;return"string"==typeof e?(t=b.metas[e]||{},t.type=e):"object"==typeof e&&(t=e),t=p(b.metas["*"],t),new C(t)};const _={types:[]};function x(t,n){return n.request(n).then((o=>{const{type:i}=n;let r=n.responseConverter(o,n);return r instanceof Array?r.filter((e=>e instanceof f)).length!==r.length&&(console.error("the type of elements in dicts must be DictData"),r=[]):(console.error("the return of responseConverter must be Array.<DictData>"),r=[]),t.type[i].splice(0,Number.MAX_SAFE_INTEGER,...r),r.forEach((n=>{e.set(t.label[i],n.value,n.label)})),r}))}class w{constructor(){this.owner=null,this.label={},this.type={}}init(t){t instanceof Array&&(t={types:t});const n=p(_,t);if(void 0===n.types)throw new Error("need dict types");const o=[];return this._dictMetas=n.types.map((e=>C.parse(e))),this._dictMetas.forEach((t=>{const{type:n}=t;e.set(this.label,n,{}),e.set(this.type,n,[]),t.lazy||o.push(x(this,t))})),Promise.all(o)}reloadDict(e){const t=this._dictMetas.find((t=>t.type===e));return void 0===t?Promise.reject():x(this,t)}}function k(e,t){y(t),e.mixin({data(){if(void 0===this.$options||void 0===this.$options.dicts||null===this.$options.dicts)return{};const e=new w;return e.owner=this,{dict:e}},created(){this.dict instanceof w&&(t.onCreated?.(this.dict),this.dict.init(this.$options.dicts).then((()=>{t.onReady?.(this.dict),this.$nextTick((()=>{this.$emit("dict-ready",this.dict),this.$options.methods&&this.$options.methods.onDictReady instanceof Function&&this.$options.methods.onDictReady.call(this,this.dict)}))})))}})}var E={install:function(e,{getDicts:t}){e.use(k,{metas:{"*":{labelField:"dictLabel",valueField:"dictValue",request:e=>t(e.type).then((e=>e.data))}}})}};function B(e,t){const n=t.getters&&t.getters["user/permissions"];return!!(e&&e.length>0)&&n.some((t=>"*:*:*"===t||t===e))}function T(e,t){const n=t.getters&&t.getters["user/permissions"];return!!(e&&e.length>0)&&n.some((t=>"admin"===t||t===e))}var S={session:{set(e,t){sessionStorage&&null!=e&&null!=t&&sessionStorage.setItem(e,t)},get:e=>sessionStorage?null==e?null:sessionStorage.getItem(e):null,setJSON(e,t){null!=t&&this.set(e,JSON.stringify(t))},getJSON(e){const t=this.get(e);if(null!=t)return JSON.parse(t)},remove(e){sessionStorage.removeItem(e)}},local:{set(e,t){localStorage&&null!=e&&null!=t&&localStorage.setItem(e,t)},get:e=>localStorage?null==e?null:localStorage.getItem(e):null,setJSON(e,t){null!=t&&this.set(e,JSON.stringify(t))},getJSON(e){const t=this.get(e);if(null!=t)return JSON.parse(t)},remove(e){localStorage.removeItem(e)}}};let $;var I={msg(e){t.info(e)},msgError(e){t.error(e)},msgSuccess(e){t.success(e)},msgWarning(e){t.warning(e)},alert(e){n.alert(e,"系统提示")},alertError(e){n.alert(e,"系统提示",{type:"error"})},alertSuccess(e){n.alert(e,"系统提示",{type:"success"})},alertWarning(e){n.alert(e,"系统提示",{type:"warning"})},notify(e){o.info(e)},notifyError(e){o.error(e)},notifySuccess(e){o.success(e)},notifyWarning(e){o.warning(e)},confirm:e=>n.confirm(e,"系统提示",{closeOnClickModal:!1,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),prompt:e=>n.prompt(e,"系统提示",{closeOnClickModal:!1,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),loading(e){$=i.service({lock:!0,text:e,spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"})},closeLoading(){$.close()}};const q=c.development.API;var R={zip(e,t){r({method:"get",myUrl:q+e,responseType:"blob",headers:{Authorization:`Bearer ${this.$store.getters["user/token"]}`}}).then((async e=>{if(await l(e.data)){const n=new Blob([e.data],{type:"application/zip"});this.saveAs(n,t)}else this.printErrMsg(e.data)}))},saveAs(e,t,n){s(e,t,n)},async printErrMsg(e){const n=await e.text(),o=JSON.parse(n),i=a[o.code]||o.msg||a.default;t.error(i)}},W={install(e,{store:t}){e.prototype.$auth=function(e){return{hasPermi:e=>B(e),hasPermiOr:t=>t.some((t=>B(t,e))),hasPermiAnd:t=>t.every((t=>B(t,e))),hasRole:e=>T(e),hasRoleOr:t=>t.some((t=>T(t,e))),hasRoleAnd:t=>t.every((t=>T(t,e)))}}(t),e.prototype.$cache=S,e.prototype.$modal=I,e.prototype.$download=R}};var D={bind(e,t){const{value:n}=t;if(!1===n)return;const o=e.querySelector(".el-dialog__header"),i=e.querySelector(".el-dialog");o.style.cursor="move";const r=i.currentStyle||window.getComputedStyle(i,null);i.style.position="absolute",i.style.marginTop=0;let{width:s}=i.style;s=s.includes("%")?+document.body.clientWidth*(+s.replace(/%/g,"")/100):+s.replace(/\px/g,""),i.style.left=(document.body.clientWidth-s)/2+"px",o.onmousedown=e=>{const t=e.clientX-o.offsetLeft,n=e.clientY-o.offsetTop;let s,a;r.left.includes("%")?(s=+document.body.clientWidth*(+r.left.replace(/%/g,"")/100),a=+document.body.clientHeight*(+r.top.replace(/%/g,"")/100)):(s=+r.left.replace(/\px/g,""),a=+r.top.replace(/\px/g,"")),document.onmousemove=function(e){const o=e.clientX-t,r=e.clientY-n,l=o+s,c=r+a;i.style.left=`${l}px`,i.style.top=`${c}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}}},O={bind(e){const t=e.querySelector(".el-dialog"),n=document.createElement("div");n.style="width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;",n.addEventListener("mousedown",(n=>{const o=n.clientX-e.offsetLeft,i=t.offsetWidth;document.onmousemove=function(e){e.preventDefault();const n=e.clientX-o;t.style.width=`${i+n}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}),!1),t.appendChild(n)}},N={bind(e){const t=e.querySelector(".el-dialog"),n=document.createElement("div");n.style="width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;",n.addEventListener("mousedown",(n=>{const o=n.clientX-e.offsetLeft,i=n.clientY-e.offsetTop,r=t.offsetWidth,s=t.offsetHeight;document.onmousemove=function(e){e.preventDefault();const n=e.clientX-o,a=e.clientY-i;t.style.width=`${r+n}px`,t.style.height=`${s+a}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}),!1),t.appendChild(n)}},j={bind(e,t){switch(t.arg){case"success":e._vClipBoard_success=t.value;break;case"error":e._vClipBoard_error=t.value;break;default:{const n=new d(e,{text:()=>t.value,action:()=>"cut"===t.arg?"cut":"copy"});n.on("success",(t=>{const n=e._vClipBoard_success;n?.(t)})),n.on("error",(t=>{const n=e._vClipBoard_error;n?.(t)})),e._vClipBoard=n}}},update(e,t){"success"===t.arg?e._vClipBoard_success=t.value:"error"===t.arg?e._vClipBoard_error=t.value:(e._vClipBoard.text=function(){return t.value},e._vClipBoard.action=()=>"cut"===t.arg?"cut":"copy")},unbind(e,t){e._vClipboard&&("success"===t.arg?delete e._vClipBoard_success:"error"===t.arg?delete e._vClipBoard_error:(e._vClipBoard.destroy(),delete e._vClipBoard))}};const F=function(e,{store:t}){e.directive("hasRole",function(e){return{inserted(t,n){const{value:o}=n,i=e.getters&&e.getters["user/userRoles"];if(!(o&&o instanceof Array&&o.length>0))throw new Error('请设置角色权限标签值"');{const e=o;i.some((t=>"admin"===t||e.includes(t)))||t.parentNode?.removeChild(t)}}}}(t)),e.directive("hasPermi",function(e){return{inserted(t,n){const{value:o}=n,i=e.getters&&e.getters["user/permissions"];if(!(o&&o instanceof Array&&o.length>0))throw new Error("请设置操作权限标签值");{const e=o,n=i.some((t=>"*:*:*"===t||e.includes(t)));n||t.parentNode?.removeChild(t)}}}}(t)),e.directive("clipboard",j),e.directive("dialogDrag",D),e.directive("dialogDragWidth",O),e.directive("dialogDragHeight",N)};var P={install(e,t){var n;e.prototype.$jumpToApp=(n=t.store,function(e){window.open(((e,t,n)=>(e.includes("?")?e+=`&${t}=${n}`:e+=`?${t}=${n}`,e))(e,"token",n.getters["user/token"]))})}},U={name:"FormSection",props:{action:{type:String,default:""},loading:{type:Boolean,default:!1},cancelText:{type:String,default:"取消"},saveText:{type:String,default:"保存"},submitText:{type:String,default:"提交"},border:{type:Boolean,default:!0},jumpPath:{type:String,default:""},hideFooter:{type:Boolean,default:!1}},data:()=>({loadingText:"玩命加载中请稍等...."}),computed:{isView(){return"View"===this.action}},methods:{handleCancel(){this.$listeners.cancel?this.$emit("cancel"):this.$tabClose(this.jumpPath)}}};function z(e,t,n,o,i,r,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);const d="function"==typeof n?n.options:n;let u;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),o&&(d._scopeId=o),r?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(r)},d._ssrRegister=u):t&&(u=s?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),u)if(d.functional){const e=d.render;d.render=function(t,n){return u.call(n),e(t,n)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,u):[u]}return n}const L="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function K(e){return(e,t)=>function(e,t){const n=L?t.media||"default":e,o=Y[n]||(Y[n]={ids:new Set,styles:[]});if(!o.ids.has(e)){o.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),o.element||(o.element=document.createElement("style"),o.element.type="text/css",t.media&&o.element.setAttribute("media",t.media),void 0===V&&(V=document.head||document.getElementsByTagName("head")[0]),V.appendChild(o.element)),"styleSheet"in o.element)o.styles.push(n),o.element.styleSheet.cssText=o.styles.filter(Boolean).join("\n");else{const e=o.ids.size-1,t=document.createTextNode(n),i=o.element.childNodes;i[e]&&o.element.removeChild(i[e]),i.length?o.element.insertBefore(t,i[e]):o.element.appendChild(t)}}}(e,t)}let V;const Y={};const Q=U;var X=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"form-section",class:{"form-section__view-only":e.isView},attrs:{"element-loading-text":e.loadingText}},[n("el-card",{staticClass:"box-margin",class:{"form-view-hide-star":e.isView,"no-border":!e.border}},[n("div",{staticClass:"form-section__content"},[e._t("default")],2),e._v(" "),!e.hideFooter||e.$slots.btn?n("el-row",{staticClass:"submit-btns-box"},[n("div",{staticClass:"border-top"},[e.cancelText?n("el-button",{attrs:{icon:"el-icon-close"},on:{click:e.handleCancel}},[e._v(e._s(e.cancelText))]):e._e(),e._v(" "),e._t("btn"),e._v(" "),e.isView?e._e():[e.saveText?n("el-button",{attrs:{icon:"el-icon-check",type:"primary"},on:{click:function(t){return e.$emit("save","save")}}},[e._v(e._s(e.saveText))]):e._e(),e._v(" "),e.submitText&&"AuditEdit"!==e.action?n("el-button",{attrs:{icon:"el-icon-check",type:"primary"},on:{click:function(t){return e.$emit("submit","submit")}}},[e._v(e._s(e.submitText))]):e._e()]],2)]):e._e()],1)],1)};X._withStripped=!0;const J=z({render:X,staticRenderFns:[]},(function(e){e&&e("data-v-c2cbdf04_0",{source:'.submit-btns-box[data-v-c2cbdf04] {\n background: white;\n position: absolute;\n right: 0;\n bottom: 0;\n box-sizing: border-box;\n z-index: 99;\n}\n.border-top[data-v-c2cbdf04] {\n display: flex;\n flex: 1;\n justify-content: flex-end;\n width: 100%;\n}\n.form-section__view-only[data-v-c2cbdf04] .el-form-item__label::before {\n display: none;\n}\n.form-section__view-only[data-v-c2cbdf04] .form-table.el-table .el-form-item.is-required {\n padding-left: 0;\n}\n.form-section__view-only[data-v-c2cbdf04] .form-table.el-table .el-form-item.is-required::before {\n display: none;\n}\n.form-section__view-only[data-v-c2cbdf04] .form-table.el-table .el-form-item span.view-item {\n margin-left: 0;\n margin-top: 0;\n padding: 0 15px;\n}\n.form-section__view-only[data-v-c2cbdf04] th div.table-columns-required::before {\n display: none;\n}\n.form-section[data-v-c2cbdf04] > .el-card {\n height: 100%;\n}\n.form-section[data-v-c2cbdf04] > .el-card .el-card__body {\n height: 100%;\n padding: 20px;\n padding-bottom: 100px;\n}\n[data-v-c2cbdf04] .el-card.box-margin {\n position: relative;\n}\n[data-v-c2cbdf04] .el-card.box-margin.no-border {\n border: none;\n}\n[data-v-c2cbdf04] .el-card.box-margin .form-view-hide-star {\n margin: 0;\n}\n[data-v-c2cbdf04] .el-card.box-margin .form-section__content {\n height: 100%;\n overflow-y: auto;\n}\n.form-section[data-v-c2cbdf04] {\n width: 100%;\n height: 100%;\n position: relative;\n}\n.form-section[data-v-c2cbdf04]::before {\n content: "";\n position: absolute;\n border-top: 1px solid #e9e9e9;\n bottom: 2px;\n width: 100%;\n left: 50%;\n transform: translate(-50%);\n height: 90px;\n z-index: 99;\n background: white;\n}\n:root[theme-mode="dark"] .border-top[data-v-c2cbdf04],\n:root[theme-mode="dark"] .form-section[data-v-c2cbdf04]::before {\n background: var(--td-bg-color-page);\n}\n',map:{version:3,sources:["FormSection.vue"],names:[],mappings:"AAAA;EACE,iBAAiB;EACjB,kBAAkB;EAClB,QAAQ;EACR,SAAS;EACT,sBAAsB;EACtB,WAAW;AACb;AACA;EACE,aAAa;EACb,OAAO;EACP,yBAAyB;EACzB,WAAW;AACb;AACA;EACE,aAAa;AACf;AACA;EACE,eAAe;AACjB;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,aAAa;EACb,eAAe;AACjB;AACA;EACE,aAAa;AACf;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,YAAY;AACd;AACA;EACE,SAAS;AACX;AACA;EACE,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,6BAA6B;EAC7B,WAAW;EACX,WAAW;EACX,SAAS;EACT,0BAA0B;EAC1B,YAAY;EACZ,WAAW;EACX,iBAAiB;AACnB;AACA;;EAEE,mCAAmC;AACrC",file:"FormSection.vue",sourcesContent:['.submit-btns-box {\n background: white;\n position: absolute;\n right: 0;\n bottom: 0;\n box-sizing: border-box;\n z-index: 99;\n}\n.border-top {\n display: flex;\n flex: 1;\n justify-content: flex-end;\n width: 100%;\n}\n.form-section__view-only ::v-deep .el-form-item__label::before {\n display: none;\n}\n.form-section__view-only ::v-deep .form-table.el-table .el-form-item.is-required {\n padding-left: 0;\n}\n.form-section__view-only ::v-deep .form-table.el-table .el-form-item.is-required::before {\n display: none;\n}\n.form-section__view-only ::v-deep .form-table.el-table .el-form-item span.view-item {\n margin-left: 0;\n margin-top: 0;\n padding: 0 15px;\n}\n.form-section__view-only ::v-deep th div.table-columns-required::before {\n display: none;\n}\n.form-section > ::v-deep .el-card {\n height: 100%;\n}\n.form-section > ::v-deep .el-card .el-card__body {\n height: 100%;\n padding: 20px;\n padding-bottom: 100px;\n}\n::v-deep .el-card.box-margin {\n position: relative;\n}\n::v-deep .el-card.box-margin.no-border {\n border: none;\n}\n::v-deep .el-card.box-margin .form-view-hide-star {\n margin: 0;\n}\n::v-deep .el-card.box-margin .form-section__content {\n height: 100%;\n overflow-y: auto;\n}\n.form-section {\n width: 100%;\n height: 100%;\n position: relative;\n}\n.form-section::before {\n content: "";\n position: absolute;\n border-top: 1px solid #e9e9e9;\n bottom: 2px;\n width: 100%;\n left: 50%;\n transform: translate(-50%);\n height: 90px;\n z-index: 99;\n background: white;\n}\n:root[theme-mode="dark"] .border-top,\n:root[theme-mode="dark"] .form-section::before {\n background: var(--td-bg-color-page);\n}\n']},media:void 0})}),Q,"data-v-c2cbdf04",false,undefined,!1,K,void 0,void 0);const H={name:"CommonDialog",props:{value:{type:Boolean,default:!1},dialogTitle:{type:String,default:"详情"},label:{type:String,default:"打开弹窗"},btn:{type:Object,default:()=>({type:"primary"})},closeOnClickModal:{type:Boolean,default:!1},bodyScroll:{type:Boolean,default:!1},height:{type:String,default:"0"},viewOnly:{type:Boolean,default:!1},noFooter:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},btnType:{type:String,default:""},btnIcon:{type:String,default:""},showClose:{type:Boolean,default:!0}},computed:{visible:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.label?n("el-button",e._b({attrs:{icon:e.btnIcon,type:e.btnType,plain:""},on:{click:function(t){e.visible=!0,e.$emit("open")}}},"el-button",e.btn,!1),[e._v(e._s(e.label))]):e._e(),e._v(" "),n("el-dialog",e._g(e._b({class:{"common-dialog__body--scroll":e.bodyScroll,"fix-height":"1"===e.height,"common-dialog":!0,"view-only":e.viewOnly,"no-footer":e.noFooter},attrs:{"close-on-click-modal":e.closeOnClickModal,"show-close":e.showClose,visible:e.visible,title:e.dialogTitle,top:e.bodyScroll||"1"===e.height?"80px":"15vh"},on:{"update:visible":function(t){e.visible=t}}},"el-dialog",e.$attrs,!1),e.$listeners),[e.$slots.title?[e._t("title")]:e._e(),e._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[e._t("default")],2),e._v(" "),e.noFooter?e._e():n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e._t("footer"),e._v(" "),e.viewOnly?e._e():n("el-button",{attrs:{icon:"el-icon-check",loading:e.loading,type:"primary"},on:{click:function(t){return e.$emit("ok")}}},[e._v("确定")])],2)],2)],1)};Z._withStripped=!0;const G=z({render:Z,staticRenderFns:[]},(function(e){e&&e("data-v-7fe9e791_0",{source:".common-dialog[data-v-7fe9e791] .el-dialog__body {\n overflow-y: auto;\n}\n.common-dialog[data-v-7fe9e791] .el-dialog__body > div {\n height: calc(100% - 25px);\n overflow-y: auto;\n}\n.common-dialog[data-v-7fe9e791] .is-fullscreen .el-dialog__body {\n height: calc(100% - 135px);\n}\n.common-dialog.common-dialog__body--scroll[data-v-7fe9e791] .el-dialog__body {\n max-height: calc(100vh - 300px);\n}\n.common-dialog.common-dialog__body--scroll.view-only[data-v-7fe9e791] .el-dialog__body,\n.common-dialog.common-dialog__body--scroll.no-footer[data-v-7fe9e791] .el-dialog__body {\n max-height: calc(100vh - 200px);\n}\n.common-dialog.fix-height[data-v-7fe9e791] {\n /* stylelint-disable-next-line no-descending-specificity */\n}\n.common-dialog.fix-height[data-v-7fe9e791] .el-dialog__body {\n height: calc(100vh - 300px);\n}\n.common-dialog.fix-height.view-only[data-v-7fe9e791] .el-dialog__body,\n.common-dialog.fix-height.no-footer[data-v-7fe9e791] .el-dialog__body {\n height: calc(100vh - 200px);\n}\n.common-dialog.view-only[data-v-7fe9e791] .el-dialog__footer {\n padding: 0;\n}\n",map:{version:3,sources:["CommonDialog.vue"],names:[],mappings:"AAAA;EACE,gBAAgB;AAClB;AACA;EACE,yBAAyB;EACzB,gBAAgB;AAClB;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,+BAA+B;AACjC;AACA;;EAEE,+BAA+B;AACjC;AACA;EACE,0DAA0D;AAC5D;AACA;EACE,2BAA2B;AAC7B;AACA;;EAEE,2BAA2B;AAC7B;AACA;EACE,UAAU;AACZ",file:"CommonDialog.vue",sourcesContent:[".common-dialog /deep/ .el-dialog__body {\n overflow-y: auto;\n}\n.common-dialog /deep/ .el-dialog__body > div {\n height: calc(100% - 25px);\n overflow-y: auto;\n}\n.common-dialog /deep/ .is-fullscreen .el-dialog__body {\n height: calc(100% - 135px);\n}\n.common-dialog.common-dialog__body--scroll /deep/ .el-dialog__body {\n max-height: calc(100vh - 300px);\n}\n.common-dialog.common-dialog__body--scroll.view-only /deep/ .el-dialog__body,\n.common-dialog.common-dialog__body--scroll.no-footer /deep/ .el-dialog__body {\n max-height: calc(100vh - 200px);\n}\n.common-dialog.fix-height {\n /* stylelint-disable-next-line no-descending-specificity */\n}\n.common-dialog.fix-height /deep/ .el-dialog__body {\n height: calc(100vh - 300px);\n}\n.common-dialog.fix-height.view-only /deep/ .el-dialog__body,\n.common-dialog.fix-height.no-footer /deep/ .el-dialog__body {\n height: calc(100vh - 200px);\n}\n.common-dialog.view-only /deep/ .el-dialog__footer {\n padding: 0;\n}\n"]},media:void 0})}),H,"data-v-7fe9e791",false,undefined,!1,K,void 0,void 0);const M={name:"DictTag",props:{options:{type:Array,default:null},value:[Number,String,Array]},computed:{values(){return null!==this.value&&void 0!==this.value?Array.isArray(this.value)?this.value:[String(this.value)]:[]}}};var ee=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._l(e.options,(function(t,o){return[e.values.includes(t.value)?["default"==t.raw.listClass||""==t.raw.listClass?n("span",{key:t.value,class:t.raw.cssClass,attrs:{index:o}},[e._v(e._s(t.label))]):n("el-tag",{key:t.value,class:t.raw.cssClass,attrs:{"disable-transitions":!0,index:o,type:"primary"==t.raw.listClass?"":t.raw.listClass}},[e._v("\n "+e._s(t.label)+"\n ")])]:e._e()]}))],2)};ee._withStripped=!0;const te=z({render:ee,staticRenderFns:[]},(function(e){e&&e("data-v-2c52f168_0",{source:".el-tag + .el-tag[data-v-2c52f168] {\n margin-left: 10px;\n}\n",map:{version:3,sources:["DictTag.vue"],names:[],mappings:"AAAA;EACE,iBAAiB;AACnB",file:"DictTag.vue",sourcesContent:[".el-tag + .el-tag {\n margin-left: 10px;\n}\n"]},media:void 0})}),M,"data-v-2c52f168",false,undefined,!1,K,void 0,void 0);const ne={name:"RightToolbar",props:{hasSearch:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},backPathName:{type:String,default:""}},data:()=>({value:[],title:"显示/隐藏",open:!1}),created(){Object.keys(this.columns).forEach((e=>{!1===this.columns[e].visible&&this.value.push(parseInt(e,10))}))},methods:{toggleSearch(){this.$emit("update:showSearch",!this.showSearch)},refresh(){this.$emit("queryTable")},dataChange(e){Object.keys(this.columns).forEach((t=>{const n=this.columns[t].key;this.columns[t].visible=!e.includes(n)}))},showColumn(){this.open=!0},goBack(){this.$listeners.back?this.$emit("back"):this.$tabClose(this.backPathName)}}};var oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"top-right-btn"},[n("el-row",[e.hasSearch?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.showSearch?"隐藏搜索":"显示搜索",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-search"},on:{click:function(t){return e.toggleSearch()}}})],1):e._e(),e._v(" "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"刷新",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-refresh"},on:{click:function(t){return e.refresh()}}})],1),e._v(" "),e.columns.length>0?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"显隐列",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-menu"},on:{click:function(t){return e.showColumn()}}})],1):e._e(),e._v(" "),e.backPathName||e.$listeners.back?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"返回",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-back"},on:{click:function(t){return e.goBack()}}})],1):e._e()],1),e._v(" "),e.columns.length>0?n("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.title,visible:e.open,"append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[n("el-transfer",{attrs:{titles:["显示","隐藏"],data:e.columns},on:{change:e.dataChange},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1):e._e()],1)};oe._withStripped=!0;const ie=z({render:oe,staticRenderFns:[]},(function(e){e&&e("data-v-7d11014a_0",{source:"[data-v-7d11014a] .el-transfer__button {\n border-radius: 50%;\n padding: 12px;\n display: block;\n margin-left: 0px;\n}\n[data-v-7d11014a] .el-transfer__button:first-child {\n margin-bottom: 10px;\n}\n.top-right-btn[data-v-7d11014a] {\n flex: 1;\n display: flex;\n justify-content: flex-end;\n}\n.top-right-btn[data-v-7d11014a] .el-button--mini.is-circle {\n width: 40px;\n box-sizing: border-box;\n}\n",map:{version:3,sources:["RightToolbar.vue"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,aAAa;EACb,cAAc;EACd,gBAAgB;AAClB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,OAAO;EACP,aAAa;EACb,yBAAyB;AAC3B;AACA;EACE,WAAW;EACX,sBAAsB;AACxB",file:"RightToolbar.vue",sourcesContent:["::v-deep .el-transfer__button {\n border-radius: 50%;\n padding: 12px;\n display: block;\n margin-left: 0px;\n}\n::v-deep .el-transfer__button:first-child {\n margin-bottom: 10px;\n}\n.top-right-btn {\n flex: 1;\n display: flex;\n justify-content: flex-end;\n}\n.top-right-btn ::v-deep .el-button--mini.is-circle {\n width: 40px;\n box-sizing: border-box;\n}\n"]},media:void 0})}),ne,"data-v-7d11014a",false,undefined,!1,K,void 0,void 0);function re(e){return e&&(e.Ctor.options.name||e.tag)}const se={type:[String,RegExp,Array],default:""};function ae(e,t){if(e.length){const n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function le(e){return null!=e}const ce=Object.prototype.toString;function de(e,t,n,o){const i=e[t];!i||o&&i.tag===o.tag||i.componentInstance.$destroy(),e[t]=null,ae(n,t)}function ue(e,t){const n=e.cache,o=e.keys,i=e._vnode;Object.keys(n).forEach((e=>{const r=n[e];if(r){const s=r.name;s&&!t(s)&&de(n,e,o,i)}}))}function he(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===ce.call(n)&&e.test(t));var n}var me={name:"BytzKeepAlive",abstract:!0,props:{needCache:{type:Boolean,default:!1},include:se,exclude:se,max:[String,Number],isRefreshing:{type:Boolean,default:!1},noDestroyPathArray:Array},watch:{noDestroyPathArray:{handler:function(e){Object.keys(this.cache).forEach((t=>{t.includes("transition")||!this.cache[t]||e.includes(this.cache[t].path)||de(this.cache,t,this.keys)}))}}},methods:{cacheVNode(){const e=this.cache,t=this.keys,n=this.vnodeToCache,o=this.keyToCache;if(n){const i=n.tag,r=n.componentInstance;r.__keepAlivePath=this.$route.path;const s=n.componentOptions;e[o]={name:re(s),tag:i,componentInstance:r,fullPath:this.$route.fullPath,path:this.$route.path,key:o},t.push(o),this.max&&t.length>window.parseInt(this.max)&&de(e,t[0],t,this._vnode),this.vnodeToCache=null}}},created(){this.cache=Object.create(null),this.keys=[]},destroyed(){for(const e in this.cache)de(this.cache,e,this.keys)},mounted(){this.cacheVNode(),this.$watch("include",(e=>{ue(this,(t=>he(e,t)))})),this.$watch("exclude",(e=>{ue(this,(t=>!he(e,t)))}))},updated(){this.cacheVNode()},render(){const e=this.$slots.default,t=function(e){if(Array.isArray(e))for(let n=0;n<e.length;n++){const o=e[n];if(le(o)&&(le(o.componentOptions)||(t=o).isComment&&t.asyncFactory))return o}var t}(e);if(!this.needCache)return t;const n=t&&t.componentOptions;if(n){const e=re(n),o=this.include,i=this.exclude;if(o&&(!e||!he(o,e))||i&&e&&he(i,e))return t;const r=this.cache,s=this.keys,a=null==t.key?n.Ctor.cid+(n.tag?`::${n.tag}`:""):t.key;r[a]?(t.componentInstance=r[a].componentInstance,ae(s,a),s.push(a)):(this.vnodeToCache=t,this.keyToCache=a),t.data.keepAlive=!0}return t?.componentInstance&&t.componentInstance.__keepAlivePath===this.$route.path&&t?.componentInstance?.loadData&&t.componentInstance.loadData(),t||e&&e[0]}};function pe(e){const t=new u;return t.setPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGqR2QqERJkFRCD/8i/9\nnDioWOq4xyDzIgWtSJWMmpsOQIC20rxdteVPa6UgJHZm3matHirRkixqFIceXjIf\nK1UZQp8+ivsVqmZS3uCSqVXxHq/Y8aKG3h2ds2b3ddViffpKqFJZOL9Q0zlzYofy\nuwqd5ZnH+ESPUzVYV9qfUF8f9DlLIW2LYrbnAFWGN+OQ3yovsvMxxSTV9V/Yrb6Z\nNtfqiNJkHCPCh01g6WaP1ko1WjUTdFGisa06UJnDHU9Kq/V8AoI3umt2jSnWneO3\nhzkWI1d87Cmyt90kgU+N8f6ld1GFOvxaNW+nuq/e/RJff18tO3V+04m9uzBVkJmT\n+wIDAQAB"),t.encrypt(e)}function fe(e){const t=new u;return t.setPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8apHZCoREmQVE\nIP/yL/2cOKhY6rjHIPMiBa1IlYyamw5AgLbSvF215U9rpSAkdmbeZq0eKtGSLGoU\nhx5eMh8rVRlCnz6K+xWqZlLe4JKpVfEer9jxoobeHZ2zZvd11WJ9+kqoUlk4v1DT\nOXNih/K7Cp3lmcf4RI9TNVhX2p9QXx/0OUshbYtitucAVYY345DfKi+y8zHFJNX1\nX9itvpk21+qI0mQcI8KHTWDpZo/WSjVaNRN0UaKxrTpQmcMdT0qr9XwCgje6a3aN\nKdad47eHORYjV3zsKbK33SSBT43x/qV3UYU6/Fo1b6e6r979El9/Xy07dX7Tib27\nMFWQmZP7AgMBAAECggEAK3GLFXdGTibWPwI44ZfNKyMpNe9REaD4ToTukojg9ZkA\n7UCAZxDFrrYj3NcjFSUzzN3x1r3aupCBGSCakO+Pnkct3t2m5xbDxRl4zCkNx/un\n8AJtzDFEVZyQixgXwNSltBRs+GicZ+g886cQgsyD3Dqzc4hEwmrUfUQUjZU8HKSc\nfDacNma9XFJvJt2IKLWlQh74TIWBJos5oXHgKR7WhLAfTUEe8nI8GgER4c2kVOvO\nSPUWpC/Zj0h7knAzf+R10xLzgeIK8aYG1k3xOU1A8jiiw0+fWbFa3/JgRpQkVTKq\nN0t93GI+qaNuxPgj1lylDkj103dkD7+XWVFazssQIQKBgQDz6Kz0HX6NopgB3Y2Y\nJqVyGgTogC3mvQZJ0TEYaq2fulnBwtXIhHVuGk8Jh9Bo5QudvuE/oY8sGiUKRlNZ\nWkFeyDNKUdxyFl7p2HO/rnYQeJBRsl2zkCs2FOjqcTmRgOzqrKxBXDjON+4FXR1x\nHZma6btTd+1JAfpgMmam8+4rsQKBgQDFwapi9XMWKW5o1RxHwCGKb58/lVanrtC7\nqtLROGSwCW7/OhhjWs7MBvyu2e28gfAVLf+4fgchcVQhJmsb6kHZ8JZBZb2g2Xt9\nb6mLSLNt+VZUzI3Kn+ZaU0Zavk2bG69lNG6XyFTvsRl44usjGjui+WPg3zXiLVHq\n6TkEp4OhawKBgQDC9wAY+eKJEKj1BMYEExA4jrfRqXQHdp0qMD9QRyWWAf1xNm5w\npADCC+GVuqxKzJtmcofWtyuckyF8fw5s5ApQ2zK0e4782wjvX4fWdnwFWnnx8+OW\nfu0rg7dSf0MHHclDJNdkP3Vg0bA/NVkta/22qJKGe9x+eUhL0L3hQiblYQKBgE4n\nF1s8fVsIzKWJcz+34ol/S4QpVLG4GK3R+LbOfpxDXiZnozPAs3FWYY4IejfBckws\nfZ8/zzmcPA9Ny46gqZ2jwv3dY2+qA2+zLWHqPV785u1kWbT2NGcF+gvqoWjnLA3n\nBr3dYhPH/bUUmLCqsV7bCGnaTMUx++nGec4pFZA5AoGAH9+boczQhGp9Bjt5XoVr\nC6FqHwkjTY3jR4/7B77HDj/ShGHnptmwGcyiDRSuScUyvIPxs2OnbyPCV8l3SKx/\nRTL5qvDZvWmHROfRncHVjIxM/mXZZRtEGKcJcaU4azIzygC2c4szWXihY16RWsKH\nNYB7uG1uA4/+4+g++Qval54="),t.decrypt(e)}function ge(e){return function(t){const n=new u;return n.setPublicKey(e||"MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsr9kM6vJHJb8KgWhY6xVaYCkLEr+QKeuYUoZ2uX3+t4lzbxdf1JeJ2jUs26jWWgkpe3W1UHxXUaapyTG9sFbECAwEAAQ=="),n.encrypt(t)}}let Ae,ve=0;const be=h((()=>{Ae&&Ae.close(),Ae=null}),300);function ye(){ve-=1,ve=Math.max(ve,0),0===ve&&be()}function Ce(e,t,o,s,a,l,c){const d=r.create({baseURL:o,timeout:6e4,withCredentials:!0});return d.interceptors.request.use((e=>{const n=!1===(e.headers||{}).isToken;if(a()&&!n&&(e.headers.Authorization=`Bearer ${a()}`),e.headers["App-Id"]=c,"get"===e.method&&e.params){let n=`${e.url}?${t(e.params)}`;n=n.slice(0,-1),e.params={},e.url=n}var o;return!1!==e.headers.showLoading&&(o=e.headers.loadingTarget,0!==ve||Ae||(Ae=i.service({lock:!0,text:"数据加载中...",background:"rgba(0, 0, 0, 0.5)",target:o||"body"})),ve+=1),e}),(e=>{ye(),Promise.reject(e)})),d.interceptors.response.use((t=>{t.headers.ntk&&e.commit("user/setToken",t.headers.ntk);const n=t.config;return n.returnAll||"blob"===t.request.responseType||"arraybuffer"===t.request.responseType?(ye(),n.returnAll?t:t.data):200===t.data.code||200===t.status?(!1!==t.config.headers.showLoading&&ye(),s()&&!1!==t.config.headers.showLoading&&(ve=1,ye()),t.data):(ye(),t.data)}),(t=>{const{config:o}=t;if(ye(),!o||!o.retry)return 401===t.response.data.code?n.confirm("登录状态已过期,您可以继续留在该页面,或者重新登录","系统提示",{confirmButtonText:"重新登录",cancelButtonText:"取消",customClass:"token-expired-alert-box",type:"warning"}).then((()=>{l(),e.dispatch("user/logout"),e.dispatch("permission/restore")})):n.alert(t.response?.data?.errorInfo?.message||t.response?.data?.msg||t.response?.statusText||"接口报错","系统提示",{type:"error",customClass:"api-error-alert-box"}),Promise.reject(t);if(o.retryCount=o.retryCount||0,o.retryCount>=o.retry)return Promise.reject(t);o.retryCount+=1;return new Promise((e=>{setTimeout((()=>{e({})}),o.retryDelay||1)})).then((()=>d(o)))})),d.interceptors.retry=3,d}let _e=null;async function xe({NProgress:e,getStore:t,to:n,from:o,next:i}){if(function(e,t){return!!e.query.access_token&&("/appCallback"===e.path?(t(),!0):(t({path:"/appCallback",query:{...e.query,redirect:e.path}}),!0))}(n,i))return;const r=t();if(e.start(),"/login"===n.path&&Object.prototype.hasOwnProperty.call(n.query,"srid"))return i(),void e.done();if(0===n.path.indexOf("/iamCallback")||"/logout"===n.path||"/appCallback"===n.path)i();else if(Object.prototype.hasOwnProperty.call(n.query,"srid"))await r.commit("user/removeToken"),i({path:"/login",query:{...n.query}});else{if(r.getters["user/token"]){const t=r.getters["user/roles"];if(t&&t.length>0)"/login"===n.path||"/"===n.path||"/404"===n.path&&"/404"!==_e?(i(n.query.redirect||_e),e.done()):i();else try{"/login"!==o.path?await r.dispatch("user/getUserInfo",!0):await r.dispatch("user/getUserInfo",!1),await r.dispatch("permission/initRoutes"),_e=r.getters["permission/defaultTo"],i({...n})}catch(t){await r.commit("user/removeToken"),i(`/login?redirect=${n.fullPath}`),e.done()}}else-1!==r.getters["permission/whiteListRouters"].indexOf(n.path)?i():"/"===n.path&&_e?i(_e):i(`/login?redirect=${n.fullPath}`),e.done()}}const we={data:()=>({items:[]}),created(){this.$on("dict-ready",(()=>{this.items.forEach((e=>{e.dict&&this.dict?.type[e.dict]&&this.$set(e,"options",this.dict.type[e.dict].map((e=>({label:e.label,value:e.value}))))}))}))}},ke=["webkit","moz","ms","o"];function Ee(){if("hidden"in document)return"hidden";for(let e=0;e<ke.length;e++)if(`${ke[e]}Hidden`in document)return`${ke[e]}Hidden`;return null}let Be=null;const Te=Ee(),Se=function(e=Ee()){return`${e.replace(/[H|h]idden/,"")}visibilitychange`}(Te);let $e=null;var Ie={computed:{needRefreshToken:function(){return window.self===window.top}},watch:{"$route.path":{handler:function(e){this.needRefreshToken&&("/login"===e&&this.clearTokenInfo(),this.needTime(e)?Be||this.startTiming():this.stopTiming())},immediate:!0}},mounted(){this.handleWindowTab()},beforeDestroy(){this.stopTiming(),document.removeEventListener(Se,this.windowTabActive,!1)},methods:{needTime:function(e=this.$route.path){return!["/login","/"].includes(e)},handleWindowTab:function(){this.needRefreshToken&&Te&&document.addEventListener(Se,this.windowTabActive,!1)},windowTabActive:function(){if("visible"!==document[function(){if("visibilityState"in document)return"visibilityState";for(let e=0;e<ke.length;e++)if(`${ke[e]}VisibilityState`in document)return`${ke[e]}VisibilityState`;return null}()])return!1;this.refreshToken().then((()=>{this.needTime()&&this.startTiming()})).catch()},getRequestData:function(){const e={token:this.getToken()},t=this.$store.getters["user/userInfo"];return t?.userName&&(e.username=t.userName,this.localIsStoreUser()||this.setLocalToStoreToken()),this.$route.query.srid&&(e.srid=this.$route.query.srid),e},refreshToken:function(){return this.getToken()?this.$request.post("/auth/checkAndRefreshToken"+(this.$route.query.srid?`?srid=${this.$route.query.srid}`:""),{...this.getRequestData()},{headers:{showLoading:!1}}).then(this.handleRequestResult):(this.stopTiming(),Promise.reject())},handleRequestResult:function({data:e}){if(e.tokenInvalid)this.reloadWindow(e.message||"token 无效","确定",(()=>{this.$route.push("/login")}));else if(e.redirectUrl)this.reloadWindow("已在其他页面登录,页面将重新载入","确定",(()=>{window.location.href=this.setComplateRedirectUrl(e)}));else if(e.refreshTokenExpired){const e=this.refreshTokenData.proxy[this.refreshTokenData.env].APP_ID;!this.localIsStoreUser()||e&&"$system$"!==e?(this.$store.commit("user/removeToken"),this.reloadWindow("已在其它页面登出","重新登录")):this.reloadWindow("已在其他页面重新登录,页面将重新载入")}else e.tokenExpired?"/login"!==this.$route.path?this.reloadWindow("登录状态已过期","重新登录",(()=>{this.$store.dispatch("user/logout")})):this.$store.commit("user/removeToken"):e.userChanged?"/login"===this.$route.path?this.reloadWindow("已在其他页面登录,页面将重新载入","确定",(()=>{this.setLocalToStoreToken(),this.$router.push(this.$route.query.redirect||"/homePage/index")})):this.reloadWindow(`登录用户已改变【新用户为:${e.newUsername}】,页面将重新载入`):e.tenantChanged?(this.$store.commit("user/setToken",e.newToken),this.reloadWindow("租户已改变,页面将重新载入")):e.newToken&&this.$store.commit("user/setToken",e.newToken)},reloadWindow:function(e,t="确定",n=(()=>window.location.reload())){const o=document.querySelector(".auto-refresh-token-alert-box");o?this.refreshTip(o,e,t):this.$alert(e,"系统提示",{type:"warning",showClose:!1,confirmButtonText:t,closeOnClickModal:!1,customClass:"auto-refresh-token-alert-box",callback:()=>{($e||n)()}})},refreshTip:function(e,t,n,o){e.querySelector(".el-message-box__message").innerHTML=`<p>${t}</p>`,e.querySelector(".el-button").innerHTML=`<span>${n}</span>`,$e=o},startTiming:function(){Be&&clearInterval(Be),Be=setInterval((()=>{this.refreshToken()}),3e5)},stopTiming:function(){Be&&(clearInterval(Be),Be=null)},clearTokenInfo:function(){this.$store.commit("user/removeToken"),this.$store.commit("user/setUserInfo")},getToken:function(){return this.$store.getters["user/token"]||localStorage.getItem(this.refreshTokenData.TOKEN_NAME)},setComplateRedirectUrl:function(e){let t;return t="development"===this.refreshTokenData.env?`${window.location.origin}${this.refreshTokenData.proxy[this.refreshTokenData.env].API}`:this.refreshTokenData.proxy[this.refreshTokenData.env].API,t=`${t}/auth${e.redirectUrl}`,t},localIsStoreUser:function(){const e=localStorage.getItem(this.refreshTokenData.USER_NAME);return e&&this.$store.getters["user/userInfo"]?.userName===e},setLocalToStoreToken:function(){this.$store.commit("user/setToken",localStorage.getItem(this.refreshTokenData.TOKEN_NAME))}}},qe={install:function(e,t){e.use(m,t),e.use(E,t),e.use(W,t),e.use(F,t),e.component("FormSection",J),e.component("DictTag",te),e.component("CommonDialog",G),e.component("RightToolbar",ie),e.use(P,t)}};export{me as BytzKeepAlive,we as DictArrayAddOptionsMixin,fe as decrypt,qe as default,pe as encrypt,xe as getPermission,Ce as getRequest,ge as processEncrypt,Ie as refreshTokenMixin};
|
|
1
|
+
import e from"vue";import{Message as t,MessageBox as n,Notification as o,Loading as i}from"element-ui";import r from"axios";import{saveAs as s}from"file-saver";import a from"@/utils/errorCode";import{blobValidate as l}from"@/utils/commonSettings";import c from"@/config/host";import d from"clipboard";import u from"jsencrypt/bin/jsencrypt";import h from"lodash/debounce";var m={install:function(e,{componentPath:t,store:n}){e.prototype.$changePage=function(e,o={},i={}){const r=n.getters["permission/menuPath"][t[e]];r?this.$router.push({name:r,params:o,query:i}):this.$message.error("您没有该页面的权限!")},e.prototype.$tabClose=function(e,t,o){window.opener?window.close():e?(n.commit("tabRouter/subtractCurrentTabRouter",{path:this.$route.path,routerIdx:n.getters["tabRouter/tabRouterList"].findIndex((e=>e.path===this.$route.path))}),this.$changePage(e,t,o)):this.$router.go(-1)}}};function p(e,t){for(const n in t)try{t[n].constructor===Object?e[n]=p(e[n],t[n]):e[n]=t[n]}catch(o){e[n]=t[n]}return e}class f{constructor(e,t,n){this.label=e,this.value=t,this.raw=n}}const g=["label","name","title"],A=["value","id","uid","key"];function v(e,...t){return t.find((t=>Object.prototype.hasOwnProperty.call(e,t)))}const b={metas:{"*":{request:()=>Promise.resolve([]),responseConverter:function(e,t){const n=e.content instanceof Array?e.content:e;return void 0===n?(console.error(`no dict data of "${t.type}" found in the response`),[]):n.map((e=>function(e,t){const n=v(e,t.labelField,...g),o=v(e,t.valueField,...A);return new f(e[n],e[o],e)}(e,t)))},labelField:"label",valueField:"value"}},DEFAULT_LABEL_FIELDS:g,DEFAULT_VALUE_FIELDS:A};function y(e){p(b,e)}class C{constructor(e){this.type=e.type,this.request=e.request,this.responseConverter=e.responseConverter,this.labelField=e.labelField,this.valueField=e.valueField,this.lazy=!0===e.lazy}}C.parse=function(e){let t=null;return"string"==typeof e?(t=b.metas[e]||{},t.type=e):"object"==typeof e&&(t=e),t=p(b.metas["*"],t),new C(t)};const _={types:[]};function x(t,n){return n.request(n).then((o=>{const{type:i}=n;let r=n.responseConverter(o,n);return r instanceof Array?r.filter((e=>e instanceof f)).length!==r.length&&(console.error("the type of elements in dicts must be DictData"),r=[]):(console.error("the return of responseConverter must be Array.<DictData>"),r=[]),t.type[i].splice(0,Number.MAX_SAFE_INTEGER,...r),r.forEach((n=>{e.set(t.label[i],n.value,n.label)})),r}))}class w{constructor(){this.owner=null,this.label={},this.type={}}init(t){t instanceof Array&&(t={types:t});const n=p(_,t);if(void 0===n.types)throw new Error("need dict types");const o=[];return this._dictMetas=n.types.map((e=>C.parse(e))),this._dictMetas.forEach((t=>{const{type:n}=t;e.set(this.label,n,{}),e.set(this.type,n,[]),t.lazy||o.push(x(this,t))})),Promise.all(o)}reloadDict(e){const t=this._dictMetas.find((t=>t.type===e));return void 0===t?Promise.reject():x(this,t)}}function k(e,t){y(t),e.mixin({data(){if(void 0===this.$options||void 0===this.$options.dicts||null===this.$options.dicts)return{};const e=new w;return e.owner=this,{dict:e}},created(){this.dict instanceof w&&(t.onCreated?.(this.dict),this.dict.init(this.$options.dicts).then((()=>{t.onReady?.(this.dict),this.$nextTick((()=>{this.$emit("dict-ready",this.dict),this.$options.methods&&this.$options.methods.onDictReady instanceof Function&&this.$options.methods.onDictReady.call(this,this.dict)}))})))}})}var E={install:function(e,{getDicts:t}){e.use(k,{metas:{"*":{labelField:"dictLabel",valueField:"dictValue",request:e=>t(e.type).then((e=>e.data))}}})}};function B(e,t){const n=t.getters&&t.getters["user/permissions"];return!!(e&&e.length>0)&&n.some((t=>"*:*:*"===t||t===e))}function T(e,t){const n=t.getters&&t.getters["user/permissions"];return!!(e&&e.length>0)&&n.some((t=>"admin"===t||t===e))}var S={session:{set(e,t){sessionStorage&&null!=e&&null!=t&&sessionStorage.setItem(e,t)},get:e=>sessionStorage?null==e?null:sessionStorage.getItem(e):null,setJSON(e,t){null!=t&&this.set(e,JSON.stringify(t))},getJSON(e){const t=this.get(e);if(null!=t)return JSON.parse(t)},remove(e){sessionStorage.removeItem(e)}},local:{set(e,t){localStorage&&null!=e&&null!=t&&localStorage.setItem(e,t)},get:e=>localStorage?null==e?null:localStorage.getItem(e):null,setJSON(e,t){null!=t&&this.set(e,JSON.stringify(t))},getJSON(e){const t=this.get(e);if(null!=t)return JSON.parse(t)},remove(e){localStorage.removeItem(e)}}};let $;var I={msg(e){t.info(e)},msgError(e){t.error(e)},msgSuccess(e){t.success(e)},msgWarning(e){t.warning(e)},alert(e){n.alert(e,"系统提示")},alertError(e){n.alert(e,"系统提示",{type:"error"})},alertSuccess(e){n.alert(e,"系统提示",{type:"success"})},alertWarning(e){n.alert(e,"系统提示",{type:"warning"})},notify(e){o.info(e)},notifyError(e){o.error(e)},notifySuccess(e){o.success(e)},notifyWarning(e){o.warning(e)},confirm:e=>n.confirm(e,"系统提示",{closeOnClickModal:!1,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),prompt:e=>n.prompt(e,"系统提示",{closeOnClickModal:!1,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),loading(e){$=i.service({lock:!0,text:e,spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"})},closeLoading(){$.close()}};const q=c.development.API;var R={zip(e,t){r({method:"get",myUrl:q+e,responseType:"blob",headers:{Authorization:`Bearer ${this.$store.getters["user/token"]}`}}).then((async e=>{if(await l(e.data)){const n=new Blob([e.data],{type:"application/zip"});this.saveAs(n,t)}else this.printErrMsg(e.data)}))},saveAs(e,t,n){s(e,t,n)},async printErrMsg(e){const n=await e.text(),o=JSON.parse(n),i=a[o.code]||o.msg||a.default;t.error(i)}},W={install(e,{store:t}){e.prototype.$auth=function(e){return{hasPermi:e=>B(e),hasPermiOr:t=>t.some((t=>B(t,e))),hasPermiAnd:t=>t.every((t=>B(t,e))),hasRole:e=>T(e),hasRoleOr:t=>t.some((t=>T(t,e))),hasRoleAnd:t=>t.every((t=>T(t,e)))}}(t),e.prototype.$cache=S,e.prototype.$modal=I,e.prototype.$download=R}};var D={bind(e,t){const{value:n}=t;if(!1===n)return;const o=e.querySelector(".el-dialog__header"),i=e.querySelector(".el-dialog");o.style.cursor="move";const r=i.currentStyle||window.getComputedStyle(i,null);i.style.position="absolute",i.style.marginTop=0;let{width:s}=i.style;s=s.includes("%")?+document.body.clientWidth*(+s.replace(/%/g,"")/100):+s.replace(/\px/g,""),i.style.left=(document.body.clientWidth-s)/2+"px",o.onmousedown=e=>{const t=e.clientX-o.offsetLeft,n=e.clientY-o.offsetTop;let s,a;r.left.includes("%")?(s=+document.body.clientWidth*(+r.left.replace(/%/g,"")/100),a=+document.body.clientHeight*(+r.top.replace(/%/g,"")/100)):(s=+r.left.replace(/\px/g,""),a=+r.top.replace(/\px/g,"")),document.onmousemove=function(e){const o=e.clientX-t,r=e.clientY-n,l=o+s,c=r+a;i.style.left=`${l}px`,i.style.top=`${c}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}}},O={bind(e){const t=e.querySelector(".el-dialog"),n=document.createElement("div");n.style="width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;",n.addEventListener("mousedown",(n=>{const o=n.clientX-e.offsetLeft,i=t.offsetWidth;document.onmousemove=function(e){e.preventDefault();const n=e.clientX-o;t.style.width=`${i+n}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}),!1),t.appendChild(n)}},N={bind(e){const t=e.querySelector(".el-dialog"),n=document.createElement("div");n.style="width: 6px; background: inherit; height: 10px; position: absolute; right: 0; bottom: 0; margin: auto; z-index: 1; cursor: nwse-resize;",n.addEventListener("mousedown",(n=>{const o=n.clientX-e.offsetLeft,i=n.clientY-e.offsetTop,r=t.offsetWidth,s=t.offsetHeight;document.onmousemove=function(e){e.preventDefault();const n=e.clientX-o,a=e.clientY-i;t.style.width=`${r+n}px`,t.style.height=`${s+a}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}),!1),t.appendChild(n)}},j={bind(e,t){switch(t.arg){case"success":e._vClipBoard_success=t.value;break;case"error":e._vClipBoard_error=t.value;break;default:{const n=new d(e,{text:()=>t.value,action:()=>"cut"===t.arg?"cut":"copy"});n.on("success",(t=>{const n=e._vClipBoard_success;n?.(t)})),n.on("error",(t=>{const n=e._vClipBoard_error;n?.(t)})),e._vClipBoard=n}}},update(e,t){"success"===t.arg?e._vClipBoard_success=t.value:"error"===t.arg?e._vClipBoard_error=t.value:(e._vClipBoard.text=function(){return t.value},e._vClipBoard.action=()=>"cut"===t.arg?"cut":"copy")},unbind(e,t){e._vClipboard&&("success"===t.arg?delete e._vClipBoard_success:"error"===t.arg?delete e._vClipBoard_error:(e._vClipBoard.destroy(),delete e._vClipBoard))}};const F=function(e,{store:t}){e.directive("hasRole",function(e){return{inserted(t,n){const{value:o}=n,i=e.getters&&e.getters["user/userRoles"];if(!(o&&o instanceof Array&&o.length>0))throw new Error('请设置角色权限标签值"');{const e=o;i.some((t=>"admin"===t||e.includes(t)))||t.parentNode?.removeChild(t)}}}}(t)),e.directive("hasPermi",function(e){return{inserted(t,n){const{value:o}=n,i=e.getters&&e.getters["user/permissions"];if(!(o&&o instanceof Array&&o.length>0))throw new Error("请设置操作权限标签值");{const e=o,n=i.some((t=>"*:*:*"===t||e.includes(t)));n||t.parentNode?.removeChild(t)}}}}(t)),e.directive("clipboard",j),e.directive("dialogDrag",D),e.directive("dialogDragWidth",O),e.directive("dialogDragHeight",N)};var P={install(e,t){var n;e.prototype.$jumpToApp=(n=t.store,function(e){window.open(((e,t,n)=>(e.includes("?")?e+=`&${t}=${n}`:e+=`?${t}=${n}`,e))(e,"access_token",n.getters["user/token"]))})}},U={name:"FormSection",props:{action:{type:String,default:""},loading:{type:Boolean,default:!1},cancelText:{type:String,default:"取消"},saveText:{type:String,default:"保存"},submitText:{type:String,default:"提交"},border:{type:Boolean,default:!0},jumpPath:{type:String,default:""},hideFooter:{type:Boolean,default:!1}},data:()=>({loadingText:"玩命加载中请稍等...."}),computed:{isView(){return"View"===this.action}},methods:{handleCancel(){this.$listeners.cancel?this.$emit("cancel"):this.$tabClose(this.jumpPath)}}};function z(e,t,n,o,i,r,s,a,l,c){"boolean"!=typeof s&&(l=a,a=s,s=!1);const d="function"==typeof n?n.options:n;let u;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),o&&(d._scopeId=o),r?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(r)},d._ssrRegister=u):t&&(u=s?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),u)if(d.functional){const e=d.render;d.render=function(t,n){return u.call(n),e(t,n)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,u):[u]}return n}const L="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function K(e){return(e,t)=>function(e,t){const n=L?t.media||"default":e,o=Y[n]||(Y[n]={ids:new Set,styles:[]});if(!o.ids.has(e)){o.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),o.element||(o.element=document.createElement("style"),o.element.type="text/css",t.media&&o.element.setAttribute("media",t.media),void 0===V&&(V=document.head||document.getElementsByTagName("head")[0]),V.appendChild(o.element)),"styleSheet"in o.element)o.styles.push(n),o.element.styleSheet.cssText=o.styles.filter(Boolean).join("\n");else{const e=o.ids.size-1,t=document.createTextNode(n),i=o.element.childNodes;i[e]&&o.element.removeChild(i[e]),i.length?o.element.insertBefore(t,i[e]):o.element.appendChild(t)}}}(e,t)}let V;const Y={};const Q=U;var X=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"form-section",class:{"form-section__view-only":e.isView},attrs:{"element-loading-text":e.loadingText}},[n("el-card",{staticClass:"box-margin",class:{"form-view-hide-star":e.isView,"no-border":!e.border}},[n("div",{staticClass:"form-section__content"},[e._t("default")],2),e._v(" "),!e.hideFooter||e.$slots.btn?n("el-row",{staticClass:"submit-btns-box"},[n("div",{staticClass:"border-top"},[e.cancelText?n("el-button",{attrs:{icon:"el-icon-close"},on:{click:e.handleCancel}},[e._v(e._s(e.cancelText))]):e._e(),e._v(" "),e._t("btn"),e._v(" "),e.isView?e._e():[e.saveText?n("el-button",{attrs:{icon:"el-icon-check",type:"primary"},on:{click:function(t){return e.$emit("save","save")}}},[e._v(e._s(e.saveText))]):e._e(),e._v(" "),e.submitText&&"AuditEdit"!==e.action?n("el-button",{attrs:{icon:"el-icon-check",type:"primary"},on:{click:function(t){return e.$emit("submit","submit")}}},[e._v(e._s(e.submitText))]):e._e()]],2)]):e._e()],1)],1)};X._withStripped=!0;const J=z({render:X,staticRenderFns:[]},(function(e){e&&e("data-v-c2cbdf04_0",{source:'.submit-btns-box[data-v-c2cbdf04] {\n background: white;\n position: absolute;\n right: 0;\n bottom: 0;\n box-sizing: border-box;\n z-index: 99;\n}\n.border-top[data-v-c2cbdf04] {\n display: flex;\n flex: 1;\n justify-content: flex-end;\n width: 100%;\n}\n.form-section__view-only[data-v-c2cbdf04] .el-form-item__label::before {\n display: none;\n}\n.form-section__view-only[data-v-c2cbdf04] .form-table.el-table .el-form-item.is-required {\n padding-left: 0;\n}\n.form-section__view-only[data-v-c2cbdf04] .form-table.el-table .el-form-item.is-required::before {\n display: none;\n}\n.form-section__view-only[data-v-c2cbdf04] .form-table.el-table .el-form-item span.view-item {\n margin-left: 0;\n margin-top: 0;\n padding: 0 15px;\n}\n.form-section__view-only[data-v-c2cbdf04] th div.table-columns-required::before {\n display: none;\n}\n.form-section[data-v-c2cbdf04] > .el-card {\n height: 100%;\n}\n.form-section[data-v-c2cbdf04] > .el-card .el-card__body {\n height: 100%;\n padding: 20px;\n padding-bottom: 100px;\n}\n[data-v-c2cbdf04] .el-card.box-margin {\n position: relative;\n}\n[data-v-c2cbdf04] .el-card.box-margin.no-border {\n border: none;\n}\n[data-v-c2cbdf04] .el-card.box-margin .form-view-hide-star {\n margin: 0;\n}\n[data-v-c2cbdf04] .el-card.box-margin .form-section__content {\n height: 100%;\n overflow-y: auto;\n}\n.form-section[data-v-c2cbdf04] {\n width: 100%;\n height: 100%;\n position: relative;\n}\n.form-section[data-v-c2cbdf04]::before {\n content: "";\n position: absolute;\n border-top: 1px solid #e9e9e9;\n bottom: 2px;\n width: 100%;\n left: 50%;\n transform: translate(-50%);\n height: 90px;\n z-index: 99;\n background: white;\n}\n:root[theme-mode="dark"] .border-top[data-v-c2cbdf04],\n:root[theme-mode="dark"] .form-section[data-v-c2cbdf04]::before {\n background: var(--td-bg-color-page);\n}\n',map:{version:3,sources:["FormSection.vue"],names:[],mappings:"AAAA;EACE,iBAAiB;EACjB,kBAAkB;EAClB,QAAQ;EACR,SAAS;EACT,sBAAsB;EACtB,WAAW;AACb;AACA;EACE,aAAa;EACb,OAAO;EACP,yBAAyB;EACzB,WAAW;AACb;AACA;EACE,aAAa;AACf;AACA;EACE,eAAe;AACjB;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,aAAa;EACb,eAAe;AACjB;AACA;EACE,aAAa;AACf;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;AACvB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,YAAY;AACd;AACA;EACE,SAAS;AACX;AACA;EACE,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,6BAA6B;EAC7B,WAAW;EACX,WAAW;EACX,SAAS;EACT,0BAA0B;EAC1B,YAAY;EACZ,WAAW;EACX,iBAAiB;AACnB;AACA;;EAEE,mCAAmC;AACrC",file:"FormSection.vue",sourcesContent:['.submit-btns-box {\n background: white;\n position: absolute;\n right: 0;\n bottom: 0;\n box-sizing: border-box;\n z-index: 99;\n}\n.border-top {\n display: flex;\n flex: 1;\n justify-content: flex-end;\n width: 100%;\n}\n.form-section__view-only ::v-deep .el-form-item__label::before {\n display: none;\n}\n.form-section__view-only ::v-deep .form-table.el-table .el-form-item.is-required {\n padding-left: 0;\n}\n.form-section__view-only ::v-deep .form-table.el-table .el-form-item.is-required::before {\n display: none;\n}\n.form-section__view-only ::v-deep .form-table.el-table .el-form-item span.view-item {\n margin-left: 0;\n margin-top: 0;\n padding: 0 15px;\n}\n.form-section__view-only ::v-deep th div.table-columns-required::before {\n display: none;\n}\n.form-section > ::v-deep .el-card {\n height: 100%;\n}\n.form-section > ::v-deep .el-card .el-card__body {\n height: 100%;\n padding: 20px;\n padding-bottom: 100px;\n}\n::v-deep .el-card.box-margin {\n position: relative;\n}\n::v-deep .el-card.box-margin.no-border {\n border: none;\n}\n::v-deep .el-card.box-margin .form-view-hide-star {\n margin: 0;\n}\n::v-deep .el-card.box-margin .form-section__content {\n height: 100%;\n overflow-y: auto;\n}\n.form-section {\n width: 100%;\n height: 100%;\n position: relative;\n}\n.form-section::before {\n content: "";\n position: absolute;\n border-top: 1px solid #e9e9e9;\n bottom: 2px;\n width: 100%;\n left: 50%;\n transform: translate(-50%);\n height: 90px;\n z-index: 99;\n background: white;\n}\n:root[theme-mode="dark"] .border-top,\n:root[theme-mode="dark"] .form-section::before {\n background: var(--td-bg-color-page);\n}\n']},media:void 0})}),Q,"data-v-c2cbdf04",false,undefined,!1,K,void 0,void 0);const H={name:"CommonDialog",props:{value:{type:Boolean,default:!1},dialogTitle:{type:String,default:"详情"},label:{type:String,default:"打开弹窗"},btn:{type:Object,default:()=>({type:"primary"})},closeOnClickModal:{type:Boolean,default:!1},bodyScroll:{type:Boolean,default:!1},height:{type:String,default:"0"},viewOnly:{type:Boolean,default:!1},noFooter:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},btnType:{type:String,default:""},btnIcon:{type:String,default:""},showClose:{type:Boolean,default:!0}},computed:{visible:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}}};var Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.label?n("el-button",e._b({attrs:{icon:e.btnIcon,type:e.btnType,plain:""},on:{click:function(t){e.visible=!0,e.$emit("open")}}},"el-button",e.btn,!1),[e._v(e._s(e.label))]):e._e(),e._v(" "),n("el-dialog",e._g(e._b({class:{"common-dialog__body--scroll":e.bodyScroll,"fix-height":"1"===e.height,"common-dialog":!0,"view-only":e.viewOnly,"no-footer":e.noFooter},attrs:{"close-on-click-modal":e.closeOnClickModal,"show-close":e.showClose,visible:e.visible,title:e.dialogTitle,top:e.bodyScroll||"1"===e.height?"80px":"15vh"},on:{"update:visible":function(t){e.visible=t}}},"el-dialog",e.$attrs,!1),e.$listeners),[e.$slots.title?[e._t("title")]:e._e(),e._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[e._t("default")],2),e._v(" "),e.noFooter?e._e():n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e._t("footer"),e._v(" "),e.viewOnly?e._e():n("el-button",{attrs:{icon:"el-icon-check",loading:e.loading,type:"primary"},on:{click:function(t){return e.$emit("ok")}}},[e._v("确定")])],2)],2)],1)};Z._withStripped=!0;const G=z({render:Z,staticRenderFns:[]},(function(e){e&&e("data-v-7fe9e791_0",{source:".common-dialog[data-v-7fe9e791] .el-dialog__body {\n overflow-y: auto;\n}\n.common-dialog[data-v-7fe9e791] .el-dialog__body > div {\n height: calc(100% - 25px);\n overflow-y: auto;\n}\n.common-dialog[data-v-7fe9e791] .is-fullscreen .el-dialog__body {\n height: calc(100% - 135px);\n}\n.common-dialog.common-dialog__body--scroll[data-v-7fe9e791] .el-dialog__body {\n max-height: calc(100vh - 300px);\n}\n.common-dialog.common-dialog__body--scroll.view-only[data-v-7fe9e791] .el-dialog__body,\n.common-dialog.common-dialog__body--scroll.no-footer[data-v-7fe9e791] .el-dialog__body {\n max-height: calc(100vh - 200px);\n}\n.common-dialog.fix-height[data-v-7fe9e791] {\n /* stylelint-disable-next-line no-descending-specificity */\n}\n.common-dialog.fix-height[data-v-7fe9e791] .el-dialog__body {\n height: calc(100vh - 300px);\n}\n.common-dialog.fix-height.view-only[data-v-7fe9e791] .el-dialog__body,\n.common-dialog.fix-height.no-footer[data-v-7fe9e791] .el-dialog__body {\n height: calc(100vh - 200px);\n}\n.common-dialog.view-only[data-v-7fe9e791] .el-dialog__footer {\n padding: 0;\n}\n",map:{version:3,sources:["CommonDialog.vue"],names:[],mappings:"AAAA;EACE,gBAAgB;AAClB;AACA;EACE,yBAAyB;EACzB,gBAAgB;AAClB;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,+BAA+B;AACjC;AACA;;EAEE,+BAA+B;AACjC;AACA;EACE,0DAA0D;AAC5D;AACA;EACE,2BAA2B;AAC7B;AACA;;EAEE,2BAA2B;AAC7B;AACA;EACE,UAAU;AACZ",file:"CommonDialog.vue",sourcesContent:[".common-dialog /deep/ .el-dialog__body {\n overflow-y: auto;\n}\n.common-dialog /deep/ .el-dialog__body > div {\n height: calc(100% - 25px);\n overflow-y: auto;\n}\n.common-dialog /deep/ .is-fullscreen .el-dialog__body {\n height: calc(100% - 135px);\n}\n.common-dialog.common-dialog__body--scroll /deep/ .el-dialog__body {\n max-height: calc(100vh - 300px);\n}\n.common-dialog.common-dialog__body--scroll.view-only /deep/ .el-dialog__body,\n.common-dialog.common-dialog__body--scroll.no-footer /deep/ .el-dialog__body {\n max-height: calc(100vh - 200px);\n}\n.common-dialog.fix-height {\n /* stylelint-disable-next-line no-descending-specificity */\n}\n.common-dialog.fix-height /deep/ .el-dialog__body {\n height: calc(100vh - 300px);\n}\n.common-dialog.fix-height.view-only /deep/ .el-dialog__body,\n.common-dialog.fix-height.no-footer /deep/ .el-dialog__body {\n height: calc(100vh - 200px);\n}\n.common-dialog.view-only /deep/ .el-dialog__footer {\n padding: 0;\n}\n"]},media:void 0})}),H,"data-v-7fe9e791",false,undefined,!1,K,void 0,void 0);const M={name:"DictTag",props:{options:{type:Array,default:null},value:[Number,String,Array]},computed:{values(){return null!==this.value&&void 0!==this.value?Array.isArray(this.value)?this.value:[String(this.value)]:[]}}};var ee=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._l(e.options,(function(t,o){return[e.values.includes(t.value)?["default"==t.raw.listClass||""==t.raw.listClass?n("span",{key:t.value,class:t.raw.cssClass,attrs:{index:o}},[e._v(e._s(t.label))]):n("el-tag",{key:t.value,class:t.raw.cssClass,attrs:{"disable-transitions":!0,index:o,type:"primary"==t.raw.listClass?"":t.raw.listClass}},[e._v("\n "+e._s(t.label)+"\n ")])]:e._e()]}))],2)};ee._withStripped=!0;const te=z({render:ee,staticRenderFns:[]},(function(e){e&&e("data-v-2c52f168_0",{source:".el-tag + .el-tag[data-v-2c52f168] {\n margin-left: 10px;\n}\n",map:{version:3,sources:["DictTag.vue"],names:[],mappings:"AAAA;EACE,iBAAiB;AACnB",file:"DictTag.vue",sourcesContent:[".el-tag + .el-tag {\n margin-left: 10px;\n}\n"]},media:void 0})}),M,"data-v-2c52f168",false,undefined,!1,K,void 0,void 0);const ne={name:"RightToolbar",props:{hasSearch:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},backPathName:{type:String,default:""}},data:()=>({value:[],title:"显示/隐藏",open:!1}),created(){Object.keys(this.columns).forEach((e=>{!1===this.columns[e].visible&&this.value.push(parseInt(e,10))}))},methods:{toggleSearch(){this.$emit("update:showSearch",!this.showSearch)},refresh(){this.$emit("queryTable")},dataChange(e){Object.keys(this.columns).forEach((t=>{const n=this.columns[t].key;this.columns[t].visible=!e.includes(n)}))},showColumn(){this.open=!0},goBack(){this.$listeners.back?this.$emit("back"):this.$tabClose(this.backPathName)}}};var oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"top-right-btn"},[n("el-row",[e.hasSearch?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.showSearch?"隐藏搜索":"显示搜索",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-search"},on:{click:function(t){return e.toggleSearch()}}})],1):e._e(),e._v(" "),n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"刷新",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-refresh"},on:{click:function(t){return e.refresh()}}})],1),e._v(" "),e.columns.length>0?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"显隐列",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-menu"},on:{click:function(t){return e.showColumn()}}})],1):e._e(),e._v(" "),e.backPathName||e.$listeners.back?n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"返回",placement:"top"}},[n("el-button",{attrs:{circle:"",icon:"el-icon-back"},on:{click:function(t){return e.goBack()}}})],1):e._e()],1),e._v(" "),e.columns.length>0?n("el-dialog",{attrs:{"close-on-click-modal":!1,title:e.title,visible:e.open,"append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[n("el-transfer",{attrs:{titles:["显示","隐藏"],data:e.columns},on:{change:e.dataChange},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1):e._e()],1)};oe._withStripped=!0;const ie=z({render:oe,staticRenderFns:[]},(function(e){e&&e("data-v-7d11014a_0",{source:"[data-v-7d11014a] .el-transfer__button {\n border-radius: 50%;\n padding: 12px;\n display: block;\n margin-left: 0px;\n}\n[data-v-7d11014a] .el-transfer__button:first-child {\n margin-bottom: 10px;\n}\n.top-right-btn[data-v-7d11014a] {\n flex: 1;\n display: flex;\n justify-content: flex-end;\n}\n.top-right-btn[data-v-7d11014a] .el-button--mini.is-circle {\n width: 40px;\n box-sizing: border-box;\n}\n",map:{version:3,sources:["RightToolbar.vue"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,aAAa;EACb,cAAc;EACd,gBAAgB;AAClB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,OAAO;EACP,aAAa;EACb,yBAAyB;AAC3B;AACA;EACE,WAAW;EACX,sBAAsB;AACxB",file:"RightToolbar.vue",sourcesContent:["::v-deep .el-transfer__button {\n border-radius: 50%;\n padding: 12px;\n display: block;\n margin-left: 0px;\n}\n::v-deep .el-transfer__button:first-child {\n margin-bottom: 10px;\n}\n.top-right-btn {\n flex: 1;\n display: flex;\n justify-content: flex-end;\n}\n.top-right-btn ::v-deep .el-button--mini.is-circle {\n width: 40px;\n box-sizing: border-box;\n}\n"]},media:void 0})}),ne,"data-v-7d11014a",false,undefined,!1,K,void 0,void 0);function re(e){return e&&(e.Ctor.options.name||e.tag)}const se={type:[String,RegExp,Array],default:""};function ae(e,t){if(e.length){const n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function le(e){return null!=e}const ce=Object.prototype.toString;function de(e,t,n,o){const i=e[t];!i||o&&i.tag===o.tag||i.componentInstance.$destroy(),e[t]=null,ae(n,t)}function ue(e,t){const n=e.cache,o=e.keys,i=e._vnode;Object.keys(n).forEach((e=>{const r=n[e];if(r){const s=r.name;s&&!t(s)&&de(n,e,o,i)}}))}function he(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===ce.call(n)&&e.test(t));var n}var me={name:"BytzKeepAlive",abstract:!0,props:{needCache:{type:Boolean,default:!1},include:se,exclude:se,max:[String,Number],isRefreshing:{type:Boolean,default:!1},noDestroyPathArray:Array},watch:{noDestroyPathArray:{handler:function(e){Object.keys(this.cache).forEach((t=>{t.includes("transition")||!this.cache[t]||e.includes(this.cache[t].path)||de(this.cache,t,this.keys)}))}}},methods:{cacheVNode(){const e=this.cache,t=this.keys,n=this.vnodeToCache,o=this.keyToCache;if(n){const i=n.tag,r=n.componentInstance;r.__keepAlivePath=this.$route.path;const s=n.componentOptions;e[o]={name:re(s),tag:i,componentInstance:r,fullPath:this.$route.fullPath,path:this.$route.path,key:o},t.push(o),this.max&&t.length>window.parseInt(this.max)&&de(e,t[0],t,this._vnode),this.vnodeToCache=null}}},created(){this.cache=Object.create(null),this.keys=[]},destroyed(){for(const e in this.cache)de(this.cache,e,this.keys)},mounted(){this.cacheVNode(),this.$watch("include",(e=>{ue(this,(t=>he(e,t)))})),this.$watch("exclude",(e=>{ue(this,(t=>!he(e,t)))}))},updated(){this.cacheVNode()},render(){const e=this.$slots.default,t=function(e){if(Array.isArray(e))for(let n=0;n<e.length;n++){const o=e[n];if(le(o)&&(le(o.componentOptions)||(t=o).isComment&&t.asyncFactory))return o}var t}(e);if(!this.needCache)return t;const n=t&&t.componentOptions;if(n){const e=re(n),o=this.include,i=this.exclude;if(o&&(!e||!he(o,e))||i&&e&&he(i,e))return t;const r=this.cache,s=this.keys,a=null==t.key?n.Ctor.cid+(n.tag?`::${n.tag}`:""):t.key;r[a]?(t.componentInstance=r[a].componentInstance,ae(s,a),s.push(a)):(this.vnodeToCache=t,this.keyToCache=a),t.data.keepAlive=!0}return t?.componentInstance&&t.componentInstance.__keepAlivePath===this.$route.path&&t?.componentInstance?.loadData&&t.componentInstance.loadData(),t||e&&e[0]}};function pe(e){const t=new u;return t.setPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvGqR2QqERJkFRCD/8i/9\nnDioWOq4xyDzIgWtSJWMmpsOQIC20rxdteVPa6UgJHZm3matHirRkixqFIceXjIf\nK1UZQp8+ivsVqmZS3uCSqVXxHq/Y8aKG3h2ds2b3ddViffpKqFJZOL9Q0zlzYofy\nuwqd5ZnH+ESPUzVYV9qfUF8f9DlLIW2LYrbnAFWGN+OQ3yovsvMxxSTV9V/Yrb6Z\nNtfqiNJkHCPCh01g6WaP1ko1WjUTdFGisa06UJnDHU9Kq/V8AoI3umt2jSnWneO3\nhzkWI1d87Cmyt90kgU+N8f6ld1GFOvxaNW+nuq/e/RJff18tO3V+04m9uzBVkJmT\n+wIDAQAB"),t.encrypt(e)}function fe(e){const t=new u;return t.setPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8apHZCoREmQVE\nIP/yL/2cOKhY6rjHIPMiBa1IlYyamw5AgLbSvF215U9rpSAkdmbeZq0eKtGSLGoU\nhx5eMh8rVRlCnz6K+xWqZlLe4JKpVfEer9jxoobeHZ2zZvd11WJ9+kqoUlk4v1DT\nOXNih/K7Cp3lmcf4RI9TNVhX2p9QXx/0OUshbYtitucAVYY345DfKi+y8zHFJNX1\nX9itvpk21+qI0mQcI8KHTWDpZo/WSjVaNRN0UaKxrTpQmcMdT0qr9XwCgje6a3aN\nKdad47eHORYjV3zsKbK33SSBT43x/qV3UYU6/Fo1b6e6r979El9/Xy07dX7Tib27\nMFWQmZP7AgMBAAECggEAK3GLFXdGTibWPwI44ZfNKyMpNe9REaD4ToTukojg9ZkA\n7UCAZxDFrrYj3NcjFSUzzN3x1r3aupCBGSCakO+Pnkct3t2m5xbDxRl4zCkNx/un\n8AJtzDFEVZyQixgXwNSltBRs+GicZ+g886cQgsyD3Dqzc4hEwmrUfUQUjZU8HKSc\nfDacNma9XFJvJt2IKLWlQh74TIWBJos5oXHgKR7WhLAfTUEe8nI8GgER4c2kVOvO\nSPUWpC/Zj0h7knAzf+R10xLzgeIK8aYG1k3xOU1A8jiiw0+fWbFa3/JgRpQkVTKq\nN0t93GI+qaNuxPgj1lylDkj103dkD7+XWVFazssQIQKBgQDz6Kz0HX6NopgB3Y2Y\nJqVyGgTogC3mvQZJ0TEYaq2fulnBwtXIhHVuGk8Jh9Bo5QudvuE/oY8sGiUKRlNZ\nWkFeyDNKUdxyFl7p2HO/rnYQeJBRsl2zkCs2FOjqcTmRgOzqrKxBXDjON+4FXR1x\nHZma6btTd+1JAfpgMmam8+4rsQKBgQDFwapi9XMWKW5o1RxHwCGKb58/lVanrtC7\nqtLROGSwCW7/OhhjWs7MBvyu2e28gfAVLf+4fgchcVQhJmsb6kHZ8JZBZb2g2Xt9\nb6mLSLNt+VZUzI3Kn+ZaU0Zavk2bG69lNG6XyFTvsRl44usjGjui+WPg3zXiLVHq\n6TkEp4OhawKBgQDC9wAY+eKJEKj1BMYEExA4jrfRqXQHdp0qMD9QRyWWAf1xNm5w\npADCC+GVuqxKzJtmcofWtyuckyF8fw5s5ApQ2zK0e4782wjvX4fWdnwFWnnx8+OW\nfu0rg7dSf0MHHclDJNdkP3Vg0bA/NVkta/22qJKGe9x+eUhL0L3hQiblYQKBgE4n\nF1s8fVsIzKWJcz+34ol/S4QpVLG4GK3R+LbOfpxDXiZnozPAs3FWYY4IejfBckws\nfZ8/zzmcPA9Ny46gqZ2jwv3dY2+qA2+zLWHqPV785u1kWbT2NGcF+gvqoWjnLA3n\nBr3dYhPH/bUUmLCqsV7bCGnaTMUx++nGec4pFZA5AoGAH9+boczQhGp9Bjt5XoVr\nC6FqHwkjTY3jR4/7B77HDj/ShGHnptmwGcyiDRSuScUyvIPxs2OnbyPCV8l3SKx/\nRTL5qvDZvWmHROfRncHVjIxM/mXZZRtEGKcJcaU4azIzygC2c4szWXihY16RWsKH\nNYB7uG1uA4/+4+g++Qval54="),t.decrypt(e)}function ge(e){return function(t){const n=new u;return n.setPublicKey(e||"MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsr9kM6vJHJb8KgWhY6xVaYCkLEr+QKeuYUoZ2uX3+t4lzbxdf1JeJ2jUs26jWWgkpe3W1UHxXUaapyTG9sFbECAwEAAQ=="),n.encrypt(t)}}let Ae,ve=0;const be=h((()=>{Ae&&Ae.close(),Ae=null}),300);function ye(){ve-=1,ve=Math.max(ve,0),0===ve&&be()}function Ce(e,t,o,s,a,l,c){const d=r.create({baseURL:o,timeout:6e4,withCredentials:!0});return d.interceptors.request.use((e=>{const n=!1===(e.headers||{}).isToken;if(a()&&!n&&(e.headers.Authorization=`Bearer ${a()}`),e.headers["App-Id"]=c,"get"===e.method&&e.params){let n=`${e.url}?${t(e.params)}`;n=n.slice(0,-1),e.params={},e.url=n}var o;return!1!==e.headers.showLoading&&(o=e.headers.loadingTarget,0!==ve||Ae||(Ae=i.service({lock:!0,text:"数据加载中...",background:"rgba(0, 0, 0, 0.5)",target:o||"body"})),ve+=1),e}),(e=>{ye(),Promise.reject(e)})),d.interceptors.response.use((t=>{t.headers.ntk&&e.commit("user/setToken",t.headers.ntk);const n=t.config;return n.returnAll||"blob"===t.request.responseType||"arraybuffer"===t.request.responseType?(ye(),n.returnAll?t:t.data):200===t.data.code||200===t.status?(!1!==t.config.headers.showLoading&&ye(),s()&&!1!==t.config.headers.showLoading&&(ve=1,ye()),t.data):(ye(),t.data)}),(t=>{const{config:o}=t;if(ye(),!o||!o.retry)return 401===t.response.data.code?n.confirm("登录状态已过期,您可以继续留在该页面,或者重新登录","系统提示",{confirmButtonText:"重新登录",cancelButtonText:"取消",customClass:"token-expired-alert-box",type:"warning"}).then((()=>{l(),e.dispatch("user/logout"),e.dispatch("permission/restore")})):n.alert(t.response?.data?.errorInfo?.message||t.response?.data?.msg||t.response?.statusText||"接口报错","系统提示",{type:"error",customClass:"api-error-alert-box"}),Promise.reject(t);if(o.retryCount=o.retryCount||0,o.retryCount>=o.retry)return Promise.reject(t);o.retryCount+=1;return new Promise((e=>{setTimeout((()=>{e({})}),o.retryDelay||1)})).then((()=>d(o)))})),d.interceptors.retry=3,d}let _e=null;async function xe({NProgress:e,getStore:t,to:n,from:o,next:i}){if(function(e,t){return!!e.query.access_token&&("/appCallback"===e.path?(t(),!0):(t({path:"/appCallback",query:{...e.query,redirect:e.path}}),!0))}(n,i))return;const r=t();if(e.start(),"/login"===n.path&&Object.prototype.hasOwnProperty.call(n.query,"srid"))return i(),void e.done();if(0===n.path.indexOf("/iamCallback")||"/logout"===n.path||"/appCallback"===n.path)i();else if(Object.prototype.hasOwnProperty.call(n.query,"srid"))await r.commit("user/removeToken"),i({path:"/login",query:{...n.query}});else{if(r.getters["user/token"]){const t=r.getters["user/roles"];if(t&&t.length>0)"/login"===n.path||"/"===n.path||"/404"===n.path&&"/404"!==_e?(i(n.query.redirect||_e),e.done()):i();else try{"/login"!==o.path?await r.dispatch("user/getUserInfo",!0):await r.dispatch("user/getUserInfo",!1),await r.dispatch("permission/initRoutes"),_e=r.getters["permission/defaultTo"],i({...n})}catch(t){await r.commit("user/removeToken"),i(`/login?redirect=${n.fullPath}`),e.done()}}else-1!==r.getters["permission/whiteListRouters"].indexOf(n.path)?i():"/"===n.path&&_e?i(_e):i(`/login?redirect=${n.fullPath}`),e.done()}}const we={data:()=>({items:[]}),created(){this.$on("dict-ready",(()=>{this.items.forEach((e=>{e.dict&&this.dict?.type[e.dict]&&this.$set(e,"options",this.dict.type[e.dict].map((e=>({label:e.label,value:e.value}))))}))}))}},ke=["webkit","moz","ms","o"];function Ee(){if("hidden"in document)return"hidden";for(let e=0;e<ke.length;e++)if(`${ke[e]}Hidden`in document)return`${ke[e]}Hidden`;return null}let Be=null;const Te=Ee(),Se=function(e=Ee()){return`${e.replace(/[H|h]idden/,"")}visibilitychange`}(Te);let $e=null;var Ie={computed:{needRefreshToken:function(){return window.self===window.top}},watch:{"$route.path":{handler:function(e){this.needRefreshToken&&("/login"===e&&this.clearTokenInfo(),this.needTime(e)?Be||this.startTiming():this.stopTiming())},immediate:!0}},mounted(){this.handleWindowTab()},beforeDestroy(){this.stopTiming(),document.removeEventListener(Se,this.windowTabActive,!1)},methods:{needTime:function(e=this.$route.path){return!["/login","/"].includes(e)},handleWindowTab:function(){this.needRefreshToken&&Te&&document.addEventListener(Se,this.windowTabActive,!1)},windowTabActive:function(){if("visible"!==document[function(){if("visibilityState"in document)return"visibilityState";for(let e=0;e<ke.length;e++)if(`${ke[e]}VisibilityState`in document)return`${ke[e]}VisibilityState`;return null}()])return!1;this.refreshToken().then((()=>{this.needTime()&&this.startTiming()})).catch()},getRequestData:function(){const e={token:this.getToken()},t=this.$store.getters["user/userInfo"];return t?.userName&&(e.username=t.userName,this.localIsStoreUser()||this.setLocalToStoreToken()),this.$route.query.srid&&(e.srid=this.$route.query.srid),e},refreshToken:function(){return this.getToken()?this.$request.post("/auth/checkAndRefreshToken"+(this.$route.query.srid?`?srid=${this.$route.query.srid}`:""),{...this.getRequestData()},{headers:{showLoading:!1}}).then(this.handleRequestResult):(this.stopTiming(),Promise.reject())},handleRequestResult:function({data:e}){if(e.tokenInvalid)this.reloadWindow(e.message||"token 无效","确定",(()=>{this.$route.push("/login")}));else if(e.redirectUrl)this.reloadWindow("已在其他页面登录,页面将重新载入","确定",(()=>{window.location.href=this.setComplateRedirectUrl(e)}));else if(e.refreshTokenExpired){const e=this.refreshTokenData.proxy[this.refreshTokenData.env].APP_ID;!this.localIsStoreUser()||e&&"$system$"!==e?(this.$store.commit("user/removeToken"),this.reloadWindow("已在其它页面登出","重新登录")):this.reloadWindow("已在其他页面重新登录,页面将重新载入")}else e.tokenExpired?"/login"!==this.$route.path?this.reloadWindow("登录状态已过期","重新登录",(()=>{this.$store.dispatch("user/logout")})):this.$store.commit("user/removeToken"):e.userChanged?"/login"===this.$route.path?this.reloadWindow("已在其他页面登录,页面将重新载入","确定",(()=>{this.setLocalToStoreToken(),this.$router.push(this.$route.query.redirect||"/homePage/index")})):this.reloadWindow(`登录用户已改变【新用户为:${e.newUsername}】,页面将重新载入`):e.tenantChanged?(this.$store.commit("user/setToken",e.newToken),this.reloadWindow("租户已改变,页面将重新载入")):e.newToken&&this.$store.commit("user/setToken",e.newToken)},reloadWindow:function(e,t="确定",n=(()=>window.location.reload())){const o=document.querySelector(".auto-refresh-token-alert-box");o?this.refreshTip(o,e,t):this.$alert(e,"系统提示",{type:"warning",showClose:!1,confirmButtonText:t,closeOnClickModal:!1,customClass:"auto-refresh-token-alert-box",callback:()=>{($e||n)()}})},refreshTip:function(e,t,n,o){e.querySelector(".el-message-box__message").innerHTML=`<p>${t}</p>`,e.querySelector(".el-button").innerHTML=`<span>${n}</span>`,$e=o},startTiming:function(){Be&&clearInterval(Be),Be=setInterval((()=>{this.refreshToken()}),3e5)},stopTiming:function(){Be&&(clearInterval(Be),Be=null)},clearTokenInfo:function(){this.$store.commit("user/removeToken"),this.$store.commit("user/setUserInfo")},getToken:function(){return this.$store.getters["user/token"]||localStorage.getItem(this.refreshTokenData.TOKEN_NAME)},setComplateRedirectUrl:function(e){let t;return t="development"===this.refreshTokenData.env?`${window.location.origin}${this.refreshTokenData.proxy[this.refreshTokenData.env].API}`:this.refreshTokenData.proxy[this.refreshTokenData.env].API,t=`${t}/auth${e.redirectUrl}`,t},localIsStoreUser:function(){const e=localStorage.getItem(this.refreshTokenData.USER_NAME);return e&&this.$store.getters["user/userInfo"]?.userName===e},setLocalToStoreToken:function(){this.$store.commit("user/setToken",localStorage.getItem(this.refreshTokenData.TOKEN_NAME))}}},qe={install:function(e,t){e.use(m,t),e.use(E,t),e.use(W,t),e.use(F,t),e.component("FormSection",J),e.component("DictTag",te),e.component("CommonDialog",G),e.component("RightToolbar",ie),e.use(P,t)}};export{me as BytzKeepAlive,we as DictArrayAddOptionsMixin,fe as decrypt,qe as default,pe as encrypt,xe as getPermission,Ce as getRequest,ge as processEncrypt,Ie as refreshTokenMixin};
|