manage-client 3.2.37 → 3.2.41
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/.babelrc +5 -5
- package/.classpath +6 -6
- package/.editorconfig +9 -9
- package/.eslintrc.js +20 -20
- package/.gradle/5.4.1/fileChanges/last-build.bin +0 -0
- package/.gradle/5.4.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/5.4.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/.project +18 -18
- package/CHANGELOG.md +15 -15
- package/DOC//345/212/237/350/203/275/350/257/264/346/230/216.md +13 -13
- package/DOC//347/211/210/346/234/254/344/277/241/346/201/257.md +8 -8
- package/ManageClient.iml +13 -13
- package/README.md +38 -38
- package/build/dev-server.js +194 -174
- package/build/webpack.base.conf.js +82 -82
- package/build.gradle +13 -13
- package/config/dev.env.js +6 -6
- package/config/index.js +40 -40
- package/config/prod.env.js +3 -3
- package/config/test.env.js +6 -6
- package/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/gradlew.bat +100 -100
- package/index.html +28 -28
- package/package.json +1 -1
- package/release.bat +5 -5
- package/src/.idea/misc.xml +9 -0
- package/src/.idea/modules.xml +8 -0
- package/src/.idea/src.iml +9 -0
- package/src/.idea/vcs.xml +6 -0
- package/src/.idea/workspace.xml +93 -0
- package/src/ManageHome.js +269 -269
- package/src/Staff/StaffCompileList.vue +334 -334
- package/src/Staff/StaffList.vue +161 -161
- package/src/Staff/StaffListManage.vue +49 -49
- package/src/Util.js +367 -367
- package/src/components/BasisEcharts/BarChart.vue +247 -247
- package/src/components/BasisEcharts/LineChart.vue +243 -243
- package/src/components/ManageHome/CustomerService/ContentmentStatistics.vue +135 -135
- package/src/components/ManageHome/CustomerService/ExcepCollect.vue +174 -174
- package/src/components/ManageHome/CustomerService/ReasonComplaint.vue +116 -116
- package/src/components/ManageHome/CustomerService/ReasonConsultation.vue +115 -115
- package/src/components/ManageHome/CustomerService/ServiceFix.vue +155 -155
- package/src/components/ManageHome/CustomerService/ServiceHome.vue +179 -179
- package/src/components/ManageHome/CustomerService/ServiceStatistics.vue +147 -147
- package/src/components/ManageHome/CustomerService/TrafficStatistics.vue +160 -160
- package/src/components/ManageHome/Drill/DrillData.vue +791 -791
- package/src/components/ManageHome/Drill/DrillList.vue +320 -320
- package/src/components/ManageHome/Drill/DrillPool.vue +129 -129
- package/src/components/ManageHome/Home/CallCenter.vue +124 -124
- package/src/components/ManageHome/Home/CallFix.vue +172 -172
- package/src/components/ManageHome/Home/CallStatistics.vue +147 -147
- package/src/components/ManageHome/Home/GasValue.vue +233 -233
- package/src/components/ManageHome/Home/Home.vue +138 -138
- package/src/components/ManageHome/Home/Monitor.vue +329 -329
- package/src/components/ManageHome/Home/NetWork.vue +202 -202
- package/src/components/ManageHome/Home/SafeCheck.vue +249 -249
- package/src/components/ManageHome/Home/UserModule.vue +367 -367
- package/src/components/ManageHome/ImportSupplygas/AddSupply.vue +206 -206
- package/src/components/ManageHome/ImportSupplygas/SuppleManagement.vue +43 -43
- package/src/components/ManageHome/ImportSupplygas/SupplySelect.vue +85 -85
- package/src/components/ManageHome/ImportSupplygas/UpdateSupply.vue +187 -187
- package/src/components/ManageHome/ManageHome.vue +292 -292
- package/src/components/ManageHome/Monitor/BuySub.vue +311 -311
- package/src/components/ManageHome/Monitor/Caveat.vue +300 -300
- package/src/components/ManageHome/Monitor/ComparedGas.vue +264 -264
- package/src/components/ManageHome/Monitor/MeterBrand.vue +211 -211
- package/src/components/ManageHome/Monitor/MonitorCenter.vue +132 -132
- package/src/components/ManageHome/Monitor/MonitorHome.vue +188 -188
- package/src/components/ManageHome/Monitor/NoBuyGas.vue +223 -223
- package/src/components/ManageHome/Monitor/NoContact.vue +233 -233
- package/src/components/ManageHome/Monitor/NoGas.vue +202 -202
- package/src/components/ManageHome/NetWork/LineInspection.vue +267 -267
- package/src/components/ManageHome/NetWork/NetDanger.vue +258 -258
- package/src/components/ManageHome/NetWork/NetHome.vue +84 -84
- package/src/components/ManageHome/NetWork/SupplyGas.vue +204 -204
- package/src/components/ManageHome/SecurityCheck/CheckHome.vue +94 -94
- package/src/components/ManageHome/SecurityCheck/CustomerType.vue +244 -244
- package/src/components/ManageHome/SecurityCheck/LatentDanger.vue +218 -218
- package/src/components/ManageHome/SecurityCheck/PlanStatistics.vue +231 -231
- package/src/components/ManageHome/SecurityCheck/StateStatistics.vue +237 -237
- package/src/components/ManageHome/SecurityCheck/TaskStatistics.vue +303 -303
- package/src/components/ManageHome/User/GasDistri.vue +271 -271
- package/src/components/ManageHome/User/InspecDistri.vue +272 -272
- package/src/components/ManageHome/User/SaleProportion.vue +309 -309
- package/src/components/ManageHome/User/UseHome.vue +155 -155
- package/src/components/ManageHome/User/UserGascontrast.vue +223 -223
- package/src/components/ManageHome/User/UserNumber.vue +519 -519
- package/src/components/ManageHome/User/UsernumIncrease.vue +243 -243
- package/src/components/ManageHome/loading.vue +23 -23
- package/src/components/ManageHomeCS/Cockpit.vue +43 -43
- package/src/components/ManageHomeCS/CustomerService/ContentmentStatistics.vue +161 -161
- package/src/components/ManageHomeCS/CustomerService/ExcepCollect.vue +201 -201
- package/src/components/ManageHomeCS/CustomerService/ReasonComplaint.vue +146 -146
- package/src/components/ManageHomeCS/CustomerService/ReasonConsultation.vue +148 -148
- package/src/components/ManageHomeCS/CustomerService/ServiceFix.vue +242 -242
- package/src/components/ManageHomeCS/CustomerService/ServiceHome.vue +176 -176
- package/src/components/ManageHomeCS/CustomerService/ServiceStatistics.vue +277 -277
- package/src/components/ManageHomeCS/CustomerService/TrafficStatistics.vue +226 -226
- package/src/components/ManageHomeCS/Drill/DrillData.vue +918 -918
- package/src/components/ManageHomeCS/Drill/DrillList.vue +320 -320
- package/src/components/ManageHomeCS/Drill/DrillPool.vue +129 -129
- package/src/components/ManageHomeCS/Home/CallCenter.vue +206 -206
- package/src/components/ManageHomeCS/Home/CallFix.vue +172 -172
- package/src/components/ManageHomeCS/Home/CallStatistics.vue +147 -147
- package/src/components/ManageHomeCS/Home/GasValue.vue +466 -466
- package/src/components/ManageHomeCS/Home/Home.vue +57 -57
- package/src/components/ManageHomeCS/Home/Monitor.vue +423 -423
- package/src/components/ManageHomeCS/Home/NetWork.vue +223 -223
- package/src/components/ManageHomeCS/Home/SafeCheck.vue +446 -446
- package/src/components/ManageHomeCS/Home/ShanxiMap.vue +432 -432
- package/src/components/ManageHomeCS/Home/UserModule.vue +511 -511
- package/src/components/ManageHomeCS/Home/YulinMap.vue +424 -424
- package/src/components/ManageHomeCS/ImportSupplygas/AddSupply.vue +206 -206
- package/src/components/ManageHomeCS/ImportSupplygas/SuppleManagement.vue +43 -43
- package/src/components/ManageHomeCS/ImportSupplygas/SupplySelect.vue +85 -85
- package/src/components/ManageHomeCS/ImportSupplygas/UpdateSupply.vue +187 -187
- package/src/components/ManageHomeCS/Monitor/BuySub.vue +339 -339
- package/src/components/ManageHomeCS/Monitor/Caveat.vue +301 -301
- package/src/components/ManageHomeCS/Monitor/ComparedGas.vue +276 -276
- package/src/components/ManageHomeCS/Monitor/MeterBrand.vue +220 -220
- package/src/components/ManageHomeCS/Monitor/MonitorCenter.vue +139 -139
- package/src/components/ManageHomeCS/Monitor/MonitorHome.vue +188 -188
- package/src/components/ManageHomeCS/Monitor/NoBuyGas.vue +218 -218
- package/src/components/ManageHomeCS/Monitor/NoContact.vue +217 -217
- package/src/components/ManageHomeCS/Monitor/NoGas.vue +214 -214
- package/src/components/ManageHomeCS/NetWork/LineInspection.vue +268 -268
- package/src/components/ManageHomeCS/NetWork/NetDanger.vue +258 -258
- package/src/components/ManageHomeCS/NetWork/NetHome.vue +106 -106
- package/src/components/ManageHomeCS/NetWork/NetWork.vue +222 -222
- package/src/components/ManageHomeCS/NetWork/NetWorkMap.vue +86 -86
- package/src/components/ManageHomeCS/NetWork/SupplyGas.vue +291 -291
- package/src/components/ManageHomeCS/NewHome/GasProperties.vue +314 -314
- package/src/components/ManageHomeCS/NewHome/NewManageHome.vue +182 -182
- package/src/components/ManageHomeCS/NewHome/TextBusiness.vue +267 -267
- package/src/components/ManageHomeCS/NewHome/TextChildsellgas.vue +209 -209
- package/src/components/ManageHomeCS/NewHome/TextProfit.vue +298 -298
- package/src/components/ManageHomeCS/NewHome/TextSellgas.vue +82 -82
- package/src/components/ManageHomeCS/NewHome/TextShanximap.vue +389 -389
- package/src/components/ManageHomeCS/NewHome/TextTotalsellgas.vue +406 -406
- package/src/components/ManageHomeCS/NewHome/TextUser.vue +378 -378
- package/src/components/ManageHomeCS/NewHome/yulin.vue +425 -425
- package/src/components/ManageHomeCS/Poor/PoorHome.vue +176 -176
- package/src/components/ManageHomeCS/SecurityCheck/CheckHome.vue +94 -94
- package/src/components/ManageHomeCS/SecurityCheck/CustomerType.vue +246 -246
- package/src/components/ManageHomeCS/SecurityCheck/LatentDanger.vue +220 -220
- package/src/components/ManageHomeCS/SecurityCheck/PlanStatistics.vue +306 -306
- package/src/components/ManageHomeCS/SecurityCheck/StateStatistics.vue +239 -239
- package/src/components/ManageHomeCS/SecurityCheck/TaskStatistics.vue +311 -311
- package/src/components/ManageHomeCS/User/FMYInspecDistri.vue +269 -269
- package/src/components/ManageHomeCS/User/GasDistri.vue +220 -220
- package/src/components/ManageHomeCS/User/MYInspecDistri.vue +269 -269
- package/src/components/ManageHomeCS/User/SaleProportion.vue +384 -384
- package/src/components/ManageHomeCS/User/UseHome.vue +162 -162
- package/src/components/ManageHomeCS/User/UserGascontrast.vue +221 -221
- package/src/components/ManageHomeCS/User/UserNumber.vue +600 -600
- package/src/components/ManageHomeCS/User/UsernumIncrease.vue +277 -277
- package/src/components/ManageHomeCS/loading.vue +39 -39
- package/src/components/ManageHomeCS/test.vue +88 -88
- package/src/components/MeterManage/ChangeMeterQuery.vue +82 -82
- package/src/components/MeterManage/ChargeQuery.vue +79 -79
- package/src/components/MeterManage/FillCardQuery.vue +80 -80
- package/src/components/MeterManage/FillGasQuery.vue +80 -80
- package/src/components/MeterManage/HandQuery.vue +72 -72
- package/src/components/MeterManage/MeterInfoManage.vue +107 -107
- package/src/components/MeterManage/MeterList.vue +336 -336
- package/src/components/MeterManage/MeterMsg.vue +181 -181
- package/src/components/MeterManage/OtherChargeQuery.vue +78 -78
- package/src/components/MeterManage/ReversalQuery.vue +77 -77
- package/src/components/MeterManage/TransferQuery.vue +72 -72
- package/src/components/SellReport/BankManager.vue +146 -146
- package/src/components/SellReport/CaiManageDayGas.vue +280 -280
- package/src/components/SellReport/ChManageBusSummary.vue +273 -273
- package/src/components/SellReport/ChManageHandSellMoney.vue +274 -274
- package/src/components/SellReport/ChManageMonthGas.vue +285 -285
- package/src/components/SellReport/ChOtherfee.vue +251 -251
- package/src/components/SellReport/CollectFee.vue +184 -184
- package/src/components/SellReport/Contrast.vue +188 -188
- package/src/components/SellReport/DayStairMoney.vue +256 -256
- package/src/components/SellReport/FenxiangSell.vue +183 -183
- package/src/components/SellReport/FxGasTable.vue +220 -220
- package/src/components/SellReport/GasCollect.vue +174 -174
- package/src/components/SellReport/GaspriceHas.vue +141 -141
- package/src/components/SellReport/HandCollect.vue +189 -189
- package/src/components/SellReport/JinChengBusSummary.vue +182 -182
- package/src/components/SellReport/JinChengHandGas.vue +182 -182
- package/src/components/SellReport/JinChengOperSummary.vue +182 -182
- package/src/components/SellReport/JinChengSliceSumgas.vue +182 -182
- package/src/components/SellReport/ManageBusTable.vue +207 -207
- package/src/components/SellReport/ManageGasFee.vue +247 -247
- package/src/components/SellReport/ManageGasFeeOperator.vue +236 -236
- package/src/components/SellReport/ManageHandSellInputtor.vue +241 -241
- package/src/components/SellReport/ManageMonthGas.vue +249 -249
- package/src/components/SellReport/ManageNewGasPrice.vue +245 -245
- package/src/components/SellReport/ManageReceivable.vue +254 -254
- package/src/components/SellReport/ManageUserCollect.vue +183 -183
- package/src/components/SellReport/MeterBill.vue +185 -185
- package/src/components/SellReport/MeterGasMoney.vue +226 -226
- package/src/components/SellReport/MeterInput.vue +250 -250
- package/src/components/SellReport/MonthStairMoney.vue +256 -256
- package/src/components/SellReport/OweAging.vue +174 -174
- package/src/components/SellReport/ReportHistory.vue +80 -80
- package/src/components/SellReport/ReportPool.vue +60 -60
- package/src/components/SellReport/Selling.vue +188 -188
- package/src/components/SellReport/SiteManager.vue +147 -147
- package/src/components/SellReport/UserStateStatistics.vue +188 -188
- package/src/components/SellReport/UsertypePie.vue +101 -101
- package/src/components/SellReport/XianYangDate.vue +227 -227
- package/src/components/SellReport/XianYangOperator.vue +228 -228
- package/src/components/SellReport/XyDateCharge.vue +227 -227
- package/src/components/SellReport/XyOperatorCharge.vue +256 -256
- package/src/components/SellReport/YuShouTableTwo.vue +309 -309
- package/src/components/SellReport/jingwei/CardCharge.vue +142 -142
- package/src/components/SellReport/jingwei/MachineCharge.vue +141 -141
- package/src/components/SellReport/jingwei/PaymentNotice.vue +479 -479
- package/src/components/SellReport/jingwei/handplanReport.vue +280 -280
- package/src/components/SellReport/jingwei/widegt/PaymentNoticePrint.vue +198 -198
- package/src/components/SellReport/jingwei/widegt/handplanPrint.vue +143 -143
- package/src/components/SellReport/pengan/ManageBusSummaryPeng.vue +241 -241
- package/src/components/WebReport/AbnormalInfo.vue +197 -197
- package/src/components/WebReport/AbnormalInfoEcharts.vue +120 -120
- package/src/components/WebReport/BatteryLow.vue +148 -148
- package/src/components/WebReport/BusinessHall.vue +85 -85
- package/src/components/WebReport/BussinessType.vue +137 -137
- package/src/components/WebReport/Communication.vue +131 -131
- package/src/components/WebReport/CompanyUser.vue +79 -79
- package/src/components/WebReport/EchartsBox.vue +110 -110
- package/src/components/WebReport/ElectroMagnetic.vue +142 -142
- package/src/components/WebReport/GaspriceHas.vue +141 -141
- package/src/components/WebReport/HandplanPrint.vue +167 -167
- package/src/components/WebReport/NotUpload.vue +165 -165
- package/src/components/WebReport/OweQuery.vue +169 -169
- package/src/components/WebReport/PaymentDistributed.vue +176 -176
- package/src/components/WebReport/Paymentpie.vue +157 -157
- package/src/components/WebReport/ReportWorklist.vue +220 -220
- package/src/components/WebReport/SellType.vue +89 -89
- package/src/components/WebReport/Telemanlist.vue +221 -221
- package/src/components/WebReport/UserGasAll.vue +214 -214
- package/src/components/WebReport/UserGasEcharts.vue +107 -107
- package/src/components/WebReport/UsertypePie.vue +105 -105
- package/src/components/WebReport/ValueEcharts.vue +99 -99
- package/src/components/WebReport/ValueInfo.vue +194 -194
- package/src/components/qinhua/BarChartLine.vue +288 -288
- package/src/components/qinhua/ManageMain.vue +162 -162
- package/src/components/qinhua/Ring.vue +165 -165
- package/src/components/qinhua/SafeCheckRing.vue +149 -149
- package/src/components/qinhua/SafecheckBarChart.vue +209 -209
- package/src/components/qinhua/Scada.vue +93 -93
- package/src/components/safecheck/analysis/SafeHiddenAnaly.vue +932 -932
- package/src/components/safecheck/planCheck/chanceSituation.vue +149 -149
- package/src/components/safecheck/planCheck/checkFamily.vue +217 -217
- package/src/components/safecheck/planCheck/hidderDanger.vue +179 -179
- package/src/components/safecheck/planCheck/inFamily.vue +185 -185
- package/src/components/sale/businessquery/AccountQuery/TransactionSummary.vue +373 -373
- package/src/components/sale/businessquery/BalanceQuery.vue +456 -456
- package/src/components/sale/businessquery/BusinesQuery.vue +358 -358
- package/src/components/sale/businessquery/ChangeMeterQuery.vue +632 -632
- package/src/components/sale/businessquery/ChangeUserQuery.vue +357 -357
- package/src/components/sale/businessquery/ChargeQuery.vue +1254 -1254
- package/src/components/sale/businessquery/DisableQuery.vue +451 -451
- package/src/components/sale/businessquery/EnableQuery.vue +408 -408
- package/src/components/sale/businessquery/FillCardQuery.vue +486 -486
- package/src/components/sale/businessquery/FillGasQuery.vue +511 -511
- package/src/components/sale/businessquery/InspectListUser.vue +1 -1
- package/src/components/sale/businessquery/InspectManage.vue +47 -47
- package/src/components/sale/businessquery/NewAccountQuery.vue +409 -409
- package/src/components/sale/businessquery/OtherChargeDetailQuery.vue +74 -74
- package/src/components/sale/businessquery/OtherChargeQuery.vue +634 -634
- package/src/components/sale/businessquery/ResourceOperatingQuery.vue +317 -317
- package/src/components/sale/businessquery/ReverseQuery.vue +402 -402
- package/src/components/sale/businessquery/SalesGasClassification.vue +168 -168
- package/src/components/sale/businessquery/TongjiManage.vue +74 -74
- package/src/components/sale/businessquery/TransferQuery.vue +418 -418
- package/src/components/sale/businessquery/UserTongjiQuery.vue +358 -358
- package/src/components/sale/businessquery/YearGasQuery.vue +422 -422
- package/src/components/sale/businessquery/analysisquery/AnalysisManage.vue +65 -65
- package/src/components/sale/businessquery/iotStateSearch/iotStateQuery.vue +308 -308
- package/src/components/sale/businessquery/weChatBind.vue +361 -361
- package/src/components/sale/common/PrintData.vue +171 -171
- package/src/components/sale/common/PrintDataSelf.vue +225 -225
- package/src/components/sale/common/PrintTable.vue +228 -228
- package/src/components/sale/common/PrintTableSelf.vue +251 -251
- package/src/components/sale/common/TabButton.vue +155 -155
- package/src/components/sale/common/Tabs.vue +67 -67
- package/src/components/sale/common/handplanUser.vue +112 -112
- package/src/components/sale/config/DefaultPrint.js +6 -6
- package/src/components/sale/filesquery/DeviceQuery.vue +534 -534
- package/src/components/sale/filesquery/RecordInfoQuery.vue +1260 -1260
- package/src/components/sale/filesquery/detail/UserBaseInfo.vue +69 -69
- package/src/components/sale/filesquery/detail/UserDetail.vue +41 -41
- package/src/components/sale/filesquery/detail/UserOperInfo.vue +76 -76
- package/src/components/sale/filesquery/detail/oper/ChangeMessage.vue +46 -46
- package/src/components/sale/filesquery/detail/oper/ExchangeOper.vue +66 -66
- package/src/components/sale/filesquery/detail/oper/HandOper.vue +46 -46
- package/src/components/sale/filesquery/detail/oper/HandleMessage.vue +46 -46
- package/src/components/sale/filesquery/detail/oper/OtherCharge.vue +54 -54
- package/src/components/sale/filesquery/detail/oper/ReplaceCard.vue +51 -51
- package/src/components/sale/filesquery/detail/oper/SellOper.vue +56 -56
- package/src/components/sale/filesquery/detail/oper/TransferMessage.vue +55 -55
- package/src/components/sale/filesquery/filequerydetail/BlackListQueryDetail.vue +219 -219
- package/src/components/sale/filesquery/filequerydetail/ChangeMeterQueryDetail.vue +246 -246
- package/src/components/sale/filesquery/filequerydetail/ChargeQueryDetail.vue +239 -239
- package/src/components/sale/filesquery/filequerydetail/DeviceQueryDetail.vue +126 -126
- package/src/components/sale/filesquery/filequerydetail/DisableQueryDetail.vue +272 -272
- package/src/components/sale/filesquery/filequerydetail/EnableQueryDetail.vue +274 -274
- package/src/components/sale/filesquery/filequerydetail/FillCardQueryDetail.vue +80 -80
- package/src/components/sale/filesquery/filequerydetail/FillGasQueryDetail.vue +80 -80
- package/src/components/sale/filesquery/filequerydetail/HandQueryDetail.vue +302 -302
- package/src/components/sale/filesquery/filequerydetail/MeterQueryDetail.vue +158 -158
- package/src/components/sale/filesquery/filequerydetail/OtherChargeQueryDetail.vue +198 -198
- package/src/components/sale/filesquery/filequerydetail/RecordQueryDetail.vue +125 -125
- package/src/components/sale/filesquery/filequerydetail/SellingHandDetail.vue +280 -280
- package/src/components/sale/filesquery/filequerydetail/TransferQueryDetail.vue +160 -160
- package/src/components/sale/filesquery/filequerydetail/UserQueryDetail.vue +155 -155
- package/src/components/sale/report/aode/DayReport.vue +50 -50
- package/src/components/sale/report/aode/DayReportSummary.vue +75 -75
- package/src/components/sale/report/aode/MonthByChargeType.vue +446 -446
- package/src/components/sale/report/aode/MonthByUserType.vue +413 -413
- package/src/components/sale/report/aode/YearByChargeTpye.vue +215 -215
- package/src/components/sale/report/aode/life/LifeDayReport.vue +50 -50
- package/src/components/sale/report/aode/life/LifeDayReportList.vue +241 -241
- package/src/components/sale/report/aode/life/LifeDayReportSummary.vue +49 -49
- package/src/components/sale/report/aode/life/LifeMonthReport.vue +303 -303
- package/src/components/sale/report/aode/life/LifeYearReport.vue +175 -175
- package/src/components/sale/report/aode/widget/LifeDayReportListPrint.vue +189 -189
- package/src/components/sale/report/aode/widget/LifeMonthPrint.vue +153 -153
- package/src/components/sale/report/aode/widget/LifeYearPrint.vue +143 -143
- package/src/components/sale/report/aode/widget/MonthByChargePrint.vue +236 -236
- package/src/components/sale/report/aode/widget/MonthByUserPrint.vue +232 -232
- package/src/components/sale/report/aode/widget/YearByChargePrint.vue +203 -203
- package/src/components/sale/report/aode/widget/YearByUserPrint.vue +225 -225
- package/src/components/scada/CaculateGasConsumputionByDay/CaculateGasConsumputionByDay.vue +290 -290
- package/src/components/scada/ChartDisplay/ChartDisplayManage.vue +55 -55
- package/src/components/scada/ChartDisplay/ChartThreeDayContrast.vue +164 -164
- package/src/components/scada/CumulativeFlow/CumulativeFlowHeatPlant.vue +400 -400
- package/src/components/scada/CumulativeFlow/CumulativeFlowManage.vue +59 -59
- package/src/components/scada/CumulativeFlow/CumulativeFlowRegulatorStation.vue +504 -504
- package/src/components/scada/CumulativeFlow/CumulativeFlowStation.vue +248 -248
- package/src/components/scada/GasSupplyRunning/GasSupplyRunningByDay.vue +297 -297
- package/src/components/scada/InstantaneousFlow/InstantaneousFlowHeatPlant.vue +389 -389
- package/src/components/scada/InstantaneousFlow/InstantaneousFlowManage.vue +57 -57
- package/src/components/scada/InstantaneousFlow/InstantaneousFlowRegulatorStation.vue +503 -503
- package/src/components/scada/InstantaneousFlow/InstantaneousFlowStation.vue +244 -244
- package/src/components/scada/OnTimePressure/OnTimePressureHeatPlant.vue +356 -356
- package/src/components/scada/OnTimePressure/OnTimePressureManage.vue +51 -51
- package/src/components/scada/OnTimePressure/OnTimePressureRegulatorStation.vue +526 -526
- package/src/components/scada/ThreeDayContrast/ThreeDayContrastManage.vue +282 -282
- package/src/components/statistical/DendrogramManage.vue +239 -239
- package/src/components/webmeter/DrillData/LargeScreenAnalysisEcharts.vue +710 -710
- package/src/components/webmeter/DrillData/LostContactAnalysis.vue +531 -531
- package/src/components/webmeter/DrillData/LostContactAnalysisManage.vue +30 -30
- package/src/components/webmeter/DrillData/LostContactEform.vue +190 -190
- package/src/components/webmeter/dataCollection/DataCollection.vue +676 -676
- package/src/components/webmeter/gasAnalysis/GasAnalysisEcharts.vue +144 -144
- package/src/components/webmeter/gasAnalysis/GasAnalysisSummary.vue +162 -162
- package/src/components/webmeter/handplan/NewWebMeterHandPlan.vue +745 -745
- package/src/components/webmeter/handplan/NewWebmeterHandPlanMain.vue +59 -59
- package/src/components/webmeter/indicatorStatisticsEchars.vue +204 -204
- package/src/components/webmeter/indicatorStatisticsMain.vue +257 -257
- package/src/components/webmeter/meterinfo/NewMeterList.vue +414 -414
- package/src/components/webmeter/meterinfo/NewMeterListMain.vue +53 -53
- package/src/components/webmeter/newwebmeter/NewException/NewExceptionEform.vue +149 -149
- package/src/components/webmeter/newwebmeter/NewException/NewExceptionEformTotal.vue +211 -211
- package/src/components/webmeter/newwebmeter/NewException/NewMeterException.vue +449 -449
- package/src/components/yulin/GuanWang.vue +24 -24
- package/src/components/yulin/SingleBarLine.vue +352 -352
- package/src/components/yulin/Weather.vue +157 -157
- package/src/expandcss.less +26 -26
- package/src/filiale/WEINAN/InspectListUser.vue +492 -492
- package/src/filiale/WEINAN/config/tableConfig.js +20 -20
- package/src/filiale/aode/ArchivesManage.vue +38 -38
- package/src/filiale/aode/BusinessManage.vue +94 -94
- package/src/filiale/aode/DefaultPrint.js +6 -6
- package/src/filiale/aode/HandplanQuery.vue +632 -632
- package/src/filiale/aode/Tabs.vue +67 -67
- package/src/filiale/aode/UserQuery.vue +599 -599
- package/src/filiale/aode/sale.js +17 -17
- package/src/filiale/ceshi/ArrearsQuery.vue +642 -642
- package/src/filiale/ceshi/ChManageBusSummary.vue +293 -293
- package/src/filiale/ceshi/CollectManage.vue +94 -94
- package/src/filiale/ceshi/MeterRateQuery.vue +633 -633
- package/src/filiale/ceshi/TabButton.vue +149 -149
- package/src/filiale/ceshi/Tabs.vue +69 -69
- package/src/filiale/ceshi/reportManage.js +5 -5
- package/src/filiale/ceshi/sale.js +11 -11
- package/src/filiale/gaomi/config/DefaultPrint.js +6 -6
- package/src/filiale/gaomi/config/tableConfig.js +47 -47
- package/src/filiale/gongyi/sale/businessquery/exportConfig.js +17 -17
- package/src/filiale/gongyi/sale/filesquery/MeterQuery.vue +718 -718
- package/src/filiale/jingwei/RecordInfoQuery.vue +1142 -1142
- package/src/filiale/liaoyuan/sale.js +11 -11
- package/src/filiale/macheng/MeterQuery.vue +921 -921
- package/src/filiale/macheng/config/DefaultPrint.js +12 -12
- package/src/filiale/pingxiang/sale.js +9 -9
- package/src/filiale/qingtongxia/config/DefaultPrint.js +6 -6
- package/src/filiale/rongcheng/UserQuery.vue +827 -827
- package/src/filiale/shaoguan/HandplanQuery.vue +1314 -1314
- package/src/filiale/shaoguan/OtherChargeDetailQuery.vue +74 -74
- package/src/filiale/shaoguan/TransferQuery.vue +403 -403
- package/src/filiale/shaoguan/config/DefaultPrint.js +6 -6
- package/src/filiale/shaoguan/config/exportConfig.js +433 -433
- package/src/filiale/shaoguan/errorHandplanQuery.vue +366 -366
- package/src/filiale/shaoguan/sale/businessquery/ExemptQuery.vue +314 -314
- package/src/filiale/shaoguan/sale/businessquery/FMYGasQuery.vue +687 -687
- package/src/filiale/shaoguan/sale/businessquery/PaymentChangeQuery.vue +338 -338
- package/src/filiale/shaoguan/sale/businessquery/ReconcileQuery.vue +426 -426
- package/src/filiale/shennongjia/config/DefaultPrint.js +6 -6
- package/src/filiale/shennongjia/config/tableConfig.js +47 -47
- package/src/filiale/shennongjia/sale.js +10 -10
- package/src/filiale/tongchuan/ChargeQuery.vue +17 -4
- package/src/filiale/tongchuan/FillGasQuery.vue +523 -523
- package/src/filiale/tongchuan/config/exportConfig.js +1 -1
- package/src/filiale/zhongsheng/ChargeQuery.vue +1254 -0
- package/src/filiale/zhongsheng/config/exportConfig.js +899 -0
- package/src/filiale/zhongsheng/sale.js +10 -0
- package/src/main.js +1 -1
- package/src/plugins/GetLoginInfoService.js +505 -505
- package/src/plugins/LodopFuncs.js +124 -124
- package/src/plugins/getAllInputtor.js +29 -29
- package/src/safeCheck.js +63 -63
- package/src/stores/AppData.js +62 -62
- package/src/stores/DataSql.js +585 -585
- package/src/stores/DrillECharts.js +602 -602
- package/src/stores/DrillSql.js +888 -888
- package/src/stores/GetParames.js +15 -15
- package/src/stores/MagGetSaleParams.js +156 -156
- package/src/stores/MagLoadParams.js +63 -63
- package/src/stores/Util.js +132 -132
- package/src/stores/shanxi1.js +26 -26
- package/src/stores/yulin.js +27 -27
- package/static/china.json +1 -1
- package/static/qh.json +2410 -2410
- package/static/res.json +58411 -58411
- package/static/shanxi1.json +1 -1
- package/static/yulin.json +1 -1
- package/static//345/261/261/344/270/234/347/234/201.json +1 -1
- package/test/unit/.eslintrc +5 -5
- package/test/unit/TestUtil.js +35 -35
- package/test/unit/context.html +20 -20
- package/test/unit/index.js +13 -13
- package/test/unit/init.js +11 -11
- package/test/unit/karma.conf.js +45 -45
- package/test/unit/specs/components/CallReport/Repair.spec.js +25 -25
- package/test/unit/specs/components/ManageBusiness/EquipmentQuery.spec.js +21 -21
- package/test/unit/specs/components/ManageBusiness/TableWithQuery.spec.js +21 -21
- package/test/unit/specs/components/ManageBusiness/UserQuery.spec.js +21 -21
- package/webstorm.config.js +13 -13
|
@@ -1,505 +1,505 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import JSEncrypt from 'jsencrypt'
|
|
3
|
-
import {HttpResetClass} from 'vue-client'
|
|
4
|
-
|
|
5
|
-
let loginGen = async function (name, password) {
|
|
6
|
-
let data = {name: name, password: password}
|
|
7
|
-
// rsa加密
|
|
8
|
-
let encrypt = new JSEncrypt();
|
|
9
|
-
encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB');
|
|
10
|
-
console.log(data)
|
|
11
|
-
|
|
12
|
-
let getLogin = await Vue.resetpost('/rs/logic/getLogin', data, {resolveMsg: null, rejectMsg: null}, 'RSA')
|
|
13
|
-
if (getLogin.data.states === '登录成功') {
|
|
14
|
-
// 调用远程登录服务,获取所有有权访问的功能
|
|
15
|
-
data = {username: name, password: password}
|
|
16
|
-
data = encrypt.encrypt(JSON.stringify(data))
|
|
17
|
-
let resource = await Vue.resetpost(`/rs/user/userLogin/客服系统`, data, {
|
|
18
|
-
resolveMsg: null,
|
|
19
|
-
rejectMsg: null
|
|
20
|
-
})
|
|
21
|
-
console.log('登陆获取Util', JSON.stringify(resource.data))
|
|
22
|
-
Vue.$login.f = resource.data
|
|
23
|
-
//获取jwt
|
|
24
|
-
Vue.$login.jwt = getLogin.data.jwt
|
|
25
|
-
// 把登录用户添加到cookie里
|
|
26
|
-
Vue.cookie.set('loginId', Vue.$login.f.id)
|
|
27
|
-
|
|
28
|
-
try {
|
|
29
|
-
//获取有权限的功能树
|
|
30
|
-
let hasRight = await Vue.resetpost(`/rs/search`, {
|
|
31
|
-
source: "tool.getFullTree(this.getRights().where(row.getType() == $function$))",
|
|
32
|
-
userid: Vue.$login.f.id
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
resolveMsg: null,
|
|
36
|
-
rejectMsg: null
|
|
37
|
-
})
|
|
38
|
-
console.log('有权限功能返回数据', JSON.stringify(hasRight.data))
|
|
39
|
-
//准备替换功能树
|
|
40
|
-
var fun=[]
|
|
41
|
-
hasRight.data[0].children[0].children.forEach((item) => {
|
|
42
|
-
if(item.name=='客服系统'){
|
|
43
|
-
item.children.forEach((item1) => {
|
|
44
|
-
fun.push(item1)
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
// console.log('替换前', JSON.stringify(Vue.$login.f.functions))
|
|
49
|
-
// console.log('替换后', JSON.stringify(fun))
|
|
50
|
-
Vue.$login.f.functions=fun
|
|
51
|
-
}catch (error) {
|
|
52
|
-
}
|
|
53
|
-
if (Vue.$login.f.id !== '11') {
|
|
54
|
-
try {
|
|
55
|
-
let getAllArea = await Vue.resetpost('/rs/search', {
|
|
56
|
-
source: 'this.getParentByType($organization$).getChildByName($区$).getChildren()',
|
|
57
|
-
userid: Vue.$login.f.id
|
|
58
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
59
|
-
|
|
60
|
-
let areaTemp = []
|
|
61
|
-
for (let i = 0; i < getAllArea.data.length; i++) {
|
|
62
|
-
let getSliceArea = await Vue.resetpost('/rs/search',
|
|
63
|
-
{source: 'this.getChildren()', userid: getAllArea.data[i].id},
|
|
64
|
-
{resolveMsg: null, rejectMsg: null})
|
|
65
|
-
let sliceTemp = []
|
|
66
|
-
for (let j = 0; j < getSliceArea.data.length; j++) {
|
|
67
|
-
sliceTemp.push({label: getSliceArea.data[j].name, value: getSliceArea.data[j].name})
|
|
68
|
-
}
|
|
69
|
-
areaTemp.push({label: getAllArea.data[i].name, value: sliceTemp})
|
|
70
|
-
}
|
|
71
|
-
Vue.$login.f.f_allArea = areaTemp
|
|
72
|
-
}catch (error) {
|
|
73
|
-
Vue.$login.f.f_allArea =[]
|
|
74
|
-
console.log('获取区县',error)
|
|
75
|
-
}
|
|
76
|
-
// 获取抄表员
|
|
77
|
-
try {
|
|
78
|
-
let getGasman = await Vue.resetpost('/rs/search', {
|
|
79
|
-
source: 'this.getParentByType($organization$).getChildByName($抄表员$).getUsers()',
|
|
80
|
-
userid: Vue.$login.f.id
|
|
81
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
82
|
-
let gasman = []
|
|
83
|
-
for (let i = 0; i < getGasman.data.length; i++) {
|
|
84
|
-
gasman.push(getGasman.data[i])
|
|
85
|
-
}
|
|
86
|
-
Vue.$login.f.f_gasman = gasman
|
|
87
|
-
}catch (error) {
|
|
88
|
-
Vue.$login.f.f_gasman = []
|
|
89
|
-
console.log('抄表员模块',error)
|
|
90
|
-
}
|
|
91
|
-
// 获取安装人
|
|
92
|
-
try {
|
|
93
|
-
let getInstallman = await Vue.resetpost('/rs/search', {
|
|
94
|
-
source: 'this.getParentByType($organization$).getChildByName($安装员$).getUsers()',
|
|
95
|
-
userid: Vue.$login.f.id
|
|
96
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
97
|
-
console.log('获取安装员', getInstallman)
|
|
98
|
-
let installman = []
|
|
99
|
-
for (let i = 0; i < getInstallman.data.length; i++) {
|
|
100
|
-
installman.push(getInstallman.data[i])
|
|
101
|
-
}
|
|
102
|
-
Vue.$login.f.f_installman = installman
|
|
103
|
-
}catch (error) {
|
|
104
|
-
Vue.$login.f.f_installman =[]
|
|
105
|
-
console.log('安装人模块',error)
|
|
106
|
-
}
|
|
107
|
-
// 获取换表员
|
|
108
|
-
try {
|
|
109
|
-
let getChangeMeterman = await Vue.resetpost('/rs/search', {
|
|
110
|
-
source: 'this.getParentByType($organization$).getChildByName($换表员$).getUsers()',
|
|
111
|
-
userid: Vue.$login.f.id
|
|
112
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
113
|
-
let changemeterman = []
|
|
114
|
-
for (let i = 0; i < getChangeMeterman.data.length; i++) {
|
|
115
|
-
changemeterman.push(getChangeMeterman.data[i])
|
|
116
|
-
}
|
|
117
|
-
Vue.$login.f.f_changemeterman = changemeterman
|
|
118
|
-
}catch (error) {
|
|
119
|
-
Vue.$login.f.f_changemeterman = []
|
|
120
|
-
console.log('换表员模块',error)
|
|
121
|
-
}
|
|
122
|
-
// 票据使用人
|
|
123
|
-
try {
|
|
124
|
-
let getPaperUseman = await Vue.resetpost('/rs/search', {
|
|
125
|
-
source: 'this.getParentByType($organization$).getChildByName($票据使用人$).getUsers()',
|
|
126
|
-
userid: Vue.$login.f.id
|
|
127
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
128
|
-
let perperuseman = []
|
|
129
|
-
for (let i = 0; i < getPaperUseman.data.length; i++) {
|
|
130
|
-
perperuseman.push(getPaperUseman.data[i])
|
|
131
|
-
}
|
|
132
|
-
Vue.$login.f.f_paperUseman = perperuseman
|
|
133
|
-
}catch (error) {
|
|
134
|
-
Vue.$login.f.f_paperUseman = []
|
|
135
|
-
console.log('票据使用人模块',error)
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
// 票据分配人
|
|
139
|
-
try {
|
|
140
|
-
let getPaperAllotman = await Vue.resetpost('/rs/search', {
|
|
141
|
-
source: 'this.getParentByType($organization$).getChildByName($票据分配人$).getUsers()',
|
|
142
|
-
userid: Vue.$login.f.id
|
|
143
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
144
|
-
let paperallotman = []
|
|
145
|
-
for (let i = 0; i < getPaperAllotman.data.length; i++) {
|
|
146
|
-
paperallotman.push(getPaperAllotman.data[i])
|
|
147
|
-
}
|
|
148
|
-
Vue.$login.f.f_paperAllotman = paperallotman
|
|
149
|
-
}catch (error) {
|
|
150
|
-
Vue.$login.f.f_paperAllotman = []
|
|
151
|
-
console.log('票据分配人模块',error)
|
|
152
|
-
}
|
|
153
|
-
// TODO 处理界面细节
|
|
154
|
-
try {
|
|
155
|
-
let viewDetails = await Vue.resetpost('rs/search', {
|
|
156
|
-
source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
|
|
157
|
-
userid: Vue.$login.f.id
|
|
158
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
159
|
-
let r = viewDetails.data
|
|
160
|
-
Vue.$login.r = []
|
|
161
|
-
r.forEach(x => Vue.$login.r.push(x.name))
|
|
162
|
-
}catch (error) {
|
|
163
|
-
Vue.$login.r = []
|
|
164
|
-
console.log('加载模块失败',error)
|
|
165
|
-
}
|
|
166
|
-
// 调用登录后处理
|
|
167
|
-
for(let proc of Vue.$login.afterLogin) {
|
|
168
|
-
await proc(Vue.$login.f)
|
|
169
|
-
}
|
|
170
|
-
// 定时发送心跳
|
|
171
|
-
setInterval(()=> {
|
|
172
|
-
let http = new HttpResetClass()
|
|
173
|
-
http.load('POST', `rs/user/access/${Vue.$login.f.id}`, {}, {resolveMsg: null, rejectMsg: null}).then((req) => {
|
|
174
|
-
if(req.data.status==710){
|
|
175
|
-
Vue.showMessage(req.data.msg+",您将被强制退出系统", ['confirm']).then((res) => {
|
|
176
|
-
if (res === 'confirm') {
|
|
177
|
-
location.reload()
|
|
178
|
-
}
|
|
179
|
-
})
|
|
180
|
-
}
|
|
181
|
-
})
|
|
182
|
-
}, 2 * 60 * 1000)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
} else {
|
|
186
|
-
let error = {status: 401, data: getLogin.data.states}
|
|
187
|
-
// 抛出错误
|
|
188
|
-
throw error
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
let GetLoginInfoService = {
|
|
193
|
-
// 登录后要处理的异步对象
|
|
194
|
-
afterLogin: [],
|
|
195
|
-
//验证码开关
|
|
196
|
-
Verification: true,
|
|
197
|
-
install (Vue, options) {
|
|
198
|
-
// 给vue增添对话框显示方法
|
|
199
|
-
Vue.$login = Vue.prototype.$login = GetLoginInfoService
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
f: {
|
|
203
|
-
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* 登录
|
|
208
|
-
* @param name
|
|
209
|
-
* @param password
|
|
210
|
-
*/
|
|
211
|
-
login (name, password) {
|
|
212
|
-
return loginGen(name, password)
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
convertToIn (val) {
|
|
216
|
-
let temp = ''
|
|
217
|
-
if (val instanceof Array) {
|
|
218
|
-
if (val.length >= 1) {
|
|
219
|
-
temp = '('
|
|
220
|
-
val.forEach((res) => {
|
|
221
|
-
temp += `'${res}',`
|
|
222
|
-
})
|
|
223
|
-
temp = temp.substr(0, temp.length - 1) + ')'
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return temp
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
toStandardYearMonth () {
|
|
230
|
-
let dt = new Date()
|
|
231
|
-
let month = dt.getMonth() + 1
|
|
232
|
-
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month)
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
toStandardYearMonth1 () {
|
|
236
|
-
let dt = new Date()
|
|
237
|
-
let month = dt.getMonth() + 1
|
|
238
|
-
return dt.getFullYear() + (month < 10 ? '0' + month : month)
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
toStandardDateString () {
|
|
242
|
-
let dt = new Date()
|
|
243
|
-
let month = dt.getMonth() + 1
|
|
244
|
-
let date = dt.getDate()
|
|
245
|
-
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
toStartAndEndDateString () {
|
|
249
|
-
let dt = new Date()
|
|
250
|
-
let month = dt.getMonth() + 1
|
|
251
|
-
// let date = dt.getDate()
|
|
252
|
-
return [dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-01',
|
|
253
|
-
dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (new Date(dt.getFullYear(), month, 0).getDate())]
|
|
254
|
-
// return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
toStandardTimeString () {
|
|
258
|
-
let dt = new Date()
|
|
259
|
-
let month = dt.getMonth() + 1
|
|
260
|
-
let date = dt.getDate()
|
|
261
|
-
let hour = dt.getHours()
|
|
262
|
-
let min = dt.getMinutes()
|
|
263
|
-
let sec = dt.getSeconds()
|
|
264
|
-
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) +
|
|
265
|
-
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
guid () {
|
|
269
|
-
let buf = new Uint16Array(8)
|
|
270
|
-
window.crypto.getRandomValues(buf)
|
|
271
|
-
let S4 = function (num) {
|
|
272
|
-
let ret = num.toString(16)
|
|
273
|
-
while (ret.length < 4) {
|
|
274
|
-
ret = '0' + ret
|
|
275
|
-
}
|
|
276
|
-
return ret
|
|
277
|
-
}
|
|
278
|
-
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]))
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
choices (role, param, hasBlank = false, blankHint = '请选择') {
|
|
282
|
-
if (role == 'view') {
|
|
283
|
-
Vue.getParams(param, [null])
|
|
284
|
-
} else {
|
|
285
|
-
let result = []
|
|
286
|
-
if (hasBlank)
|
|
287
|
-
result.push({label: blankHint, value: null})
|
|
288
|
-
if (!Vue.param || !Vue.param[param])
|
|
289
|
-
result.push({label: '请在系统设置里更新参数', value: '请在系统设置里更新参数'})
|
|
290
|
-
else {
|
|
291
|
-
let p = Vue.param[param]
|
|
292
|
-
p.forEach(function (item) {
|
|
293
|
-
result.push({label: item.name, value: item.name})
|
|
294
|
-
})
|
|
295
|
-
}
|
|
296
|
-
return result
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
required (param) {
|
|
301
|
-
if (typeof param === 'number' && param == 0)
|
|
302
|
-
return false
|
|
303
|
-
if (!param)
|
|
304
|
-
return true
|
|
305
|
-
param = param + ''
|
|
306
|
-
param = param.trim()
|
|
307
|
-
if (!param)
|
|
308
|
-
return true
|
|
309
|
-
return false
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
isInt (n) {
|
|
313
|
-
return !window.isNaN(n) && n % 1 === 0
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
isFloat (n) {
|
|
317
|
-
return !window.isNaN(n)
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
// this will convert all true/false to boolean
|
|
321
|
-
booleanFilter (paper) {
|
|
322
|
-
for (let key in paper) {
|
|
323
|
-
if (!paper.hasOwnProperty(key))
|
|
324
|
-
continue
|
|
325
|
-
if (typeof paper[key] == 'object' && paper[key] != null) {
|
|
326
|
-
booleanFilter(paper[key])
|
|
327
|
-
} else {
|
|
328
|
-
if (paper[key] === 'true' || paper[key] == 'false')
|
|
329
|
-
paper[key] = (paper[key] === 'true')
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
// recursively traverse through each path
|
|
334
|
-
ratifyPics (paper) {
|
|
335
|
-
for (let key in paper) {
|
|
336
|
-
if (key.endsWith('_path')) {
|
|
337
|
-
if (!paper[key]) {
|
|
338
|
-
paper[key] = 'rs/db/file/nopic.png'
|
|
339
|
-
} else {
|
|
340
|
-
paper[key] = 'rs/db/file/' + paper[key]
|
|
341
|
-
}
|
|
342
|
-
} else if (paper[key] !== null && typeof (paper[key]) == 'object') {
|
|
343
|
-
ratifyPics(paper[key])
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
// load script and other stuff
|
|
349
|
-
loadscript (type, fileName) {
|
|
350
|
-
return new Promise((resolve, reject) => {
|
|
351
|
-
let element
|
|
352
|
-
if (type == 'css') {
|
|
353
|
-
element = document.createElement('link')
|
|
354
|
-
element.setAttribute('rel', 'stylesheet')
|
|
355
|
-
element.setAttribute('type', 'text/css')
|
|
356
|
-
element.setAttribute('href', fileName)
|
|
357
|
-
} else if (type == 'js') {
|
|
358
|
-
element = document.createElement('script')
|
|
359
|
-
element.setAttribute('type', 'text/javascript')
|
|
360
|
-
element.setAttribute('src', fileName)
|
|
361
|
-
}
|
|
362
|
-
if (element) {
|
|
363
|
-
element.setAttribute('async', '')
|
|
364
|
-
element.setAttribute('defer', '')
|
|
365
|
-
element.addEventListener('load', function () {
|
|
366
|
-
resolve(element)
|
|
367
|
-
}, false)
|
|
368
|
-
element.addEventListener('error', function () {
|
|
369
|
-
reject(element)
|
|
370
|
-
}, false)
|
|
371
|
-
document.body.appendChild(element)
|
|
372
|
-
}
|
|
373
|
-
})
|
|
374
|
-
},
|
|
375
|
-
// 不能选择器中截取掉多余的字符
|
|
376
|
-
orgName (name) {
|
|
377
|
-
return name.substring(10)
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
getNowDate (name) {
|
|
381
|
-
// 求取当前时间的工具
|
|
382
|
-
let myweekday = ''
|
|
383
|
-
let year = ''
|
|
384
|
-
let mydate = new Date()
|
|
385
|
-
myweekday = mydate.getDay()
|
|
386
|
-
let mymonth = mydate.getMonth() + 1
|
|
387
|
-
let myday = mydate.getDate()
|
|
388
|
-
let myyear = mydate.getYear()
|
|
389
|
-
year = (myyear > 200) ? myyear : 1900 + myyear
|
|
390
|
-
let week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期日', '星期六']
|
|
391
|
-
// document.write("<font color=#ffffff>今天是 "+year+"年"+mymonth+"月"+myday+"日 "+weekday+"</font>");
|
|
392
|
-
return year + '年' + mymonth + '月' + myday + '日 ' + week[myweekday]
|
|
393
|
-
},
|
|
394
|
-
|
|
395
|
-
addDate (date, days) {
|
|
396
|
-
// 求取当前时间的工具
|
|
397
|
-
let endDate = new Date(date)
|
|
398
|
-
endDate = endDate.valueOf()
|
|
399
|
-
endDate = endDate + days * 24 * 60 * 60 * 1000
|
|
400
|
-
endDate = new Date(endDate)
|
|
401
|
-
let month = endDate.getMonth() + 1
|
|
402
|
-
let day = endDate.getDate()
|
|
403
|
-
let hour = endDate.getHours()
|
|
404
|
-
let min = endDate.getMinutes()
|
|
405
|
-
let sec = endDate.getSeconds()
|
|
406
|
-
return endDate.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) +
|
|
407
|
-
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
|
408
|
-
// return a
|
|
409
|
-
},
|
|
410
|
-
|
|
411
|
-
// 通过地址栏的参数获取参数内容
|
|
412
|
-
getUrlParames (param) {
|
|
413
|
-
var query = window.location.search
|
|
414
|
-
var iLen = param.length
|
|
415
|
-
var iStart = query.indexOf(param)
|
|
416
|
-
if (iStart === -1) {
|
|
417
|
-
return ''
|
|
418
|
-
}
|
|
419
|
-
iStart += iLen + 1
|
|
420
|
-
var iEnd = query.indexOf('&', iStart)
|
|
421
|
-
if (iEnd === -1) {
|
|
422
|
-
return query.substring(iStart)
|
|
423
|
-
}
|
|
424
|
-
return query.substring(iStart, iEnd)
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
// 从地址栏获取加密的参数
|
|
428
|
-
getUrlCompileParames (param) {
|
|
429
|
-
let code = unescape(window.location.search.slice(1, window.location.search.length))
|
|
430
|
-
let query = String.fromCharCode(code.charCodeAt(0) - code.length)
|
|
431
|
-
for (var i = 1; i < code.length; i++) {
|
|
432
|
-
query += String.fromCharCode(code.charCodeAt(i) - query.charCodeAt(i - 1))
|
|
433
|
-
}
|
|
434
|
-
let iLen = param.length
|
|
435
|
-
let iStart = query.indexOf(param)
|
|
436
|
-
if (iStart === -1) {
|
|
437
|
-
return ''
|
|
438
|
-
}
|
|
439
|
-
iStart += iLen + 1
|
|
440
|
-
let iEnd = query.indexOf('&', iStart)
|
|
441
|
-
if (iEnd === -1) {
|
|
442
|
-
return query.substring(iStart)
|
|
443
|
-
}
|
|
444
|
-
return query.substring(iStart, iEnd)
|
|
445
|
-
},
|
|
446
|
-
|
|
447
|
-
// 对字符串进行加密
|
|
448
|
-
compileStr (code) {
|
|
449
|
-
let c = String.fromCharCode(code.charCodeAt(0) + code.length)
|
|
450
|
-
for (let i = 1; i < code.length; i++) {
|
|
451
|
-
c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1))
|
|
452
|
-
}
|
|
453
|
-
return escape(c)
|
|
454
|
-
},
|
|
455
|
-
// 字符串进行解密
|
|
456
|
-
uncompileStr (code) {
|
|
457
|
-
code = unescape(code)
|
|
458
|
-
let c = String.fromCharCode(code.charCodeAt(0) - code.length)
|
|
459
|
-
for (var i = 1; i < code.length; i++) {
|
|
460
|
-
c += String.fromCharCode(code.charCodeAt(i) - c.charCodeAt(i - 1))
|
|
461
|
-
}
|
|
462
|
-
return c
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
dateDescripte (date) {
|
|
466
|
-
let nowTime = new Date().getTime()
|
|
467
|
-
let oldTime = new Date(date).getTime()
|
|
468
|
-
let timeDiff = nowTime - oldTime
|
|
469
|
-
// 规则说明
|
|
470
|
-
// 小于等于2分钟为刚刚
|
|
471
|
-
// 大于2分钟小于等于1小时为取整的分钟前(例如:35分钟前)
|
|
472
|
-
// 大于1小时小于等于24小时为取整的小时前(例如:15小时前)
|
|
473
|
-
// 大于24小时小于等于30天为取整的天前(例如:12天前)
|
|
474
|
-
// 大于30天小于等于12月为取整的月前,月份统一为30天一月,不做额外处理(例如:3个月前)
|
|
475
|
-
// 大于365取整的年前,(例如:2年前)
|
|
476
|
-
let minute = 1000 * 60
|
|
477
|
-
let hour = minute * 60
|
|
478
|
-
let day = hour * 24
|
|
479
|
-
let month = day * 30
|
|
480
|
-
let year = month * 12
|
|
481
|
-
let des = ''
|
|
482
|
-
if (timeDiff <= minute * 2) {
|
|
483
|
-
des = '刚刚'
|
|
484
|
-
} else if (minute * 2 < timeDiff && timeDiff < hour) {
|
|
485
|
-
des = `${Math.floor(timeDiff / minute)}分钟前`
|
|
486
|
-
} else if (hour < timeDiff && timeDiff <= day) {
|
|
487
|
-
des = `${Math.floor(timeDiff / hour)}小时前`
|
|
488
|
-
} else if (day < timeDiff && timeDiff <= month) {
|
|
489
|
-
des = `${Math.floor(timeDiff / day)}天前`
|
|
490
|
-
} else if (month < timeDiff && timeDiff <= year) {
|
|
491
|
-
des = `${Math.floor(timeDiff / month)}个月前`
|
|
492
|
-
} else if (year < timeDiff) {
|
|
493
|
-
des = `${Math.floor(timeDiff / year)}年前`
|
|
494
|
-
}
|
|
495
|
-
return des
|
|
496
|
-
},
|
|
497
|
-
|
|
498
|
-
nextMonth20 (date) {
|
|
499
|
-
let ds = date.split('-')
|
|
500
|
-
let nextMonth = ds[1] - 0 + 1
|
|
501
|
-
return ds[0] + '-' + (nextMonth < 10 ? '0' + nextMonth : nextMonth) + '-20 00:00:00'
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export default GetLoginInfoService
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import JSEncrypt from 'jsencrypt'
|
|
3
|
+
import {HttpResetClass} from 'vue-client'
|
|
4
|
+
|
|
5
|
+
let loginGen = async function (name, password) {
|
|
6
|
+
let data = {name: name, password: password}
|
|
7
|
+
// rsa加密
|
|
8
|
+
let encrypt = new JSEncrypt();
|
|
9
|
+
encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB');
|
|
10
|
+
console.log(data)
|
|
11
|
+
|
|
12
|
+
let getLogin = await Vue.resetpost('/rs/logic/getLogin', data, {resolveMsg: null, rejectMsg: null}, 'RSA')
|
|
13
|
+
if (getLogin.data.states === '登录成功') {
|
|
14
|
+
// 调用远程登录服务,获取所有有权访问的功能
|
|
15
|
+
data = {username: name, password: password}
|
|
16
|
+
data = encrypt.encrypt(JSON.stringify(data))
|
|
17
|
+
let resource = await Vue.resetpost(`/rs/user/userLogin/客服系统`, data, {
|
|
18
|
+
resolveMsg: null,
|
|
19
|
+
rejectMsg: null
|
|
20
|
+
})
|
|
21
|
+
console.log('登陆获取Util', JSON.stringify(resource.data))
|
|
22
|
+
Vue.$login.f = resource.data
|
|
23
|
+
//获取jwt
|
|
24
|
+
Vue.$login.jwt = getLogin.data.jwt
|
|
25
|
+
// 把登录用户添加到cookie里
|
|
26
|
+
Vue.cookie.set('loginId', Vue.$login.f.id)
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
//获取有权限的功能树
|
|
30
|
+
let hasRight = await Vue.resetpost(`/rs/search`, {
|
|
31
|
+
source: "tool.getFullTree(this.getRights().where(row.getType() == $function$))",
|
|
32
|
+
userid: Vue.$login.f.id
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
resolveMsg: null,
|
|
36
|
+
rejectMsg: null
|
|
37
|
+
})
|
|
38
|
+
console.log('有权限功能返回数据', JSON.stringify(hasRight.data))
|
|
39
|
+
//准备替换功能树
|
|
40
|
+
var fun=[]
|
|
41
|
+
hasRight.data[0].children[0].children.forEach((item) => {
|
|
42
|
+
if(item.name=='客服系统'){
|
|
43
|
+
item.children.forEach((item1) => {
|
|
44
|
+
fun.push(item1)
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
// console.log('替换前', JSON.stringify(Vue.$login.f.functions))
|
|
49
|
+
// console.log('替换后', JSON.stringify(fun))
|
|
50
|
+
Vue.$login.f.functions=fun
|
|
51
|
+
}catch (error) {
|
|
52
|
+
}
|
|
53
|
+
if (Vue.$login.f.id !== '11') {
|
|
54
|
+
try {
|
|
55
|
+
let getAllArea = await Vue.resetpost('/rs/search', {
|
|
56
|
+
source: 'this.getParentByType($organization$).getChildByName($区$).getChildren()',
|
|
57
|
+
userid: Vue.$login.f.id
|
|
58
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
59
|
+
|
|
60
|
+
let areaTemp = []
|
|
61
|
+
for (let i = 0; i < getAllArea.data.length; i++) {
|
|
62
|
+
let getSliceArea = await Vue.resetpost('/rs/search',
|
|
63
|
+
{source: 'this.getChildren()', userid: getAllArea.data[i].id},
|
|
64
|
+
{resolveMsg: null, rejectMsg: null})
|
|
65
|
+
let sliceTemp = []
|
|
66
|
+
for (let j = 0; j < getSliceArea.data.length; j++) {
|
|
67
|
+
sliceTemp.push({label: getSliceArea.data[j].name, value: getSliceArea.data[j].name})
|
|
68
|
+
}
|
|
69
|
+
areaTemp.push({label: getAllArea.data[i].name, value: sliceTemp})
|
|
70
|
+
}
|
|
71
|
+
Vue.$login.f.f_allArea = areaTemp
|
|
72
|
+
}catch (error) {
|
|
73
|
+
Vue.$login.f.f_allArea =[]
|
|
74
|
+
console.log('获取区县',error)
|
|
75
|
+
}
|
|
76
|
+
// 获取抄表员
|
|
77
|
+
try {
|
|
78
|
+
let getGasman = await Vue.resetpost('/rs/search', {
|
|
79
|
+
source: 'this.getParentByType($organization$).getChildByName($抄表员$).getUsers()',
|
|
80
|
+
userid: Vue.$login.f.id
|
|
81
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
82
|
+
let gasman = []
|
|
83
|
+
for (let i = 0; i < getGasman.data.length; i++) {
|
|
84
|
+
gasman.push(getGasman.data[i])
|
|
85
|
+
}
|
|
86
|
+
Vue.$login.f.f_gasman = gasman
|
|
87
|
+
}catch (error) {
|
|
88
|
+
Vue.$login.f.f_gasman = []
|
|
89
|
+
console.log('抄表员模块',error)
|
|
90
|
+
}
|
|
91
|
+
// 获取安装人
|
|
92
|
+
try {
|
|
93
|
+
let getInstallman = await Vue.resetpost('/rs/search', {
|
|
94
|
+
source: 'this.getParentByType($organization$).getChildByName($安装员$).getUsers()',
|
|
95
|
+
userid: Vue.$login.f.id
|
|
96
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
97
|
+
console.log('获取安装员', getInstallman)
|
|
98
|
+
let installman = []
|
|
99
|
+
for (let i = 0; i < getInstallman.data.length; i++) {
|
|
100
|
+
installman.push(getInstallman.data[i])
|
|
101
|
+
}
|
|
102
|
+
Vue.$login.f.f_installman = installman
|
|
103
|
+
}catch (error) {
|
|
104
|
+
Vue.$login.f.f_installman =[]
|
|
105
|
+
console.log('安装人模块',error)
|
|
106
|
+
}
|
|
107
|
+
// 获取换表员
|
|
108
|
+
try {
|
|
109
|
+
let getChangeMeterman = await Vue.resetpost('/rs/search', {
|
|
110
|
+
source: 'this.getParentByType($organization$).getChildByName($换表员$).getUsers()',
|
|
111
|
+
userid: Vue.$login.f.id
|
|
112
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
113
|
+
let changemeterman = []
|
|
114
|
+
for (let i = 0; i < getChangeMeterman.data.length; i++) {
|
|
115
|
+
changemeterman.push(getChangeMeterman.data[i])
|
|
116
|
+
}
|
|
117
|
+
Vue.$login.f.f_changemeterman = changemeterman
|
|
118
|
+
}catch (error) {
|
|
119
|
+
Vue.$login.f.f_changemeterman = []
|
|
120
|
+
console.log('换表员模块',error)
|
|
121
|
+
}
|
|
122
|
+
// 票据使用人
|
|
123
|
+
try {
|
|
124
|
+
let getPaperUseman = await Vue.resetpost('/rs/search', {
|
|
125
|
+
source: 'this.getParentByType($organization$).getChildByName($票据使用人$).getUsers()',
|
|
126
|
+
userid: Vue.$login.f.id
|
|
127
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
128
|
+
let perperuseman = []
|
|
129
|
+
for (let i = 0; i < getPaperUseman.data.length; i++) {
|
|
130
|
+
perperuseman.push(getPaperUseman.data[i])
|
|
131
|
+
}
|
|
132
|
+
Vue.$login.f.f_paperUseman = perperuseman
|
|
133
|
+
}catch (error) {
|
|
134
|
+
Vue.$login.f.f_paperUseman = []
|
|
135
|
+
console.log('票据使用人模块',error)
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
// 票据分配人
|
|
139
|
+
try {
|
|
140
|
+
let getPaperAllotman = await Vue.resetpost('/rs/search', {
|
|
141
|
+
source: 'this.getParentByType($organization$).getChildByName($票据分配人$).getUsers()',
|
|
142
|
+
userid: Vue.$login.f.id
|
|
143
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
144
|
+
let paperallotman = []
|
|
145
|
+
for (let i = 0; i < getPaperAllotman.data.length; i++) {
|
|
146
|
+
paperallotman.push(getPaperAllotman.data[i])
|
|
147
|
+
}
|
|
148
|
+
Vue.$login.f.f_paperAllotman = paperallotman
|
|
149
|
+
}catch (error) {
|
|
150
|
+
Vue.$login.f.f_paperAllotman = []
|
|
151
|
+
console.log('票据分配人模块',error)
|
|
152
|
+
}
|
|
153
|
+
// TODO 处理界面细节
|
|
154
|
+
try {
|
|
155
|
+
let viewDetails = await Vue.resetpost('rs/search', {
|
|
156
|
+
source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
|
|
157
|
+
userid: Vue.$login.f.id
|
|
158
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
159
|
+
let r = viewDetails.data
|
|
160
|
+
Vue.$login.r = []
|
|
161
|
+
r.forEach(x => Vue.$login.r.push(x.name))
|
|
162
|
+
}catch (error) {
|
|
163
|
+
Vue.$login.r = []
|
|
164
|
+
console.log('加载模块失败',error)
|
|
165
|
+
}
|
|
166
|
+
// 调用登录后处理
|
|
167
|
+
for(let proc of Vue.$login.afterLogin) {
|
|
168
|
+
await proc(Vue.$login.f)
|
|
169
|
+
}
|
|
170
|
+
// 定时发送心跳
|
|
171
|
+
setInterval(()=> {
|
|
172
|
+
let http = new HttpResetClass()
|
|
173
|
+
http.load('POST', `rs/user/access/${Vue.$login.f.id}`, {}, {resolveMsg: null, rejectMsg: null}).then((req) => {
|
|
174
|
+
if(req.data.status==710){
|
|
175
|
+
Vue.showMessage(req.data.msg+",您将被强制退出系统", ['confirm']).then((res) => {
|
|
176
|
+
if (res === 'confirm') {
|
|
177
|
+
location.reload()
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
}, 2 * 60 * 1000)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
} else {
|
|
186
|
+
let error = {status: 401, data: getLogin.data.states}
|
|
187
|
+
// 抛出错误
|
|
188
|
+
throw error
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
let GetLoginInfoService = {
|
|
193
|
+
// 登录后要处理的异步对象
|
|
194
|
+
afterLogin: [],
|
|
195
|
+
//验证码开关
|
|
196
|
+
Verification: true,
|
|
197
|
+
install (Vue, options) {
|
|
198
|
+
// 给vue增添对话框显示方法
|
|
199
|
+
Vue.$login = Vue.prototype.$login = GetLoginInfoService
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
f: {
|
|
203
|
+
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* 登录
|
|
208
|
+
* @param name
|
|
209
|
+
* @param password
|
|
210
|
+
*/
|
|
211
|
+
login (name, password) {
|
|
212
|
+
return loginGen(name, password)
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
convertToIn (val) {
|
|
216
|
+
let temp = ''
|
|
217
|
+
if (val instanceof Array) {
|
|
218
|
+
if (val.length >= 1) {
|
|
219
|
+
temp = '('
|
|
220
|
+
val.forEach((res) => {
|
|
221
|
+
temp += `'${res}',`
|
|
222
|
+
})
|
|
223
|
+
temp = temp.substr(0, temp.length - 1) + ')'
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return temp
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
toStandardYearMonth () {
|
|
230
|
+
let dt = new Date()
|
|
231
|
+
let month = dt.getMonth() + 1
|
|
232
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month)
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
toStandardYearMonth1 () {
|
|
236
|
+
let dt = new Date()
|
|
237
|
+
let month = dt.getMonth() + 1
|
|
238
|
+
return dt.getFullYear() + (month < 10 ? '0' + month : month)
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
toStandardDateString () {
|
|
242
|
+
let dt = new Date()
|
|
243
|
+
let month = dt.getMonth() + 1
|
|
244
|
+
let date = dt.getDate()
|
|
245
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
toStartAndEndDateString () {
|
|
249
|
+
let dt = new Date()
|
|
250
|
+
let month = dt.getMonth() + 1
|
|
251
|
+
// let date = dt.getDate()
|
|
252
|
+
return [dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-01',
|
|
253
|
+
dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (new Date(dt.getFullYear(), month, 0).getDate())]
|
|
254
|
+
// return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
toStandardTimeString () {
|
|
258
|
+
let dt = new Date()
|
|
259
|
+
let month = dt.getMonth() + 1
|
|
260
|
+
let date = dt.getDate()
|
|
261
|
+
let hour = dt.getHours()
|
|
262
|
+
let min = dt.getMinutes()
|
|
263
|
+
let sec = dt.getSeconds()
|
|
264
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) +
|
|
265
|
+
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
guid () {
|
|
269
|
+
let buf = new Uint16Array(8)
|
|
270
|
+
window.crypto.getRandomValues(buf)
|
|
271
|
+
let S4 = function (num) {
|
|
272
|
+
let ret = num.toString(16)
|
|
273
|
+
while (ret.length < 4) {
|
|
274
|
+
ret = '0' + ret
|
|
275
|
+
}
|
|
276
|
+
return ret
|
|
277
|
+
}
|
|
278
|
+
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]))
|
|
279
|
+
},
|
|
280
|
+
|
|
281
|
+
choices (role, param, hasBlank = false, blankHint = '请选择') {
|
|
282
|
+
if (role == 'view') {
|
|
283
|
+
Vue.getParams(param, [null])
|
|
284
|
+
} else {
|
|
285
|
+
let result = []
|
|
286
|
+
if (hasBlank)
|
|
287
|
+
result.push({label: blankHint, value: null})
|
|
288
|
+
if (!Vue.param || !Vue.param[param])
|
|
289
|
+
result.push({label: '请在系统设置里更新参数', value: '请在系统设置里更新参数'})
|
|
290
|
+
else {
|
|
291
|
+
let p = Vue.param[param]
|
|
292
|
+
p.forEach(function (item) {
|
|
293
|
+
result.push({label: item.name, value: item.name})
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
return result
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
required (param) {
|
|
301
|
+
if (typeof param === 'number' && param == 0)
|
|
302
|
+
return false
|
|
303
|
+
if (!param)
|
|
304
|
+
return true
|
|
305
|
+
param = param + ''
|
|
306
|
+
param = param.trim()
|
|
307
|
+
if (!param)
|
|
308
|
+
return true
|
|
309
|
+
return false
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
isInt (n) {
|
|
313
|
+
return !window.isNaN(n) && n % 1 === 0
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
isFloat (n) {
|
|
317
|
+
return !window.isNaN(n)
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
// this will convert all true/false to boolean
|
|
321
|
+
booleanFilter (paper) {
|
|
322
|
+
for (let key in paper) {
|
|
323
|
+
if (!paper.hasOwnProperty(key))
|
|
324
|
+
continue
|
|
325
|
+
if (typeof paper[key] == 'object' && paper[key] != null) {
|
|
326
|
+
booleanFilter(paper[key])
|
|
327
|
+
} else {
|
|
328
|
+
if (paper[key] === 'true' || paper[key] == 'false')
|
|
329
|
+
paper[key] = (paper[key] === 'true')
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
// recursively traverse through each path
|
|
334
|
+
ratifyPics (paper) {
|
|
335
|
+
for (let key in paper) {
|
|
336
|
+
if (key.endsWith('_path')) {
|
|
337
|
+
if (!paper[key]) {
|
|
338
|
+
paper[key] = 'rs/db/file/nopic.png'
|
|
339
|
+
} else {
|
|
340
|
+
paper[key] = 'rs/db/file/' + paper[key]
|
|
341
|
+
}
|
|
342
|
+
} else if (paper[key] !== null && typeof (paper[key]) == 'object') {
|
|
343
|
+
ratifyPics(paper[key])
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
// load script and other stuff
|
|
349
|
+
loadscript (type, fileName) {
|
|
350
|
+
return new Promise((resolve, reject) => {
|
|
351
|
+
let element
|
|
352
|
+
if (type == 'css') {
|
|
353
|
+
element = document.createElement('link')
|
|
354
|
+
element.setAttribute('rel', 'stylesheet')
|
|
355
|
+
element.setAttribute('type', 'text/css')
|
|
356
|
+
element.setAttribute('href', fileName)
|
|
357
|
+
} else if (type == 'js') {
|
|
358
|
+
element = document.createElement('script')
|
|
359
|
+
element.setAttribute('type', 'text/javascript')
|
|
360
|
+
element.setAttribute('src', fileName)
|
|
361
|
+
}
|
|
362
|
+
if (element) {
|
|
363
|
+
element.setAttribute('async', '')
|
|
364
|
+
element.setAttribute('defer', '')
|
|
365
|
+
element.addEventListener('load', function () {
|
|
366
|
+
resolve(element)
|
|
367
|
+
}, false)
|
|
368
|
+
element.addEventListener('error', function () {
|
|
369
|
+
reject(element)
|
|
370
|
+
}, false)
|
|
371
|
+
document.body.appendChild(element)
|
|
372
|
+
}
|
|
373
|
+
})
|
|
374
|
+
},
|
|
375
|
+
// 不能选择器中截取掉多余的字符
|
|
376
|
+
orgName (name) {
|
|
377
|
+
return name.substring(10)
|
|
378
|
+
},
|
|
379
|
+
|
|
380
|
+
getNowDate (name) {
|
|
381
|
+
// 求取当前时间的工具
|
|
382
|
+
let myweekday = ''
|
|
383
|
+
let year = ''
|
|
384
|
+
let mydate = new Date()
|
|
385
|
+
myweekday = mydate.getDay()
|
|
386
|
+
let mymonth = mydate.getMonth() + 1
|
|
387
|
+
let myday = mydate.getDate()
|
|
388
|
+
let myyear = mydate.getYear()
|
|
389
|
+
year = (myyear > 200) ? myyear : 1900 + myyear
|
|
390
|
+
let week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期日', '星期六']
|
|
391
|
+
// document.write("<font color=#ffffff>今天是 "+year+"年"+mymonth+"月"+myday+"日 "+weekday+"</font>");
|
|
392
|
+
return year + '年' + mymonth + '月' + myday + '日 ' + week[myweekday]
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
addDate (date, days) {
|
|
396
|
+
// 求取当前时间的工具
|
|
397
|
+
let endDate = new Date(date)
|
|
398
|
+
endDate = endDate.valueOf()
|
|
399
|
+
endDate = endDate + days * 24 * 60 * 60 * 1000
|
|
400
|
+
endDate = new Date(endDate)
|
|
401
|
+
let month = endDate.getMonth() + 1
|
|
402
|
+
let day = endDate.getDate()
|
|
403
|
+
let hour = endDate.getHours()
|
|
404
|
+
let min = endDate.getMinutes()
|
|
405
|
+
let sec = endDate.getSeconds()
|
|
406
|
+
return endDate.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) +
|
|
407
|
+
' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
|
408
|
+
// return a
|
|
409
|
+
},
|
|
410
|
+
|
|
411
|
+
// 通过地址栏的参数获取参数内容
|
|
412
|
+
getUrlParames (param) {
|
|
413
|
+
var query = window.location.search
|
|
414
|
+
var iLen = param.length
|
|
415
|
+
var iStart = query.indexOf(param)
|
|
416
|
+
if (iStart === -1) {
|
|
417
|
+
return ''
|
|
418
|
+
}
|
|
419
|
+
iStart += iLen + 1
|
|
420
|
+
var iEnd = query.indexOf('&', iStart)
|
|
421
|
+
if (iEnd === -1) {
|
|
422
|
+
return query.substring(iStart)
|
|
423
|
+
}
|
|
424
|
+
return query.substring(iStart, iEnd)
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
// 从地址栏获取加密的参数
|
|
428
|
+
getUrlCompileParames (param) {
|
|
429
|
+
let code = unescape(window.location.search.slice(1, window.location.search.length))
|
|
430
|
+
let query = String.fromCharCode(code.charCodeAt(0) - code.length)
|
|
431
|
+
for (var i = 1; i < code.length; i++) {
|
|
432
|
+
query += String.fromCharCode(code.charCodeAt(i) - query.charCodeAt(i - 1))
|
|
433
|
+
}
|
|
434
|
+
let iLen = param.length
|
|
435
|
+
let iStart = query.indexOf(param)
|
|
436
|
+
if (iStart === -1) {
|
|
437
|
+
return ''
|
|
438
|
+
}
|
|
439
|
+
iStart += iLen + 1
|
|
440
|
+
let iEnd = query.indexOf('&', iStart)
|
|
441
|
+
if (iEnd === -1) {
|
|
442
|
+
return query.substring(iStart)
|
|
443
|
+
}
|
|
444
|
+
return query.substring(iStart, iEnd)
|
|
445
|
+
},
|
|
446
|
+
|
|
447
|
+
// 对字符串进行加密
|
|
448
|
+
compileStr (code) {
|
|
449
|
+
let c = String.fromCharCode(code.charCodeAt(0) + code.length)
|
|
450
|
+
for (let i = 1; i < code.length; i++) {
|
|
451
|
+
c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1))
|
|
452
|
+
}
|
|
453
|
+
return escape(c)
|
|
454
|
+
},
|
|
455
|
+
// 字符串进行解密
|
|
456
|
+
uncompileStr (code) {
|
|
457
|
+
code = unescape(code)
|
|
458
|
+
let c = String.fromCharCode(code.charCodeAt(0) - code.length)
|
|
459
|
+
for (var i = 1; i < code.length; i++) {
|
|
460
|
+
c += String.fromCharCode(code.charCodeAt(i) - c.charCodeAt(i - 1))
|
|
461
|
+
}
|
|
462
|
+
return c
|
|
463
|
+
},
|
|
464
|
+
|
|
465
|
+
dateDescripte (date) {
|
|
466
|
+
let nowTime = new Date().getTime()
|
|
467
|
+
let oldTime = new Date(date).getTime()
|
|
468
|
+
let timeDiff = nowTime - oldTime
|
|
469
|
+
// 规则说明
|
|
470
|
+
// 小于等于2分钟为刚刚
|
|
471
|
+
// 大于2分钟小于等于1小时为取整的分钟前(例如:35分钟前)
|
|
472
|
+
// 大于1小时小于等于24小时为取整的小时前(例如:15小时前)
|
|
473
|
+
// 大于24小时小于等于30天为取整的天前(例如:12天前)
|
|
474
|
+
// 大于30天小于等于12月为取整的月前,月份统一为30天一月,不做额外处理(例如:3个月前)
|
|
475
|
+
// 大于365取整的年前,(例如:2年前)
|
|
476
|
+
let minute = 1000 * 60
|
|
477
|
+
let hour = minute * 60
|
|
478
|
+
let day = hour * 24
|
|
479
|
+
let month = day * 30
|
|
480
|
+
let year = month * 12
|
|
481
|
+
let des = ''
|
|
482
|
+
if (timeDiff <= minute * 2) {
|
|
483
|
+
des = '刚刚'
|
|
484
|
+
} else if (minute * 2 < timeDiff && timeDiff < hour) {
|
|
485
|
+
des = `${Math.floor(timeDiff / minute)}分钟前`
|
|
486
|
+
} else if (hour < timeDiff && timeDiff <= day) {
|
|
487
|
+
des = `${Math.floor(timeDiff / hour)}小时前`
|
|
488
|
+
} else if (day < timeDiff && timeDiff <= month) {
|
|
489
|
+
des = `${Math.floor(timeDiff / day)}天前`
|
|
490
|
+
} else if (month < timeDiff && timeDiff <= year) {
|
|
491
|
+
des = `${Math.floor(timeDiff / month)}个月前`
|
|
492
|
+
} else if (year < timeDiff) {
|
|
493
|
+
des = `${Math.floor(timeDiff / year)}年前`
|
|
494
|
+
}
|
|
495
|
+
return des
|
|
496
|
+
},
|
|
497
|
+
|
|
498
|
+
nextMonth20 (date) {
|
|
499
|
+
let ds = date.split('-')
|
|
500
|
+
let nextMonth = ds[1] - 0 + 1
|
|
501
|
+
return ds[0] + '-' + (nextMonth < 10 ? '0' + nextMonth : nextMonth) + '-20 00:00:00'
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export default GetLoginInfoService
|