vue2-client 0.1.0 → 1.1.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/.editorconfig +9 -0
- package/.env +14 -0
- package/.env.development +1 -0
- package/.eslintrc.js +81 -0
- package/.eslintrc.json +5 -0
- package/README.md +54 -36
- package/babel.config.js +11 -2
- package/docs/index.md +29 -0
- package/jest.config.js +3 -0
- package/package.json +68 -22
- package/public/index.html +13 -3
- package/src/App.vue +93 -0
- package/src/assets/img/alipay.png +0 -0
- package/src/assets/img/defect.png +0 -0
- package/src/assets/img/error.png +0 -0
- package/src/assets/img/logo.png +0 -0
- package/src/assets/img/preview-nine.png +0 -0
- package/src/assets/img/preview.png +0 -0
- package/src/assets/img/success.png +0 -0
- package/src/assets/img/success1.png +0 -0
- package/src/assets/img/wechatpay.png +0 -0
- package/src/base-client/all.js +57 -0
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +1159 -0
- package/src/base-client/components/common/CreateQuery/index.js +3 -0
- package/src/base-client/components/common/CreateQuery/index.md +42 -0
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +540 -0
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -0
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -0
- package/src/{components → base-client/components/common}/CustomColumnsDrawer/CustomColumnsDrawer.vue +21 -15
- package/src/{components → base-client/components/common}/CustomColumnsDrawer/index.js +0 -0
- package/src/{components → base-client/components/common}/CustomColumnsDrawer/index.md +0 -0
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +150 -0
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -0
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -0
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +163 -0
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -0
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -0
- package/src/base-client/components/common/JSONToTree/index.js +3 -0
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -0
- package/src/base-client/components/common/XAddForm/XAddForm.vue +323 -0
- package/src/base-client/components/common/XAddForm/index.js +3 -0
- package/src/base-client/components/common/XAddForm/index.md +60 -0
- package/src/base-client/components/common/XBadge/XBadge.vue +61 -0
- package/src/base-client/components/common/XBadge/index.js +3 -0
- package/src/base-client/components/common/XBadge/index.md +39 -0
- package/src/base-client/components/common/XCard/XCard.vue +59 -0
- package/src/base-client/components/common/XCard/index.js +3 -0
- package/src/base-client/components/common/XCard/index.md +43 -0
- package/src/base-client/components/common/XForm/XForm.vue +275 -0
- package/src/base-client/components/common/XForm/XFormItem.vue +217 -0
- package/src/base-client/components/common/XForm/index.js +3 -0
- package/src/base-client/components/common/XForm/index.md +196 -0
- package/src/{components/FormItem/FormItem.vue → base-client/components/common/XFormCol/XFormCol.vue} +16 -14
- package/src/base-client/components/common/XFormCol/index.js +3 -0
- package/src/{components/FormItem → base-client/components/common/XFormCol}/index.md +2 -2
- package/src/base-client/components/common/XFormTable/XFormTable.vue +405 -0
- package/src/base-client/components/common/XFormTable/index.js +3 -0
- package/src/base-client/components/common/XFormTable/index.md +89 -0
- package/src/base-client/components/common/XTable/XTable.vue +262 -0
- package/src/base-client/components/common/XTable/index.js +3 -0
- package/src/base-client/components/common/XTable/index.md +255 -0
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +105 -0
- package/src/base-client/components/common/XTreeOne/index.js +3 -0
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +226 -0
- package/src/base-client/components/iot/CustomerDetailsView/index.js +3 -0
- package/src/base-client/components/iot/CustomerDetailsView/index.md +41 -0
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +127 -0
- package/src/base-client/components/iot/DataAnalysisUser/index.js +3 -0
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +250 -0
- package/src/base-client/components/iot/DataAnalysisView/index.js +3 -0
- package/src/base-client/components/iot/DataAnalysisViewGD/DataAnalysisViewGD.vue +548 -0
- package/src/base-client/components/iot/DataAnalysisViewGD/WindowTemplate/WindowInfotemp.vue +99 -0
- package/src/base-client/components/iot/DataAnalysisViewGD/WindowTemplate/index.js +3 -0
- package/src/base-client/components/iot/DataAnalysisViewGD/index.js +3 -0
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +453 -0
- package/src/base-client/components/iot/DeviceBrandDetailsView/index.js +3 -0
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +231 -0
- package/src/base-client/components/iot/DeviceDetailsView/index.js +3 -0
- package/src/base-client/components/iot/DeviceDetailsView/index.md +43 -0
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -0
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -0
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +122 -0
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +122 -0
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +225 -0
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +135 -0
- package/src/base-client/components/iot/DeviceDetailsView/part/index.js +8 -0
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +277 -0
- package/src/base-client/components/iot/DeviceTypeDetailsView/index.js +3 -0
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +472 -0
- package/src/{components → base-client/components/iot}/InstructDetailsView/index.js +0 -0
- package/src/base-client/components/iot/InstructDetailsView/index.md +45 -0
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +380 -0
- package/src/base-client/components/iot/LogDetailsView/index.js +3 -0
- package/src/base-client/components/iot/LogDetailsView/index.md +43 -0
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +360 -0
- package/src/{components → base-client/components/iot}/MeterDetailsView/index.js +0 -0
- package/src/base-client/components/iot/MeterDetailsView/index.md +43 -0
- package/src/{components → base-client/components/iot}/MeterDetailsView/part/MeterDetailsCount.vue +335 -381
- package/src/{components → base-client/components/iot}/MeterDetailsView/part/MeterDetailsException.vue +185 -204
- package/src/{components → base-client/components/iot}/MeterDetailsView/part/MeterDetailsHandPlan.vue +292 -320
- package/src/{components → base-client/components/iot}/MeterDetailsView/part/MeterDetailsInstruct.vue +237 -278
- package/src/{components → base-client/components/iot}/MeterDetailsView/part/MeterDetailsMain.vue +257 -247
- package/src/{components → base-client/components/iot}/MeterDetailsView/part/MeterDetailsSellGas.vue +190 -211
- package/src/base-client/components/iot/MeterDetailsView/part/index.js +9 -0
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +723 -0
- package/src/base-client/components/iot/WebmeterAnalysisView/index.js +3 -0
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +48 -0
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -0
- package/src/base-client/components/system/DictionaryDetailsView/index.js +3 -0
- package/src/base-client/components/system/DictionaryDetailsView/index.md +41 -0
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +248 -0
- package/src/base-client/components/system/QueryParamsDetailsView/index.js +3 -0
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +406 -0
- package/src/base-client/components/ticket/EmployeeDetailsView/index.js +3 -0
- package/src/base-client/components/ticket/EmployeeDetailsView/index.md +28 -0
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +486 -0
- package/src/base-client/components/ticket/TicketDetailsView/index.js +3 -0
- package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -0
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +184 -0
- package/src/base-client/components/ticket/TicketDetailsView/part/index.js +3 -0
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +303 -0
- package/src/base-client/components/ticket/TicketSubmitSuccessView/index.js +3 -0
- package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -0
- package/src/base-client/plugins/AppData.js +69 -0
- package/src/{plugins → base-client/plugins}/Config.js +1 -1
- package/src/base-client/plugins/GetLoginInfoService.js +221 -0
- package/src/{plugins → base-client/plugins}/PagedList.js +0 -0
- package/src/base-client/plugins/authority-plugin.js +167 -0
- package/src/base-client/plugins/i18n-extend.js +32 -0
- package/src/base-client/plugins/index.js +21 -0
- package/src/{plugins → base-client/plugins}/moment.js +8 -8
- package/src/base-client/plugins/tabs-page-plugin.js +38 -0
- package/src/bootstrap.js +27 -0
- package/src/components/Charts/Bar.vue +62 -0
- package/src/components/Charts/ChartCard.vue +120 -0
- package/src/components/Charts/DataUserOrderSituation.vue +77 -0
- package/src/components/Charts/DataUserReporting.vue +74 -0
- package/src/components/Charts/DataUserSituation.vue +107 -0
- package/src/components/Charts/Liquid.vue +67 -0
- package/src/components/Charts/MiniArea.vue +39 -0
- package/src/components/Charts/MiniBar.vue +39 -0
- package/src/components/Charts/MiniProgress.vue +75 -0
- package/src/components/Charts/MiniSmoothArea.vue +40 -0
- package/src/components/Charts/Radar.vue +68 -0
- package/src/components/Charts/RankList.vue +77 -0
- package/src/components/Charts/TagCloud.vue +113 -0
- package/src/components/Charts/TransferBar.vue +64 -0
- package/src/components/Charts/Trend.vue +82 -0
- package/src/components/Charts/chart.less +13 -0
- package/src/components/Charts/smooth.area.less +14 -0
- package/src/components/Ellipsis/Ellipsis.vue +64 -0
- package/src/components/Ellipsis/index.js +3 -0
- package/src/components/Ellipsis/index.md +38 -0
- package/src/components/NumberInfo/NumberInfo.vue +54 -0
- package/src/components/NumberInfo/index.js +3 -0
- package/src/components/NumberInfo/index.less +55 -0
- package/src/components/NumberInfo/index.md +43 -0
- package/src/components/STable/README.md +341 -0
- package/src/components/STable/index.js +316 -0
- package/src/components/Trend/Trend.vue +41 -0
- package/src/components/Trend/index.js +3 -0
- package/src/components/Trend/index.less +42 -0
- package/src/components/Trend/index.md +45 -0
- package/src/components/_util/util.js +46 -0
- package/src/components/cache/AKeepAlive.js +172 -0
- package/src/components/card/ChartCard.vue +79 -0
- package/src/components/chart/Bar.vue +60 -0
- package/src/components/chart/MiniArea.vue +67 -0
- package/src/components/chart/MiniBar.vue +59 -0
- package/src/components/chart/MiniProgress.vue +57 -0
- package/src/components/chart/Radar.vue +80 -0
- package/src/components/chart/RankingList.vue +60 -0
- package/src/components/chart/Trend.vue +79 -0
- package/src/components/chart/index.less +9 -0
- package/src/components/checkbox/ColorCheckbox.vue +157 -0
- package/src/components/checkbox/ImgCheckbox.vue +163 -0
- package/src/components/checkbox/index.js +7 -0
- package/src/components/dataAnalysisView/UserData.vue +61 -0
- package/src/components/exception/ExceptionPage.vue +70 -0
- package/src/components/exception/typeConfig.js +19 -0
- package/src/components/form/FormRow.vue +52 -0
- package/src/components/index.js +36 -0
- package/src/components/index.less +6 -0
- package/src/components/input/IInput.vue +66 -0
- package/src/components/menu/Contextmenu.vue +84 -0
- package/src/components/menu/SideMenu.vue +62 -0
- package/src/components/menu/index.less +38 -0
- package/src/components/menu/menu.js +273 -0
- package/src/components/page/header/PageHeader.vue +64 -0
- package/src/components/page/header/index.less +40 -0
- package/src/components/result/Result.vue +77 -0
- package/src/components/setting/Setting.vue +237 -0
- package/src/components/setting/SettingItem.vue +26 -0
- package/src/components/setting/i18n.js +117 -0
- package/src/components/table/StandardTable.vue +142 -0
- package/src/components/table/advance/ActionColumns.vue +158 -0
- package/src/components/table/advance/ActionSize.vue +45 -0
- package/src/components/table/advance/AdvanceTable.vue +275 -0
- package/src/components/table/advance/SearchArea.vue +355 -0
- package/src/components/table/advance/index.js +2 -0
- package/src/components/table/api/ApiTable.vue +50 -0
- package/src/components/task/TaskGroup.vue +80 -0
- package/src/components/task/TaskItem.vue +26 -0
- package/src/components/tool/AStepItem.vue +60 -0
- package/src/components/tool/AvatarList.vue +69 -0
- package/src/components/tool/DetailList.vue +157 -0
- package/src/components/tool/Drawer.vue +142 -0
- package/src/components/tool/FooterToolBar.vue +30 -0
- package/src/components/tool/HeadInfo.vue +35 -0
- package/src/components/tool/TagSelect.vue +83 -0
- package/src/components/tool/TagSelectOption.vue +33 -0
- package/src/components/transition/PageToggleTransition.vue +97 -0
- package/src/config/config.js +13 -0
- package/src/config/default/admin.config.js +18 -0
- package/src/config/default/animate.config.js +21 -0
- package/src/config/default/antd.config.js +84 -0
- package/src/config/default/index.js +6 -0
- package/src/config/default/setting.config.js +33 -0
- package/src/config/index.js +6 -0
- package/src/config/replacer/index.js +10 -0
- package/src/config/replacer/resolve.config.js +67 -0
- package/src/index.js +28 -35
- package/src/layouts/AdminLayout.vue +174 -0
- package/src/layouts/BlankView.vue +22 -0
- package/src/layouts/CommonLayout.vue +42 -0
- package/src/layouts/ComponentLayoutOne.vue +47 -0
- package/src/layouts/PageLayout.vue +151 -0
- package/src/layouts/PageView.vue +55 -0
- package/src/layouts/SinglePageView.vue +74 -0
- package/src/layouts/footer/PageFooter.vue +46 -0
- package/src/layouts/header/AdminHeader.vue +109 -0
- package/src/layouts/header/HeaderAvatar.vue +60 -0
- package/src/layouts/header/HeaderNotice.vue +97 -0
- package/src/layouts/header/HeaderSearch.vue +67 -0
- package/src/layouts/header/index.less +92 -0
- package/src/layouts/tabs/TabsHead.vue +190 -0
- package/src/layouts/tabs/TabsView.vue +355 -0
- package/src/layouts/tabs/i18n.js +25 -0
- package/src/layouts/tabs/index.js +2 -0
- package/src/main.js +15 -7
- package/src/mock/common/activityData.js +32 -0
- package/src/mock/common/index.js +89 -0
- package/src/mock/common/reportData.js +20 -0
- package/src/mock/common/tableData.js +118 -0
- package/src/mock/extend/index.js +83 -0
- package/src/mock/goods/index.js +108 -0
- package/src/mock/index.js +12 -0
- package/src/mock/project/index.js +17 -0
- package/src/mock/user/current.js +13 -0
- package/src/mock/user/login.js +39 -0
- package/src/mock/user/routes.js +61 -0
- package/src/mock/workplace/index.js +15 -0
- package/src/pages/exception/403.vue +25 -0
- package/src/pages/exception/404.vue +25 -0
- package/src/pages/exception/500.vue +25 -0
- package/src/pages/login/Login.vue +194 -0
- package/src/pages/login/index.js +2 -0
- package/src/pages/report/ReportTable.js +125 -0
- package/src/pages/report/ReportTableHome.vue +28 -0
- package/src/pages/resourceManage/resourceManageMain.vue +55 -0
- package/src/pages/system/applyInstallView/Core.vue +570 -0
- package/src/pages/system/applyInstallView/LFComponents/AddPanel.vue +52 -0
- package/src/pages/system/applyInstallView/LFComponents/Control.vue +78 -0
- package/src/pages/system/applyInstallView/LFComponents/DataDialog.vue +24 -0
- package/src/pages/system/applyInstallView/LFComponents/NodePanel.vue +103 -0
- package/src/pages/system/applyInstallView/PropertySetting/Base.vue +124 -0
- package/src/pages/system/applyInstallView/PropertySetting/CommonProperty.vue +104 -0
- package/src/pages/system/applyInstallView/PropertySetting/PropertyDialog.vue +43 -0
- package/src/pages/system/applyInstallView/background/base.png +0 -0
- package/src/pages/system/applyInstallView/background/click.png +0 -0
- package/src/pages/system/applyInstallView/background/download.png +0 -0
- package/src/pages/system/applyInstallView/background/end.png +0 -0
- package/src/pages/system/applyInstallView/background/push.png +0 -0
- package/src/pages/system/applyInstallView/background/start.png +0 -0
- package/src/pages/system/applyInstallView/background/step.png +0 -0
- package/src/pages/system/applyInstallView/background/time.png +0 -0
- package/src/pages/system/applyInstallView/config.js +22 -0
- package/src/pages/system/applyInstallView/data.json +1284 -0
- package/src/pages/system/applyInstallView/index.vue +34 -0
- package/src/pages/system/applyInstallView/registerNode/Connect.vue +43 -0
- package/src/pages/system/applyInstallView/registerNode/index.js +16 -0
- package/src/pages/system/applyInstallView/registerNode/registerBackEdge.js +44 -0
- package/src/pages/system/applyInstallView/registerNode/registerBase.js +139 -0
- package/src/pages/system/applyInstallView/registerNode/registerConnect.js +60 -0
- package/src/pages/system/applyInstallView/registerNode/registerDownload.js +92 -0
- package/src/pages/system/applyInstallView/registerNode/registerEnd.js +110 -0
- package/src/pages/system/applyInstallView/registerNode/registerPolyline.js +14 -0
- package/src/pages/system/applyInstallView/registerNode/registerPush.js +127 -0
- package/src/pages/system/applyInstallView/registerNode/registerStart.js +105 -0
- package/src/pages/system/applyInstallView/registerNode/registerStep.js +209 -0
- package/src/pages/system/applyInstallView/registerNode/registerTask.js +29 -0
- package/src/pages/system/dictionary/index.vue +41 -0
- package/src/pages/system/queryParams/index.vue +41 -0
- package/src/router/async/config.async.js +25 -0
- package/src/router/async/router.map.js +59 -0
- package/src/router/config.js +23 -0
- package/src/router/guards.js +104 -0
- package/src/router/i18n.js +57 -0
- package/src/router/index.js +27 -0
- package/src/services/api/CustomerDetailsViewApi.js +6 -0
- package/src/services/api/DeviceBrandDetailsViewApi.js +14 -0
- package/src/services/api/DeviceDetailsViewApi.js +10 -0
- package/src/services/api/DeviceTypeDetailsViewApi.js +6 -0
- package/src/services/api/DictionaryDetailsViewApi.js +6 -0
- package/src/services/api/EmployeeDetailsViewApi.js +16 -0
- package/src/services/api/FormGroupEditApi.js +6 -0
- package/src/services/api/InstructDetailsViewApi.js +12 -0
- package/src/services/api/LogDetailsViewApi.js +10 -0
- package/src/services/api/MeterDetailsViewApi.js +24 -0
- package/src/services/api/QueryParamsDetailsViewApi.js +6 -0
- package/src/services/api/TicketDetailsViewApi.js +30 -0
- package/src/services/api/WebmeterAnalysisViewApi.js +30 -0
- package/src/services/api/common.js +39 -0
- package/src/services/api/iot.js +7 -0
- package/src/services/api/manage.js +12 -0
- package/src/services/api/restTools.js +23 -0
- package/src/services/api/service.js +12 -0
- package/src/services/api.js +11 -0
- package/src/services/dataSource.js +12 -0
- package/src/services/index.js +7 -0
- package/src/services/user.js +34 -0
- package/src/store/index.js +5 -0
- package/src/store/modules/account.js +103 -0
- package/src/store/modules/index.js +4 -0
- package/src/store/modules/setting.js +114 -0
- package/src/store/mutation-types.js +1 -0
- package/src/theme/antd/ant-menu.less +3 -0
- package/src/theme/antd/ant-message.less +3 -0
- package/src/theme/antd/ant-table.less +22 -0
- package/src/theme/antd/ant-time-picker.less +3 -0
- package/src/theme/antd/index.less +4 -0
- package/src/theme/default/color.less +43 -0
- package/src/theme/default/index.less +3 -0
- package/src/theme/default/nprogress.less +76 -0
- package/src/theme/default/style.less +33 -0
- package/src/theme/global.less +130 -0
- package/src/theme/index.less +5 -0
- package/src/theme/reportTable.less +58 -0
- package/src/theme/theme.less +1 -0
- package/src/utils/Objects.js +25 -0
- package/src/utils/authority-utils.js +85 -0
- package/src/utils/axios-interceptors.js +82 -0
- package/src/utils/colors.js +103 -0
- package/src/utils/excel/Blob.js +181 -0
- package/src/utils/excel/Export2Excel.js +142 -0
- package/src/utils/filter.js +21 -0
- package/src/utils/formatter.js +68 -0
- package/src/utils/i18n.js +80 -0
- package/src/utils/indexedDB.js +146 -0
- package/src/utils/request.js +197 -0
- package/src/utils/routerUtil.js +353 -0
- package/src/utils/theme-color-replacer-extend.js +92 -0
- package/src/utils/themeUtil.js +102 -0
- package/src/utils/util.js +134 -0
- package/tests/unit/ReportTable.spec.js +15 -0
- package/vue.config.js +152 -0
- package/webpack.config.js +12 -0
- package/src/api/business.js +0 -30
- package/src/api/common.js +0 -6
- package/src/assets/logo.png +0 -0
- package/src/components/Criteria/Criteria.vue +0 -191
- package/src/components/Criteria/CriteriaPaged.vue +0 -50
- package/src/components/Criteria/index.js +0 -7
- package/src/components/Criteria/index.md +0 -120
- package/src/components/DataGrid/DataGrid.vue +0 -206
- package/src/components/DataGrid/index.js +0 -3
- package/src/components/DataGrid/index.md +0 -195
- package/src/components/ExportExcel/ExportExcel.vue +0 -246
- package/src/components/ExportExcel/index.js +0 -3
- package/src/components/ExportExcel/index.md +0 -76
- package/src/components/FormItem/index.js +0 -3
- package/src/components/InstructDetailsView/InstructDetailsView.vue +0 -518
- package/src/components/InstructDetailsView/index.md +0 -40
- package/src/components/MetaAnalysis/MetaAnalysis.vue +0 -183
- package/src/components/MetaAnalysis/demo/A.vue +0 -31
- package/src/components/MetaAnalysis/demo/B.vue +0 -31
- package/src/components/MetaAnalysis/demo/C.vue +0 -31
- package/src/components/MetaAnalysis/demo/MetaTest.vue +0 -44
- package/src/components/MetaAnalysis/index.js +0 -3
- package/src/components/MetaAnalysis/index.md +0 -255
- package/src/components/MeterDetailsView/MeterDetailsView.vue +0 -317
- package/src/components/MeterDetailsView/index.md +0 -40
- package/src/components/MeterDetailsView/part/index.js +0 -9
- package/src/components/ModalView/Modal.vue +0 -100
- package/src/components/ModalView/index.js +0 -3
- package/src/components/WCriteria/WCriteria.vue +0 -191
- package/src/components/WCriteria/WCriteriaPaged.vue +0 -95
- package/src/components/WCriteria/index.js +0 -7
- package/src/components/WCriteria/index.md +0 -120
- package/src/components/WTable/WTable.vue +0 -216
- package/src/components/WTable/index.js +0 -3
- package/src/components/WTable/index.md +0 -195
- package/src/plugins/AppData.js +0 -39
- package/src/plugins/GetLoginInfoService.js +0 -475
- package/src/plugins/MessageBox.js +0 -15
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-drawer
|
|
3
|
+
title="工单进度查询"
|
|
4
|
+
placement="right"
|
|
5
|
+
:width="isMobile ? screenWidth : screenWidth * 0.85"
|
|
6
|
+
:visible="visible"
|
|
7
|
+
@close="onClose"
|
|
8
|
+
>
|
|
9
|
+
<a-card class="result-success" :bordered="false">
|
|
10
|
+
<result :is-success="icon" :description="description" :title="title" :title-class="titleClass">
|
|
11
|
+
<template slot="action">
|
|
12
|
+
<span style="margin-right: 10px" v-if="countDown > 0">{{ countDownFormat() }}</span>
|
|
13
|
+
<a-tooltip placement="topLeft" :title="tip" arrow-point-at-center>
|
|
14
|
+
<a-button type="primary" v-if="UrgentAvailable" :disabled="urgentAccess" style="margin-right: 20px" @click="urgent">请求加急处理</a-button>
|
|
15
|
+
</a-tooltip>
|
|
16
|
+
<a-button type="danger" @click="closeBtn" >撤销工单</a-button>
|
|
17
|
+
</template>
|
|
18
|
+
<a-modal
|
|
19
|
+
title="关闭工单"
|
|
20
|
+
:visible="closeVisible"
|
|
21
|
+
@ok="handleCloseOk"
|
|
22
|
+
@cancel="handleCloseCancel"
|
|
23
|
+
:zIndex="1002"
|
|
24
|
+
>
|
|
25
|
+
<p>是否确认手动关闭工单?</p>
|
|
26
|
+
<p style="color: red">(该操作不可撤销,请谨慎操作!)</p>
|
|
27
|
+
</a-modal>
|
|
28
|
+
<div>
|
|
29
|
+
<div class="project-name">工单处理进度</div>
|
|
30
|
+
<detail-list size="small" style="max-width: 800px; margin-bottom: 8px">
|
|
31
|
+
<detail-list-item term="工单编号">{{ serialNumber }}</detail-list-item>
|
|
32
|
+
<detail-list-item term="提交时间">{{ format(details.createdTime, 'yyyy-MM-dd') }}</detail-list-item>
|
|
33
|
+
</detail-list>
|
|
34
|
+
<a-steps :current="step" progressDot>
|
|
35
|
+
<a-step title="工单提交">
|
|
36
|
+
<a-step-item-group slot="description">
|
|
37
|
+
<a-step-item :title="details.uploader" />
|
|
38
|
+
<a-step-item :title="details.createdTime"/>
|
|
39
|
+
</a-step-item-group>
|
|
40
|
+
</a-step>
|
|
41
|
+
<a-step title="工单处理中" >
|
|
42
|
+
<a-step-item-group slot="description">
|
|
43
|
+
<a-step-item :title="details.name" v-if="step >= 1" />
|
|
44
|
+
<a-step-item :title="details.confirmTime" v-if="step >= 1"/>
|
|
45
|
+
</a-step-item-group>
|
|
46
|
+
</a-step>
|
|
47
|
+
<a-step title="工单完成" >
|
|
48
|
+
<a-step-item-group slot="description">
|
|
49
|
+
<a-step-item :title="details.finishedTime" v-if="step >= 2"/>
|
|
50
|
+
</a-step-item-group>
|
|
51
|
+
</a-step>
|
|
52
|
+
</a-steps>
|
|
53
|
+
</div>
|
|
54
|
+
</result>
|
|
55
|
+
</a-card>
|
|
56
|
+
</a-drawer>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script>
|
|
60
|
+
import Result from '@/components/result/Result'
|
|
61
|
+
import DetailList from '@/components/tool/DetailList'
|
|
62
|
+
import AStepItem from '@/components/tool/AStepItem'
|
|
63
|
+
import { TicketDetailsViewApi } from '@/services/api/TicketDetailsViewApi'
|
|
64
|
+
import { post } from '@/services/api/restTools'
|
|
65
|
+
import { mapState } from 'vuex'
|
|
66
|
+
import { formatDate } from '@/utils/util'
|
|
67
|
+
|
|
68
|
+
const AStepItemGroup = AStepItem.Group
|
|
69
|
+
const DetailListItem = DetailList.Item
|
|
70
|
+
export default {
|
|
71
|
+
name: 'submitTicketSuccess',
|
|
72
|
+
components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result },
|
|
73
|
+
data () {
|
|
74
|
+
return {
|
|
75
|
+
// 页面宽度
|
|
76
|
+
screenWidth: document.documentElement.clientWidth,
|
|
77
|
+
title: '提交成功',
|
|
78
|
+
description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系',
|
|
79
|
+
// 加急按钮气泡文字
|
|
80
|
+
tip: '如果需要加急,请在5分钟倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
|
|
81
|
+
// 控制标题样式
|
|
82
|
+
titleClass: 'title',
|
|
83
|
+
// 工单详情
|
|
84
|
+
details: {
|
|
85
|
+
uploader: '',
|
|
86
|
+
status: '',
|
|
87
|
+
name: '',
|
|
88
|
+
priority: undefined,
|
|
89
|
+
createdTime: '',
|
|
90
|
+
confirmTime: '',
|
|
91
|
+
finishedTime: ''
|
|
92
|
+
},
|
|
93
|
+
// 控制加急按钮
|
|
94
|
+
urgentAccess: true,
|
|
95
|
+
// 倒计时
|
|
96
|
+
countDown: 0,
|
|
97
|
+
// 控制加急按钮显示
|
|
98
|
+
UrgentAvailable: true,
|
|
99
|
+
// 刷新页面的定时器
|
|
100
|
+
timer: undefined,
|
|
101
|
+
// 取消工单确认框可见性
|
|
102
|
+
closeVisible: false,
|
|
103
|
+
// 控制页面大图标
|
|
104
|
+
icon: true,
|
|
105
|
+
// 控制加急后定时器
|
|
106
|
+
showTelephoneCountDown: 0
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
props: {
|
|
110
|
+
serialNumber: {
|
|
111
|
+
type: String,
|
|
112
|
+
required: true
|
|
113
|
+
},
|
|
114
|
+
visible: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: false
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
mounted () {
|
|
120
|
+
this.getTicketDetail()
|
|
121
|
+
this.refresh()
|
|
122
|
+
this.countDown = 0
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
// 关闭抽屉时回调
|
|
126
|
+
onClose () {
|
|
127
|
+
this.urgentAccess = true
|
|
128
|
+
clearInterval(this.timer)
|
|
129
|
+
this.$emit('update:visible', false)
|
|
130
|
+
this.titleClass = 'title'
|
|
131
|
+
this.description = '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系'
|
|
132
|
+
this.title = '提交成功'
|
|
133
|
+
this.UrgentAvailable = true
|
|
134
|
+
},
|
|
135
|
+
format (date, format) {
|
|
136
|
+
return formatDate(date, format)
|
|
137
|
+
},
|
|
138
|
+
// 关闭工单确认后操作
|
|
139
|
+
handleCloseOk () {
|
|
140
|
+
return post(TicketDetailsViewApi.manualCloseTicketByCustomer, {
|
|
141
|
+
serialNumber: this.serialNumber,
|
|
142
|
+
time: new Date()
|
|
143
|
+
})
|
|
144
|
+
.then(res => {
|
|
145
|
+
this.closeVisible = false
|
|
146
|
+
this.title = '工单已关闭'
|
|
147
|
+
this.description = ''
|
|
148
|
+
this.icon = false
|
|
149
|
+
clearInterval(this.timer)
|
|
150
|
+
}, err => {
|
|
151
|
+
console.error(err)
|
|
152
|
+
})
|
|
153
|
+
},
|
|
154
|
+
// 关闭工单取消后业务逻辑
|
|
155
|
+
handleCloseCancel () {
|
|
156
|
+
this.closeVisible = false
|
|
157
|
+
},
|
|
158
|
+
// 关闭工单按钮
|
|
159
|
+
closeBtn () {
|
|
160
|
+
this.closeVisible = true
|
|
161
|
+
},
|
|
162
|
+
// 过10s刷新一下页面数据
|
|
163
|
+
refresh () {
|
|
164
|
+
this.timer = setInterval(() => {
|
|
165
|
+
this.getTicketDetail()
|
|
166
|
+
}, 10 * 1000)
|
|
167
|
+
},
|
|
168
|
+
// 对工单进行加急处理
|
|
169
|
+
urgent () {
|
|
170
|
+
return post(TicketDetailsViewApi.rushTicket, {
|
|
171
|
+
serialNumber: this.serialNumber
|
|
172
|
+
})
|
|
173
|
+
.then(res => {
|
|
174
|
+
if (res === 1) {
|
|
175
|
+
this.$message.success(
|
|
176
|
+
'操作成功',
|
|
177
|
+
5
|
|
178
|
+
)
|
|
179
|
+
this.title = '加急成功'
|
|
180
|
+
this.titleClass = 'title_danger'
|
|
181
|
+
this.description = '您的工单已经被加急处理,我们的工作人员会马上与您取得联系'
|
|
182
|
+
this.UrgentAvailable = false
|
|
183
|
+
this.showPhoneNumberTimer()
|
|
184
|
+
} else {
|
|
185
|
+
this.$message.error(
|
|
186
|
+
'操作失败',
|
|
187
|
+
5
|
|
188
|
+
)
|
|
189
|
+
}
|
|
190
|
+
}, err => {
|
|
191
|
+
console.log(err)
|
|
192
|
+
})
|
|
193
|
+
},
|
|
194
|
+
// 格式化倒计时
|
|
195
|
+
countDownFormat () {
|
|
196
|
+
const hours = '00'
|
|
197
|
+
let mins = Math.floor(this.countDown / 60)
|
|
198
|
+
let secs = this.countDown % 60
|
|
199
|
+
if (mins < 10) {
|
|
200
|
+
mins = '0' + mins
|
|
201
|
+
}
|
|
202
|
+
if (secs < 10) {
|
|
203
|
+
secs = '0' + secs
|
|
204
|
+
}
|
|
205
|
+
return hours + ':' + mins + ':' + secs
|
|
206
|
+
},
|
|
207
|
+
// 设置用于控制加急按钮倒计时定时器,加急按钮5分钟后才可点击
|
|
208
|
+
setTimer () {
|
|
209
|
+
this.countDown = 5
|
|
210
|
+
const time = setInterval(() => {
|
|
211
|
+
this.countDown--
|
|
212
|
+
if (this.countDown <= 0) {
|
|
213
|
+
this.urgentAccess = false
|
|
214
|
+
clearInterval(time)
|
|
215
|
+
this.countDown = -1
|
|
216
|
+
}
|
|
217
|
+
}, 1000)
|
|
218
|
+
},
|
|
219
|
+
// 设定关于加急后的定时器,5分钟后仍没人联系,显示联系电话
|
|
220
|
+
showPhoneNumberTimer () {
|
|
221
|
+
this.showTelephoneCountDown = 5
|
|
222
|
+
const time = setInterval(() => {
|
|
223
|
+
this.showTelephoneCountDown--
|
|
224
|
+
if (this.showTelephoneCountDown <= 0) {
|
|
225
|
+
this.description = '很抱歉让您久等,029-88888888 您可以直接拨打此电话,与我们技术人员直接交谈!'
|
|
226
|
+
clearInterval(time)
|
|
227
|
+
this.showTelephoneCountDown = -1
|
|
228
|
+
}
|
|
229
|
+
}, 1000)
|
|
230
|
+
},
|
|
231
|
+
// 获取工单详情
|
|
232
|
+
getTicketDetail () {
|
|
233
|
+
return post(TicketDetailsViewApi.getTicketDetailsForUploader, {
|
|
234
|
+
serialNumber: this.serialNumber
|
|
235
|
+
})
|
|
236
|
+
.then(res => {
|
|
237
|
+
this.details.uploader = res.uploader
|
|
238
|
+
// 判断负责人有没有值
|
|
239
|
+
if (res.name === undefined) {
|
|
240
|
+
this.details.name = ''
|
|
241
|
+
} else {
|
|
242
|
+
this.details.name = res.name
|
|
243
|
+
}
|
|
244
|
+
// 判断工单被确认时间
|
|
245
|
+
if (res.confirmtime === undefined) {
|
|
246
|
+
this.details.confirmTime = ''
|
|
247
|
+
} else {
|
|
248
|
+
this.details.confirmTime = this.format(res.confirmtime, 'yyyy-MM-dd hh:mm:ss')
|
|
249
|
+
}
|
|
250
|
+
// 判断工单完成时间
|
|
251
|
+
if (res.finishedtime === undefined) {
|
|
252
|
+
this.details.finishedTime = ''
|
|
253
|
+
} else {
|
|
254
|
+
this.details.finishedTime = this.format(res.finishedtime, 'yyyy-MM-dd hh:mm:ss')
|
|
255
|
+
}
|
|
256
|
+
this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
|
|
257
|
+
this.details.status = res.status
|
|
258
|
+
this.details.priority = res.priority
|
|
259
|
+
|
|
260
|
+
// 如果当前状态为一般,设置定时器,五分钟后允许加急
|
|
261
|
+
if (this.details.priority > 1 && this.countDown === 0) {
|
|
262
|
+
this.setTimer()
|
|
263
|
+
}
|
|
264
|
+
}, err => {
|
|
265
|
+
console.log(err)
|
|
266
|
+
})
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
computed: {
|
|
270
|
+
...mapState('account', { currUser: 'user' }),
|
|
271
|
+
...mapState('setting', ['isMobile']),
|
|
272
|
+
// 用于进度条,进度显示控制
|
|
273
|
+
step () {
|
|
274
|
+
if (this.details.status !== 0 && this.details.status !== 1) {
|
|
275
|
+
return 2
|
|
276
|
+
} else {
|
|
277
|
+
return this.details.status
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
watch: {
|
|
282
|
+
'serialNumber' () {
|
|
283
|
+
this.getTicketDetail()
|
|
284
|
+
this.refresh()
|
|
285
|
+
this.countDown = 0
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
</script>
|
|
290
|
+
|
|
291
|
+
<style scoped lang="less">
|
|
292
|
+
.result-success{
|
|
293
|
+
.action:not(:first-child){
|
|
294
|
+
margin-left: 8px;
|
|
295
|
+
}
|
|
296
|
+
.project-name{
|
|
297
|
+
font-size: 16px;
|
|
298
|
+
color: @title-color;
|
|
299
|
+
font-weight: 500;
|
|
300
|
+
margin-bottom: 20px;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# TicketDetailsView 工单详情页
|
|
2
|
+
|
|
3
|
+
提供一个可以对单个工单进行一系列通用业务操作的抽屉实现
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
允许用户对单个工单进行一系列通用业务操作
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## 代码演示
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<ticket-details-view
|
|
17
|
+
:visible.sync="detailVisible"
|
|
18
|
+
:ticketId="ticketId"
|
|
19
|
+
v-if="ticketId"
|
|
20
|
+
/>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## API
|
|
24
|
+
|
|
25
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
26
|
+
|---------------|-------|---------|-------|
|
|
27
|
+
| detailVisible | 是否显示 | Boolean | false |
|
|
28
|
+
| ticketId | 工单编号 | String | null |
|
|
29
|
+
| id | 负责人id | String | null |
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { post } from '@/services/api/restTools'
|
|
2
|
+
import { manageApi } from '@/services/api/manage'
|
|
3
|
+
import { commonApi } from '@/services/api/common'
|
|
4
|
+
|
|
5
|
+
const GetAppDataService = {
|
|
6
|
+
install (Vue) {
|
|
7
|
+
// 给vue增添对话框显示方法
|
|
8
|
+
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
9
|
+
},
|
|
10
|
+
async load () {
|
|
11
|
+
const params = {}
|
|
12
|
+
// 查询燃气公司列表
|
|
13
|
+
const orgList = []
|
|
14
|
+
await post(manageApi.orgList, {}).then(async res => {
|
|
15
|
+
for (let i = 0, len = res.length; i < len; i++) {
|
|
16
|
+
orgList.push({
|
|
17
|
+
label: res[i],
|
|
18
|
+
value: res[i],
|
|
19
|
+
text: res[i]
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
params['orgList'] = orgList
|
|
23
|
+
await post(commonApi.getDictionaryValue, {}).then((res) => {
|
|
24
|
+
Object.assign(params, res)
|
|
25
|
+
const badgeItemArray = {}
|
|
26
|
+
for (const key of Object.keys(params)) {
|
|
27
|
+
badgeItemArray[key] = {}
|
|
28
|
+
for (const item of params[key]) {
|
|
29
|
+
if (item.status) {
|
|
30
|
+
badgeItemArray[key][item.value] = {
|
|
31
|
+
status: item.status,
|
|
32
|
+
text: item.text
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// 追加参数
|
|
38
|
+
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
39
|
+
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
},
|
|
43
|
+
getDictionaryList (key) {
|
|
44
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
45
|
+
const object = JSON.parse(str)
|
|
46
|
+
return object[key]
|
|
47
|
+
},
|
|
48
|
+
getParam (key, value) {
|
|
49
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
50
|
+
const object = JSON.parse(str)
|
|
51
|
+
const result = object[key]
|
|
52
|
+
if (result && result.hasOwnProperty(value)) {
|
|
53
|
+
return result[value]
|
|
54
|
+
} else {
|
|
55
|
+
return null
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
getParams () {
|
|
59
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
60
|
+
const object = JSON.parse(str)
|
|
61
|
+
return object
|
|
62
|
+
},
|
|
63
|
+
getSingleValues () {
|
|
64
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
65
|
+
const object = JSON.parse(str)
|
|
66
|
+
return object
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export default GetAppDataService
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import { SEARCH } from '@/services/api'
|
|
3
|
+
import { post } from '@/services/api/restTools'
|
|
4
|
+
|
|
5
|
+
const loginGen = async function (response) {
|
|
6
|
+
Vue.$login.f = response
|
|
7
|
+
await Promise.all([Vue.$appdata.load(), getGasman(), getLic(), getViewDetails()])
|
|
8
|
+
const login = {
|
|
9
|
+
f: Vue.$login.f,
|
|
10
|
+
jwt: Vue.$login.f.id,
|
|
11
|
+
r: Vue.$login.r
|
|
12
|
+
}
|
|
13
|
+
Vue.$store.commit('account/setLogin', login)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 获取片区
|
|
18
|
+
* @returns {Promise<void>}
|
|
19
|
+
*/
|
|
20
|
+
// eslint-disable-next-line
|
|
21
|
+
async function getAllArea () {
|
|
22
|
+
try {
|
|
23
|
+
const getAllArea = await post(SEARCH, {
|
|
24
|
+
source: 'this.getParentByType($organization$).getChildByName($片区$).getChildren()',
|
|
25
|
+
userid: Vue.$login.f.id
|
|
26
|
+
})
|
|
27
|
+
const areaTemp = []
|
|
28
|
+
for (let i = 0; i < getAllArea.length; i++) {
|
|
29
|
+
areaTemp.push({ label: getAllArea[i].name, value: getAllArea[i] })
|
|
30
|
+
}
|
|
31
|
+
Vue.$login.f.f_allArea = areaTemp
|
|
32
|
+
} catch (error) {
|
|
33
|
+
Vue.$login.f.f_allArea = []
|
|
34
|
+
console.log('获取片区异常', error)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 获取抄表员
|
|
39
|
+
* @returns {Promise<void>}
|
|
40
|
+
*/
|
|
41
|
+
async function getGasman () {
|
|
42
|
+
try {
|
|
43
|
+
const getGasman = await post(SEARCH, {
|
|
44
|
+
source: 'this.getParentByType($organization$).getChildByName($抄表员$).getUsers()',
|
|
45
|
+
userid: Vue.$login.f.id
|
|
46
|
+
})
|
|
47
|
+
const gasman = []
|
|
48
|
+
for (let i = 0; i < getGasman.length; i++) {
|
|
49
|
+
gasman.push(getGasman[i])
|
|
50
|
+
}
|
|
51
|
+
Vue.$login.f.f_gasman = gasman
|
|
52
|
+
} catch (error) {
|
|
53
|
+
Vue.$login.f.f_gasman = []
|
|
54
|
+
console.log('获取抄表员异常', error)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 获取资源服务权限
|
|
59
|
+
* @returns {Promise<void>}
|
|
60
|
+
*/
|
|
61
|
+
async function getLic () {
|
|
62
|
+
try {
|
|
63
|
+
const getLic = await post(SEARCH, { data: {
|
|
64
|
+
source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($资源操作$) != -1)',
|
|
65
|
+
userid: Vue.$login.f.id
|
|
66
|
+
} }, { resolveMsg: null, rejectMsg: null })
|
|
67
|
+
const arry = []
|
|
68
|
+
getLic.forEach((item) => {
|
|
69
|
+
arry.push(item.name)
|
|
70
|
+
})
|
|
71
|
+
Vue.$login.f.lics = arry
|
|
72
|
+
} catch (error) {
|
|
73
|
+
Vue.$login.f.f_gasman = []
|
|
74
|
+
console.log('获取资源服务权限异常', error)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 获取界面细节 (界面权限)
|
|
79
|
+
* @returns {Promise<void>}
|
|
80
|
+
*/
|
|
81
|
+
async function getViewDetails () {
|
|
82
|
+
try {
|
|
83
|
+
const viewDetails = await post(SEARCH, {
|
|
84
|
+
source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
|
|
85
|
+
userid: Vue.$login.f.id
|
|
86
|
+
}, { resolveMsg: null, rejectMsg: null })
|
|
87
|
+
const r = viewDetails
|
|
88
|
+
Vue.$login.r = []
|
|
89
|
+
r.forEach(x => Vue.$login.r.push(x.name))
|
|
90
|
+
} catch (error) {
|
|
91
|
+
Vue.$login.r = []
|
|
92
|
+
console.log('获取界面细节异常', error)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 获取资源功能
|
|
97
|
+
* @returns {Promise<void>}
|
|
98
|
+
*/
|
|
99
|
+
async function getResourceFunction () {
|
|
100
|
+
try {
|
|
101
|
+
const resourceFunction = await post(SEARCH, {
|
|
102
|
+
source: 'tool.getFullTree(this.getRights().where(row.getName() == $组织管理$||row.getName() == $功能管理$||row.getName() == $部门管理$ || row.getName() == $角色管理$ || row.getName() == $人员管理$|| row.getName() == $资源调配$ ))',
|
|
103
|
+
userid: Vue.$login.f.id
|
|
104
|
+
}, { resolveMsg: null, rejectMsg: null })
|
|
105
|
+
return resourceFunction
|
|
106
|
+
} catch (error) {
|
|
107
|
+
console.log('获取资源功能异常', error)
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const GetLoginInfoService = {
|
|
112
|
+
install (Vue) {
|
|
113
|
+
// 给vue增添对话框显示方法
|
|
114
|
+
Vue.$login = Vue.prototype.$login = GetLoginInfoService
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
f: {
|
|
118
|
+
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
login (response) {
|
|
122
|
+
return loginGen(response)
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
convertToIn (val) {
|
|
126
|
+
let temp = ''
|
|
127
|
+
if (val instanceof Array) {
|
|
128
|
+
if (val.length >= 1) {
|
|
129
|
+
temp = '('
|
|
130
|
+
val.forEach((res) => {
|
|
131
|
+
temp += `'${res}',`
|
|
132
|
+
})
|
|
133
|
+
temp = temp.substr(0, temp.length - 1) + ')'
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return temp
|
|
137
|
+
},
|
|
138
|
+
toStandardTimeString () {
|
|
139
|
+
const dt = new Date()
|
|
140
|
+
const month = dt.getMonth() + 1
|
|
141
|
+
const date = dt.getDate()
|
|
142
|
+
const hour = dt.getHours()
|
|
143
|
+
const min = dt.getMinutes()
|
|
144
|
+
const sec = dt.getSeconds()
|
|
145
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) +
|
|
146
|
+
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
guid () {
|
|
150
|
+
const buf = new Uint16Array(8)
|
|
151
|
+
window.crypto.getRandomValues(buf)
|
|
152
|
+
const S4 = function (num) {
|
|
153
|
+
let ret = num.toString()
|
|
154
|
+
while (ret.length < 4) {
|
|
155
|
+
ret = '0' + ret
|
|
156
|
+
}
|
|
157
|
+
return ret
|
|
158
|
+
}
|
|
159
|
+
return (S4(buf[0]) + S4(buf[1]) + S4(buf[2]) + S4(buf[3]) + S4(buf[4]) + S4(buf[5]) + S4(buf[6]) + S4(buf[7]))
|
|
160
|
+
},
|
|
161
|
+
required (param) {
|
|
162
|
+
if (typeof param === 'number' && param === 0) {
|
|
163
|
+
return false
|
|
164
|
+
}
|
|
165
|
+
if (!param) {
|
|
166
|
+
return true
|
|
167
|
+
}
|
|
168
|
+
param = param + ''
|
|
169
|
+
param = param.trim()
|
|
170
|
+
return !param
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
isInt (n) {
|
|
174
|
+
return !window.isNaN(n) && n % 1 === 0
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
// 不能选择器中截取掉多余的字符
|
|
178
|
+
orgName (name) {
|
|
179
|
+
return name.substring(10)
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
addDate (date, days) {
|
|
183
|
+
// 求取当前时间的工具
|
|
184
|
+
let endDate = new Date(date)
|
|
185
|
+
endDate = endDate.valueOf()
|
|
186
|
+
endDate = endDate + days * 24 * 60 * 60 * 1000
|
|
187
|
+
endDate = new Date(endDate)
|
|
188
|
+
const month = endDate.getMonth() + 1
|
|
189
|
+
const day = endDate.getDate()
|
|
190
|
+
const hour = endDate.getHours()
|
|
191
|
+
const min = endDate.getMinutes()
|
|
192
|
+
const sec = endDate.getSeconds()
|
|
193
|
+
return endDate.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) +
|
|
194
|
+
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
|
195
|
+
// return a
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
// 对字符串进行加密
|
|
199
|
+
compileStr (code) {
|
|
200
|
+
let c = String.fromCharCode(code.charCodeAt(0) + code.length)
|
|
201
|
+
for (let i = 1; i < code.length; i++) {
|
|
202
|
+
c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1))
|
|
203
|
+
}
|
|
204
|
+
return escape(c)
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
// 字符串进行解密
|
|
208
|
+
uncompileStr (code) {
|
|
209
|
+
code = unescape(code)
|
|
210
|
+
let c = String.fromCharCode(code.charCodeAt(0) - code.length)
|
|
211
|
+
for (let i = 1; i < code.length; i++) {
|
|
212
|
+
c += String.fromCharCode(code.charCodeAt(i) - c.charCodeAt(i - 1))
|
|
213
|
+
}
|
|
214
|
+
return c
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export default GetLoginInfoService
|
|
219
|
+
export {
|
|
220
|
+
getResourceFunction
|
|
221
|
+
}
|
|
File without changes
|