manage-client 3.2.89-aode → 3.2.89-aodeToV4
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/.classpath +6 -6
- package/.eslintrc.js +16 -16
- package/.project +18 -18
- package/CHANGELOG.md +13 -13
- 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 +12 -12
- package/build/dev-server.js +193 -193
- package/build/webpack.base.conf.js +80 -80
- package/build.gradle +13 -13
- package/config/index.js +38 -38
- package/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/gradlew +234 -234
- package/gradlew.bat +89 -89
- package/package.json +101 -101
- package/src/App.vue +28 -28
- package/src/ManageHome.js +269 -269
- package/src/Staff/StaffCompileList.vue +334 -334
- package/src/Staff/StaffList.vue +161 -161
- package/src/Util.js +383 -383
- package/src/components/ManageHome/Drill/DrillList.vue +320 -320
- package/src/components/ManageHome/Home/CallCenter.vue +124 -124
- package/src/components/ManageHome/Home/Monitor.vue +329 -329
- package/src/components/ManageHome/Home/UserModule.vue +367 -367
- package/src/components/ManageHome/ImportSupplygas/AddSupply.vue +206 -206
- package/src/components/ManageHome/ImportSupplygas/SupplySelect.vue +85 -85
- package/src/components/ManageHome/ImportSupplygas/UpdateSupply.vue +187 -187
- package/src/components/ManageHome/Monitor/NoContact.vue +232 -232
- package/src/components/ManageHome/NetWork/LineInspection.vue +267 -267
- package/src/components/ManageHome/NetWork/NetDanger.vue +258 -258
- 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 +116 -116
- package/src/components/ManageHomeCS/CustomerService/ReasonConsultation.vue +115 -115
- package/src/components/ManageHomeCS/CustomerService/ServiceFix.vue +195 -195
- package/src/components/ManageHomeCS/CustomerService/ServiceHome.vue +177 -177
- package/src/components/ManageHomeCS/CustomerService/ServiceStatistics.vue +173 -173
- package/src/components/ManageHomeCS/Drill/DrillData.vue +792 -792
- package/src/components/ManageHomeCS/Drill/DrillList.vue +320 -320
- package/src/components/ManageHomeCS/Home/CallCenter.vue +191 -191
- package/src/components/ManageHomeCS/Home/GasValue.vue +377 -377
- package/src/components/ManageHomeCS/Home/Home.vue +55 -55
- package/src/components/ManageHomeCS/Home/Monitor.vue +415 -415
- package/src/components/ManageHomeCS/Home/NetWork.vue +223 -223
- package/src/components/ManageHomeCS/Home/SafeCheck.vue +443 -443
- package/src/components/ManageHomeCS/Home/UserModule.vue +527 -527
- package/src/components/ManageHomeCS/ImportSupplygas/AddSupply.vue +206 -206
- package/src/components/ManageHomeCS/ImportSupplygas/SupplySelect.vue +85 -85
- package/src/components/ManageHomeCS/ImportSupplygas/UpdateSupply.vue +187 -187
- package/src/components/ManageHomeCS/ManageHome.vue +149 -149
- package/src/components/ManageHomeCS/Monitor/Caveat.vue +301 -301
- package/src/components/ManageHomeCS/Monitor/ComparedGas.vue +264 -264
- package/src/components/ManageHomeCS/Monitor/MeterBrand.vue +221 -221
- package/src/components/ManageHomeCS/Monitor/MonitorCenter.vue +136 -136
- package/src/components/ManageHomeCS/Monitor/MonitorHome.vue +188 -188
- package/src/components/ManageHomeCS/Monitor/NoBuyGas.vue +233 -233
- package/src/components/ManageHomeCS/Monitor/NoContact.vue +246 -246
- package/src/components/ManageHomeCS/Monitor/NoGas.vue +212 -212
- 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 +108 -108
- package/src/components/ManageHomeCS/NetWork/NetWork.vue +222 -222
- package/src/components/ManageHomeCS/NetWork/NetWorkMap.vue +86 -86
- package/src/components/ManageHomeCS/NewHome/NewManageHome.vue +64 -64
- package/src/components/ManageHomeCS/NewHome/TextBusiness.vue +340 -340
- package/src/components/ManageHomeCS/NewHome/TextChildsellgas.vue +206 -206
- package/src/components/ManageHomeCS/NewHome/TextProfit.vue +275 -275
- package/src/components/ManageHomeCS/NewHome/TextSellgas.vue +79 -79
- package/src/components/ManageHomeCS/NewHome/TextShanximap.vue +389 -389
- package/src/components/ManageHomeCS/NewHome/TextTotalsellgas.vue +403 -403
- package/src/components/ManageHomeCS/NewHome/TextUser.vue +298 -298
- package/src/components/ManageHomeCS/NewHome/shanxi.vue +437 -437
- package/src/components/ManageHomeCS/SecurityCheck/CustomerType.vue +246 -246
- package/src/components/ManageHomeCS/SecurityCheck/LatentDanger.vue +263 -263
- package/src/components/ManageHomeCS/SecurityCheck/PlanStatistics.vue +306 -306
- package/src/components/ManageHomeCS/User/GasDistri.vue +343 -343
- package/src/components/ManageHomeCS/User/InspecDistri.vue +348 -348
- package/src/components/ManageHomeCS/User/SaleProportion.vue +336 -336
- package/src/components/ManageHomeCS/User/UseHome.vue +154 -154
- package/src/components/ManageHomeCS/User/UserGascontrast.vue +224 -224
- package/src/components/ManageHomeCS/User/UserNumber.vue +599 -599
- package/src/components/ManageHomeCS/User/UsernumIncrease.vue +277 -277
- 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/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/BonSummary.vue +182 -182
- package/src/components/SellReport/BusSummary.vue +238 -238
- package/src/components/SellReport/ChargeBill.vue +186 -186
- package/src/components/SellReport/CollectFee.vue +184 -184
- package/src/components/SellReport/Contrast.vue +188 -188
- package/src/components/SellReport/FenxiangSell.vue +183 -183
- package/src/components/SellReport/GasCollect.vue +174 -174
- package/src/components/SellReport/GasPrice.vue +183 -183
- package/src/components/SellReport/GaspriceHas.vue +141 -141
- package/src/components/SellReport/GetSummary.vue +186 -186
- package/src/components/SellReport/GetUserNum.vue +166 -166
- package/src/components/SellReport/HandCollect.vue +189 -189
- package/src/components/SellReport/HandplanBili.vue +73 -73
- 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/ManageBusSummary.vue +241 -241
- package/src/components/SellReport/ManageGasPrice.vue +183 -183
- package/src/components/SellReport/ManageHandInputtor.vue +241 -241
- package/src/components/SellReport/ManageMonthGas.vue +181 -181
- package/src/components/SellReport/ManageNewGasPrice.vue +240 -240
- package/src/components/SellReport/ManageSellType.vue +183 -183
- package/src/components/SellReport/ManageUserCollect.vue +177 -177
- package/src/components/SellReport/MeterBill.vue +185 -185
- package/src/components/SellReport/MeterInput.vue +185 -185
- package/src/components/SellReport/MeterReader.vue +203 -203
- package/src/components/SellReport/OweAging.vue +174 -174
- package/src/components/SellReport/QTXManageBusSummary.vue +234 -234
- package/src/components/SellReport/RefundQuery.vue +237 -237
- package/src/components/SellReport/ReportHistory.vue +80 -80
- package/src/components/SellReport/ReportItems.vue +39 -39
- package/src/components/SellReport/ReportPool.vue +40 -40
- package/src/components/SellReport/Selling.vue +188 -188
- package/src/components/SellReport/SiteManager.vue +151 -151
- package/src/components/SellReport/UsertypePie.vue +99 -99
- package/src/components/SellReport/VolumeStatistics.vue +226 -226
- package/src/components/SellReport/YuShou.vue +185 -185
- package/src/components/SellReport/getWebReport.vue +181 -181
- 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 +316 -316
- package/src/components/SellReport/jingwei/handplanReport.vue +229 -225
- package/src/components/TelReport/TrafficAssess.vue +99 -99
- package/src/components/TelReport/TrafficBasic.vue +117 -117
- package/src/components/TelReport/ZhiHuanservice.vue +147 -147
- 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/BussinessType.vue +140 -140
- package/src/components/WebReport/Communication.vue +131 -131
- 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/Paymentpie.vue +160 -160
- 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/safecheck/analysis/SafeHiddenAnaly.vue +932 -932
- package/src/components/sale/businessquery/BusinessManage.vue +109 -109
- package/src/components/sale/businessquery/CancelChargeQuery.vue +650 -650
- package/src/components/sale/businessquery/ChangeMeterQuery.vue +667 -667
- package/src/components/sale/businessquery/ChargeQuery.vue +663 -663
- package/src/components/sale/businessquery/DeductionGas.vue +149 -149
- package/src/components/sale/businessquery/DisableQuery.vue +315 -315
- package/src/components/sale/businessquery/EnableQuery.vue +315 -315
- package/src/components/sale/businessquery/FillCardQuery.vue +436 -436
- package/src/components/sale/businessquery/FillGasQuery.vue +435 -435
- package/src/components/sale/businessquery/HandplanQuery.vue +705 -705
- package/src/components/sale/businessquery/InspectListGas.vue +456 -456
- package/src/components/sale/businessquery/InspectListUser.vue +366 -366
- package/src/components/sale/businessquery/InspectManage.vue +37 -37
- package/src/components/sale/businessquery/NewAccountQuery.vue +511 -511
- package/src/components/sale/businessquery/OtherChargeDetailQuery.vue +70 -70
- package/src/components/sale/businessquery/OtherChargeQuery.vue +406 -406
- package/src/components/sale/businessquery/QueryUserState.vue +313 -313
- package/src/components/sale/businessquery/ReverseQuery.vue +347 -347
- package/src/components/sale/businessquery/SellingHand.vue +340 -340
- package/src/components/sale/businessquery/TransferQuery.vue +363 -363
- package/src/components/sale/businessquery/errorHandplanQuery.vue +246 -246
- package/src/components/sale/businessquery/ncpushQuery.vue +304 -304
- package/src/components/sale/businessquery/toolCardMakeQuery.vue +340 -340
- package/src/components/sale/common/TabButton.vue +149 -149
- package/src/components/sale/common/Tabs.vue +67 -67
- package/src/components/sale/config/exportConfig.js +271 -271
- package/src/components/sale/filesquery/ArchivesManage.vue +35 -35
- package/src/components/sale/filesquery/ChangeUserQuery.vue +396 -396
- package/src/components/sale/filesquery/DeviceQuery.vue +329 -329
- package/src/components/sale/filesquery/MeterQuery.vue +613 -613
- package/src/components/sale/filesquery/UserQuery.vue +556 -556
- package/src/components/sale/filesquery/detail/UserBaseInfo.vue +69 -69
- 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/ncpush/ncUserLoad.vue +176 -176
- package/src/components/sale/ncpush/ncpushmanage/NCpushList.vue +497 -497
- package/src/components/sale/ncpush/ncpushmanage/NCpushManage.vue +50 -50
- package/src/components/sale/ncpush/ncpushmanage/NCpushSummary.vue +110 -110
- package/src/components/sale/ncpush/ncrecord/pushRecordQuery.vue +252 -252
- package/src/components/sale/ncpush/ncrecord/pushbilldatalist.vue +166 -166
- package/src/components/sale/ncpush/ncrecord/pushdaydatalist.vue +298 -298
- package/src/components/sale/ncpush/pushconfirmManage.vue +271 -271
- package/src/components/sale/ncpush/pushconfirmadd.vue +420 -420
- package/src/components/sale/ncpush/pushconfirmlist.vue +414 -414
- package/src/components/sale/ncpush/pushconfirmmergelist.vue +480 -480
- package/src/components/sale/report/aode/DayReport.vue +50 -50
- package/src/components/sale/report/aode/DayReportList.vue +553 -553
- package/src/components/sale/report/aode/DayReportSummary.vue +112 -112
- package/src/components/sale/report/aode/MonthByChargeType.vue +526 -526
- package/src/components/sale/report/aode/MonthByUserType.vue +562 -562
- package/src/components/sale/report/aode/YearByChargeTpye.vue +254 -254
- package/src/components/sale/report/aode/YearByUserType.vue +351 -351
- package/src/components/sale/report/aode/iot/FarawayQuery.vue +401 -401
- package/src/components/sale/report/aode/iot/ReportQuery.vue +387 -387
- package/src/components/sale/report/aode/life/LifeDayReportList.vue +324 -324
- package/src/components/sale/report/aode/life/LifeMonthReport.vue +487 -487
- package/src/components/sale/report/aode/life/LifeYearReport.vue +216 -216
- package/src/components/sale/report/aode/othercharge/OtherDayReport.vue +50 -50
- package/src/components/sale/report/aode/othercharge/OtherDayReportList.vue +414 -414
- package/src/components/sale/report/aode/othercharge/OtherDayReportListPrint.vue +240 -240
- package/src/components/sale/report/aode/othercharge/OtherDayReportSummary.vue +68 -68
- package/src/components/sale/report/aode/userbuyQuery.vue +477 -477
- package/src/components/sale/report/aode/widget/DayReportListPrint.vue +310 -310
- package/src/components/sale/report/aode/widget/LifeDayReportListPrint.vue +233 -233
- package/src/components/sale/report/aode/widget/LifeMonthPrint.vue +170 -170
- package/src/components/sale/report/aode/widget/LifeYearPrint.vue +160 -160
- package/src/components/sale/report/aode/widget/MonthByChargePrint.vue +246 -246
- package/src/components/sale/report/aode/widget/MonthByUserPrint.vue +232 -232
- package/src/components/valueaddinfo/ValueAddinfoQuery.vue +425 -425
- package/src/components/valueaddinfo/renewalvalueAddUserQuery.vue +371 -371
- package/src/components/valueaddinfo/valueAddCountQuery.vue +315 -315
- package/src/components/valueaddinfo/valueAddUserQuery.vue +404 -404
- package/src/components/webmeter/ArreasuserQuery.vue +193 -193
- package/src/components/webmeter/DrillData/LargeScreenAnalysisEcharts.vue +710 -710
- package/src/components/webmeter/DrillData/LostContactAnalysis.vue +531 -531
- package/src/components/webmeter/DrillData/LostContactAnalysisList.vue +548 -559
- package/src/components/webmeter/DrillData/LostContactEcharts.vue +159 -159
- package/src/components/webmeter/DrillData/LostContactEform.vue +190 -190
- package/src/components/webmeter/DrillData/NewUserGasAll.vue +592 -592
- package/src/components/webmeter/DrillData/UserGasAll.vue +538 -538
- package/src/components/webmeter/DrillData/UserGasEcharts.vue +209 -209
- package/src/components/webmeter/DrillData/UserGasEform.vue +226 -226
- package/src/components/webmeter/DrillData/UserLostContactAnalysis.vue +527 -527
- package/src/components/webmeter/EasyExcelExportCk.vue +396 -396
- package/src/components/webmeter/IOTArrears/arrears.vue +325 -325
- package/src/components/webmeter/IOTArrears/iotRechargeAudit.vue +378 -378
- package/src/components/webmeter/IOTArrears/valueConfig.js +14 -14
- package/src/components/webmeter/NewWebmeterHandplanQuery.vue +605 -605
- package/src/components/webmeter/OperatorCount.vue +189 -189
- package/src/components/webmeter/WebmeterHandplanQuery.vue +640 -640
- package/src/components/webmeter/WebmeterHandplanQuery2CK.vue +663 -663
- package/src/components/webmeter/dataCollection/DataCollection.vue +630 -630
- package/src/components/webmeter/gasAnalysis/GasAnalysisEcharts.vue +144 -144
- package/src/components/webmeter/gasAnalysis/GasAnalysisManage.vue +303 -303
- package/src/components/webmeter/gasAnalysis/GasAnalysisSummary.vue +162 -162
- package/src/components/webmeter/handplan/NewWebMeterHandPlan.vue +745 -745
- package/src/components/webmeter/indicatorStatisticsEchars.vue +204 -204
- package/src/components/webmeter/indicatorStatisticsMain.vue +257 -257
- package/src/components/webmeter/newwebmeter/NewException/NewExceptionEcharsTotal.vue +712 -712
- 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/webmeter/newwebmeter/NewException/TotalExceptionByMeter.vue +511 -459
- package/src/components/webmeter/newwebmeter/NewWebUserHand.vue +324 -324
- package/src/components/webmeter/newwebmeter/ReportDataQuery.vue +283 -283
- package/src/components/webmeter/newwebmeter/UserGasEchartsList.vue +245 -245
- package/src/components/webmeter/newwebmeter/UserGasList.vue +295 -295
- package/src/components/webmeter/newwebmeter/UserInstructEchartsList.vue +286 -286
- package/src/components/webmeter/newwebmeter/UserInstructList.vue +311 -311
- package/src/components/webmeter/newwebmeter/signAnalysisEcharts.vue +258 -258
- package/src/components/webmeter/newwebmeter/signAnalysisEform.vue +175 -175
- package/src/components/webmeter/newwebmeter/signAnalysisListMain.vue +386 -386
- package/src/components/webmeter/report/ReportList.vue +211 -211
- package/src/index.js +9 -9
- package/src/main.js +56 -56
- package/src/newmanage.js +288 -288
- package/src/plugins/GetLoginInfoService.js +505 -505
- package/src/plugins/LodopFuncs.js +124 -124
- package/src/reportManage.js +208 -208
- package/src/saleManage.js +263 -263
- package/src/stores/DataSql.js +585 -585
- package/src/stores/DrillECharts.js +601 -601
- package/src/stores/DrillSql.js +675 -675
- package/src/stores/MagGetSaleParams.js +138 -138
- package/src/stores/MagLoadParams.js +63 -63
- package/src/webmeterManage.js +99 -99
- package/yarn-error.log +7394 -7394
|
@@ -1,601 +1,601 @@
|
|
|
1
|
-
import {HttpResetClass} from 'vue-client'
|
|
2
|
-
|
|
3
|
-
//请求当前公司的小区
|
|
4
|
-
export function select(self, param, condition) {
|
|
5
|
-
var items = '\'f_residential_area\' value,F_RESIDENTIAL_AREA label'
|
|
6
|
-
var tablename = 't_area'
|
|
7
|
-
var sqlcondition = {items: items, tablename: tablename, condition: condition}
|
|
8
|
-
let load = new HttpResetClass()
|
|
9
|
-
load.load("POST", "/
|
|
10
|
-
{data: sqlcondition},
|
|
11
|
-
{resolveMsg: null, rejectMsg: null})
|
|
12
|
-
.then((res) => {
|
|
13
|
-
console.log(res.data, param, '返回数据')
|
|
14
|
-
let children = []
|
|
15
|
-
res.data.forEach((area) => {
|
|
16
|
-
|
|
17
|
-
var result = {label: area.label, value: Math.random(), name: area.value}
|
|
18
|
-
children.push(result)
|
|
19
|
-
})
|
|
20
|
-
for (var i = 0; i < self.drillparam.length; i++) {
|
|
21
|
-
var s = self.drillparam[i]
|
|
22
|
-
if (s.name == param) {
|
|
23
|
-
self.drillparam[i] = {label: s.label, value: s.value, name: s.name, children: children}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
console.log(self.drillparam, '子列')
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
//请求后台数据
|
|
31
|
-
export function getData(self, sqlname,condition) {
|
|
32
|
-
let load = new HttpResetClass();
|
|
33
|
-
load.load("POST", '
|
|
34
|
-
{data: condition},
|
|
35
|
-
{resolveMsg: null, rejectMsg: null})
|
|
36
|
-
.then((res) => {
|
|
37
|
-
console.log(res.data, '返回数据')
|
|
38
|
-
self.sqlobtaindata = res.data
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//时间类柱状图数据整合
|
|
43
|
-
export function DataIntegration(data) {
|
|
44
|
-
var cachedata = data
|
|
45
|
-
var param = []
|
|
46
|
-
console.log(cachedata, '待整合数据')
|
|
47
|
-
param.push(cachedata[0].type)
|
|
48
|
-
// 获取时间下的分类
|
|
49
|
-
for (var i = 1; i < cachedata.length; i++) {
|
|
50
|
-
var l = 0
|
|
51
|
-
for (var j = 0; j < param.length; j++) {
|
|
52
|
-
if (param[j] != cachedata[i].type) {
|
|
53
|
-
l++
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (l == param.length) {
|
|
57
|
-
param.push(cachedata[i].type)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
// 按照分类进行时间划分
|
|
61
|
-
var result = []
|
|
62
|
-
for (var i = 0; i < param.length; i++) {
|
|
63
|
-
var item = {}
|
|
64
|
-
var chilrenlist = []
|
|
65
|
-
data.forEach(function (s) {
|
|
66
|
-
if (s.type == param[i]) {
|
|
67
|
-
var h = {}
|
|
68
|
-
h.name = s.name
|
|
69
|
-
h.value = s.value
|
|
70
|
-
chilrenlist.push(h)
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
item.name = param[i]
|
|
74
|
-
item.value = chilrenlist
|
|
75
|
-
result.push(item)
|
|
76
|
-
}
|
|
77
|
-
return result
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//绘制饼状图
|
|
81
|
-
export function setPie(self, id, data) {
|
|
82
|
-
console.log(data, '饼状图数据')
|
|
83
|
-
// 获取显示区域
|
|
84
|
-
self.xc = self.$echarts.init(document.getElementById(id))
|
|
85
|
-
var scale = 0.8
|
|
86
|
-
// 获取图例
|
|
87
|
-
var legendname = []
|
|
88
|
-
data.forEach(function (s) {
|
|
89
|
-
legendname.push(s.name)
|
|
90
|
-
})
|
|
91
|
-
// 获取数据
|
|
92
|
-
var echartData = data
|
|
93
|
-
// 自定义样式
|
|
94
|
-
var rich = {
|
|
95
|
-
white: {
|
|
96
|
-
color: "#fff",
|
|
97
|
-
align: 'center',
|
|
98
|
-
fontSize: 12 * scale,
|
|
99
|
-
|
|
100
|
-
padding: [4, 0]
|
|
101
|
-
},
|
|
102
|
-
blue: {
|
|
103
|
-
color: '#e1e52a',
|
|
104
|
-
fontSize: 12 * scale,
|
|
105
|
-
align: 'center',
|
|
106
|
-
padding: [6, 0]
|
|
107
|
-
},
|
|
108
|
-
hr: {
|
|
109
|
-
borderColor: '#64d8d4',
|
|
110
|
-
width: '100%',
|
|
111
|
-
borderWidth: 0.5,
|
|
112
|
-
height: 0,
|
|
113
|
-
},
|
|
114
|
-
}
|
|
115
|
-
var total = 0;
|
|
116
|
-
var result = ''
|
|
117
|
-
// 数据求和
|
|
118
|
-
data.forEach(function (value) {
|
|
119
|
-
total += value.value;
|
|
120
|
-
});
|
|
121
|
-
// 数据进行处理,增加单位万
|
|
122
|
-
var index = total.toString().length
|
|
123
|
-
if (index > 4) {
|
|
124
|
-
var i = total.toString().substring(0, index - 4)
|
|
125
|
-
var s = total.toString().substring(index - 4, index - 3)
|
|
126
|
-
result = i + '.' + s + '万'
|
|
127
|
-
} else {
|
|
128
|
-
result = total
|
|
129
|
-
}
|
|
130
|
-
var s = ""
|
|
131
|
-
for (var i = 4; i > 0; i--) {
|
|
132
|
-
if (result.length < i) {
|
|
133
|
-
s = "\t" + s
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
result = s + result
|
|
137
|
-
|
|
138
|
-
console.log(echartData, legendname, '绘图样式数据')
|
|
139
|
-
// 绘图
|
|
140
|
-
self.xc.setOption({
|
|
141
|
-
title: [
|
|
142
|
-
{
|
|
143
|
-
text: '总用户数',
|
|
144
|
-
x: '44%',
|
|
145
|
-
y: '33%',
|
|
146
|
-
textStyle: {
|
|
147
|
-
color: '#ffffff',
|
|
148
|
-
fontSize: 12 * scale,
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
text: result,
|
|
153
|
-
x: '41%',
|
|
154
|
-
y: '38%',
|
|
155
|
-
padding: [15, 20],
|
|
156
|
-
textStyle: {
|
|
157
|
-
color: '#00e2ea',
|
|
158
|
-
fontSize: 12 * scale,
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
}],
|
|
162
|
-
legend: {
|
|
163
|
-
orient: 'horizontal',
|
|
164
|
-
icon: 'circle',
|
|
165
|
-
x: 'center',
|
|
166
|
-
y: '80%',
|
|
167
|
-
itemWidth: 20 * scale,
|
|
168
|
-
itemHeight: 10 * scale,
|
|
169
|
-
textStyle: {
|
|
170
|
-
fontSize: 12 * scale,
|
|
171
|
-
padding: [0, 0, 0, 4],
|
|
172
|
-
color: '#ffffff'
|
|
173
|
-
},
|
|
174
|
-
data: legendname
|
|
175
|
-
},
|
|
176
|
-
series: [
|
|
177
|
-
{
|
|
178
|
-
name: 'Line 1',
|
|
179
|
-
type: 'pie',
|
|
180
|
-
animation: false,
|
|
181
|
-
clockWise: false,
|
|
182
|
-
radius: ['25%', '26%'],
|
|
183
|
-
center: ['50%', '40%'],
|
|
184
|
-
itemStyle: {
|
|
185
|
-
normal: {
|
|
186
|
-
label: {
|
|
187
|
-
show: false
|
|
188
|
-
},
|
|
189
|
-
labelLine: {
|
|
190
|
-
show: false
|
|
191
|
-
},
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
hoverAnimation: false,
|
|
195
|
-
tooltip: {
|
|
196
|
-
trigger: 'axis'
|
|
197
|
-
},
|
|
198
|
-
data: [{
|
|
199
|
-
value: 100,
|
|
200
|
-
name: '02',
|
|
201
|
-
itemStyle: {
|
|
202
|
-
normal: {
|
|
203
|
-
color: '#29b7ff',//未完成的圆环的颜色
|
|
204
|
-
label: {
|
|
205
|
-
show: false
|
|
206
|
-
},
|
|
207
|
-
labelLine: {
|
|
208
|
-
show: false
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}]
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
name: '总用户数',
|
|
216
|
-
type: 'pie',
|
|
217
|
-
radius: ['30%', '40%'],
|
|
218
|
-
center: ['50%', '40%'],
|
|
219
|
-
hoverAnimation: false,
|
|
220
|
-
color: ['#6fd9d0', '#ede61f', '#6d9bdc'],
|
|
221
|
-
minAngle: 15,//最小角度
|
|
222
|
-
startAngle: 60, //起始角度
|
|
223
|
-
label: {
|
|
224
|
-
normal: {
|
|
225
|
-
borderWidth: 1,
|
|
226
|
-
borderRadius: 4,
|
|
227
|
-
backgroundColor: '#004b5c',
|
|
228
|
-
borderColor: '#64d8d4',
|
|
229
|
-
formatter: function (params, ticket, callback) {
|
|
230
|
-
var total = 0; //用户总数量
|
|
231
|
-
var percent = 0;
|
|
232
|
-
echartData.forEach(function (value, index, array) {
|
|
233
|
-
total += value.value;
|
|
234
|
-
});
|
|
235
|
-
if( params.name.toString().length>6){
|
|
236
|
-
var s= params.name.toString().substring(6, params.name.toString().length)
|
|
237
|
-
return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
console.log(params.name,'cccccc')
|
|
241
|
-
percent = ((params.value / total) * 100).toFixed(1);
|
|
242
|
-
return '{white|' + params.name + '}\n{hr|}\n{blue| ' + params.value + '}{blue| ' + percent + '%}';
|
|
243
|
-
},
|
|
244
|
-
rich: rich,
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
labelLine: {
|
|
249
|
-
normal: {
|
|
250
|
-
length: 15 * scale,
|
|
251
|
-
length2: 20 * scale,
|
|
252
|
-
lineStyle: {
|
|
253
|
-
formatter: function (params, ticket, callback) {
|
|
254
|
-
var total = 0; //用户总数量
|
|
255
|
-
var percent = 0; //用户占比
|
|
256
|
-
echartData.forEach(function (value, index, array) {
|
|
257
|
-
total += value.value;
|
|
258
|
-
});
|
|
259
|
-
percent = ((params.value / total) * 100).toFixed(1);
|
|
260
|
-
if( params.name.toString().length>6){
|
|
261
|
-
var s= params.name.toString().substring(6, params.name.toString().length)
|
|
262
|
-
return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
console.log(params.name,'cccccc')
|
|
266
|
-
return '{white| ' + params.name + '}\n{hr|}\n{yellow| ' + params.value + '}\n{blue| ' + percent + '%}';
|
|
267
|
-
},
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
data: echartData
|
|
272
|
-
}, {
|
|
273
|
-
name: 'Line 2',
|
|
274
|
-
type: 'pie',
|
|
275
|
-
animation: false,
|
|
276
|
-
clockWise: false,
|
|
277
|
-
radius: ['44%', '45%'],
|
|
278
|
-
center: ['50%', '40%'],
|
|
279
|
-
itemStyle: {
|
|
280
|
-
normal: {label: {show: false}, labelLine: {show: false},}
|
|
281
|
-
},
|
|
282
|
-
hoverAnimation: false,
|
|
283
|
-
tooltip: {
|
|
284
|
-
show: false
|
|
285
|
-
},
|
|
286
|
-
data: [{
|
|
287
|
-
value: 100,
|
|
288
|
-
name: '02',
|
|
289
|
-
itemStyle: {
|
|
290
|
-
normal: {color: '#29b7ff', label: {show: false}, labelLine: {show: false}}
|
|
291
|
-
}
|
|
292
|
-
}]
|
|
293
|
-
}]
|
|
294
|
-
}, true)
|
|
295
|
-
self.xc.on("click", self.eConsole)
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
//绘制柱状图
|
|
299
|
-
export function setBar(self, id, data, xname, yname, seriename, idname, namesubif) {
|
|
300
|
-
console.log(data, '柱状图数据')
|
|
301
|
-
self.xc = self.$echarts.init(document.getElementById(id))
|
|
302
|
-
var scale = 0.8
|
|
303
|
-
var xAxisData = [];
|
|
304
|
-
var legendData = [];
|
|
305
|
-
var serieData = [];
|
|
306
|
-
var metaDate = []
|
|
307
|
-
var xlegen = []
|
|
308
|
-
for (var i = 0; i < data.length; i++) {
|
|
309
|
-
legendData[i] = data[i].name
|
|
310
|
-
metaDate.push(data[i].value)
|
|
311
|
-
var xnamechildren = []
|
|
312
|
-
var cachedata = data[i].value
|
|
313
|
-
cachedata.forEach(function (s) {
|
|
314
|
-
xnamechildren.push(s.name)
|
|
315
|
-
})
|
|
316
|
-
xlegen.push(xnamechildren)
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
xAxisData = xlegen[0]
|
|
320
|
-
for (var i = 1; i < xlegen.length; i++) {
|
|
321
|
-
if (xlegen[i].length > xAxisData.length) {
|
|
322
|
-
xAxisData = xlegen[i]
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
xAxisData.push("")
|
|
326
|
-
var tooltype = ''
|
|
327
|
-
console.log(xname)
|
|
328
|
-
if (xname != '') {
|
|
329
|
-
tooltype = xname.substring(0, 1)
|
|
330
|
-
}
|
|
331
|
-
console.log(xAxisData, '系列名')
|
|
332
|
-
var h = []
|
|
333
|
-
metaDate.forEach(function (s) {
|
|
334
|
-
var l = []
|
|
335
|
-
for (var i = 0; i < xAxisData.length; i++) {
|
|
336
|
-
var flag = 0
|
|
337
|
-
for (var j = 0; j < s.length; j++) {
|
|
338
|
-
if (s[j].name == xAxisData[i]) {
|
|
339
|
-
flag++
|
|
340
|
-
l.push(s[j])
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
if (flag == 0) {
|
|
344
|
-
l.push({name: xAxisData[i], value: 0})
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
h.push(l)
|
|
348
|
-
})
|
|
349
|
-
metaDate = h
|
|
350
|
-
var xname1 = ' ' + xname
|
|
351
|
-
var color = []
|
|
352
|
-
color = getcolor(idname, xAxisData.length - 1)
|
|
353
|
-
console.log(legendData,'图例名')
|
|
354
|
-
if(typeof legendData[0]=="undefined"){
|
|
355
|
-
legendData=[]
|
|
356
|
-
legendData.push(seriename)
|
|
357
|
-
}
|
|
358
|
-
if (JSON.stringify(color) == '[]') {
|
|
359
|
-
color = ["#2EF7F3", '#ffe8cb', '#ff9000']
|
|
360
|
-
for (var v = 0; v < legendData.length; v++) {
|
|
361
|
-
var serie = {
|
|
362
|
-
name: legendData[v],
|
|
363
|
-
type: "bar",
|
|
364
|
-
barWidth: '30%',
|
|
365
|
-
barGap: "15%",
|
|
366
|
-
boundaryGap:true,
|
|
367
|
-
itemStyle: {
|
|
368
|
-
normal: {
|
|
369
|
-
color: color[v],
|
|
370
|
-
label: {
|
|
371
|
-
show: true,
|
|
372
|
-
textStyle: {
|
|
373
|
-
color: "#fff"
|
|
374
|
-
},
|
|
375
|
-
position: "top",
|
|
376
|
-
formatter: function (p) {
|
|
377
|
-
var index = p.value.toString().length
|
|
378
|
-
if(p.value <= 0){
|
|
379
|
-
return ""
|
|
380
|
-
}
|
|
381
|
-
if (index > 9) {
|
|
382
|
-
return p.value.toString().substring(0, index - 9) + '亿'
|
|
383
|
-
} else if (index > 4) {
|
|
384
|
-
return p.value.toString().substring(0, index - 4) + '万'
|
|
385
|
-
}
|
|
386
|
-
return p.value
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
data: metaDate[v],
|
|
393
|
-
}
|
|
394
|
-
serieData.push(serie)
|
|
395
|
-
}
|
|
396
|
-
} else {
|
|
397
|
-
for (var v = 0; v < legendData.length; v++) {
|
|
398
|
-
var serie = {
|
|
399
|
-
name: legendData[v],
|
|
400
|
-
type: "bar",
|
|
401
|
-
barWidth: '25%',
|
|
402
|
-
barGap: "15%",
|
|
403
|
-
itemStyle: {
|
|
404
|
-
normal: {
|
|
405
|
-
color: function (params) {
|
|
406
|
-
let colorList = color;
|
|
407
|
-
return colorList[params.dataIndex];
|
|
408
|
-
},
|
|
409
|
-
label: {
|
|
410
|
-
show: true,
|
|
411
|
-
textStyle: {
|
|
412
|
-
color: "#fff"
|
|
413
|
-
},
|
|
414
|
-
position: "top",
|
|
415
|
-
formatter: function (p) {
|
|
416
|
-
|
|
417
|
-
var index = p.value.toString().length
|
|
418
|
-
if(p.value <= 0){
|
|
419
|
-
return ""
|
|
420
|
-
}
|
|
421
|
-
if (index > 9) {
|
|
422
|
-
return p.value.toString().substring(0, index - 9) + '亿'
|
|
423
|
-
} else if (index > 4) {
|
|
424
|
-
return p.value.toString().substring(0, index - 4) + '万'
|
|
425
|
-
}else {
|
|
426
|
-
return p.value
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
data: metaDate[v],
|
|
433
|
-
}
|
|
434
|
-
serieData.push(serie)
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
console.log(legendData, xAxisData, metaDate, serieData, '柱状图绘图参数')
|
|
440
|
-
var colors = ["#036BC8", "#4A95FF", "#5EBEFC", "#2EF7F3", "#FFFFFF"]
|
|
441
|
-
self.xc.setOption({
|
|
442
|
-
title: {text: '', textAlign: 'left', textStyle: {color: "#fff", fontSize: "16*scale", fontWeight: "normal"}},
|
|
443
|
-
color: colors,
|
|
444
|
-
grid: {left: '5%', top: "18%", bottom: "8%", right: "5%", containLabel: true},
|
|
445
|
-
dataZoom: [{
|
|
446
|
-
type: 'inside',
|
|
447
|
-
show: true,
|
|
448
|
-
xAxisIndex: [0],
|
|
449
|
-
left: '9%',
|
|
450
|
-
bottom: -5,
|
|
451
|
-
start: 2,
|
|
452
|
-
end: 90 //初始化滚动条
|
|
453
|
-
}],
|
|
454
|
-
legend: {
|
|
455
|
-
top: 0,
|
|
456
|
-
textStyle: {
|
|
457
|
-
color: '#fff',
|
|
458
|
-
},
|
|
459
|
-
data: legendData,
|
|
460
|
-
},
|
|
461
|
-
tooltip: {
|
|
462
|
-
formatter: function (params) {
|
|
463
|
-
if (params[0].axisValue == '') {
|
|
464
|
-
return ''
|
|
465
|
-
}
|
|
466
|
-
var result = ''
|
|
467
|
-
params.forEach(function (item) {
|
|
468
|
-
result += item.marker + " " + item.seriesName + " : " + item.value + "</br>";
|
|
469
|
-
});
|
|
470
|
-
return params[0].axisValue + tooltype + ' <br/> ' + result
|
|
471
|
-
},
|
|
472
|
-
axisPointer: {type: 'line', lineStyle: {width: 0}},
|
|
473
|
-
trigger: 'axis',
|
|
474
|
-
extraCssText: 'width: auto;height: auto;'
|
|
475
|
-
},
|
|
476
|
-
xAxis: [
|
|
477
|
-
{
|
|
478
|
-
name: xname1,
|
|
479
|
-
type: 'category',
|
|
480
|
-
nameTextStyle: {
|
|
481
|
-
fontSize: 14 * scale,
|
|
482
|
-
color: '#15dce2',
|
|
483
|
-
padding: [40 * scale, 0, 0, -70 * scale],
|
|
484
|
-
},
|
|
485
|
-
axisLine: {show: true, lineStyle: {color: '#04669e', width: 1}},
|
|
486
|
-
axisLabel: {
|
|
487
|
-
interval: 0, textStyle: {color: '#ffffff', fontSize: 14 * scale},
|
|
488
|
-
formatter: function (value, index) {
|
|
489
|
-
if (!namesubif) {
|
|
490
|
-
return value
|
|
491
|
-
}
|
|
492
|
-
//进行客户名称截取换行
|
|
493
|
-
var s = ''
|
|
494
|
-
// 长度超过4个字符进行换行
|
|
495
|
-
if (value.toString().length > 3 && value.toString().length < 8) {
|
|
496
|
-
var s0 = value.toString().substring(0, 4)
|
|
497
|
-
var s1 = value.toString().substring(4, value.toString().length)
|
|
498
|
-
s = s0 + '\n' + s1
|
|
499
|
-
return s
|
|
500
|
-
}
|
|
501
|
-
// 长度超过8个字符进行再次换行
|
|
502
|
-
if (value.toString().length > 7 && value.toString().length < 12) {
|
|
503
|
-
var s0 = value.toString().substring(0, 4)
|
|
504
|
-
var s1 = value.toString().substring(4, 8)
|
|
505
|
-
var s2 = value.toString().substring(8, value.toString().length)
|
|
506
|
-
s = s0 + '\n' + s1 + '\n' + s2
|
|
507
|
-
return s
|
|
508
|
-
}
|
|
509
|
-
// 长度超过12个字符进行再次换行
|
|
510
|
-
if (value.toString().length > 11) {
|
|
511
|
-
var s0 = value.toString().substring(0, 4)
|
|
512
|
-
var s1 = value.toString().substring(4, 8)
|
|
513
|
-
var s2 = value.toString().substring(8, 12)
|
|
514
|
-
var s3 = value.toString().substring(12, value.toString().length)
|
|
515
|
-
s = s0 + '\n' + s1 + '\n' + s2 + '\n' + s3
|
|
516
|
-
return s
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
s = value.toString()
|
|
520
|
-
|
|
521
|
-
return s;
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
|
-
axisTick: {show: false},
|
|
525
|
-
data: xAxisData,
|
|
526
|
-
},
|
|
527
|
-
],
|
|
528
|
-
yAxis: [
|
|
529
|
-
{
|
|
530
|
-
name: yname,
|
|
531
|
-
nameTextStyle: {
|
|
532
|
-
fontSize: 14 * scale,
|
|
533
|
-
padding: [-10 * scale, 35 * scale, 0, 0],
|
|
534
|
-
},
|
|
535
|
-
axisTick: {show: false},
|
|
536
|
-
splitLine: {show: true, lineStyle: {type: 'dashed', color: '#004371'}},
|
|
537
|
-
axisLabel: {interval: 0, textStyle: {color: '#15dce2', fontSize: 14 * scale},
|
|
538
|
-
formatter: function (value) {
|
|
539
|
-
var index = value.toString().length
|
|
540
|
-
if (index > 9) {
|
|
541
|
-
return value.toString().substring(0, index - 9) + '亿'
|
|
542
|
-
} else if (index > 4) {
|
|
543
|
-
return value.toString().substring(0, index - 4) + '万'
|
|
544
|
-
}
|
|
545
|
-
return value
|
|
546
|
-
}},
|
|
547
|
-
axisLine: {show: false, lineStyle: {color: '#15dce2', fontSize: 14 * scale}},
|
|
548
|
-
},
|
|
549
|
-
],
|
|
550
|
-
series: serieData
|
|
551
|
-
}, true)
|
|
552
|
-
console.log('绘图成功')
|
|
553
|
-
self.xc.on("click", self.eConsole)
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
var parseColor = function (hexStr) {
|
|
558
|
-
return hexStr.length === 4 ? hexStr.substr(1).split('').map(function (s) {
|
|
559
|
-
return 0x11 * parseInt(s, 16);
|
|
560
|
-
}) : [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(function (s) {
|
|
561
|
-
return parseInt(s, 16);
|
|
562
|
-
})
|
|
563
|
-
};
|
|
564
|
-
|
|
565
|
-
var pad = function (s) {
|
|
566
|
-
return (s.length === 1) ? '0' + s : s;
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
// 获取渐变色值
|
|
570
|
-
export function gradientColors(start, end, steps, gamma) {
|
|
571
|
-
var i, j, ms, me, output = [], so = [];
|
|
572
|
-
gamma = gamma || 1;
|
|
573
|
-
var normalize = function (channel) {
|
|
574
|
-
return Math.pow(channel / 255, gamma);
|
|
575
|
-
};
|
|
576
|
-
start = parseColor(start).map(normalize);
|
|
577
|
-
end = parseColor(end).map(normalize);
|
|
578
|
-
for (i = 0; i < steps; i++) {
|
|
579
|
-
ms = i / (steps - 1);
|
|
580
|
-
me = 1 - ms;
|
|
581
|
-
for (j = 0; j < 3; j++) {
|
|
582
|
-
so[j] = pad(Math.round(Math.pow(start[j] * me + end[j] * ms, 1 / gamma) * 255).toString(16));
|
|
583
|
-
}
|
|
584
|
-
output.push('#' + so.join(''));
|
|
585
|
-
}
|
|
586
|
-
return output;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
var getcolor = function (idname, num) {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
let color = {
|
|
594
|
-
longnotbuygas: ['#ffe8cb', '#ff9000'],
|
|
595
|
-
}
|
|
596
|
-
if (typeof color[idname] != "undefined") {
|
|
597
|
-
return gradientColors(color[idname][0], color[idname][1], num, 2.2)
|
|
598
|
-
}
|
|
599
|
-
return []
|
|
600
|
-
}
|
|
601
|
-
|
|
1
|
+
import {HttpResetClass} from 'vue-client'
|
|
2
|
+
|
|
3
|
+
//请求当前公司的小区
|
|
4
|
+
export function select(self, param, condition) {
|
|
5
|
+
var items = '\'f_residential_area\' value,F_RESIDENTIAL_AREA label'
|
|
6
|
+
var tablename = 't_area'
|
|
7
|
+
var sqlcondition = {items: items, tablename: tablename, condition: condition}
|
|
8
|
+
let load = new HttpResetClass()
|
|
9
|
+
load.load("POST", "/api/af-revenue/sql/singleTableParam",
|
|
10
|
+
{data: sqlcondition},
|
|
11
|
+
{resolveMsg: null, rejectMsg: null})
|
|
12
|
+
.then((res) => {
|
|
13
|
+
console.log(res.data, param, '返回数据')
|
|
14
|
+
let children = []
|
|
15
|
+
res.data.forEach((area) => {
|
|
16
|
+
|
|
17
|
+
var result = {label: area.label, value: Math.random(), name: area.value}
|
|
18
|
+
children.push(result)
|
|
19
|
+
})
|
|
20
|
+
for (var i = 0; i < self.drillparam.length; i++) {
|
|
21
|
+
var s = self.drillparam[i]
|
|
22
|
+
if (s.name == param) {
|
|
23
|
+
self.drillparam[i] = {label: s.label, value: s.value, name: s.name, children: children}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
console.log(self.drillparam, '子列')
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//请求后台数据
|
|
31
|
+
export function getData(self, sqlname,condition) {
|
|
32
|
+
let load = new HttpResetClass();
|
|
33
|
+
load.load("POST", 'api/af-revenue/sql/jyd'+sqlname,
|
|
34
|
+
{data: condition},
|
|
35
|
+
{resolveMsg: null, rejectMsg: null})
|
|
36
|
+
.then((res) => {
|
|
37
|
+
console.log(res.data, '返回数据')
|
|
38
|
+
self.sqlobtaindata = res.data
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//时间类柱状图数据整合
|
|
43
|
+
export function DataIntegration(data) {
|
|
44
|
+
var cachedata = data
|
|
45
|
+
var param = []
|
|
46
|
+
console.log(cachedata, '待整合数据')
|
|
47
|
+
param.push(cachedata[0].type)
|
|
48
|
+
// 获取时间下的分类
|
|
49
|
+
for (var i = 1; i < cachedata.length; i++) {
|
|
50
|
+
var l = 0
|
|
51
|
+
for (var j = 0; j < param.length; j++) {
|
|
52
|
+
if (param[j] != cachedata[i].type) {
|
|
53
|
+
l++
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (l == param.length) {
|
|
57
|
+
param.push(cachedata[i].type)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// 按照分类进行时间划分
|
|
61
|
+
var result = []
|
|
62
|
+
for (var i = 0; i < param.length; i++) {
|
|
63
|
+
var item = {}
|
|
64
|
+
var chilrenlist = []
|
|
65
|
+
data.forEach(function (s) {
|
|
66
|
+
if (s.type == param[i]) {
|
|
67
|
+
var h = {}
|
|
68
|
+
h.name = s.name
|
|
69
|
+
h.value = s.value
|
|
70
|
+
chilrenlist.push(h)
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
item.name = param[i]
|
|
74
|
+
item.value = chilrenlist
|
|
75
|
+
result.push(item)
|
|
76
|
+
}
|
|
77
|
+
return result
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//绘制饼状图
|
|
81
|
+
export function setPie(self, id, data) {
|
|
82
|
+
console.log(data, '饼状图数据')
|
|
83
|
+
// 获取显示区域
|
|
84
|
+
self.xc = self.$echarts.init(document.getElementById(id))
|
|
85
|
+
var scale = 0.8
|
|
86
|
+
// 获取图例
|
|
87
|
+
var legendname = []
|
|
88
|
+
data.forEach(function (s) {
|
|
89
|
+
legendname.push(s.name)
|
|
90
|
+
})
|
|
91
|
+
// 获取数据
|
|
92
|
+
var echartData = data
|
|
93
|
+
// 自定义样式
|
|
94
|
+
var rich = {
|
|
95
|
+
white: {
|
|
96
|
+
color: "#fff",
|
|
97
|
+
align: 'center',
|
|
98
|
+
fontSize: 12 * scale,
|
|
99
|
+
|
|
100
|
+
padding: [4, 0]
|
|
101
|
+
},
|
|
102
|
+
blue: {
|
|
103
|
+
color: '#e1e52a',
|
|
104
|
+
fontSize: 12 * scale,
|
|
105
|
+
align: 'center',
|
|
106
|
+
padding: [6, 0]
|
|
107
|
+
},
|
|
108
|
+
hr: {
|
|
109
|
+
borderColor: '#64d8d4',
|
|
110
|
+
width: '100%',
|
|
111
|
+
borderWidth: 0.5,
|
|
112
|
+
height: 0,
|
|
113
|
+
},
|
|
114
|
+
}
|
|
115
|
+
var total = 0;
|
|
116
|
+
var result = ''
|
|
117
|
+
// 数据求和
|
|
118
|
+
data.forEach(function (value) {
|
|
119
|
+
total += value.value;
|
|
120
|
+
});
|
|
121
|
+
// 数据进行处理,增加单位万
|
|
122
|
+
var index = total.toString().length
|
|
123
|
+
if (index > 4) {
|
|
124
|
+
var i = total.toString().substring(0, index - 4)
|
|
125
|
+
var s = total.toString().substring(index - 4, index - 3)
|
|
126
|
+
result = i + '.' + s + '万'
|
|
127
|
+
} else {
|
|
128
|
+
result = total
|
|
129
|
+
}
|
|
130
|
+
var s = ""
|
|
131
|
+
for (var i = 4; i > 0; i--) {
|
|
132
|
+
if (result.length < i) {
|
|
133
|
+
s = "\t" + s
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
result = s + result
|
|
137
|
+
|
|
138
|
+
console.log(echartData, legendname, '绘图样式数据')
|
|
139
|
+
// 绘图
|
|
140
|
+
self.xc.setOption({
|
|
141
|
+
title: [
|
|
142
|
+
{
|
|
143
|
+
text: '总用户数',
|
|
144
|
+
x: '44%',
|
|
145
|
+
y: '33%',
|
|
146
|
+
textStyle: {
|
|
147
|
+
color: '#ffffff',
|
|
148
|
+
fontSize: 12 * scale,
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
text: result,
|
|
153
|
+
x: '41%',
|
|
154
|
+
y: '38%',
|
|
155
|
+
padding: [15, 20],
|
|
156
|
+
textStyle: {
|
|
157
|
+
color: '#00e2ea',
|
|
158
|
+
fontSize: 12 * scale,
|
|
159
|
+
|
|
160
|
+
}
|
|
161
|
+
}],
|
|
162
|
+
legend: {
|
|
163
|
+
orient: 'horizontal',
|
|
164
|
+
icon: 'circle',
|
|
165
|
+
x: 'center',
|
|
166
|
+
y: '80%',
|
|
167
|
+
itemWidth: 20 * scale,
|
|
168
|
+
itemHeight: 10 * scale,
|
|
169
|
+
textStyle: {
|
|
170
|
+
fontSize: 12 * scale,
|
|
171
|
+
padding: [0, 0, 0, 4],
|
|
172
|
+
color: '#ffffff'
|
|
173
|
+
},
|
|
174
|
+
data: legendname
|
|
175
|
+
},
|
|
176
|
+
series: [
|
|
177
|
+
{
|
|
178
|
+
name: 'Line 1',
|
|
179
|
+
type: 'pie',
|
|
180
|
+
animation: false,
|
|
181
|
+
clockWise: false,
|
|
182
|
+
radius: ['25%', '26%'],
|
|
183
|
+
center: ['50%', '40%'],
|
|
184
|
+
itemStyle: {
|
|
185
|
+
normal: {
|
|
186
|
+
label: {
|
|
187
|
+
show: false
|
|
188
|
+
},
|
|
189
|
+
labelLine: {
|
|
190
|
+
show: false
|
|
191
|
+
},
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
hoverAnimation: false,
|
|
195
|
+
tooltip: {
|
|
196
|
+
trigger: 'axis'
|
|
197
|
+
},
|
|
198
|
+
data: [{
|
|
199
|
+
value: 100,
|
|
200
|
+
name: '02',
|
|
201
|
+
itemStyle: {
|
|
202
|
+
normal: {
|
|
203
|
+
color: '#29b7ff',//未完成的圆环的颜色
|
|
204
|
+
label: {
|
|
205
|
+
show: false
|
|
206
|
+
},
|
|
207
|
+
labelLine: {
|
|
208
|
+
show: false
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: '总用户数',
|
|
216
|
+
type: 'pie',
|
|
217
|
+
radius: ['30%', '40%'],
|
|
218
|
+
center: ['50%', '40%'],
|
|
219
|
+
hoverAnimation: false,
|
|
220
|
+
color: ['#6fd9d0', '#ede61f', '#6d9bdc'],
|
|
221
|
+
minAngle: 15,//最小角度
|
|
222
|
+
startAngle: 60, //起始角度
|
|
223
|
+
label: {
|
|
224
|
+
normal: {
|
|
225
|
+
borderWidth: 1,
|
|
226
|
+
borderRadius: 4,
|
|
227
|
+
backgroundColor: '#004b5c',
|
|
228
|
+
borderColor: '#64d8d4',
|
|
229
|
+
formatter: function (params, ticket, callback) {
|
|
230
|
+
var total = 0; //用户总数量
|
|
231
|
+
var percent = 0;
|
|
232
|
+
echartData.forEach(function (value, index, array) {
|
|
233
|
+
total += value.value;
|
|
234
|
+
});
|
|
235
|
+
if( params.name.toString().length>6){
|
|
236
|
+
var s= params.name.toString().substring(6, params.name.toString().length)
|
|
237
|
+
return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
|
|
238
|
+
|
|
239
|
+
}
|
|
240
|
+
console.log(params.name,'cccccc')
|
|
241
|
+
percent = ((params.value / total) * 100).toFixed(1);
|
|
242
|
+
return '{white|' + params.name + '}\n{hr|}\n{blue| ' + params.value + '}{blue| ' + percent + '%}';
|
|
243
|
+
},
|
|
244
|
+
rich: rich,
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
labelLine: {
|
|
249
|
+
normal: {
|
|
250
|
+
length: 15 * scale,
|
|
251
|
+
length2: 20 * scale,
|
|
252
|
+
lineStyle: {
|
|
253
|
+
formatter: function (params, ticket, callback) {
|
|
254
|
+
var total = 0; //用户总数量
|
|
255
|
+
var percent = 0; //用户占比
|
|
256
|
+
echartData.forEach(function (value, index, array) {
|
|
257
|
+
total += value.value;
|
|
258
|
+
});
|
|
259
|
+
percent = ((params.value / total) * 100).toFixed(1);
|
|
260
|
+
if( params.name.toString().length>6){
|
|
261
|
+
var s= params.name.toString().substring(6, params.name.toString().length)
|
|
262
|
+
return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
|
|
263
|
+
|
|
264
|
+
}
|
|
265
|
+
console.log(params.name,'cccccc')
|
|
266
|
+
return '{white| ' + params.name + '}\n{hr|}\n{yellow| ' + params.value + '}\n{blue| ' + percent + '%}';
|
|
267
|
+
},
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
data: echartData
|
|
272
|
+
}, {
|
|
273
|
+
name: 'Line 2',
|
|
274
|
+
type: 'pie',
|
|
275
|
+
animation: false,
|
|
276
|
+
clockWise: false,
|
|
277
|
+
radius: ['44%', '45%'],
|
|
278
|
+
center: ['50%', '40%'],
|
|
279
|
+
itemStyle: {
|
|
280
|
+
normal: {label: {show: false}, labelLine: {show: false},}
|
|
281
|
+
},
|
|
282
|
+
hoverAnimation: false,
|
|
283
|
+
tooltip: {
|
|
284
|
+
show: false
|
|
285
|
+
},
|
|
286
|
+
data: [{
|
|
287
|
+
value: 100,
|
|
288
|
+
name: '02',
|
|
289
|
+
itemStyle: {
|
|
290
|
+
normal: {color: '#29b7ff', label: {show: false}, labelLine: {show: false}}
|
|
291
|
+
}
|
|
292
|
+
}]
|
|
293
|
+
}]
|
|
294
|
+
}, true)
|
|
295
|
+
self.xc.on("click", self.eConsole)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
//绘制柱状图
|
|
299
|
+
export function setBar(self, id, data, xname, yname, seriename, idname, namesubif) {
|
|
300
|
+
console.log(data, '柱状图数据')
|
|
301
|
+
self.xc = self.$echarts.init(document.getElementById(id))
|
|
302
|
+
var scale = 0.8
|
|
303
|
+
var xAxisData = [];
|
|
304
|
+
var legendData = [];
|
|
305
|
+
var serieData = [];
|
|
306
|
+
var metaDate = []
|
|
307
|
+
var xlegen = []
|
|
308
|
+
for (var i = 0; i < data.length; i++) {
|
|
309
|
+
legendData[i] = data[i].name
|
|
310
|
+
metaDate.push(data[i].value)
|
|
311
|
+
var xnamechildren = []
|
|
312
|
+
var cachedata = data[i].value
|
|
313
|
+
cachedata.forEach(function (s) {
|
|
314
|
+
xnamechildren.push(s.name)
|
|
315
|
+
})
|
|
316
|
+
xlegen.push(xnamechildren)
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
xAxisData = xlegen[0]
|
|
320
|
+
for (var i = 1; i < xlegen.length; i++) {
|
|
321
|
+
if (xlegen[i].length > xAxisData.length) {
|
|
322
|
+
xAxisData = xlegen[i]
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
xAxisData.push("")
|
|
326
|
+
var tooltype = ''
|
|
327
|
+
console.log(xname)
|
|
328
|
+
if (xname != '') {
|
|
329
|
+
tooltype = xname.substring(0, 1)
|
|
330
|
+
}
|
|
331
|
+
console.log(xAxisData, '系列名')
|
|
332
|
+
var h = []
|
|
333
|
+
metaDate.forEach(function (s) {
|
|
334
|
+
var l = []
|
|
335
|
+
for (var i = 0; i < xAxisData.length; i++) {
|
|
336
|
+
var flag = 0
|
|
337
|
+
for (var j = 0; j < s.length; j++) {
|
|
338
|
+
if (s[j].name == xAxisData[i]) {
|
|
339
|
+
flag++
|
|
340
|
+
l.push(s[j])
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (flag == 0) {
|
|
344
|
+
l.push({name: xAxisData[i], value: 0})
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
h.push(l)
|
|
348
|
+
})
|
|
349
|
+
metaDate = h
|
|
350
|
+
var xname1 = ' ' + xname
|
|
351
|
+
var color = []
|
|
352
|
+
color = getcolor(idname, xAxisData.length - 1)
|
|
353
|
+
console.log(legendData,'图例名')
|
|
354
|
+
if(typeof legendData[0]=="undefined"){
|
|
355
|
+
legendData=[]
|
|
356
|
+
legendData.push(seriename)
|
|
357
|
+
}
|
|
358
|
+
if (JSON.stringify(color) == '[]') {
|
|
359
|
+
color = ["#2EF7F3", '#ffe8cb', '#ff9000']
|
|
360
|
+
for (var v = 0; v < legendData.length; v++) {
|
|
361
|
+
var serie = {
|
|
362
|
+
name: legendData[v],
|
|
363
|
+
type: "bar",
|
|
364
|
+
barWidth: '30%',
|
|
365
|
+
barGap: "15%",
|
|
366
|
+
boundaryGap:true,
|
|
367
|
+
itemStyle: {
|
|
368
|
+
normal: {
|
|
369
|
+
color: color[v],
|
|
370
|
+
label: {
|
|
371
|
+
show: true,
|
|
372
|
+
textStyle: {
|
|
373
|
+
color: "#fff"
|
|
374
|
+
},
|
|
375
|
+
position: "top",
|
|
376
|
+
formatter: function (p) {
|
|
377
|
+
var index = p.value.toString().length
|
|
378
|
+
if(p.value <= 0){
|
|
379
|
+
return ""
|
|
380
|
+
}
|
|
381
|
+
if (index > 9) {
|
|
382
|
+
return p.value.toString().substring(0, index - 9) + '亿'
|
|
383
|
+
} else if (index > 4) {
|
|
384
|
+
return p.value.toString().substring(0, index - 4) + '万'
|
|
385
|
+
}
|
|
386
|
+
return p.value
|
|
387
|
+
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
data: metaDate[v],
|
|
393
|
+
}
|
|
394
|
+
serieData.push(serie)
|
|
395
|
+
}
|
|
396
|
+
} else {
|
|
397
|
+
for (var v = 0; v < legendData.length; v++) {
|
|
398
|
+
var serie = {
|
|
399
|
+
name: legendData[v],
|
|
400
|
+
type: "bar",
|
|
401
|
+
barWidth: '25%',
|
|
402
|
+
barGap: "15%",
|
|
403
|
+
itemStyle: {
|
|
404
|
+
normal: {
|
|
405
|
+
color: function (params) {
|
|
406
|
+
let colorList = color;
|
|
407
|
+
return colorList[params.dataIndex];
|
|
408
|
+
},
|
|
409
|
+
label: {
|
|
410
|
+
show: true,
|
|
411
|
+
textStyle: {
|
|
412
|
+
color: "#fff"
|
|
413
|
+
},
|
|
414
|
+
position: "top",
|
|
415
|
+
formatter: function (p) {
|
|
416
|
+
|
|
417
|
+
var index = p.value.toString().length
|
|
418
|
+
if(p.value <= 0){
|
|
419
|
+
return ""
|
|
420
|
+
}
|
|
421
|
+
if (index > 9) {
|
|
422
|
+
return p.value.toString().substring(0, index - 9) + '亿'
|
|
423
|
+
} else if (index > 4) {
|
|
424
|
+
return p.value.toString().substring(0, index - 4) + '万'
|
|
425
|
+
}else {
|
|
426
|
+
return p.value
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
data: metaDate[v],
|
|
433
|
+
}
|
|
434
|
+
serieData.push(serie)
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
console.log(legendData, xAxisData, metaDate, serieData, '柱状图绘图参数')
|
|
440
|
+
var colors = ["#036BC8", "#4A95FF", "#5EBEFC", "#2EF7F3", "#FFFFFF"]
|
|
441
|
+
self.xc.setOption({
|
|
442
|
+
title: {text: '', textAlign: 'left', textStyle: {color: "#fff", fontSize: "16*scale", fontWeight: "normal"}},
|
|
443
|
+
color: colors,
|
|
444
|
+
grid: {left: '5%', top: "18%", bottom: "8%", right: "5%", containLabel: true},
|
|
445
|
+
dataZoom: [{
|
|
446
|
+
type: 'inside',
|
|
447
|
+
show: true,
|
|
448
|
+
xAxisIndex: [0],
|
|
449
|
+
left: '9%',
|
|
450
|
+
bottom: -5,
|
|
451
|
+
start: 2,
|
|
452
|
+
end: 90 //初始化滚动条
|
|
453
|
+
}],
|
|
454
|
+
legend: {
|
|
455
|
+
top: 0,
|
|
456
|
+
textStyle: {
|
|
457
|
+
color: '#fff',
|
|
458
|
+
},
|
|
459
|
+
data: legendData,
|
|
460
|
+
},
|
|
461
|
+
tooltip: {
|
|
462
|
+
formatter: function (params) {
|
|
463
|
+
if (params[0].axisValue == '') {
|
|
464
|
+
return ''
|
|
465
|
+
}
|
|
466
|
+
var result = ''
|
|
467
|
+
params.forEach(function (item) {
|
|
468
|
+
result += item.marker + " " + item.seriesName + " : " + item.value + "</br>";
|
|
469
|
+
});
|
|
470
|
+
return params[0].axisValue + tooltype + ' <br/> ' + result
|
|
471
|
+
},
|
|
472
|
+
axisPointer: {type: 'line', lineStyle: {width: 0}},
|
|
473
|
+
trigger: 'axis',
|
|
474
|
+
extraCssText: 'width: auto;height: auto;'
|
|
475
|
+
},
|
|
476
|
+
xAxis: [
|
|
477
|
+
{
|
|
478
|
+
name: xname1,
|
|
479
|
+
type: 'category',
|
|
480
|
+
nameTextStyle: {
|
|
481
|
+
fontSize: 14 * scale,
|
|
482
|
+
color: '#15dce2',
|
|
483
|
+
padding: [40 * scale, 0, 0, -70 * scale],
|
|
484
|
+
},
|
|
485
|
+
axisLine: {show: true, lineStyle: {color: '#04669e', width: 1}},
|
|
486
|
+
axisLabel: {
|
|
487
|
+
interval: 0, textStyle: {color: '#ffffff', fontSize: 14 * scale},
|
|
488
|
+
formatter: function (value, index) {
|
|
489
|
+
if (!namesubif) {
|
|
490
|
+
return value
|
|
491
|
+
}
|
|
492
|
+
//进行客户名称截取换行
|
|
493
|
+
var s = ''
|
|
494
|
+
// 长度超过4个字符进行换行
|
|
495
|
+
if (value.toString().length > 3 && value.toString().length < 8) {
|
|
496
|
+
var s0 = value.toString().substring(0, 4)
|
|
497
|
+
var s1 = value.toString().substring(4, value.toString().length)
|
|
498
|
+
s = s0 + '\n' + s1
|
|
499
|
+
return s
|
|
500
|
+
}
|
|
501
|
+
// 长度超过8个字符进行再次换行
|
|
502
|
+
if (value.toString().length > 7 && value.toString().length < 12) {
|
|
503
|
+
var s0 = value.toString().substring(0, 4)
|
|
504
|
+
var s1 = value.toString().substring(4, 8)
|
|
505
|
+
var s2 = value.toString().substring(8, value.toString().length)
|
|
506
|
+
s = s0 + '\n' + s1 + '\n' + s2
|
|
507
|
+
return s
|
|
508
|
+
}
|
|
509
|
+
// 长度超过12个字符进行再次换行
|
|
510
|
+
if (value.toString().length > 11) {
|
|
511
|
+
var s0 = value.toString().substring(0, 4)
|
|
512
|
+
var s1 = value.toString().substring(4, 8)
|
|
513
|
+
var s2 = value.toString().substring(8, 12)
|
|
514
|
+
var s3 = value.toString().substring(12, value.toString().length)
|
|
515
|
+
s = s0 + '\n' + s1 + '\n' + s2 + '\n' + s3
|
|
516
|
+
return s
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
s = value.toString()
|
|
520
|
+
|
|
521
|
+
return s;
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
axisTick: {show: false},
|
|
525
|
+
data: xAxisData,
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
yAxis: [
|
|
529
|
+
{
|
|
530
|
+
name: yname,
|
|
531
|
+
nameTextStyle: {
|
|
532
|
+
fontSize: 14 * scale,
|
|
533
|
+
padding: [-10 * scale, 35 * scale, 0, 0],
|
|
534
|
+
},
|
|
535
|
+
axisTick: {show: false},
|
|
536
|
+
splitLine: {show: true, lineStyle: {type: 'dashed', color: '#004371'}},
|
|
537
|
+
axisLabel: {interval: 0, textStyle: {color: '#15dce2', fontSize: 14 * scale},
|
|
538
|
+
formatter: function (value) {
|
|
539
|
+
var index = value.toString().length
|
|
540
|
+
if (index > 9) {
|
|
541
|
+
return value.toString().substring(0, index - 9) + '亿'
|
|
542
|
+
} else if (index > 4) {
|
|
543
|
+
return value.toString().substring(0, index - 4) + '万'
|
|
544
|
+
}
|
|
545
|
+
return value
|
|
546
|
+
}},
|
|
547
|
+
axisLine: {show: false, lineStyle: {color: '#15dce2', fontSize: 14 * scale}},
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
series: serieData
|
|
551
|
+
}, true)
|
|
552
|
+
console.log('绘图成功')
|
|
553
|
+
self.xc.on("click", self.eConsole)
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
var parseColor = function (hexStr) {
|
|
558
|
+
return hexStr.length === 4 ? hexStr.substr(1).split('').map(function (s) {
|
|
559
|
+
return 0x11 * parseInt(s, 16);
|
|
560
|
+
}) : [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(function (s) {
|
|
561
|
+
return parseInt(s, 16);
|
|
562
|
+
})
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
var pad = function (s) {
|
|
566
|
+
return (s.length === 1) ? '0' + s : s;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
// 获取渐变色值
|
|
570
|
+
export function gradientColors(start, end, steps, gamma) {
|
|
571
|
+
var i, j, ms, me, output = [], so = [];
|
|
572
|
+
gamma = gamma || 1;
|
|
573
|
+
var normalize = function (channel) {
|
|
574
|
+
return Math.pow(channel / 255, gamma);
|
|
575
|
+
};
|
|
576
|
+
start = parseColor(start).map(normalize);
|
|
577
|
+
end = parseColor(end).map(normalize);
|
|
578
|
+
for (i = 0; i < steps; i++) {
|
|
579
|
+
ms = i / (steps - 1);
|
|
580
|
+
me = 1 - ms;
|
|
581
|
+
for (j = 0; j < 3; j++) {
|
|
582
|
+
so[j] = pad(Math.round(Math.pow(start[j] * me + end[j] * ms, 1 / gamma) * 255).toString(16));
|
|
583
|
+
}
|
|
584
|
+
output.push('#' + so.join(''));
|
|
585
|
+
}
|
|
586
|
+
return output;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
var getcolor = function (idname, num) {
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
let color = {
|
|
594
|
+
longnotbuygas: ['#ffe8cb', '#ff9000'],
|
|
595
|
+
}
|
|
596
|
+
if (typeof color[idname] != "undefined") {
|
|
597
|
+
return gradientColors(color[idname][0], color[idname][1], num, 2.2)
|
|
598
|
+
}
|
|
599
|
+
return []
|
|
600
|
+
}
|
|
601
|
+
|