@utogether/udp-core 1.0.0
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/build/index.ts +90 -0
- package/build/plugins.ts +26 -0
- package/dist/403-B1R-4vXw.js +64 -0
- package/dist/404-fXPl8csw.js +64 -0
- package/dist/500-eI5842YB.js +66 -0
- package/dist/AuthorityInfo-CfVH6PaB.js +4 -0
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +102 -0
- package/dist/AuthorityPanel-BaLMwMgW.js +4 -0
- package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js +107 -0
- package/dist/Company-CYC9Avfz.js +25 -0
- package/dist/CompanyPanel-B4MzoqN_.js +206 -0
- package/dist/DataSet-DT-rGICv.js +147 -0
- package/dist/Department-B4BNSiYx.js +25 -0
- package/dist/DepartmentPanel-zJO89L2O.js +224 -0
- package/dist/DesignPanel-S8P0J97f.js +4 -0
- package/dist/DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js +1015 -0
- package/dist/DictView-bIS5-rK-.js +95 -0
- package/dist/InvOrganization-MuM2jtsG.js +66 -0
- package/dist/Org-kXHSjsgJ.js +35 -0
- package/dist/Preview-CRyiwUIR.js +48 -0
- package/dist/ReportDefine-WZYIx8Sm.js +10 -0
- package/dist/ReportDesign-D-7GKgpb.js +165 -0
- package/dist/ReportQuery-BIIJny6w.js +75 -0
- package/dist/ReportQueryFrom-OoUl7N2O.js +4 -0
- package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js +177 -0
- package/dist/ReportTemplate-Cfeq9US-.js +161 -0
- package/dist/Role-BwTV2QMH.js +25 -0
- package/dist/RoleAssign-De1JjOun.js +26 -0
- package/dist/RolePanel-E3RcdByM.js +4 -0
- package/dist/RolePanel-pUBXsqCM.js +4 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js +148 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +126 -0
- package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js +100 -0
- package/dist/Staff-Czm7A8vI.js +25 -0
- package/dist/StaffInfo-DJzvBuxy.js +4 -0
- package/dist/StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js +108 -0
- package/dist/StaffPanel-CHk60LEz.js +4 -0
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js +114 -0
- package/dist/SysUser-BGwbttRn.js +15 -0
- package/dist/SysUserPanel-BCbKoLKt.js +4 -0
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +289 -0
- package/dist/SystemMenu-BkqZSDKl.js +151 -0
- package/dist/UserInfo-BsyAcT2d.js +4 -0
- package/dist/UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js +158 -0
- package/dist/await-to-js.es5-BtRbN2QH.js +10 -0
- package/dist/childView-CF83nhxb.js +4 -0
- package/dist/childView-CyuLTUqC.js +4 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-CNSgGda3.js +187 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js +144 -0
- package/dist/code-rule-Bz-gnktN.js +147 -0
- package/dist/core.es.js +13 -0
- package/dist/core.umd.js +173 -0
- package/dist/cron-task-CIifSUdW.js +135 -0
- package/dist/frameView-_d2mqjjQ.js +43 -0
- package/dist/img/l_img.svg +1 -0
- package/dist/img/minicolors.png +0 -0
- package/dist/img/v_img.svg +1 -0
- package/dist/index-BKIw8tSn.js +9195 -0
- package/dist/layoutView-DLKVepB8.js +3317 -0
- package/dist/log-in-e7D5Ss1P.js +110 -0
- package/dist/log-out--RRncZhN.js +120 -0
- package/dist/login-LREiDfFU.js +251 -0
- package/dist/login-log-CvVnyGi3.js +68 -0
- package/dist/lov-view-DDrIVILB.js +97 -0
- package/dist/menuInfo-B1FUV-Sk.js +4 -0
- package/dist/menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js +338 -0
- package/dist/pda-app-CRhVGijN.js +2209 -0
- package/dist/redirect-DiaNDu8F.js +15 -0
- package/dist/resource-BCwx9fEv.js +97 -0
- package/dist/su-welcome-189A7N4r.js +526 -0
- package/dist/sys-config-BZ3sejow.js +277 -0
- package/dist/udp-core.css +9 -0
- package/dist/utogether-r08LNiIZ.js +182 -0
- package/index.ts +36 -0
- package/package.json +16 -0
- package/public/img/l_img.svg +1 -0
- package/public/img/minicolors.png +0 -0
- package/public/img/v_img.svg +1 -0
- package/src/App.vue +70 -0
- package/src/api/http.ts +50 -0
- package/src/api/index.ts +31 -0
- package/src/api/mock.ts +20 -0
- package/src/api/user.ts +43 -0
- package/src/assets/images/avatars.jpg +0 -0
- package/src/assets/images/empty.png +0 -0
- package/src/assets/images/login.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/assets/images/mask-text.jpg +0 -0
- package/src/assets/images/minicolors.png +0 -0
- package/src/assets/images/utogether.png +0 -0
- package/src/assets/images/welcome.png +0 -0
- package/src/assets/status/403.svg +1 -0
- package/src/assets/status/404.svg +1 -0
- package/src/assets/status/500.svg +1 -0
- package/src/assets/svg/back_top.svg +1 -0
- package/src/assets/svg/bg.svg +1 -0
- package/src/assets/svg/close.svg +1 -0
- package/src/assets/svg/close_all.svg +1 -0
- package/src/assets/svg/close_left.svg +1 -0
- package/src/assets/svg/close_other.svg +1 -0
- package/src/assets/svg/close_right.svg +1 -0
- package/src/assets/svg/dark.svg +1 -0
- package/src/assets/svg/day.svg +1 -0
- package/src/assets/svg/enter_outlined.svg +1 -0
- package/src/assets/svg/exit_screen.svg +1 -0
- package/src/assets/svg/full_screen.svg +1 -0
- package/src/assets/svg/globalization.svg +1 -0
- package/src/assets/svg/loading.svg +17 -0
- package/src/assets/svg/mdi_keyboard_esc.svg +1 -0
- package/src/assets/svg/refresh.svg +1 -0
- package/src/assets/svg/system.svg +1 -0
- package/src/components/ReCountTo/README.md +2 -0
- package/src/components/ReCountTo/index.ts +18 -0
- package/src/components/ReCountTo/src/normal/index.tsx +165 -0
- package/src/components/ReCountTo/src/normal/props.ts +37 -0
- package/src/components/ReCountTo/src/rebound/index.tsx +67 -0
- package/src/components/ReCountTo/src/rebound/props.ts +14 -0
- package/src/components/ReCountTo/src/rebound/rebound.css +77 -0
- package/src/components/ReCropper/index.ts +14 -0
- package/src/components/ReCropper/src/index.tsx +141 -0
- package/src/components/ReFlicker/index.css +39 -0
- package/src/components/ReFlicker/index.ts +50 -0
- package/src/components/ReFlop/index.ts +14 -0
- package/src/components/ReFlop/src/Filpper.tsx +99 -0
- package/src/components/ReFlop/src/filpper.css +184 -0
- package/src/components/ReFlop/src/index.vue +126 -0
- package/src/components/ReFlowChart/index.ts +24 -0
- package/src/components/ReFlowChart/src/Control.vue +139 -0
- package/src/components/ReFlowChart/src/DataDialog.vue +12 -0
- package/src/components/ReFlowChart/src/NodePanel.vue +151 -0
- package/src/components/ReFlowChart/src/adpterForTurbo.ts +160 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +49 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +61 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +58 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +47 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/components/ReFlowChart/src/config.ts +62 -0
- package/src/components/ReIcon/index.ts +12 -0
- package/src/components/ReIcon/src/Icon.vue +81 -0
- package/src/components/ReIcon/src/hooks.ts +63 -0
- package/src/components/ReIcon/src/iconfont.ts +45 -0
- package/src/components/ReIcon/src/iconifyIconOffline.ts +36 -0
- package/src/components/ReIcon/src/iconifyIconOnline.ts +28 -0
- package/src/components/ReIcon/src/offlineIcon.ts +64 -0
- package/src/components/ReIcon/src/types.ts +20 -0
- package/src/components/ReSplitPane/index.css +49 -0
- package/src/components/ReSplitPane/index.tsx +119 -0
- package/src/components/ReSplitPane/resizer.css +45 -0
- package/src/components/ReSplitPane/resizer.tsx +30 -0
- package/src/components/SuCharts/index.ts +36 -0
- package/src/components/SuCharts/src/EchartBar.vue +134 -0
- package/src/components/SuCharts/src/UserInfo.vue +78 -0
- package/src/components/SuCharts/src/echart-line.vue +85 -0
- package/src/components/SuCharts/src/echart-pie.vue +95 -0
- package/src/components/SuCommon/card/components/Card.vue +148 -0
- package/src/components/SuCommon/card/components/DialogForm.vue +127 -0
- package/src/components/SuCommon/card/index.vue +142 -0
- package/src/components/SuCommon/icon-select/index.vue +241 -0
- package/src/components/SuCommon/table/index.vue +208 -0
- package/src/components/SuCommon/utils/index.ts +103 -0
- package/src/components/SuCommon/utils/slot.tsx +50 -0
- package/src/components/SuFloatButton/index.vue +159 -0
- package/src/components/SuQrcode/index.ts +14 -0
- package/src/components/SuQrcode/src/index.scss +9 -0
- package/src/components/SuQrcode/src/index.tsx +236 -0
- package/src/components/SuScrollTree/ScrollPanel.vue +175 -0
- package/src/components/SuTable/SuTable.vue +334 -0
- package/src/components/SuTypeit/index.ts +51 -0
- package/src/config/index.ts +35 -0
- package/src/contant/index.ts +20 -0
- package/src/directives/elResizeDetector/index.ts +33 -0
- package/src/directives/index.ts +11 -0
- package/src/directives/permission/index.ts +29 -0
- package/src/layout/components/lay-chrome/index.vue +30 -0
- package/src/layout/components/lay-content/index.vue +143 -0
- package/src/layout/components/lay-navbar/index.vue +237 -0
- package/src/layout/components/lay-notice/data.ts +59 -0
- package/src/layout/components/lay-notice/index.vue +83 -0
- package/src/layout/components/lay-notice/noticeItem.vue +160 -0
- package/src/layout/components/lay-notice/noticeList.vue +19 -0
- package/src/layout/components/lay-panel/index.vue +150 -0
- package/src/layout/components/lay-search/components/SearchFooter.vue +67 -0
- package/src/layout/components/lay-search/components/SearchModal.vue +189 -0
- package/src/layout/components/lay-search/components/SearchResult.vue +132 -0
- package/src/layout/components/lay-search/components/index.ts +10 -0
- package/src/layout/components/lay-search/index.vue +25 -0
- package/src/layout/components/lay-select-org/index.vue +69 -0
- package/src/layout/components/lay-setting/index.vue +510 -0
- package/src/layout/components/lay-sidebar/breadCrumb.vue +131 -0
- package/src/layout/components/lay-sidebar/extraIcon.vue +25 -0
- package/src/layout/components/lay-sidebar/hamBurger.vue +72 -0
- package/src/layout/components/lay-sidebar/horizontal.vue +191 -0
- package/src/layout/components/lay-sidebar/mixNav.vue +258 -0
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +98 -0
- package/src/layout/components/lay-sidebar/sidebarItem.vue +205 -0
- package/src/layout/components/lay-sidebar/vertical.vue +94 -0
- package/src/layout/components/lay-tag/index.scss +375 -0
- package/src/layout/components/lay-tag/index.vue +625 -0
- package/src/layout/frameView.vue +71 -0
- package/src/layout/hooks/useBoolean.ts +33 -0
- package/src/layout/hooks/useDataThemeChange.ts +142 -0
- package/src/layout/hooks/useLayout.ts +65 -0
- package/src/layout/hooks/useNav.ts +173 -0
- package/src/layout/hooks/useTag.ts +233 -0
- package/src/layout/hooks/useTranslationLang.ts +51 -0
- package/src/layout/layoutView.vue +215 -0
- package/src/layout/redirect.vue +30 -0
- package/src/layout/routerView/parent.vue +23 -0
- package/src/layout/types.ts +92 -0
- package/src/main.ts +108 -0
- package/src/plugins/echarts/index.ts +58 -0
- package/src/plugins/echarts/theme.json +394 -0
- package/src/plugins/i18n/en.ts +289 -0
- package/src/plugins/i18n/index.ts +76 -0
- package/src/plugins/i18n/module/u-report.ts +64 -0
- package/src/plugins/i18n/module/u-workflow.ts +71 -0
- package/src/plugins/i18n/module/umsg.ts +28 -0
- package/src/plugins/i18n/zh.ts +337 -0
- package/src/plugins/vxe-table/index.ts +46 -0
- package/src/plugins/vxe-table/render.tsx +397 -0
- package/src/router/createComponent.tsx +25 -0
- package/src/router/index.ts +183 -0
- package/src/router/modules/error.ts +32 -0
- package/src/router/modules/home.ts +32 -0
- package/src/router/modules/nested.ts +93 -0
- package/src/router/modules/remaining.ts +83 -0
- package/src/router/modules/tabs.ts +55 -0
- package/src/router/utils.ts +377 -0
- package/src/store/index.ts +9 -0
- package/src/store/modules/app.ts +69 -0
- package/src/store/modules/epTheme.ts +49 -0
- package/src/store/modules/multiTags.ts +109 -0
- package/src/store/modules/permission.ts +103 -0
- package/src/store/modules/settings.ts +40 -0
- package/src/store/modules/system.ts +180 -0
- package/src/store/modules/types.ts +49 -0
- package/src/style/button.scss +78 -0
- package/src/style/clear-mixin.scss +28 -0
- package/src/style/dark.scss +218 -0
- package/src/style/element-plus.scss +206 -0
- package/src/style/index.scss +76 -0
- package/src/style/login.css +336 -0
- package/src/style/login2.css +106 -0
- package/src/style/print-lock.css +375 -0
- package/src/style/reset.scss +272 -0
- package/src/style/sidebar.scss +770 -0
- package/src/style/suprint.css +985 -0
- package/src/style/tailwind.css +68 -0
- package/src/style/theme.scss +143 -0
- package/src/style/transition.scss +42 -0
- package/src/style/vxetable.scss +256 -0
- package/src/utils/authority/index.ts +29 -0
- package/src/utils/browers.ts +59 -0
- package/src/utils/dataFormat/index.ts +223 -0
- package/src/utils/http/index.ts +297 -0
- package/src/utils/http/types.d.ts +46 -0
- package/src/utils/index.ts +47 -0
- package/src/utils/lifecycle.ts +20 -0
- package/src/utils/mitt.ts +19 -0
- package/src/utils/propTypes.ts +47 -0
- package/src/utils/storage/index.ts +51 -0
- package/src/views/components/contextmenu/basic.vue +74 -0
- package/src/views/components/contextmenu/context-menu.vue +40 -0
- package/src/views/components/contextmenu/menuDynamic.vue +99 -0
- package/src/views/components/contextmenu/menuGroup.vue +71 -0
- package/src/views/components/count-to/index.vue +43 -0
- package/src/views/components/cropping/index.vue +59 -0
- package/src/views/components/cropping/picture.jpeg +0 -0
- package/src/views/components/split-pane/index.vue +82 -0
- package/src/views/components/video/index.vue +57 -0
- package/src/views/error/403.vue +50 -0
- package/src/views/error/404.vue +50 -0
- package/src/views/error/500.vue +52 -0
- package/src/views/login/login-view.vue +314 -0
- package/src/views/login/utils/motion.ts +47 -0
- package/src/views/login/utils/rule.ts +70 -0
- package/src/views/login/utils/verifyCode.ts +52 -0
- package/src/views/organization/company/Company.vue +56 -0
- package/src/views/organization/company/CompanyPanel.vue +259 -0
- package/src/views/organization/department/Department.vue +58 -0
- package/src/views/organization/department/DepartmentPanel.vue +283 -0
- package/src/views/organization/inv-org/InvOrganization.vue +53 -0
- package/src/views/organization/org/Org.vue +43 -0
- package/src/views/organization/staff/Staff.vue +58 -0
- package/src/views/organization/staff/StaffInfo.vue +163 -0
- package/src/views/organization/staff/StaffPanel.vue +144 -0
- package/src/views/system/cron/cron-task.vue +157 -0
- package/src/views/system/menu/AuthorityPanel.vue +140 -0
- package/src/views/system/menu/SystemMenu.vue +191 -0
- package/src/views/system/menu/menuInfo.vue +368 -0
- package/src/views/system/role/AuthorityInfo.vue +147 -0
- package/src/views/system/role/Role.vue +57 -0
- package/src/views/system/role/RolePanel.vue +191 -0
- package/src/views/system/role/UserInfo.vue +193 -0
- package/src/views/system/role-assign/RoleAssign.vue +57 -0
- package/src/views/system/role-assign/RolePanel.vue +136 -0
- package/src/views/system/sys/sys-config.vue +291 -0
- package/src/views/system/sysUser/SysUser.vue +45 -0
- package/src/views/system/sysUser/SysUserPanel.vue +278 -0
- package/src/views/uapp/pda/pda-app.vue +176 -0
- package/src/views/udev/coderule/code-rule.vue +121 -0
- package/src/views/udev/dict/DictView.vue +106 -0
- package/src/views/udev/dict/childView.vue +222 -0
- package/src/views/udev/lov/childView.vue +180 -0
- package/src/views/udev/lov/lov-view.vue +91 -0
- package/src/views/ufile/aggregation/File.vue +87 -0
- package/src/views/ufile/file/water-mark.vue +103 -0
- package/src/views/uhome/components/menu-favorite.vue +331 -0
- package/src/views/uhome/su-welcome.vue +339 -0
- package/src/views/ulogin/login.vue +316 -0
- package/src/views/umsg/monitor/msg-monitor.vue +36 -0
- package/src/views/umsg/msg/TemplateContent.vue +103 -0
- package/src/views/umsg/msg/msg-template.vue +66 -0
- package/src/views/umsg/send/childView.vue +142 -0
- package/src/views/umsg/send/msg-send.vue +95 -0
- package/src/views/upms/interface/log-in.vue +106 -0
- package/src/views/upms/interface/log-out.vue +107 -0
- package/src/views/upms/user/login-log.vue +60 -0
- package/src/views/urpt/dataSet/DataSet.vue +139 -0
- package/src/views/urpt/design/DesignPanel.vue +526 -0
- package/src/views/urpt/design/Preview.vue +65 -0
- package/src/views/urpt/design/ReportDesign.vue +249 -0
- package/src/views/urpt/design/bg.png +0 -0
- package/src/views/urpt/design/panel.ts +841 -0
- package/src/views/urpt/design/print-data.ts +59 -0
- package/src/views/urpt/query/ReportQuery.vue +122 -0
- package/src/views/urpt/query/ReportQueryFrom.vue +252 -0
- package/src/views/urpt/report-request/ReportDefine.vue +10 -0
- package/src/views/urpt/static-resource/resource.vue +116 -0
- package/src/views/urpt/template/ReportTemplate.vue +198 -0
- package/tsconfig.json +30 -0
- package/types/env.d.ts +1 -0
- package/types/global-components.d.ts +12 -0
- package/types/global.d.ts +236 -0
- package/types/image.d.ts +7 -0
- package/types/index.d.ts +73 -0
- package/types/router.d.ts +107 -0
- package/types/shims-tsx.d.ts +22 -0
- package/types/shims-vue.d.ts +20 -0
- package/vite.config.ts +73 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defineComponent as b, ref as u, onMounted as D, resolveComponent as d, createElementBlock as E, openBlock as k, createVNode as n, withCtx as f } from "vue";
|
|
2
|
+
import { useRender as F } from "@utogether/utils";
|
|
3
|
+
import { w as _ } from "./index-BKIw8tSn.js";
|
|
4
|
+
const T = { class: "config" }, x = /* @__PURE__ */ b({
|
|
5
|
+
__name: "StaffInfo",
|
|
6
|
+
props: {
|
|
7
|
+
show: { type: Boolean, default: !0 },
|
|
8
|
+
record: { default: () => ({}) },
|
|
9
|
+
dataStatus: { default: "detail" }
|
|
10
|
+
},
|
|
11
|
+
emits: ["onClose"],
|
|
12
|
+
setup(v, { emit: y }) {
|
|
13
|
+
const i = v, t = F(), o = u({}), p = u(null), l = u(!1), w = { userName: "userName", userId: "id" }, R = { disabled: i.dataStatus !== "add" }, g = [
|
|
14
|
+
{
|
|
15
|
+
field: "employeeCode",
|
|
16
|
+
required: !0,
|
|
17
|
+
span: 8,
|
|
18
|
+
itemRender: t.renderInput({ props: R })
|
|
19
|
+
},
|
|
20
|
+
{ field: "employeeName", required: !0, span: 8, itemRender: t.renderInput() },
|
|
21
|
+
{ field: "gender", span: 8, itemRender: t.renderDict("SU.GENDER") },
|
|
22
|
+
{
|
|
23
|
+
field: "deptName",
|
|
24
|
+
required: !0,
|
|
25
|
+
span: 8,
|
|
26
|
+
itemRender: t.renderLov({ code: "SU.DEPARTMENT", field: "deptName" }, C)
|
|
27
|
+
},
|
|
28
|
+
{ field: "email", span: 8, itemRender: t.renderInput() },
|
|
29
|
+
{ field: "identity", span: 8, itemRender: t.renderInput() },
|
|
30
|
+
{ field: "employeeDate", span: 8, itemRender: t.renderDate() },
|
|
31
|
+
{ field: "solarDay", span: 8, itemRender: t.renderDate() },
|
|
32
|
+
{ field: "phone", span: 8, itemRender: t.renderInput() },
|
|
33
|
+
{ field: "mobile", span: 8, itemRender: t.renderInput() },
|
|
34
|
+
{
|
|
35
|
+
field: "attribute5",
|
|
36
|
+
title: "message.releateUser",
|
|
37
|
+
span: 8,
|
|
38
|
+
itemRender: t.renderSysUser({ mapField: w })
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
function C(e) {
|
|
42
|
+
var r, a, s;
|
|
43
|
+
e.row.deptName = ((r = e.item) == null ? void 0 : r.deptName) || e.row.deptName, e.row.deptCode = ((a = e.item) == null ? void 0 : a.deptCode) || e.row.deptCode, e.row.departmentId = ((s = e.item) == null ? void 0 : s.id) || e.row.departmentId;
|
|
44
|
+
}
|
|
45
|
+
const I = y, N = () => {
|
|
46
|
+
p.value.validateForm(async (e) => {
|
|
47
|
+
if (!e) {
|
|
48
|
+
const { dataStatus: r } = i;
|
|
49
|
+
l.value = !0, console.log(o), r === "add" ? await _().post("/uums/employee", o.value) : await _().put("/uums/employee", o.value), l.value = !1, m();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
function m() {
|
|
54
|
+
I("onClose");
|
|
55
|
+
}
|
|
56
|
+
return D(() => {
|
|
57
|
+
o.value = i.record;
|
|
58
|
+
}), (e, r) => {
|
|
59
|
+
const a = d("ut-form"), s = d("el-divider"), c = d("ut-button"), S = d("el-row"), h = d("el-drawer");
|
|
60
|
+
return k(), E("div", T, [
|
|
61
|
+
n(h, {
|
|
62
|
+
"model-value": e.show,
|
|
63
|
+
"before-close": m,
|
|
64
|
+
direction: "rtl",
|
|
65
|
+
title: e.$t("message.title.employeeInfo"),
|
|
66
|
+
"destroy-on-close": "",
|
|
67
|
+
size: "66%"
|
|
68
|
+
}, {
|
|
69
|
+
default: f(() => [
|
|
70
|
+
n(a, {
|
|
71
|
+
ref_key: "suFormRef",
|
|
72
|
+
ref: p,
|
|
73
|
+
record: o.value,
|
|
74
|
+
loading: l.value,
|
|
75
|
+
items: g,
|
|
76
|
+
"data-status": e.dataStatus
|
|
77
|
+
}, null, 8, ["record", "loading", "data-status"]),
|
|
78
|
+
n(s),
|
|
79
|
+
n(S, {
|
|
80
|
+
type: "flex",
|
|
81
|
+
justify: "end",
|
|
82
|
+
style: { "padding-right": "22px" }
|
|
83
|
+
}, {
|
|
84
|
+
default: f(() => [
|
|
85
|
+
n(c, {
|
|
86
|
+
content: "cancel",
|
|
87
|
+
icon: "ri-close-fill",
|
|
88
|
+
onTap: m
|
|
89
|
+
}),
|
|
90
|
+
n(c, {
|
|
91
|
+
content: "confirm",
|
|
92
|
+
icon: "ri-save-3-fill",
|
|
93
|
+
status: "u-cyan",
|
|
94
|
+
onTap: N
|
|
95
|
+
})
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
})
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["model-value", "title"])
|
|
102
|
+
]);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
export {
|
|
107
|
+
x as _
|
|
108
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { defineComponent as b, ref as g, inject as w, reactive as x, watch as y, nextTick as E, resolveComponent as l, createElementBlock as N, openBlock as s, createVNode as d, createBlock as C, createCommentVNode as k, Fragment as S } from "vue";
|
|
2
|
+
import { clone as D } from "xe-utils";
|
|
3
|
+
import { warnMessage as M } from "@utogether/utils";
|
|
4
|
+
import { _ as B } from "./StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js";
|
|
5
|
+
import { w as P } from "./index-BKIw8tSn.js";
|
|
6
|
+
const A = {
|
|
7
|
+
class: "page-content"
|
|
8
|
+
}, c = "/uums/employee", j = /* @__PURE__ */ b({
|
|
9
|
+
__name: "StaffPanel",
|
|
10
|
+
setup(I) {
|
|
11
|
+
const o = g(null), n = w("active"), t = x({
|
|
12
|
+
record: {},
|
|
13
|
+
showModelView: !1,
|
|
14
|
+
fetchExtParam: {}
|
|
15
|
+
});
|
|
16
|
+
y(() => n.value, (e) => {
|
|
17
|
+
t.fetchExtParam = {
|
|
18
|
+
departmentId: e == null ? void 0 : e.id
|
|
19
|
+
}, E(() => {
|
|
20
|
+
o.value.refreshData();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
const i = [{
|
|
24
|
+
field: "employeeCode"
|
|
25
|
+
}, {
|
|
26
|
+
field: "employeeName"
|
|
27
|
+
}], u = [
|
|
28
|
+
// { type: 'checkbox', width: 50, align: 'center' },
|
|
29
|
+
{
|
|
30
|
+
field: "employeeCode"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
field: "employeeName",
|
|
34
|
+
width: 150
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
field: "gender",
|
|
38
|
+
width: 100,
|
|
39
|
+
formatter: ["formatDict", "SU.GENDER"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
field: "enabled",
|
|
43
|
+
width: 100,
|
|
44
|
+
formatter: ["formatDict", "SU.ENABLE"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
field: "operate",
|
|
48
|
+
width: 150,
|
|
49
|
+
fixed: "right",
|
|
50
|
+
slots: {
|
|
51
|
+
default: ({
|
|
52
|
+
row: e
|
|
53
|
+
}) => {
|
|
54
|
+
const a = ["1", "Y"].includes(e.enabled) ? "disabled" : "enabled", r = ["1", "Y"].includes(e.enabled) ? "ri-stop-circle-fill" : "ri-play-circle-fill", v = ["1", "Y"].includes(e.enabled) ? "warning" : "success";
|
|
55
|
+
return [d(S, null, [d(l("ut-button"), {
|
|
56
|
+
icon: "ri-edit-box-line",
|
|
57
|
+
content: "edit",
|
|
58
|
+
onTap: () => p(e)
|
|
59
|
+
}, null), d(l("ut-button"), {
|
|
60
|
+
icon: r,
|
|
61
|
+
content: a,
|
|
62
|
+
status: v,
|
|
63
|
+
onTap: () => h(e)
|
|
64
|
+
}, null)])];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
], m = {
|
|
69
|
+
toolbarButtonClick({
|
|
70
|
+
code: e
|
|
71
|
+
}) {
|
|
72
|
+
e === "add" && f();
|
|
73
|
+
}
|
|
74
|
+
}, f = () => {
|
|
75
|
+
var e, a;
|
|
76
|
+
if (!((e = n.value) != null && e.deptName))
|
|
77
|
+
return M("请先选择部门");
|
|
78
|
+
t.dataStatus = "add", t.record = {}, t.record.departmentId = (a = n.value) == null ? void 0 : a.id, t.record.deptName = n.value.deptName, t.record.enabled = "1", t.showModelView = !0;
|
|
79
|
+
}, p = (e) => {
|
|
80
|
+
t.dataStatus = "update", t.record = e, t.showModelView = !0;
|
|
81
|
+
}, h = async (e) => {
|
|
82
|
+
const a = D(e, !0);
|
|
83
|
+
o.value.showLoading(), a.enabled = a.enabled === "1" ? "0" : "1", await P().put(c, a), o.value.refreshData();
|
|
84
|
+
}, _ = () => {
|
|
85
|
+
t.showModelView = !1, o.value.refreshData();
|
|
86
|
+
};
|
|
87
|
+
return (e, a) => {
|
|
88
|
+
const r = l("ut-grid");
|
|
89
|
+
return s(), N("div", A, [d(r, {
|
|
90
|
+
ref_key: "xgrid",
|
|
91
|
+
ref: o,
|
|
92
|
+
items: i,
|
|
93
|
+
columns: u,
|
|
94
|
+
"default-params": t.fetchExtParam,
|
|
95
|
+
events: m,
|
|
96
|
+
"auto-load": !1,
|
|
97
|
+
buttons: [{
|
|
98
|
+
code: "del",
|
|
99
|
+
auth: "/"
|
|
100
|
+
}],
|
|
101
|
+
url: c,
|
|
102
|
+
mode: "form"
|
|
103
|
+
}, null, 8, ["default-params"]), t.showModelView ? (s(), C(B, {
|
|
104
|
+
key: 0,
|
|
105
|
+
record: t.record,
|
|
106
|
+
"data-status": t.dataStatus,
|
|
107
|
+
onOnClose: _
|
|
108
|
+
}, null, 8, ["record", "data-status"])) : k("", !0)]);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
export {
|
|
113
|
+
j as _
|
|
114
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as t, ref as o, provide as s, createElementBlock as r, openBlock as c, createVNode as _ } from "vue";
|
|
2
|
+
import { _ as n } from "./SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js";
|
|
3
|
+
import { _ as a } from "./index-BKIw8tSn.js";
|
|
4
|
+
const p = { class: "u-content-panel1" }, i = /* @__PURE__ */ t({
|
|
5
|
+
__name: "SysUser",
|
|
6
|
+
setup(m) {
|
|
7
|
+
const e = o([]);
|
|
8
|
+
return s("treeList", e), (f, d) => (c(), r("div", p, [
|
|
9
|
+
_(n)
|
|
10
|
+
]));
|
|
11
|
+
}
|
|
12
|
+
}), x = /* @__PURE__ */ a(i, [["__scopeId", "data-v-8708bc91"]]);
|
|
13
|
+
export {
|
|
14
|
+
x as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { defineComponent as z, reactive as G, ref as v, inject as H, createVNode as t, Fragment as R, resolveComponent as r, nextTick as Q, onMounted as Y, createElementBlock as U, openBlock as g, withCtx as i, createBlock as k, createCommentVNode as J, renderList as K, unref as O } from "vue";
|
|
2
|
+
import { useI18n as W } from "vue-i18n";
|
|
3
|
+
import { t as $ } from "./await-to-js.es5-BtRbN2QH.js";
|
|
4
|
+
import { useRender as X, warnMessage as Z, errorMessage as ee } from "@utogether/utils";
|
|
5
|
+
import { VxeUI as te } from "vxe-pc-ui";
|
|
6
|
+
import { isEmpty as se } from "xe-utils";
|
|
7
|
+
import { w as ae } from "./index-BKIw8tSn.js";
|
|
8
|
+
const re = {
|
|
9
|
+
class: "page"
|
|
10
|
+
}, u = "/uums/user", pe = /* @__PURE__ */ z({
|
|
11
|
+
__name: "SysUserPanel",
|
|
12
|
+
setup(le) {
|
|
13
|
+
const s = G({
|
|
14
|
+
record: {},
|
|
15
|
+
listQuery: {},
|
|
16
|
+
dataList: [],
|
|
17
|
+
roleList: [],
|
|
18
|
+
submitLoading: !1,
|
|
19
|
+
showModelView: !1,
|
|
20
|
+
showUserRole: !1,
|
|
21
|
+
showAuth: !1,
|
|
22
|
+
dataStatus: ""
|
|
23
|
+
}), d = ae(), {
|
|
24
|
+
t: l
|
|
25
|
+
} = W(), q = {
|
|
26
|
+
userName: [{
|
|
27
|
+
required: !0,
|
|
28
|
+
message: `${l("message.required")}${l("message.userCode")}`
|
|
29
|
+
}],
|
|
30
|
+
name: [{
|
|
31
|
+
required: !0,
|
|
32
|
+
message: `${l("message.required")}${l("message.userName")}`
|
|
33
|
+
}],
|
|
34
|
+
unitId: [{
|
|
35
|
+
required: !0,
|
|
36
|
+
message: `${l("message.required")}${l("message.unitName")}`
|
|
37
|
+
}],
|
|
38
|
+
userPwd: [{
|
|
39
|
+
required: !0,
|
|
40
|
+
message: `${l("message.required")}${l("message.userPwd")}`
|
|
41
|
+
}]
|
|
42
|
+
}, m = X(), y = v({}), C = H("treeList"), N = v(null), I = [{
|
|
43
|
+
field: "name",
|
|
44
|
+
title: "message.userName"
|
|
45
|
+
}, {
|
|
46
|
+
field: "userName",
|
|
47
|
+
title: "message.userCode"
|
|
48
|
+
}], h = [{
|
|
49
|
+
type: "checkbox",
|
|
50
|
+
width: 40,
|
|
51
|
+
align: "center"
|
|
52
|
+
}, {
|
|
53
|
+
field: "userName",
|
|
54
|
+
title: "message.userCode",
|
|
55
|
+
required: !0,
|
|
56
|
+
editRender: m.renderInput()
|
|
57
|
+
}, {
|
|
58
|
+
field: "name",
|
|
59
|
+
title: "message.userName",
|
|
60
|
+
required: !0,
|
|
61
|
+
editRender: m.renderInput()
|
|
62
|
+
}, {
|
|
63
|
+
field: "type",
|
|
64
|
+
title: "message.sysType",
|
|
65
|
+
formatter: ["formatDict", "SU.ENABLE"],
|
|
66
|
+
editRender: m.renderDict("SU.USER.TYPE")
|
|
67
|
+
}, {
|
|
68
|
+
field: "userPwd",
|
|
69
|
+
required: !0,
|
|
70
|
+
width: 150,
|
|
71
|
+
editRender: m.renderInput(),
|
|
72
|
+
formatter: () => "*******"
|
|
73
|
+
}, {
|
|
74
|
+
field: "enabled",
|
|
75
|
+
width: 80,
|
|
76
|
+
cellRender: m.renderEnabled(L)
|
|
77
|
+
}, {
|
|
78
|
+
field: "operate",
|
|
79
|
+
width: 240,
|
|
80
|
+
fixed: "right",
|
|
81
|
+
slots: {
|
|
82
|
+
default: ({
|
|
83
|
+
row: e
|
|
84
|
+
}) => [t(R, null, [t(r("ut-button"), {
|
|
85
|
+
icon: "ri-user-fill",
|
|
86
|
+
content: "role",
|
|
87
|
+
onTap: () => S(e)
|
|
88
|
+
}, null), t(r("ut-button"), {
|
|
89
|
+
icon: "ri-lock-fill",
|
|
90
|
+
content: "auth",
|
|
91
|
+
status: "success",
|
|
92
|
+
onTap: () => E(e)
|
|
93
|
+
}, null), t(r("ut-button"), {
|
|
94
|
+
icon: "ri-lock-fill",
|
|
95
|
+
content: "passwordReset",
|
|
96
|
+
status: "warning",
|
|
97
|
+
onTap: () => A(e)
|
|
98
|
+
}, null)])]
|
|
99
|
+
}
|
|
100
|
+
}];
|
|
101
|
+
async function L({
|
|
102
|
+
row: e
|
|
103
|
+
}) {
|
|
104
|
+
await $(d.put(u, [e])), N.value.refreshData();
|
|
105
|
+
}
|
|
106
|
+
const S = async (e) => {
|
|
107
|
+
var n;
|
|
108
|
+
const a = await d.get(u + "/getUserRole", {
|
|
109
|
+
userName: e.userName
|
|
110
|
+
});
|
|
111
|
+
s.roleList = (n = a[0]) == null ? void 0 : n.sysRoles, Q(() => {
|
|
112
|
+
s.showUserRole = !0;
|
|
113
|
+
});
|
|
114
|
+
}, A = async (e) => {
|
|
115
|
+
await d.put(u + "/resetPwd", e), await te.modal.alert(l("message.tip.initPassword"));
|
|
116
|
+
}, E = async (e) => {
|
|
117
|
+
var f;
|
|
118
|
+
const [a, n] = await $(d.get(u + "/getUserRole", {
|
|
119
|
+
userName: e.userName
|
|
120
|
+
}));
|
|
121
|
+
a || (se(n) ? Z(l("message.tip.emptyAuth")) : (s.roleList = (f = n[0]) == null ? void 0 : f.sysMenuExts, s.showAuth = !0));
|
|
122
|
+
}, P = {
|
|
123
|
+
editActived({
|
|
124
|
+
row: e
|
|
125
|
+
}) {
|
|
126
|
+
h[1].editRender.props.disabled = !!e.id, h[4].editRender.props.disabled = !!e.id;
|
|
127
|
+
}
|
|
128
|
+
}, b = v(null), M = () => {
|
|
129
|
+
b.value.validate(async (e) => {
|
|
130
|
+
if (!e) {
|
|
131
|
+
const {
|
|
132
|
+
record: a,
|
|
133
|
+
dataStatus: n
|
|
134
|
+
} = s;
|
|
135
|
+
n === "add" ? await d.post(u, a) : await d.put(u, a), x();
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}, x = () => {
|
|
139
|
+
s.showModelView = !1;
|
|
140
|
+
}, T = () => {
|
|
141
|
+
d.get("/uums/unit", {
|
|
142
|
+
pageSize: 10
|
|
143
|
+
}).then((e) => {
|
|
144
|
+
y.value = {
|
|
145
|
+
unitId: e[0].id,
|
|
146
|
+
type: "system",
|
|
147
|
+
enabled: "1"
|
|
148
|
+
};
|
|
149
|
+
}).catch(() => {
|
|
150
|
+
ee("获取租户失败,刷新后重试");
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
return Y(() => {
|
|
154
|
+
T();
|
|
155
|
+
}), (e, a) => {
|
|
156
|
+
const n = r("ut-grid"), f = r("vxe-option"), D = r("vxe-select"), c = r("vxe-form-item"), V = r("ut-button"), B = r("vxe-form"), w = r("vxe-modal"), _ = r("vxe-column"), F = r("vxe-table"), j = r("el-tree-v2");
|
|
157
|
+
return g(), U("div", re, [t(n, {
|
|
158
|
+
ref_key: "xgrid",
|
|
159
|
+
ref: N,
|
|
160
|
+
columns: h,
|
|
161
|
+
items: I,
|
|
162
|
+
url: u,
|
|
163
|
+
"default-params": y.value,
|
|
164
|
+
events: P
|
|
165
|
+
}, null, 8, ["default-params"]), t(w, {
|
|
166
|
+
modelValue: s.showModelView,
|
|
167
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => s.showModelView = o),
|
|
168
|
+
title: "用户信息",
|
|
169
|
+
width: "300"
|
|
170
|
+
}, {
|
|
171
|
+
default: i(() => [t(B, {
|
|
172
|
+
ref_key: "xForm",
|
|
173
|
+
ref: b,
|
|
174
|
+
data: s.record,
|
|
175
|
+
rules: q,
|
|
176
|
+
"title-align": "right"
|
|
177
|
+
}, {
|
|
178
|
+
default: i(() => [t(c, {
|
|
179
|
+
title: e.$t("message.unitName"),
|
|
180
|
+
field: "unitId",
|
|
181
|
+
span: "24"
|
|
182
|
+
}, {
|
|
183
|
+
default: i(({
|
|
184
|
+
data: o
|
|
185
|
+
}) => [t(D, {
|
|
186
|
+
modelValue: o.unitId,
|
|
187
|
+
"onUpdate:modelValue": (p) => o.unitId = p
|
|
188
|
+
}, {
|
|
189
|
+
default: i(() => [(g(!0), U(R, null, K(O(C), (p) => (g(), k(f, {
|
|
190
|
+
key: p.id,
|
|
191
|
+
value: p.id,
|
|
192
|
+
label: p.unitName
|
|
193
|
+
}, null, 8, ["value", "label"]))), 128))]),
|
|
194
|
+
_: 2
|
|
195
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])]),
|
|
196
|
+
_: 1
|
|
197
|
+
}, 8, ["title"]), t(c, {
|
|
198
|
+
title: e.$t("message.userCode"),
|
|
199
|
+
"item-render": {
|
|
200
|
+
name: "input",
|
|
201
|
+
attrs: {
|
|
202
|
+
disabled: s.dataStatus === "update"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
field: "userName",
|
|
206
|
+
span: "24"
|
|
207
|
+
}, null, 8, ["title", "item-render"]), t(c, {
|
|
208
|
+
title: e.$t("message.userName"),
|
|
209
|
+
field: "name",
|
|
210
|
+
span: "24",
|
|
211
|
+
"item-render": {
|
|
212
|
+
name: "input"
|
|
213
|
+
}
|
|
214
|
+
}, null, 8, ["title"]), s.dataStatus === "add" ? (g(), k(c, {
|
|
215
|
+
key: 0,
|
|
216
|
+
title: e.$t("message.userPwd"),
|
|
217
|
+
"item-render": {
|
|
218
|
+
name: "input"
|
|
219
|
+
},
|
|
220
|
+
field: "userPwd",
|
|
221
|
+
span: "24"
|
|
222
|
+
}, null, 8, ["title"])) : J("", !0), t(c, {
|
|
223
|
+
align: "right",
|
|
224
|
+
span: "24"
|
|
225
|
+
}, {
|
|
226
|
+
default: i(() => [t(V, {
|
|
227
|
+
content: "cancel",
|
|
228
|
+
icon: "ri-close-fill",
|
|
229
|
+
onClick: x
|
|
230
|
+
}), t(V, {
|
|
231
|
+
content: "confirm",
|
|
232
|
+
icon: "ri-save-3-fill",
|
|
233
|
+
status: "u-cyan",
|
|
234
|
+
onClick: M
|
|
235
|
+
})]),
|
|
236
|
+
_: 1
|
|
237
|
+
})]),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["data"])]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["modelValue"]), t(w, {
|
|
242
|
+
modelValue: s.showUserRole,
|
|
243
|
+
"onUpdate:modelValue": a[1] || (a[1] = (o) => s.showUserRole = o),
|
|
244
|
+
title: e.$t("message.title.roleInfo"),
|
|
245
|
+
width: "600"
|
|
246
|
+
}, {
|
|
247
|
+
default: i(() => [t(F, {
|
|
248
|
+
height: "300",
|
|
249
|
+
data: s.roleList,
|
|
250
|
+
border: ""
|
|
251
|
+
}, {
|
|
252
|
+
default: i(() => [t(_, {
|
|
253
|
+
type: "seq",
|
|
254
|
+
width: "60"
|
|
255
|
+
}), t(_, {
|
|
256
|
+
field: "roleName",
|
|
257
|
+
title: e.$t("message.udp.roleName")
|
|
258
|
+
}, null, 8, ["title"]), t(_, {
|
|
259
|
+
field: "roleDesc",
|
|
260
|
+
title: e.$t("message.udp.roleDesc")
|
|
261
|
+
}, null, 8, ["title"])]),
|
|
262
|
+
_: 1
|
|
263
|
+
}, 8, ["data"])]),
|
|
264
|
+
_: 1
|
|
265
|
+
}, 8, ["modelValue", "title"]), t(w, {
|
|
266
|
+
modelValue: s.showAuth,
|
|
267
|
+
"onUpdate:modelValue": a[2] || (a[2] = (o) => s.showAuth = o),
|
|
268
|
+
title: e.$t("message.title.authority"),
|
|
269
|
+
height: "300",
|
|
270
|
+
width: "360"
|
|
271
|
+
}, {
|
|
272
|
+
default: i(() => [t(j, {
|
|
273
|
+
ref: "xTree",
|
|
274
|
+
data: s.roleList,
|
|
275
|
+
props: {
|
|
276
|
+
children: "children",
|
|
277
|
+
label: "menuName"
|
|
278
|
+
},
|
|
279
|
+
height: 420,
|
|
280
|
+
"node-key": "id"
|
|
281
|
+
}, null, 8, ["data"])]),
|
|
282
|
+
_: 1
|
|
283
|
+
}, 8, ["modelValue", "title"])]);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
export {
|
|
288
|
+
pe as _
|
|
289
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { defineComponent as x, reactive as S, ref as k, createVNode as o, resolveComponent as i, Fragment as c, createElementBlock as D, openBlock as v } from "vue";
|
|
2
|
+
import { useI18n as A } from "vue-i18n";
|
|
3
|
+
import { _ as E } from "./menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js";
|
|
4
|
+
import { _ as N } from "./AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js";
|
|
5
|
+
import { clone as m } from "xe-utils";
|
|
6
|
+
import { t as I } from "./await-to-js.es5-BtRbN2QH.js";
|
|
7
|
+
import { VxeUI as M } from "vxe-pc-ui";
|
|
8
|
+
import { useRender as R } from "@utogether/utils";
|
|
9
|
+
import { w as U } from "./index-BKIw8tSn.js";
|
|
10
|
+
const B = {
|
|
11
|
+
class: "page-content"
|
|
12
|
+
}, O = {
|
|
13
|
+
name: "SystemMenu"
|
|
14
|
+
}, j = /* @__PURE__ */ x({
|
|
15
|
+
...O,
|
|
16
|
+
setup(P) {
|
|
17
|
+
const t = S({
|
|
18
|
+
record: {},
|
|
19
|
+
dataList: [],
|
|
20
|
+
submitLoading: !1,
|
|
21
|
+
showDrawer: !1,
|
|
22
|
+
dataStatus: "",
|
|
23
|
+
total: 0,
|
|
24
|
+
listQuery: {
|
|
25
|
+
pageSize: 10,
|
|
26
|
+
pageNum: 1
|
|
27
|
+
}
|
|
28
|
+
}), {
|
|
29
|
+
t: p
|
|
30
|
+
} = A(), h = R(), r = U(), d = k(null), s = "/uums/menu", f = [{
|
|
31
|
+
type: "checkbox",
|
|
32
|
+
width: 50,
|
|
33
|
+
align: "center"
|
|
34
|
+
}, {
|
|
35
|
+
field: "menuName",
|
|
36
|
+
width: 180,
|
|
37
|
+
treeNode: !0
|
|
38
|
+
}, {
|
|
39
|
+
field: "menuNameEn",
|
|
40
|
+
width: 140
|
|
41
|
+
}, {
|
|
42
|
+
field: "sort",
|
|
43
|
+
width: 70
|
|
44
|
+
}, {
|
|
45
|
+
field: "menuCode",
|
|
46
|
+
width: 140
|
|
47
|
+
}, {
|
|
48
|
+
field: "permissionCode",
|
|
49
|
+
minWidth: 180
|
|
50
|
+
}, {
|
|
51
|
+
field: "menuCategory",
|
|
52
|
+
title: "message.menuType",
|
|
53
|
+
formatter: ["formatDict", "SU.MENU.TYPE"],
|
|
54
|
+
width: 100
|
|
55
|
+
}, {
|
|
56
|
+
field: "enabled",
|
|
57
|
+
width: 80,
|
|
58
|
+
cellRender: h.renderEnabled(g)
|
|
59
|
+
}, {
|
|
60
|
+
field: "operate",
|
|
61
|
+
width: 140,
|
|
62
|
+
fixed: "right",
|
|
63
|
+
slots: {
|
|
64
|
+
default: ({
|
|
65
|
+
row: e
|
|
66
|
+
}) => {
|
|
67
|
+
const n = e.menuType, a = o(i("ut-button"), {
|
|
68
|
+
status: "u-cyan",
|
|
69
|
+
icon: "ri-add-fill",
|
|
70
|
+
content: "add",
|
|
71
|
+
onTap: () => l(e)
|
|
72
|
+
}, null), b = o(i("ut-button"), {
|
|
73
|
+
icon: "ri-lock-fill",
|
|
74
|
+
content: "auth",
|
|
75
|
+
onTap: () => T(e)
|
|
76
|
+
}, null);
|
|
77
|
+
return [o(c, null, [n ? null : o(c, null, [o(i("ut-button"), {
|
|
78
|
+
status: "success",
|
|
79
|
+
icon: "ri-edit-box-line",
|
|
80
|
+
content: "edit",
|
|
81
|
+
onTap: () => w(e)
|
|
82
|
+
}, null), ["0", "5"].includes(e.menuCategory) ? a : b])])];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}], C = ({
|
|
86
|
+
code: e
|
|
87
|
+
}) => {
|
|
88
|
+
e === "add" && l(), e === "del" && _();
|
|
89
|
+
}, y = async ({
|
|
90
|
+
row: e
|
|
91
|
+
}) => {
|
|
92
|
+
const n = await r.get(s, {
|
|
93
|
+
parentId: e.id
|
|
94
|
+
});
|
|
95
|
+
return new Promise((a) => {
|
|
96
|
+
a(n.list);
|
|
97
|
+
});
|
|
98
|
+
}, l = (e) => {
|
|
99
|
+
t.showDrawer = !0, t.dataStatus = "add", t.record.dispalyCode = e == null ? void 0 : e.permissionCode, t.record.permissionCode = e == null ? void 0 : e.permissionCode, t.record.menuType = "0", t.record.menuCategory = e ? "" : "0", t.record.parentId = e == null ? void 0 : e.id, t.record.hasChildren = e == null ? void 0 : e.hasChildren;
|
|
100
|
+
}, w = (e) => {
|
|
101
|
+
t.showDrawer = !0, t.dataStatus = "update", t.record = m(e, !0), t.record.menuType = t.record.menuType.toString(), t.record.dispalyCode = e.permissionCode;
|
|
102
|
+
};
|
|
103
|
+
async function g({
|
|
104
|
+
row: e
|
|
105
|
+
}) {
|
|
106
|
+
await r.put(s, [e]), d.value.refreshData();
|
|
107
|
+
}
|
|
108
|
+
const _ = async () => {
|
|
109
|
+
const e = await M.modal.confirm(p("message.delRecord")), n = d.value.getInstance().getCheckboxRecords();
|
|
110
|
+
if (e === "confirm") {
|
|
111
|
+
const [a] = await I(r.delete(s, n));
|
|
112
|
+
}
|
|
113
|
+
}, T = (e) => {
|
|
114
|
+
t.showAuthority = !0, t.dataStatus = "update", t.record = m(e, !0), t.record.menuType = t.record.menuType.toString(), t.record.dispalyCode = e.permissionCode;
|
|
115
|
+
}, u = () => {
|
|
116
|
+
t.record = {}, t.showDrawer = !1, t.showAuthority = !1;
|
|
117
|
+
};
|
|
118
|
+
return (e, n) => {
|
|
119
|
+
const a = i("ut-grid");
|
|
120
|
+
return v(), D("div", B, [o(a, {
|
|
121
|
+
ref_key: "xgrid",
|
|
122
|
+
ref: d,
|
|
123
|
+
"tree-config": {
|
|
124
|
+
childrenField: "children",
|
|
125
|
+
lazy: !0,
|
|
126
|
+
hasChild: "hasChildren",
|
|
127
|
+
loadMethod: y,
|
|
128
|
+
iconOpen: "ri-checkbox-indeterminate-line ri-lg",
|
|
129
|
+
iconClose: "ri-add-box-line ri-lg"
|
|
130
|
+
},
|
|
131
|
+
columns: f,
|
|
132
|
+
url: s,
|
|
133
|
+
stripe: !1,
|
|
134
|
+
mode: "form",
|
|
135
|
+
onToolbarButtonClick: C
|
|
136
|
+
}, null, 8, ["tree-config"]), o(E, {
|
|
137
|
+
show: t.showDrawer,
|
|
138
|
+
record: t.record,
|
|
139
|
+
"data-status": t.dataStatus,
|
|
140
|
+
onOnClose: u
|
|
141
|
+
}, null, 8, ["show", "record", "data-status"]), o(N, {
|
|
142
|
+
show: t.showAuthority,
|
|
143
|
+
record: t.record,
|
|
144
|
+
onOnClose: u
|
|
145
|
+
}, null, 8, ["show", "record"])]);
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
export {
|
|
150
|
+
j as default
|
|
151
|
+
};
|