manage-client 3.2.9 → 3.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (458) hide show
  1. package/.babelrc +5 -5
  2. package/.classpath +6 -6
  3. package/.editorconfig +9 -9
  4. package/.eslintrc.js +20 -20
  5. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  6. package/.project +18 -18
  7. package/CHANGELOG.md +15 -15
  8. package/DOC//345/212/237/350/203/275/350/257/264/346/230/216.md +13 -13
  9. package/DOC//347/211/210/346/234/254/344/277/241/346/201/257.md +8 -8
  10. package/ManageClient.iml +13 -13
  11. package/README.md +38 -38
  12. package/build/dev-server.js +176 -174
  13. package/build/webpack.base.conf.js +82 -82
  14. package/build.gradle +13 -13
  15. package/config/dev.env.js +6 -6
  16. package/config/index.js +40 -40
  17. package/config/prod.env.js +3 -3
  18. package/config/test.env.js +6 -6
  19. package/gradle/wrapper/gradle-wrapper.properties +5 -5
  20. package/gradlew.bat +100 -100
  21. package/index.html +28 -28
  22. package/package.json +2 -2
  23. package/release.bat +5 -5
  24. package/src/ManageHome.js +269 -269
  25. package/src/Staff/StaffCompileList.vue +334 -334
  26. package/src/Staff/StaffList.vue +161 -161
  27. package/src/Staff/StaffListManage.vue +49 -49
  28. package/src/Util.js +367 -367
  29. package/src/components/BasisEcharts/LineChart.vue +243 -243
  30. package/src/components/ManageHome/CustomerService/ContentmentStatistics.vue +135 -135
  31. package/src/components/ManageHome/CustomerService/ExcepCollect.vue +174 -174
  32. package/src/components/ManageHome/CustomerService/ReasonComplaint.vue +116 -116
  33. package/src/components/ManageHome/CustomerService/ReasonConsultation.vue +115 -115
  34. package/src/components/ManageHome/CustomerService/ServiceFix.vue +155 -155
  35. package/src/components/ManageHome/CustomerService/ServiceHome.vue +179 -179
  36. package/src/components/ManageHome/CustomerService/ServiceStatistics.vue +147 -147
  37. package/src/components/ManageHome/CustomerService/TrafficStatistics.vue +160 -160
  38. package/src/components/ManageHome/Drill/DrillData.vue +791 -791
  39. package/src/components/ManageHome/Drill/DrillList.vue +320 -320
  40. package/src/components/ManageHome/Drill/DrillPool.vue +129 -129
  41. package/src/components/ManageHome/Home/CallCenter.vue +124 -124
  42. package/src/components/ManageHome/Home/CallFix.vue +172 -172
  43. package/src/components/ManageHome/Home/CallStatistics.vue +147 -147
  44. package/src/components/ManageHome/Home/GasValue.vue +233 -233
  45. package/src/components/ManageHome/Home/Home.vue +138 -138
  46. package/src/components/ManageHome/Home/Monitor.vue +329 -329
  47. package/src/components/ManageHome/Home/NetWork.vue +202 -202
  48. package/src/components/ManageHome/Home/SafeCheck.vue +249 -249
  49. package/src/components/ManageHome/Home/UserModule.vue +367 -367
  50. package/src/components/ManageHome/ImportSupplygas/AddSupply.vue +206 -206
  51. package/src/components/ManageHome/ImportSupplygas/SuppleManagement.vue +43 -43
  52. package/src/components/ManageHome/ImportSupplygas/SupplySelect.vue +85 -85
  53. package/src/components/ManageHome/ImportSupplygas/UpdateSupply.vue +187 -187
  54. package/src/components/ManageHome/ManageHome.vue +292 -292
  55. package/src/components/ManageHome/Monitor/BuySub.vue +311 -311
  56. package/src/components/ManageHome/Monitor/Caveat.vue +300 -300
  57. package/src/components/ManageHome/Monitor/ComparedGas.vue +264 -264
  58. package/src/components/ManageHome/Monitor/MeterBrand.vue +211 -211
  59. package/src/components/ManageHome/Monitor/MonitorCenter.vue +132 -132
  60. package/src/components/ManageHome/Monitor/MonitorHome.vue +188 -188
  61. package/src/components/ManageHome/Monitor/NoBuyGas.vue +223 -223
  62. package/src/components/ManageHome/Monitor/NoContact.vue +233 -233
  63. package/src/components/ManageHome/Monitor/NoGas.vue +202 -202
  64. package/src/components/ManageHome/NetWork/LineInspection.vue +267 -267
  65. package/src/components/ManageHome/NetWork/NetDanger.vue +258 -258
  66. package/src/components/ManageHome/NetWork/NetHome.vue +84 -84
  67. package/src/components/ManageHome/NetWork/SupplyGas.vue +204 -204
  68. package/src/components/ManageHome/SecurityCheck/CheckHome.vue +94 -94
  69. package/src/components/ManageHome/SecurityCheck/CustomerType.vue +244 -244
  70. package/src/components/ManageHome/SecurityCheck/LatentDanger.vue +218 -218
  71. package/src/components/ManageHome/SecurityCheck/PlanStatistics.vue +231 -231
  72. package/src/components/ManageHome/SecurityCheck/StateStatistics.vue +237 -237
  73. package/src/components/ManageHome/SecurityCheck/TaskStatistics.vue +303 -303
  74. package/src/components/ManageHome/User/GasDistri.vue +271 -271
  75. package/src/components/ManageHome/User/InspecDistri.vue +272 -272
  76. package/src/components/ManageHome/User/SaleProportion.vue +309 -309
  77. package/src/components/ManageHome/User/UseHome.vue +155 -155
  78. package/src/components/ManageHome/User/UserGascontrast.vue +223 -223
  79. package/src/components/ManageHome/User/UserNumber.vue +519 -519
  80. package/src/components/ManageHome/User/UsernumIncrease.vue +243 -243
  81. package/src/components/ManageHome/loading.vue +23 -23
  82. package/src/components/ManageHomeCS/Cockpit.vue +43 -43
  83. package/src/components/ManageHomeCS/CustomerService/ContentmentStatistics.vue +161 -161
  84. package/src/components/ManageHomeCS/CustomerService/ExcepCollect.vue +201 -201
  85. package/src/components/ManageHomeCS/CustomerService/ReasonComplaint.vue +146 -146
  86. package/src/components/ManageHomeCS/CustomerService/ReasonConsultation.vue +148 -148
  87. package/src/components/ManageHomeCS/CustomerService/ServiceFix.vue +242 -242
  88. package/src/components/ManageHomeCS/CustomerService/ServiceHome.vue +176 -176
  89. package/src/components/ManageHomeCS/CustomerService/ServiceStatistics.vue +277 -277
  90. package/src/components/ManageHomeCS/CustomerService/TrafficStatistics.vue +226 -226
  91. package/src/components/ManageHomeCS/Drill/DrillData.vue +918 -918
  92. package/src/components/ManageHomeCS/Drill/DrillList.vue +320 -320
  93. package/src/components/ManageHomeCS/Drill/DrillPool.vue +129 -129
  94. package/src/components/ManageHomeCS/Home/CallCenter.vue +206 -206
  95. package/src/components/ManageHomeCS/Home/CallFix.vue +172 -172
  96. package/src/components/ManageHomeCS/Home/CallStatistics.vue +147 -147
  97. package/src/components/ManageHomeCS/Home/GasValue.vue +466 -466
  98. package/src/components/ManageHomeCS/Home/Home.vue +57 -57
  99. package/src/components/ManageHomeCS/Home/Monitor.vue +423 -423
  100. package/src/components/ManageHomeCS/Home/NetWork.vue +223 -223
  101. package/src/components/ManageHomeCS/Home/SafeCheck.vue +446 -446
  102. package/src/components/ManageHomeCS/Home/ShanxiMap.vue +432 -432
  103. package/src/components/ManageHomeCS/Home/UserModule.vue +511 -511
  104. package/src/components/ManageHomeCS/Home/YulinMap.vue +424 -424
  105. package/src/components/ManageHomeCS/ImportSupplygas/AddSupply.vue +206 -206
  106. package/src/components/ManageHomeCS/ImportSupplygas/SuppleManagement.vue +43 -43
  107. package/src/components/ManageHomeCS/ImportSupplygas/SupplySelect.vue +85 -85
  108. package/src/components/ManageHomeCS/ImportSupplygas/UpdateSupply.vue +187 -187
  109. package/src/components/ManageHomeCS/Monitor/BuySub.vue +339 -339
  110. package/src/components/ManageHomeCS/Monitor/Caveat.vue +301 -301
  111. package/src/components/ManageHomeCS/Monitor/ComparedGas.vue +276 -276
  112. package/src/components/ManageHomeCS/Monitor/MeterBrand.vue +220 -220
  113. package/src/components/ManageHomeCS/Monitor/MonitorCenter.vue +139 -139
  114. package/src/components/ManageHomeCS/Monitor/MonitorHome.vue +188 -188
  115. package/src/components/ManageHomeCS/Monitor/NoBuyGas.vue +218 -218
  116. package/src/components/ManageHomeCS/Monitor/NoContact.vue +217 -217
  117. package/src/components/ManageHomeCS/Monitor/NoGas.vue +214 -214
  118. package/src/components/ManageHomeCS/NetWork/LineInspection.vue +268 -268
  119. package/src/components/ManageHomeCS/NetWork/NetDanger.vue +258 -258
  120. package/src/components/ManageHomeCS/NetWork/NetHome.vue +106 -106
  121. package/src/components/ManageHomeCS/NetWork/NetWork.vue +222 -222
  122. package/src/components/ManageHomeCS/NetWork/NetWorkMap.vue +86 -86
  123. package/src/components/ManageHomeCS/NetWork/SupplyGas.vue +291 -291
  124. package/src/components/ManageHomeCS/NewHome/GasProperties.vue +314 -314
  125. package/src/components/ManageHomeCS/NewHome/NewManageHome.vue +182 -182
  126. package/src/components/ManageHomeCS/NewHome/TextBusiness.vue +267 -267
  127. package/src/components/ManageHomeCS/NewHome/TextChildsellgas.vue +209 -209
  128. package/src/components/ManageHomeCS/NewHome/TextProfit.vue +298 -298
  129. package/src/components/ManageHomeCS/NewHome/TextSellgas.vue +82 -82
  130. package/src/components/ManageHomeCS/NewHome/TextShanximap.vue +389 -389
  131. package/src/components/ManageHomeCS/NewHome/TextTotalsellgas.vue +406 -406
  132. package/src/components/ManageHomeCS/NewHome/TextUser.vue +378 -378
  133. package/src/components/ManageHomeCS/NewHome/yulin.vue +425 -425
  134. package/src/components/ManageHomeCS/Poor/PoorHome.vue +176 -176
  135. package/src/components/ManageHomeCS/SecurityCheck/CheckHome.vue +94 -94
  136. package/src/components/ManageHomeCS/SecurityCheck/CustomerType.vue +246 -246
  137. package/src/components/ManageHomeCS/SecurityCheck/LatentDanger.vue +220 -220
  138. package/src/components/ManageHomeCS/SecurityCheck/PlanStatistics.vue +306 -306
  139. package/src/components/ManageHomeCS/SecurityCheck/StateStatistics.vue +239 -239
  140. package/src/components/ManageHomeCS/SecurityCheck/TaskStatistics.vue +311 -311
  141. package/src/components/ManageHomeCS/User/FMYInspecDistri.vue +269 -269
  142. package/src/components/ManageHomeCS/User/GasDistri.vue +220 -220
  143. package/src/components/ManageHomeCS/User/MYInspecDistri.vue +269 -269
  144. package/src/components/ManageHomeCS/User/SaleProportion.vue +384 -384
  145. package/src/components/ManageHomeCS/User/UseHome.vue +162 -162
  146. package/src/components/ManageHomeCS/User/UserGascontrast.vue +221 -221
  147. package/src/components/ManageHomeCS/User/UserNumber.vue +600 -600
  148. package/src/components/ManageHomeCS/User/UsernumIncrease.vue +277 -277
  149. package/src/components/ManageHomeCS/loading.vue +39 -39
  150. package/src/components/ManageHomeCS/test.vue +88 -88
  151. package/src/components/MeterManage/ChangeMeterQuery.vue +82 -82
  152. package/src/components/MeterManage/ChargeQuery.vue +79 -79
  153. package/src/components/MeterManage/FillCardQuery.vue +80 -80
  154. package/src/components/MeterManage/FillGasQuery.vue +80 -80
  155. package/src/components/MeterManage/HandQuery.vue +72 -72
  156. package/src/components/MeterManage/MeterInfoManage.vue +107 -107
  157. package/src/components/MeterManage/MeterList.vue +336 -336
  158. package/src/components/MeterManage/MeterMsg.vue +181 -181
  159. package/src/components/MeterManage/OtherChargeQuery.vue +78 -78
  160. package/src/components/MeterManage/ReversalQuery.vue +77 -77
  161. package/src/components/MeterManage/TransferQuery.vue +72 -72
  162. package/src/components/SellReport/BankManager.vue +146 -146
  163. package/src/components/SellReport/BonSummary.vue +178 -244
  164. package/src/components/SellReport/CaiManageDayGas.vue +280 -280
  165. package/src/components/SellReport/ChManageBusSummary.vue +273 -273
  166. package/src/components/SellReport/ChManageHandSellMoney.vue +274 -274
  167. package/src/components/SellReport/ChManageMonthGas.vue +285 -285
  168. package/src/components/SellReport/ChOtherfee.vue +251 -251
  169. package/src/components/SellReport/CollectFee.vue +184 -184
  170. package/src/components/SellReport/Contrast.vue +188 -188
  171. package/src/components/SellReport/DayStairMoney.vue +256 -256
  172. package/src/components/SellReport/DepartmentPrick.vue +1 -1
  173. package/src/components/SellReport/FenxiangSell.vue +183 -183
  174. package/src/components/SellReport/FxGasTable.vue +220 -220
  175. package/src/components/SellReport/GasBaozhuangFee.vue +237 -237
  176. package/src/components/SellReport/GasCollect.vue +174 -174
  177. package/src/components/SellReport/GaspriceHas.vue +141 -141
  178. package/src/components/SellReport/HandCollect.vue +189 -189
  179. package/src/components/SellReport/JinChengBusSummary.vue +182 -182
  180. package/src/components/SellReport/JinChengHandGas.vue +182 -182
  181. package/src/components/SellReport/JinChengOperSummary.vue +182 -182
  182. package/src/components/SellReport/JinChengSliceSumgas.vue +182 -182
  183. package/src/components/SellReport/ManageBusSummary.vue +219 -242
  184. package/src/components/SellReport/ManageBusTable.vue +207 -207
  185. package/src/components/SellReport/ManageGasFee.vue +247 -247
  186. package/src/components/SellReport/ManageGasFeeOperator.vue +236 -236
  187. package/src/components/SellReport/ManageGasPrice.vue +176 -241
  188. package/src/components/SellReport/ManageHandSellInputtor.vue +241 -241
  189. package/src/components/SellReport/ManageMonthGas.vue +249 -249
  190. package/src/components/SellReport/ManageNewGasPrice.vue +245 -245
  191. package/src/components/SellReport/ManageReceivable.vue +254 -254
  192. package/src/components/SellReport/ManageUserCollect.vue +183 -183
  193. package/src/components/SellReport/MeterBill.vue +185 -185
  194. package/src/components/SellReport/MeterGasMoney.vue +226 -226
  195. package/src/components/SellReport/MeterInput.vue +250 -250
  196. package/src/components/SellReport/MonthStairMoney.vue +256 -256
  197. package/src/components/SellReport/NonResidentGas.vue +203 -244
  198. package/src/components/SellReport/OutletTable.vue +258 -258
  199. package/src/components/SellReport/OweAging.vue +174 -174
  200. package/src/components/SellReport/QibiaoShouqi.vue +282 -282
  201. package/src/components/SellReport/ReportComponrnt/TieAnAccount.vue +501 -499
  202. package/src/components/SellReport/ReportHistory.vue +80 -80
  203. package/src/components/SellReport/ReportPool.vue +60 -60
  204. package/src/components/SellReport/SaleMonthReport.vue +153 -227
  205. package/src/components/SellReport/Selling.vue +188 -188
  206. package/src/components/SellReport/SellingTable.vue +220 -220
  207. package/src/components/SellReport/SiteManager.vue +147 -147
  208. package/src/components/SellReport/UserSellingGas.vue +177 -251
  209. package/src/components/SellReport/UserStateStatistics.vue +188 -188
  210. package/src/components/SellReport/UsertypePie.vue +101 -101
  211. package/src/components/SellReport/XianYangDate.vue +227 -227
  212. package/src/components/SellReport/XianYangOperator.vue +228 -228
  213. package/src/components/SellReport/XyDateCharge.vue +227 -227
  214. package/src/components/SellReport/XyOperatorCharge.vue +256 -256
  215. package/src/components/SellReport/YuShouTableTwo.vue +309 -309
  216. package/src/components/SellReport/jingwei/CardCharge.vue +142 -142
  217. package/src/components/SellReport/jingwei/MachineCharge.vue +141 -141
  218. package/src/components/SellReport/jingwei/PaymentNotice.vue +479 -479
  219. package/src/components/SellReport/jingwei/handplanReport.vue +280 -280
  220. package/src/components/SellReport/jingwei/widegt/PaymentNoticePrint.vue +198 -198
  221. package/src/components/SellReport/jingwei/widegt/handplanPrint.vue +143 -143
  222. package/src/components/SellReport/pengan/ManageBusSummaryPeng.vue +241 -241
  223. package/src/components/TelReport/ZhiHuanservice.vue +162 -161
  224. package/src/components/WebReport/AbnormalInfo.vue +197 -197
  225. package/src/components/WebReport/AbnormalInfoEcharts.vue +120 -120
  226. package/src/components/WebReport/BatteryLow.vue +148 -148
  227. package/src/components/WebReport/BusinessHall.vue +85 -85
  228. package/src/components/WebReport/BussinessType.vue +137 -137
  229. package/src/components/WebReport/Communication.vue +131 -131
  230. package/src/components/WebReport/CompanyUser.vue +79 -79
  231. package/src/components/WebReport/EchartsBox.vue +110 -110
  232. package/src/components/WebReport/ElectroMagnetic.vue +142 -142
  233. package/src/components/WebReport/GaspriceHas.vue +141 -141
  234. package/src/components/WebReport/HandplanPrint.vue +167 -167
  235. package/src/components/WebReport/NotUpload.vue +165 -165
  236. package/src/components/WebReport/OweQuery.vue +169 -169
  237. package/src/components/WebReport/PaymentDistributed.vue +176 -176
  238. package/src/components/WebReport/Paymentpie.vue +157 -157
  239. package/src/components/WebReport/ReportWorklist.vue +220 -220
  240. package/src/components/WebReport/SellType.vue +89 -89
  241. package/src/components/WebReport/Telemanlist.vue +221 -221
  242. package/src/components/WebReport/UserGasAll.vue +214 -214
  243. package/src/components/WebReport/UserGasEcharts.vue +107 -107
  244. package/src/components/WebReport/UsertypePie.vue +105 -105
  245. package/src/components/WebReport/ValueEcharts.vue +99 -99
  246. package/src/components/WebReport/ValueInfo.vue +194 -194
  247. package/src/components/daping/GMap.vue +636 -636
  248. package/src/components/qinhua/BarChartLine.vue +288 -288
  249. package/src/components/qinhua/ManageMain.vue +162 -162
  250. package/src/components/qinhua/Ring.vue +165 -165
  251. package/src/components/qinhua/SafeCheckRing.vue +149 -149
  252. package/src/components/qinhua/SafecheckBarChart.vue +209 -209
  253. package/src/components/qinhua/Scada.vue +93 -93
  254. package/src/components/safecheck/analysis/SafeHiddenAnaly.vue +932 -932
  255. package/src/components/safecheck/planCheck/chanceSituation.vue +149 -149
  256. package/src/components/safecheck/planCheck/checkFamily.vue +217 -217
  257. package/src/components/safecheck/planCheck/hidderDanger.vue +179 -179
  258. package/src/components/safecheck/planCheck/inFamily.vue +185 -185
  259. package/src/components/sale/businessquery/AccountQuery/ExpectGasList.vue +504 -504
  260. package/src/components/sale/businessquery/AccountQuery/PreGasList.vue +371 -371
  261. package/src/components/sale/businessquery/AccountQuery/SellingGasList.vue +404 -404
  262. package/src/components/sale/businessquery/AccountQuery/TransactionSummary.vue +373 -373
  263. package/src/components/sale/businessquery/BalanceQuery.vue +456 -456
  264. package/src/components/sale/businessquery/FMYGasQuery.vue +713 -713
  265. package/src/components/sale/businessquery/InspectManage.vue +47 -47
  266. package/src/components/sale/businessquery/MonthGasQuery.vue +467 -467
  267. package/src/components/sale/businessquery/NewAccountQuery.vue +409 -409
  268. package/src/components/sale/businessquery/OtherChargeDetailQuery.vue +74 -74
  269. package/src/components/sale/businessquery/OtherChargeQuery.vue +619 -619
  270. package/src/components/sale/businessquery/ProceedsOper.vue +417 -417
  271. package/src/components/sale/businessquery/ResourceOperatingQuery.vue +317 -317
  272. package/src/components/sale/businessquery/TongjiManage.vue +74 -74
  273. package/src/components/sale/businessquery/UserTongjiQuery.vue +358 -358
  274. package/src/components/sale/businessquery/YearGasQuery.vue +422 -422
  275. package/src/components/sale/businessquery/YingShouMingXi.vue +525 -525
  276. package/src/components/sale/businessquery/analysisquery/AnalysisManage.vue +65 -65
  277. package/src/components/sale/businessquery/weChatBind.vue +361 -361
  278. package/src/components/sale/common/PrintData.vue +171 -171
  279. package/src/components/sale/common/PrintDataSelf.vue +225 -225
  280. package/src/components/sale/common/PrintTable.vue +228 -228
  281. package/src/components/sale/common/PrintTableSelf.vue +251 -251
  282. package/src/components/sale/common/TabButton.vue +155 -155
  283. package/src/components/sale/common/Tabs.vue +67 -67
  284. package/src/components/sale/common/handplanUser.vue +112 -112
  285. package/src/components/sale/config/DefaultPrint.js +6 -6
  286. package/src/components/sale/config/exportConfig.js +885 -885
  287. package/src/components/sale/config/tableConfig.js +48 -48
  288. package/src/components/sale/filesquery/detail/UserBaseInfo.vue +69 -69
  289. package/src/components/sale/filesquery/detail/UserDetail.vue +41 -41
  290. package/src/components/sale/filesquery/detail/UserOperInfo.vue +76 -76
  291. package/src/components/sale/filesquery/detail/oper/ChangeMessage.vue +46 -46
  292. package/src/components/sale/filesquery/detail/oper/ExchangeOper.vue +66 -66
  293. package/src/components/sale/filesquery/detail/oper/HandOper.vue +46 -46
  294. package/src/components/sale/filesquery/detail/oper/HandleMessage.vue +46 -46
  295. package/src/components/sale/filesquery/detail/oper/OtherCharge.vue +54 -54
  296. package/src/components/sale/filesquery/detail/oper/ReplaceCard.vue +51 -51
  297. package/src/components/sale/filesquery/detail/oper/SellOper.vue +56 -56
  298. package/src/components/sale/filesquery/detail/oper/TransferMessage.vue +55 -55
  299. package/src/components/sale/filesquery/filequerydetail/BlackListQueryDetail.vue +219 -219
  300. package/src/components/sale/filesquery/filequerydetail/ChangeMeterQueryDetail.vue +246 -246
  301. package/src/components/sale/filesquery/filequerydetail/ChargeQueryDetail.vue +239 -239
  302. package/src/components/sale/filesquery/filequerydetail/DeviceQueryDetail.vue +126 -126
  303. package/src/components/sale/filesquery/filequerydetail/DisableQueryDetail.vue +272 -272
  304. package/src/components/sale/filesquery/filequerydetail/EnableQueryDetail.vue +274 -274
  305. package/src/components/sale/filesquery/filequerydetail/FillCardQueryDetail.vue +80 -80
  306. package/src/components/sale/filesquery/filequerydetail/FillGasQueryDetail.vue +80 -80
  307. package/src/components/sale/filesquery/filequerydetail/HandQueryDetail.vue +302 -302
  308. package/src/components/sale/filesquery/filequerydetail/MeterQueryDetail.vue +158 -158
  309. package/src/components/sale/filesquery/filequerydetail/OtherChargeQueryDetail.vue +198 -198
  310. package/src/components/sale/filesquery/filequerydetail/RecordQueryDetail.vue +125 -125
  311. package/src/components/sale/filesquery/filequerydetail/SellingHandDetail.vue +280 -280
  312. package/src/components/sale/filesquery/filequerydetail/TransferQueryDetail.vue +160 -160
  313. package/src/components/sale/filesquery/filequerydetail/UserQueryDetail.vue +155 -155
  314. package/src/components/sale/report/aode/DayReport.vue +50 -50
  315. package/src/components/sale/report/aode/DayReportSummary.vue +75 -75
  316. package/src/components/sale/report/aode/MonthByChargeType.vue +446 -446
  317. package/src/components/sale/report/aode/MonthByUserType.vue +413 -413
  318. package/src/components/sale/report/aode/YearByChargeTpye.vue +215 -215
  319. package/src/components/sale/report/aode/YearByUserType.vue +272 -272
  320. package/src/components/sale/report/aode/life/LifeDayReport.vue +50 -50
  321. package/src/components/sale/report/aode/life/LifeDayReportList.vue +241 -241
  322. package/src/components/sale/report/aode/life/LifeDayReportSummary.vue +49 -49
  323. package/src/components/sale/report/aode/life/LifeMonthReport.vue +303 -303
  324. package/src/components/sale/report/aode/life/LifeYearReport.vue +175 -175
  325. package/src/components/sale/report/aode/widget/LifeDayReportListPrint.vue +189 -189
  326. package/src/components/sale/report/aode/widget/LifeMonthPrint.vue +153 -153
  327. package/src/components/sale/report/aode/widget/LifeYearPrint.vue +143 -143
  328. package/src/components/sale/report/aode/widget/MonthByChargePrint.vue +236 -236
  329. package/src/components/sale/report/aode/widget/MonthByUserPrint.vue +232 -232
  330. package/src/components/sale/report/aode/widget/YearByChargePrint.vue +203 -203
  331. package/src/components/sale/report/aode/widget/YearByUserPrint.vue +225 -225
  332. package/src/components/scada/CaculateGasConsumputionByDay/CaculateGasConsumputionByDay.vue +290 -290
  333. package/src/components/scada/ChartDisplay/ChartDisplayManage.vue +55 -55
  334. package/src/components/scada/ChartDisplay/ChartThreeDayContrast.vue +164 -164
  335. package/src/components/scada/CumulativeFlow/CumulativeFlowHeatPlant.vue +400 -400
  336. package/src/components/scada/CumulativeFlow/CumulativeFlowManage.vue +59 -59
  337. package/src/components/scada/CumulativeFlow/CumulativeFlowRegulatorStation.vue +504 -504
  338. package/src/components/scada/CumulativeFlow/CumulativeFlowStation.vue +248 -248
  339. package/src/components/scada/GasSupplyRunning/GasSupplyRunningByDay.vue +297 -297
  340. package/src/components/scada/InstantaneousFlow/InstantaneousFlowHeatPlant.vue +389 -389
  341. package/src/components/scada/InstantaneousFlow/InstantaneousFlowManage.vue +57 -57
  342. package/src/components/scada/InstantaneousFlow/InstantaneousFlowRegulatorStation.vue +503 -503
  343. package/src/components/scada/InstantaneousFlow/InstantaneousFlowStation.vue +244 -244
  344. package/src/components/scada/OnTimePressure/OnTimePressureHeatPlant.vue +356 -356
  345. package/src/components/scada/OnTimePressure/OnTimePressureManage.vue +51 -51
  346. package/src/components/scada/OnTimePressure/OnTimePressureRegulatorStation.vue +526 -526
  347. package/src/components/scada/ThreeDayContrast/ThreeDayContrastManage.vue +282 -282
  348. package/src/components/statistical/StatisticalAnalysis.vue +252 -247
  349. package/src/components/webmeter/DrillData/LargeScreenAnalysisEcharts.vue +710 -710
  350. package/src/components/webmeter/DrillData/LostContactAnalysis.vue +531 -531
  351. package/src/components/webmeter/DrillData/LostContactAnalysisList.vue +633 -633
  352. package/src/components/webmeter/DrillData/LostContactAnalysisManage.vue +30 -30
  353. package/src/components/webmeter/DrillData/LostContactEcharts.vue +177 -177
  354. package/src/components/webmeter/DrillData/LostContactEform.vue +190 -190
  355. package/src/components/webmeter/DrillData/UserGasEform.vue +227 -227
  356. package/src/components/webmeter/DrillData/UserLostContactAnalysis.vue +585 -585
  357. package/src/components/webmeter/dataCollection/DataCollection.vue +676 -676
  358. package/src/components/webmeter/gasAnalysis/GasAnalysisEcharts.vue +144 -144
  359. package/src/components/webmeter/gasAnalysis/GasAnalysisSummary.vue +162 -162
  360. package/src/components/webmeter/handplan/NewWebMeterHandPlan.vue +745 -745
  361. package/src/components/webmeter/handplan/NewWebmeterHandPlanMain.vue +59 -59
  362. package/src/components/webmeter/indicatorStatisticsEchars.vue +204 -204
  363. package/src/components/webmeter/indicatorStatisticsMain.vue +257 -257
  364. package/src/components/webmeter/meterinfo/NewMeterList.vue +414 -414
  365. package/src/components/webmeter/meterinfo/NewMeterListMain.vue +53 -53
  366. package/src/components/webmeter/newwebmeter/NewException/NewExceptionEform.vue +149 -149
  367. package/src/components/webmeter/newwebmeter/NewException/NewExceptionEformTotal.vue +211 -211
  368. package/src/components/webmeter/newwebmeter/NewException/NewMeterException.vue +449 -449
  369. package/src/components/webmeter/newwebmeter/NewException/TotalExceptionByMeter.vue +607 -607
  370. package/src/components/webmeter/newwebmeter/UserGasEchartsList.vue +284 -284
  371. package/src/components/webmeter/newwebmeter/UserGasList.vue +438 -438
  372. package/src/components/webmeter/newwebmeter/UserInstructEchartsList.vue +242 -242
  373. package/src/components/webmeter/newwebmeter/signAnalysisEcharts.vue +266 -266
  374. package/src/components/webmeter/newwebmeter/signAnalysisEform.vue +175 -175
  375. package/src/components/webmeter/newwebmeter/signAnalysisListMain.vue +387 -387
  376. package/src/components/yulin/GuanWang.vue +24 -24
  377. package/src/components/yulin/SingleBarLine.vue +352 -352
  378. package/src/components/yulin/Weather.vue +157 -157
  379. package/src/expandcss.less +26 -26
  380. package/src/filiale/WEINAN/EchartsBox.vue +110 -110
  381. package/src/filiale/WEINAN/InspectListUser.vue +492 -492
  382. package/src/filiale/WEINAN/OtherChargeQuery.vue +521 -521
  383. package/src/filiale/WEINAN/SiteManager.vue +191 -191
  384. package/src/filiale/WEINAN/UserGasList.vue +438 -0
  385. package/src/filiale/WEINAN/reportManage.js +12 -12
  386. package/src/filiale/WEINAN/sale.js +32 -29
  387. package/src/filiale/alashan/reportManage.js +10 -10
  388. package/src/filiale/aode/ArchivesManage.vue +38 -38
  389. package/src/filiale/aode/BusinessManage.vue +94 -94
  390. package/src/filiale/aode/DefaultPrint.js +6 -6
  391. package/src/filiale/aode/HandplanQuery.vue +632 -632
  392. package/src/filiale/aode/Tabs.vue +67 -67
  393. package/src/filiale/aode/UserQuery.vue +599 -599
  394. package/src/filiale/aode/sale.js +17 -17
  395. package/src/filiale/ceshi/ArrearsQuery.vue +642 -642
  396. package/src/filiale/ceshi/ChManageBusSummary.vue +293 -293
  397. package/src/filiale/ceshi/CollectManage.vue +94 -94
  398. package/src/filiale/ceshi/MeterRateQuery.vue +633 -633
  399. package/src/filiale/ceshi/TabButton.vue +149 -149
  400. package/src/filiale/ceshi/Tabs.vue +69 -69
  401. package/src/filiale/ceshi/reportManage.js +5 -5
  402. package/src/filiale/ceshi/sale.js +11 -11
  403. package/src/filiale/gaomi/config/DefaultPrint.js +6 -6
  404. package/src/filiale/gaomi/config/tableConfig.js +47 -47
  405. package/src/filiale/gongyi/sale/businessquery/exportConfig.js +17 -17
  406. package/src/filiale/gongyi/sale/filesquery/MeterQuery.vue +718 -718
  407. package/src/filiale/jingzhou/ChargeQuery.vue +1243 -1243
  408. package/src/filiale/jingzhou/config/exportConfig.js +861 -861
  409. package/src/filiale/liaoyuan/sale.js +11 -11
  410. package/src/filiale/macheng/config/DefaultPrint.js +12 -12
  411. package/src/filiale/meihekou/UserGasEform.vue +267 -267
  412. package/src/filiale/meihekou/sale.js +26 -26
  413. package/src/filiale/qingtongxia/config/DefaultPrint.js +6 -6
  414. package/src/filiale/qingtongxia/sale.js +13 -13
  415. package/src/filiale/rongchuang/SellingTable.vue +250 -250
  416. package/src/filiale/rongchuang/reportManage.js +11 -11
  417. package/src/filiale/shaoguan/OtherChargeDetailQuery.vue +74 -74
  418. package/src/filiale/shaoguan/config/DefaultPrint.js +6 -6
  419. package/src/filiale/shaoguan/sale/businessquery/oldMeterList.vue +5 -0
  420. package/src/filiale/shennongjia/config/DefaultPrint.js +6 -6
  421. package/src/filiale/shennongjia/config/tableConfig.js +47 -47
  422. package/src/filiale/shennongjia/sale.js +10 -10
  423. package/src/filiale/tongchuan/CriteriaPaged.vue +49 -0
  424. package/src/filiale/tongchuan/sale.js +16 -16
  425. package/src/main.js +66 -66
  426. package/src/plugins/GetLoginInfoService.js +505 -505
  427. package/src/plugins/LodopFuncs.js +124 -124
  428. package/src/plugins/getAllInputtor.js +29 -29
  429. package/src/safeCheck.js +63 -63
  430. package/src/stores/AppData.js +62 -62
  431. package/src/stores/DataSql.js +585 -585
  432. package/src/stores/DrillECharts.js +602 -602
  433. package/src/stores/DrillSql.js +888 -888
  434. package/src/stores/GetParames.js +15 -15
  435. package/src/stores/MagGetSaleParams.js +156 -156
  436. package/src/stores/MagLoadParams.js +63 -63
  437. package/src/stores/Util.js +132 -132
  438. package/src/stores/shanxi1.js +26 -26
  439. package/src/stores/yulin.js +27 -27
  440. package/src/webmeterManage.js +105 -105
  441. package/static/china.json +1 -1
  442. package/static/qh.json +2410 -2410
  443. package/static/res.json +58411 -58411
  444. package/static/shanxi1.json +1 -1
  445. package/static/wuhai.json +1610 -1610
  446. package/static/yulin.json +1 -1
  447. package/static//345/261/261/344/270/234/347/234/201.json +1 -1
  448. package/test/unit/.eslintrc +5 -5
  449. package/test/unit/TestUtil.js +35 -35
  450. package/test/unit/context.html +20 -20
  451. package/test/unit/index.js +13 -13
  452. package/test/unit/init.js +11 -11
  453. package/test/unit/karma.conf.js +45 -45
  454. package/test/unit/specs/components/CallReport/Repair.spec.js +25 -25
  455. package/test/unit/specs/components/ManageBusiness/EquipmentQuery.spec.js +21 -21
  456. package/test/unit/specs/components/ManageBusiness/TableWithQuery.spec.js +21 -21
  457. package/test/unit/specs/components/ManageBusiness/UserQuery.spec.js +21 -21
  458. package/webstorm.config.js +13 -13
@@ -1,602 +1,602 @@
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", "/rs/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
- console.log("---------------echart的condition",condition)
33
- let load = new HttpResetClass();
34
- load.load("POST", 'rs/sql/jyd'+sqlname,
35
- {data: condition},
36
- {resolveMsg: null, rejectMsg: null})
37
- .then((res) => {
38
- console.log(res.data, '返回数据')
39
- self.sqlobtaindata = res.data
40
- })
41
- }
42
-
43
- //时间类柱状图数据整合
44
- export function DataIntegration(data) {
45
- var cachedata = data
46
- var param = []
47
- console.log(cachedata, '待整合数据')
48
- param.push(cachedata[0].type)
49
- // 获取时间下的分类
50
- for (var i = 1; i < cachedata.length; i++) {
51
- var l = 0
52
- for (var j = 0; j < param.length; j++) {
53
- if (param[j] != cachedata[i].type) {
54
- l++
55
- }
56
- }
57
- if (l == param.length) {
58
- param.push(cachedata[i].type)
59
- }
60
- }
61
- // 按照分类进行时间划分
62
- var result = []
63
- for (var i = 0; i < param.length; i++) {
64
- var item = {}
65
- var chilrenlist = []
66
- data.forEach(function (s) {
67
- if (s.type == param[i]) {
68
- var h = {}
69
- h.name = s.name
70
- h.value = s.value
71
- chilrenlist.push(h)
72
- }
73
- })
74
- item.name = param[i]
75
- item.value = chilrenlist
76
- result.push(item)
77
- }
78
- return result
79
- }
80
-
81
- //绘制饼状图
82
- export function setPie(self, id, data) {
83
- console.log(data, '饼状图数据')
84
- // 获取显示区域
85
- self.xc = self.$echarts.init(document.getElementById(id))
86
- var scale = 0.8
87
- // 获取图例
88
- var legendname = []
89
- data.forEach(function (s) {
90
- legendname.push(s.name)
91
- })
92
- // 获取数据
93
- var echartData = data
94
- // 自定义样式
95
- var rich = {
96
- white: {
97
- color: "#fff",
98
- align: 'center',
99
- fontSize: 12 * scale,
100
-
101
- padding: [4, 0]
102
- },
103
- blue: {
104
- color: '#e1e52a',
105
- fontSize: 12 * scale,
106
- align: 'center',
107
- padding: [6, 0]
108
- },
109
- hr: {
110
- borderColor: '#64d8d4',
111
- width: '100%',
112
- borderWidth: 0.5,
113
- height: 0,
114
- },
115
- }
116
- var total = 0;
117
- var result = ''
118
- // 数据求和
119
- data.forEach(function (value) {
120
- total += value.value;
121
- });
122
- // 数据进行处理,增加单位万
123
- var index = total.toString().length
124
- if (index > 4) {
125
- var i = total.toString().substring(0, index - 4)
126
- var s = total.toString().substring(index - 4, index - 3)
127
- result = i + '.' + s + '万'
128
- } else {
129
- result = total
130
- }
131
- var s = ""
132
- for (var i = 4; i > 0; i--) {
133
- if (result.length < i) {
134
- s = "\t" + s
135
- }
136
- }
137
- result = s + result
138
-
139
- console.log(echartData, legendname, '绘图样式数据')
140
- // 绘图
141
- self.xc.setOption({
142
- title: [
143
- {
144
- text: '总用户数',
145
- x: '44%',
146
- y: '33%',
147
- textStyle: {
148
- color: '#ffffff',
149
- fontSize: 12 * scale,
150
- }
151
- },
152
- {
153
- text: result,
154
- x: '41%',
155
- y: '38%',
156
- padding: [15, 20],
157
- textStyle: {
158
- color: '#00e2ea',
159
- fontSize: 12 * scale,
160
-
161
- }
162
- }],
163
- legend: {
164
- orient: 'horizontal',
165
- icon: 'circle',
166
- x: 'center',
167
- y: '80%',
168
- itemWidth: 20 * scale,
169
- itemHeight: 10 * scale,
170
- textStyle: {
171
- fontSize: 12 * scale,
172
- padding: [0, 0, 0, 4],
173
- color: '#ffffff'
174
- },
175
- data: legendname
176
- },
177
- series: [
178
- {
179
- name: 'Line 1',
180
- type: 'pie',
181
- animation: false,
182
- clockWise: false,
183
- radius: ['25%', '26%'],
184
- center: ['50%', '40%'],
185
- itemStyle: {
186
- normal: {
187
- label: {
188
- show: false
189
- },
190
- labelLine: {
191
- show: false
192
- },
193
- }
194
- },
195
- hoverAnimation: false,
196
- tooltip: {
197
- trigger: 'axis'
198
- },
199
- data: [{
200
- value: 100,
201
- name: '02',
202
- itemStyle: {
203
- normal: {
204
- color: '#29b7ff',//未完成的圆环的颜色
205
- label: {
206
- show: false
207
- },
208
- labelLine: {
209
- show: false
210
- }
211
- }
212
- }
213
- }]
214
- },
215
- {
216
- name: '总用户数',
217
- type: 'pie',
218
- radius: ['30%', '40%'],
219
- center: ['50%', '40%'],
220
- hoverAnimation: false,
221
- color: ['#6fd9d0', '#ede61f', '#6d9bdc'],
222
- minAngle: 15,//最小角度
223
- startAngle: 60, //起始角度
224
- label: {
225
- normal: {
226
- borderWidth: 1,
227
- borderRadius: 4,
228
- backgroundColor: '#004b5c',
229
- borderColor: '#64d8d4',
230
- formatter: function (params, ticket, callback) {
231
- var total = 0; //用户总数量
232
- var percent = 0;
233
- echartData.forEach(function (value, index, array) {
234
- total += value.value;
235
- });
236
- if( params.name.toString().length>6){
237
- var s= params.name.toString().substring(6, params.name.toString().length)
238
- return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
239
-
240
- }
241
- console.log(params.name,'cccccc')
242
- percent = ((params.value / total) * 100).toFixed(1);
243
- return '{white|' + params.name + '}\n{hr|}\n{blue| ' + params.value + '}{blue| ' + percent + '%}';
244
- },
245
- rich: rich,
246
- }
247
- },
248
-
249
- labelLine: {
250
- normal: {
251
- length: 15 * scale,
252
- length2: 20 * scale,
253
- lineStyle: {
254
- formatter: function (params, ticket, callback) {
255
- var total = 0; //用户总数量
256
- var percent = 0; //用户占比
257
- echartData.forEach(function (value, index, array) {
258
- total += value.value;
259
- });
260
- percent = ((params.value / total) * 100).toFixed(1);
261
- if( params.name.toString().length>6){
262
- var s= params.name.toString().substring(6, params.name.toString().length)
263
- return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
264
-
265
- }
266
- console.log(params.name,'cccccc')
267
- return '{white| ' + params.name + '}\n{hr|}\n{yellow| ' + params.value + '}\n{blue| ' + percent + '%}';
268
- },
269
- }
270
- }
271
- },
272
- data: echartData
273
- }, {
274
- name: 'Line 2',
275
- type: 'pie',
276
- animation: false,
277
- clockWise: false,
278
- radius: ['44%', '45%'],
279
- center: ['50%', '40%'],
280
- itemStyle: {
281
- normal: {label: {show: false}, labelLine: {show: false},}
282
- },
283
- hoverAnimation: false,
284
- tooltip: {
285
- show: false
286
- },
287
- data: [{
288
- value: 100,
289
- name: '02',
290
- itemStyle: {
291
- normal: {color: '#29b7ff', label: {show: false}, labelLine: {show: false}}
292
- }
293
- }]
294
- }]
295
- }, true)
296
- self.xc.on("click", self.eConsole)
297
- }
298
-
299
- //绘制柱状图
300
- export function setBar(self, id, data, xname, yname, seriename, idname, namesubif) {
301
- console.log(data, '柱状图数据')
302
- self.xc = self.$echarts.init(document.getElementById(id))
303
- var scale = 0.8
304
- var xAxisData = [];
305
- var legendData = [];
306
- var serieData = [];
307
- var metaDate = []
308
- var xlegen = []
309
- for (var i = 0; i < data.length; i++) {
310
- legendData[i] = data[i].name
311
- metaDate.push(data[i].value)
312
- var xnamechildren = []
313
- var cachedata = data[i].value
314
- cachedata.forEach(function (s) {
315
- xnamechildren.push(s.name)
316
- })
317
- xlegen.push(xnamechildren)
318
- }
319
-
320
- xAxisData = xlegen[0]
321
- for (var i = 1; i < xlegen.length; i++) {
322
- if (xlegen[i].length > xAxisData.length) {
323
- xAxisData = xlegen[i]
324
- }
325
- }
326
- xAxisData.push("")
327
- var tooltype = ''
328
- console.log(xname)
329
- if (xname != '') {
330
- tooltype = xname.substring(0, 1)
331
- }
332
- console.log(xAxisData, '系列名')
333
- var h = []
334
- metaDate.forEach(function (s) {
335
- var l = []
336
- for (var i = 0; i < xAxisData.length; i++) {
337
- var flag = 0
338
- for (var j = 0; j < s.length; j++) {
339
- if (s[j].name == xAxisData[i]) {
340
- flag++
341
- l.push(s[j])
342
- }
343
- }
344
- if (flag == 0) {
345
- l.push({name: xAxisData[i], value: 0})
346
- }
347
- }
348
- h.push(l)
349
- })
350
- metaDate = h
351
- var xname1 = ' ' + xname
352
- var color = []
353
- color = getcolor(idname, xAxisData.length - 1)
354
- console.log(legendData,'图例名')
355
- if(typeof legendData[0]=="undefined"){
356
- legendData=[]
357
- legendData.push(seriename)
358
- }
359
- if (JSON.stringify(color) == '[]') {
360
- color = ["#2EF7F3", '#ffe8cb', '#ff9000']
361
- for (var v = 0; v < legendData.length; v++) {
362
- var serie = {
363
- name: legendData[v],
364
- type: "bar",
365
- barWidth: '30%',
366
- barGap: "15%",
367
- boundaryGap:true,
368
- itemStyle: {
369
- normal: {
370
- color: color[v],
371
- label: {
372
- show: true,
373
- textStyle: {
374
- color: "#fff"
375
- },
376
- position: "top",
377
- formatter: function (p) {
378
- var index = p.value.toString().length
379
- if(p.value <= 0){
380
- return ""
381
- }
382
- // if (index > 9) {
383
- // return p.value.toString().substring(0, index - 9) + '亿'
384
- // } else if (index > 4) {
385
- // return p.value.toString().substring(0, index - 4) + '万'
386
- // }
387
- return p.value
388
-
389
- }
390
- }
391
- }
392
- },
393
- data: metaDate[v],
394
- }
395
- serieData.push(serie)
396
- }
397
- } else {
398
- for (var v = 0; v < legendData.length; v++) {
399
- var serie = {
400
- name: legendData[v],
401
- type: "bar",
402
- barWidth: '25%',
403
- barGap: "15%",
404
- itemStyle: {
405
- normal: {
406
- color: function (params) {
407
- let colorList = color;
408
- return colorList[params.dataIndex];
409
- },
410
- label: {
411
- show: true,
412
- textStyle: {
413
- color: "#fff"
414
- },
415
- position: "top",
416
- formatter: function (p) {
417
-
418
- var index = p.value.toString().length
419
- if(p.value <= 0){
420
- return ""
421
- }
422
- // if (index > 9) {
423
- // return p.value.toString().substring(0, index - 9) + '亿'
424
- // } else if (index > 4) {
425
- // return p.value.toString().substring(0, index - 4) + '万'
426
- // }else {
427
- // return p.value
428
- // }
429
- }
430
- }
431
- }
432
- },
433
- data: metaDate[v],
434
- }
435
- serieData.push(serie)
436
- }
437
- }
438
-
439
-
440
- console.log(legendData, xAxisData, metaDate, serieData, '柱状图绘图参数')
441
- var colors = ["#036BC8", "#4A95FF", "#5EBEFC", "#2EF7F3", "#FFFFFF"]
442
- self.xc.setOption({
443
- title: {text: '', textAlign: 'left', textStyle: {color: "#fff", fontSize: "16*scale", fontWeight: "normal"}},
444
- color: colors,
445
- grid: {left: '5%', top: "18%", bottom: "8%", right: "5%", containLabel: true},
446
- dataZoom: [{
447
- type: 'inside',
448
- show: true,
449
- xAxisIndex: [0],
450
- left: '50%',
451
- bottom: -5,
452
- start: 2,
453
- end: 90 //初始化滚动条
454
- }],
455
- legend: {
456
- top: 0,
457
- textStyle: {
458
- color: '#fff',
459
- },
460
- data: legendData,
461
- },
462
- tooltip: {
463
- formatter: function (params) {
464
- if (params[0].axisValue == '') {
465
- return ''
466
- }
467
- var result = ''
468
- params.forEach(function (item) {
469
- result += item.marker + " " + item.seriesName + " : " + item.value + "</br>";
470
- });
471
- return params[0].axisValue + tooltype + ' <br/> ' + result
472
- },
473
- axisPointer: {type: 'line', lineStyle: {width: 0}},
474
- trigger: 'axis',
475
- extraCssText: 'width: auto;height: auto;'
476
- },
477
- xAxis: [
478
- {
479
- name: xname1,
480
- type: 'category',
481
- nameTextStyle: {
482
- fontSize: 14 * scale,
483
- color: '#15dce2',
484
- padding: [40 * scale, 0, 0, -70 * scale],
485
- },
486
- axisLine: {show: true, lineStyle: {color: '#04669e', width: 1}},
487
- axisLabel: {
488
- interval: 0, textStyle: {color: '#ffffff', fontSize: 14 * scale},
489
- formatter: function (value, index) {
490
- if (!namesubif) {
491
- return value
492
- }
493
- //进行客户名称截取换行
494
- var s = ''
495
- // 长度超过4个字符进行换行
496
- if (value.toString().length > 3 && value.toString().length < 8) {
497
- var s0 = value.toString().substring(0, 4)
498
- var s1 = value.toString().substring(4, value.toString().length)
499
- s = s0 + '\n' + s1
500
- return s
501
- }
502
- // 长度超过8个字符进行再次换行
503
- if (value.toString().length > 7 && value.toString().length < 12) {
504
- var s0 = value.toString().substring(0, 4)
505
- var s1 = value.toString().substring(4, 8)
506
- var s2 = value.toString().substring(8, value.toString().length)
507
- s = s0 + '\n' + s1 + '\n' + s2
508
- return s
509
- }
510
- // 长度超过12个字符进行再次换行
511
- if (value.toString().length > 11) {
512
- var s0 = value.toString().substring(0, 4)
513
- var s1 = value.toString().substring(4, 8)
514
- var s2 = value.toString().substring(8, 12)
515
- var s3 = value.toString().substring(12, value.toString().length)
516
- s = s0 + '\n' + s1 + '\n' + s2 + '\n' + s3
517
- return s
518
- }
519
-
520
- s = value.toString()
521
-
522
- return s;
523
- }
524
- },
525
- axisTick: {show: false},
526
- data: xAxisData,
527
- },
528
- ],
529
- yAxis: [
530
- {
531
- name: yname,
532
- nameTextStyle: {
533
- fontSize: 14 * scale,
534
- padding: [-10 * scale, 35 * scale, 0, 0],
535
- },
536
- axisTick: {show: false},
537
- splitLine: {show: true, lineStyle: {type: 'dashed', color: '#004371'}},
538
- axisLabel: {interval: 0, textStyle: {color: '#15dce2', fontSize: 14 * scale},
539
- formatter: function (value) {
540
- var index = value.toString().length
541
- if (index > 9) {
542
- return value.toString().substring(0, index - 9) + '亿'
543
- } else if (index > 4) {
544
- return value.toString().substring(0, index - 4) + '万'
545
- }
546
- return value
547
- }},
548
- axisLine: {show: false, lineStyle: {color: '#15dce2', fontSize: 14 * scale}},
549
- },
550
- ],
551
- series: serieData
552
- }, true)
553
- console.log('绘图成功')
554
- self.xc.on("click", self.eConsole)
555
- }
556
-
557
-
558
- var parseColor = function (hexStr) {
559
- return hexStr.length === 4 ? hexStr.substr(1).split('').map(function (s) {
560
- return 0x11 * parseInt(s, 16);
561
- }) : [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(function (s) {
562
- return parseInt(s, 16);
563
- })
564
- };
565
-
566
- var pad = function (s) {
567
- return (s.length === 1) ? '0' + s : s;
568
- };
569
-
570
- // 获取渐变色值
571
- export function gradientColors(start, end, steps, gamma) {
572
- var i, j, ms, me, output = [], so = [];
573
- gamma = gamma || 1;
574
- var normalize = function (channel) {
575
- return Math.pow(channel / 255, gamma);
576
- };
577
- start = parseColor(start).map(normalize);
578
- end = parseColor(end).map(normalize);
579
- for (i = 0; i < steps; i++) {
580
- ms = i / (steps - 1);
581
- me = 1 - ms;
582
- for (j = 0; j < 3; j++) {
583
- so[j] = pad(Math.round(Math.pow(start[j] * me + end[j] * ms, 1 / gamma) * 255).toString(16));
584
- }
585
- output.push('#' + so.join(''));
586
- }
587
- return output;
588
- }
589
-
590
-
591
- var getcolor = function (idname, num) {
592
-
593
-
594
- let color = {
595
- longnotbuygas: ['#ffe8cb', '#ff9000'],
596
- }
597
- if (typeof color[idname] != "undefined") {
598
- return gradientColors(color[idname][0], color[idname][1], num, 2.2)
599
- }
600
- return []
601
- }
602
-
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", "/rs/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
+ console.log("---------------echart的condition",condition)
33
+ let load = new HttpResetClass();
34
+ load.load("POST", 'rs/sql/jyd'+sqlname,
35
+ {data: condition},
36
+ {resolveMsg: null, rejectMsg: null})
37
+ .then((res) => {
38
+ console.log(res.data, '返回数据')
39
+ self.sqlobtaindata = res.data
40
+ })
41
+ }
42
+
43
+ //时间类柱状图数据整合
44
+ export function DataIntegration(data) {
45
+ var cachedata = data
46
+ var param = []
47
+ console.log(cachedata, '待整合数据')
48
+ param.push(cachedata[0].type)
49
+ // 获取时间下的分类
50
+ for (var i = 1; i < cachedata.length; i++) {
51
+ var l = 0
52
+ for (var j = 0; j < param.length; j++) {
53
+ if (param[j] != cachedata[i].type) {
54
+ l++
55
+ }
56
+ }
57
+ if (l == param.length) {
58
+ param.push(cachedata[i].type)
59
+ }
60
+ }
61
+ // 按照分类进行时间划分
62
+ var result = []
63
+ for (var i = 0; i < param.length; i++) {
64
+ var item = {}
65
+ var chilrenlist = []
66
+ data.forEach(function (s) {
67
+ if (s.type == param[i]) {
68
+ var h = {}
69
+ h.name = s.name
70
+ h.value = s.value
71
+ chilrenlist.push(h)
72
+ }
73
+ })
74
+ item.name = param[i]
75
+ item.value = chilrenlist
76
+ result.push(item)
77
+ }
78
+ return result
79
+ }
80
+
81
+ //绘制饼状图
82
+ export function setPie(self, id, data) {
83
+ console.log(data, '饼状图数据')
84
+ // 获取显示区域
85
+ self.xc = self.$echarts.init(document.getElementById(id))
86
+ var scale = 0.8
87
+ // 获取图例
88
+ var legendname = []
89
+ data.forEach(function (s) {
90
+ legendname.push(s.name)
91
+ })
92
+ // 获取数据
93
+ var echartData = data
94
+ // 自定义样式
95
+ var rich = {
96
+ white: {
97
+ color: "#fff",
98
+ align: 'center',
99
+ fontSize: 12 * scale,
100
+
101
+ padding: [4, 0]
102
+ },
103
+ blue: {
104
+ color: '#e1e52a',
105
+ fontSize: 12 * scale,
106
+ align: 'center',
107
+ padding: [6, 0]
108
+ },
109
+ hr: {
110
+ borderColor: '#64d8d4',
111
+ width: '100%',
112
+ borderWidth: 0.5,
113
+ height: 0,
114
+ },
115
+ }
116
+ var total = 0;
117
+ var result = ''
118
+ // 数据求和
119
+ data.forEach(function (value) {
120
+ total += value.value;
121
+ });
122
+ // 数据进行处理,增加单位万
123
+ var index = total.toString().length
124
+ if (index > 4) {
125
+ var i = total.toString().substring(0, index - 4)
126
+ var s = total.toString().substring(index - 4, index - 3)
127
+ result = i + '.' + s + '万'
128
+ } else {
129
+ result = total
130
+ }
131
+ var s = ""
132
+ for (var i = 4; i > 0; i--) {
133
+ if (result.length < i) {
134
+ s = "\t" + s
135
+ }
136
+ }
137
+ result = s + result
138
+
139
+ console.log(echartData, legendname, '绘图样式数据')
140
+ // 绘图
141
+ self.xc.setOption({
142
+ title: [
143
+ {
144
+ text: '总用户数',
145
+ x: '44%',
146
+ y: '33%',
147
+ textStyle: {
148
+ color: '#ffffff',
149
+ fontSize: 12 * scale,
150
+ }
151
+ },
152
+ {
153
+ text: result,
154
+ x: '41%',
155
+ y: '38%',
156
+ padding: [15, 20],
157
+ textStyle: {
158
+ color: '#00e2ea',
159
+ fontSize: 12 * scale,
160
+
161
+ }
162
+ }],
163
+ legend: {
164
+ orient: 'horizontal',
165
+ icon: 'circle',
166
+ x: 'center',
167
+ y: '80%',
168
+ itemWidth: 20 * scale,
169
+ itemHeight: 10 * scale,
170
+ textStyle: {
171
+ fontSize: 12 * scale,
172
+ padding: [0, 0, 0, 4],
173
+ color: '#ffffff'
174
+ },
175
+ data: legendname
176
+ },
177
+ series: [
178
+ {
179
+ name: 'Line 1',
180
+ type: 'pie',
181
+ animation: false,
182
+ clockWise: false,
183
+ radius: ['25%', '26%'],
184
+ center: ['50%', '40%'],
185
+ itemStyle: {
186
+ normal: {
187
+ label: {
188
+ show: false
189
+ },
190
+ labelLine: {
191
+ show: false
192
+ },
193
+ }
194
+ },
195
+ hoverAnimation: false,
196
+ tooltip: {
197
+ trigger: 'axis'
198
+ },
199
+ data: [{
200
+ value: 100,
201
+ name: '02',
202
+ itemStyle: {
203
+ normal: {
204
+ color: '#29b7ff',//未完成的圆环的颜色
205
+ label: {
206
+ show: false
207
+ },
208
+ labelLine: {
209
+ show: false
210
+ }
211
+ }
212
+ }
213
+ }]
214
+ },
215
+ {
216
+ name: '总用户数',
217
+ type: 'pie',
218
+ radius: ['30%', '40%'],
219
+ center: ['50%', '40%'],
220
+ hoverAnimation: false,
221
+ color: ['#6fd9d0', '#ede61f', '#6d9bdc'],
222
+ minAngle: 15,//最小角度
223
+ startAngle: 60, //起始角度
224
+ label: {
225
+ normal: {
226
+ borderWidth: 1,
227
+ borderRadius: 4,
228
+ backgroundColor: '#004b5c',
229
+ borderColor: '#64d8d4',
230
+ formatter: function (params, ticket, callback) {
231
+ var total = 0; //用户总数量
232
+ var percent = 0;
233
+ echartData.forEach(function (value, index, array) {
234
+ total += value.value;
235
+ });
236
+ if( params.name.toString().length>6){
237
+ var s= params.name.toString().substring(6, params.name.toString().length)
238
+ return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
239
+
240
+ }
241
+ console.log(params.name,'cccccc')
242
+ percent = ((params.value / total) * 100).toFixed(1);
243
+ return '{white|' + params.name + '}\n{hr|}\n{blue| ' + params.value + '}{blue| ' + percent + '%}';
244
+ },
245
+ rich: rich,
246
+ }
247
+ },
248
+
249
+ labelLine: {
250
+ normal: {
251
+ length: 15 * scale,
252
+ length2: 20 * scale,
253
+ lineStyle: {
254
+ formatter: function (params, ticket, callback) {
255
+ var total = 0; //用户总数量
256
+ var percent = 0; //用户占比
257
+ echartData.forEach(function (value, index, array) {
258
+ total += value.value;
259
+ });
260
+ percent = ((params.value / total) * 100).toFixed(1);
261
+ if( params.name.toString().length>6){
262
+ var s= params.name.toString().substring(6, params.name.toString().length)
263
+ return '{white| ' + params.name.substring(0,6) + '\n'+s+'}\n{hr|}\n{yellow| ' + params.value + '}{blue| ' + percent + '%}';
264
+
265
+ }
266
+ console.log(params.name,'cccccc')
267
+ return '{white| ' + params.name + '}\n{hr|}\n{yellow| ' + params.value + '}\n{blue| ' + percent + '%}';
268
+ },
269
+ }
270
+ }
271
+ },
272
+ data: echartData
273
+ }, {
274
+ name: 'Line 2',
275
+ type: 'pie',
276
+ animation: false,
277
+ clockWise: false,
278
+ radius: ['44%', '45%'],
279
+ center: ['50%', '40%'],
280
+ itemStyle: {
281
+ normal: {label: {show: false}, labelLine: {show: false},}
282
+ },
283
+ hoverAnimation: false,
284
+ tooltip: {
285
+ show: false
286
+ },
287
+ data: [{
288
+ value: 100,
289
+ name: '02',
290
+ itemStyle: {
291
+ normal: {color: '#29b7ff', label: {show: false}, labelLine: {show: false}}
292
+ }
293
+ }]
294
+ }]
295
+ }, true)
296
+ self.xc.on("click", self.eConsole)
297
+ }
298
+
299
+ //绘制柱状图
300
+ export function setBar(self, id, data, xname, yname, seriename, idname, namesubif) {
301
+ console.log(data, '柱状图数据')
302
+ self.xc = self.$echarts.init(document.getElementById(id))
303
+ var scale = 0.8
304
+ var xAxisData = [];
305
+ var legendData = [];
306
+ var serieData = [];
307
+ var metaDate = []
308
+ var xlegen = []
309
+ for (var i = 0; i < data.length; i++) {
310
+ legendData[i] = data[i].name
311
+ metaDate.push(data[i].value)
312
+ var xnamechildren = []
313
+ var cachedata = data[i].value
314
+ cachedata.forEach(function (s) {
315
+ xnamechildren.push(s.name)
316
+ })
317
+ xlegen.push(xnamechildren)
318
+ }
319
+
320
+ xAxisData = xlegen[0]
321
+ for (var i = 1; i < xlegen.length; i++) {
322
+ if (xlegen[i].length > xAxisData.length) {
323
+ xAxisData = xlegen[i]
324
+ }
325
+ }
326
+ xAxisData.push("")
327
+ var tooltype = ''
328
+ console.log(xname)
329
+ if (xname != '') {
330
+ tooltype = xname.substring(0, 1)
331
+ }
332
+ console.log(xAxisData, '系列名')
333
+ var h = []
334
+ metaDate.forEach(function (s) {
335
+ var l = []
336
+ for (var i = 0; i < xAxisData.length; i++) {
337
+ var flag = 0
338
+ for (var j = 0; j < s.length; j++) {
339
+ if (s[j].name == xAxisData[i]) {
340
+ flag++
341
+ l.push(s[j])
342
+ }
343
+ }
344
+ if (flag == 0) {
345
+ l.push({name: xAxisData[i], value: 0})
346
+ }
347
+ }
348
+ h.push(l)
349
+ })
350
+ metaDate = h
351
+ var xname1 = ' ' + xname
352
+ var color = []
353
+ color = getcolor(idname, xAxisData.length - 1)
354
+ console.log(legendData,'图例名')
355
+ if(typeof legendData[0]=="undefined"){
356
+ legendData=[]
357
+ legendData.push(seriename)
358
+ }
359
+ if (JSON.stringify(color) == '[]') {
360
+ color = ["#2EF7F3", '#ffe8cb', '#ff9000']
361
+ for (var v = 0; v < legendData.length; v++) {
362
+ var serie = {
363
+ name: legendData[v],
364
+ type: "bar",
365
+ barWidth: '30%',
366
+ barGap: "15%",
367
+ boundaryGap:true,
368
+ itemStyle: {
369
+ normal: {
370
+ color: color[v],
371
+ label: {
372
+ show: true,
373
+ textStyle: {
374
+ color: "#fff"
375
+ },
376
+ position: "top",
377
+ formatter: function (p) {
378
+ var index = p.value.toString().length
379
+ if(p.value <= 0){
380
+ return ""
381
+ }
382
+ // if (index > 9) {
383
+ // return p.value.toString().substring(0, index - 9) + '亿'
384
+ // } else if (index > 4) {
385
+ // return p.value.toString().substring(0, index - 4) + '万'
386
+ // }
387
+ return p.value
388
+
389
+ }
390
+ }
391
+ }
392
+ },
393
+ data: metaDate[v],
394
+ }
395
+ serieData.push(serie)
396
+ }
397
+ } else {
398
+ for (var v = 0; v < legendData.length; v++) {
399
+ var serie = {
400
+ name: legendData[v],
401
+ type: "bar",
402
+ barWidth: '25%',
403
+ barGap: "15%",
404
+ itemStyle: {
405
+ normal: {
406
+ color: function (params) {
407
+ let colorList = color;
408
+ return colorList[params.dataIndex];
409
+ },
410
+ label: {
411
+ show: true,
412
+ textStyle: {
413
+ color: "#fff"
414
+ },
415
+ position: "top",
416
+ formatter: function (p) {
417
+
418
+ var index = p.value.toString().length
419
+ if(p.value <= 0){
420
+ return ""
421
+ }
422
+ // if (index > 9) {
423
+ // return p.value.toString().substring(0, index - 9) + '亿'
424
+ // } else if (index > 4) {
425
+ // return p.value.toString().substring(0, index - 4) + '万'
426
+ // }else {
427
+ // return p.value
428
+ // }
429
+ }
430
+ }
431
+ }
432
+ },
433
+ data: metaDate[v],
434
+ }
435
+ serieData.push(serie)
436
+ }
437
+ }
438
+
439
+
440
+ console.log(legendData, xAxisData, metaDate, serieData, '柱状图绘图参数')
441
+ var colors = ["#036BC8", "#4A95FF", "#5EBEFC", "#2EF7F3", "#FFFFFF"]
442
+ self.xc.setOption({
443
+ title: {text: '', textAlign: 'left', textStyle: {color: "#fff", fontSize: "16*scale", fontWeight: "normal"}},
444
+ color: colors,
445
+ grid: {left: '5%', top: "18%", bottom: "8%", right: "5%", containLabel: true},
446
+ dataZoom: [{
447
+ type: 'inside',
448
+ show: true,
449
+ xAxisIndex: [0],
450
+ left: '50%',
451
+ bottom: -5,
452
+ start: 2,
453
+ end: 90 //初始化滚动条
454
+ }],
455
+ legend: {
456
+ top: 0,
457
+ textStyle: {
458
+ color: '#fff',
459
+ },
460
+ data: legendData,
461
+ },
462
+ tooltip: {
463
+ formatter: function (params) {
464
+ if (params[0].axisValue == '') {
465
+ return ''
466
+ }
467
+ var result = ''
468
+ params.forEach(function (item) {
469
+ result += item.marker + " " + item.seriesName + " : " + item.value + "</br>";
470
+ });
471
+ return params[0].axisValue + tooltype + ' <br/> ' + result
472
+ },
473
+ axisPointer: {type: 'line', lineStyle: {width: 0}},
474
+ trigger: 'axis',
475
+ extraCssText: 'width: auto;height: auto;'
476
+ },
477
+ xAxis: [
478
+ {
479
+ name: xname1,
480
+ type: 'category',
481
+ nameTextStyle: {
482
+ fontSize: 14 * scale,
483
+ color: '#15dce2',
484
+ padding: [40 * scale, 0, 0, -70 * scale],
485
+ },
486
+ axisLine: {show: true, lineStyle: {color: '#04669e', width: 1}},
487
+ axisLabel: {
488
+ interval: 0, textStyle: {color: '#ffffff', fontSize: 14 * scale},
489
+ formatter: function (value, index) {
490
+ if (!namesubif) {
491
+ return value
492
+ }
493
+ //进行客户名称截取换行
494
+ var s = ''
495
+ // 长度超过4个字符进行换行
496
+ if (value.toString().length > 3 && value.toString().length < 8) {
497
+ var s0 = value.toString().substring(0, 4)
498
+ var s1 = value.toString().substring(4, value.toString().length)
499
+ s = s0 + '\n' + s1
500
+ return s
501
+ }
502
+ // 长度超过8个字符进行再次换行
503
+ if (value.toString().length > 7 && value.toString().length < 12) {
504
+ var s0 = value.toString().substring(0, 4)
505
+ var s1 = value.toString().substring(4, 8)
506
+ var s2 = value.toString().substring(8, value.toString().length)
507
+ s = s0 + '\n' + s1 + '\n' + s2
508
+ return s
509
+ }
510
+ // 长度超过12个字符进行再次换行
511
+ if (value.toString().length > 11) {
512
+ var s0 = value.toString().substring(0, 4)
513
+ var s1 = value.toString().substring(4, 8)
514
+ var s2 = value.toString().substring(8, 12)
515
+ var s3 = value.toString().substring(12, value.toString().length)
516
+ s = s0 + '\n' + s1 + '\n' + s2 + '\n' + s3
517
+ return s
518
+ }
519
+
520
+ s = value.toString()
521
+
522
+ return s;
523
+ }
524
+ },
525
+ axisTick: {show: false},
526
+ data: xAxisData,
527
+ },
528
+ ],
529
+ yAxis: [
530
+ {
531
+ name: yname,
532
+ nameTextStyle: {
533
+ fontSize: 14 * scale,
534
+ padding: [-10 * scale, 35 * scale, 0, 0],
535
+ },
536
+ axisTick: {show: false},
537
+ splitLine: {show: true, lineStyle: {type: 'dashed', color: '#004371'}},
538
+ axisLabel: {interval: 0, textStyle: {color: '#15dce2', fontSize: 14 * scale},
539
+ formatter: function (value) {
540
+ var index = value.toString().length
541
+ if (index > 9) {
542
+ return value.toString().substring(0, index - 9) + '亿'
543
+ } else if (index > 4) {
544
+ return value.toString().substring(0, index - 4) + '万'
545
+ }
546
+ return value
547
+ }},
548
+ axisLine: {show: false, lineStyle: {color: '#15dce2', fontSize: 14 * scale}},
549
+ },
550
+ ],
551
+ series: serieData
552
+ }, true)
553
+ console.log('绘图成功')
554
+ self.xc.on("click", self.eConsole)
555
+ }
556
+
557
+
558
+ var parseColor = function (hexStr) {
559
+ return hexStr.length === 4 ? hexStr.substr(1).split('').map(function (s) {
560
+ return 0x11 * parseInt(s, 16);
561
+ }) : [hexStr.substr(1, 2), hexStr.substr(3, 2), hexStr.substr(5, 2)].map(function (s) {
562
+ return parseInt(s, 16);
563
+ })
564
+ };
565
+
566
+ var pad = function (s) {
567
+ return (s.length === 1) ? '0' + s : s;
568
+ };
569
+
570
+ // 获取渐变色值
571
+ export function gradientColors(start, end, steps, gamma) {
572
+ var i, j, ms, me, output = [], so = [];
573
+ gamma = gamma || 1;
574
+ var normalize = function (channel) {
575
+ return Math.pow(channel / 255, gamma);
576
+ };
577
+ start = parseColor(start).map(normalize);
578
+ end = parseColor(end).map(normalize);
579
+ for (i = 0; i < steps; i++) {
580
+ ms = i / (steps - 1);
581
+ me = 1 - ms;
582
+ for (j = 0; j < 3; j++) {
583
+ so[j] = pad(Math.round(Math.pow(start[j] * me + end[j] * ms, 1 / gamma) * 255).toString(16));
584
+ }
585
+ output.push('#' + so.join(''));
586
+ }
587
+ return output;
588
+ }
589
+
590
+
591
+ var getcolor = function (idname, num) {
592
+
593
+
594
+ let color = {
595
+ longnotbuygas: ['#ffe8cb', '#ff9000'],
596
+ }
597
+ if (typeof color[idname] != "undefined") {
598
+ return gradientColors(color[idname][0], color[idname][1], num, 2.2)
599
+ }
600
+ return []
601
+ }
602
+