index.js 80 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886
  1. let app = new Vue({
  2. el: "#app",
  3. data () {
  4. return {
  5. leftEcharts1: "",
  6. leftEcharts2: "",
  7. leftEcharts3: "",
  8. leftEcharts4: "",
  9. leftEcharts5: "",
  10. leftEcharts6: "",
  11. leftEcharts7: "",
  12. leftEcharts8: "",
  13. leftEcharts9: '',
  14. shanxiMap: "", // 山西地图
  15. industryProportion: 1, // 主辅业占比轮播
  16. industryLayout: 0, //产业布局分析
  17. time1: "", // 4秒定时器
  18. time2: "", // 针对投前产业布局分析的定时器
  19. meansList: [
  20. {
  21. label: "初步设计",
  22. value: "106",
  23. },
  24. {
  25. label: "详细设计",
  26. value: "103",
  27. },
  28. {
  29. label: "施工",
  30. value: "62",
  31. },
  32. {
  33. label: "完工",
  34. value: "35",
  35. },
  36. {
  37. label: "验收",
  38. value: "42",
  39. },
  40. {
  41. label: "结算",
  42. value: "33",
  43. },
  44. ],
  45. costList: [
  46. {
  47. num: 160,
  48. value: 284,
  49. status: "正偏差",
  50. },
  51. {
  52. num: 280,
  53. value: 129,
  54. status: "容差内",
  55. },
  56. {
  57. num: 103,
  58. value: 1082,
  59. status: "负偏差",
  60. },
  61. ],
  62. investData: {
  63. investList: [
  64. {
  65. name: "大地控股",
  66. yse: "26.79",
  67. yqhte: "9.64",
  68. czrde: "121.59",
  69. jse: "120.13",
  70. fke: "36.4",
  71. url: "./img/logos/logo15.png",
  72. },
  73. {
  74. name: "云时代",
  75. yse: "21.79",
  76. yqhte: "9.64",
  77. czrde: "121.59",
  78. jse: "120.13",
  79. fke: "36.4",
  80. url: "./img/logos/logo16.png",
  81. },
  82. {
  83. name: "华舰体育",
  84. yse: "26.79",
  85. yqhte: "9.64",
  86. czrde: "121.59",
  87. jse: "120.13",
  88. fke: "36.4",
  89. url: "./img/logos/logo17.png",
  90. },
  91. {
  92. name: "神农科技",
  93. yse: "26.79",
  94. yqhte: "9.64",
  95. czrde: "121.59",
  96. jse: "120.13",
  97. fke: "36.4",
  98. url: "./img/logos/logo18.png",
  99. },
  100. {
  101. name: "山西焦煤",
  102. yse: "26.79",
  103. yqhte: "9.64",
  104. czrde: "121.59",
  105. jse: "120.13",
  106. fke: "36.4",
  107. url: "./img/logos/logo1.png",
  108. },
  109. {
  110. name: "晋能控股",
  111. yse: "26.79",
  112. yqhte: "9.64",
  113. czrde: "121.59",
  114. jse: "120.13",
  115. fke: "36.4",
  116. url: "./img/logos/logo2.png",
  117. },
  118. {
  119. name: "华阳新材",
  120. yse: "26.79",
  121. yqhte: "9.64",
  122. czrde: "121.59",
  123. jse: "120.13",
  124. fke: "36.4",
  125. url: "./img/logos/logo3.png",
  126. },
  127. {
  128. name: "潞安化工",
  129. yse: "26.79",
  130. yqhte: "9.64",
  131. czrde: "121.59",
  132. jse: "120.13",
  133. fke: "36.4",
  134. url: "./img/logos/logo4.png",
  135. },
  136. {
  137. name: "华新燃气",
  138. yse: "26.79",
  139. yqhte: "9.64",
  140. czrde: "121.59",
  141. jse: "120.13",
  142. fke: "36.4",
  143. url: "./img/logos/logo5.png",
  144. },
  145. {
  146. name: "太重集团",
  147. yse: "26.79",
  148. yqhte: "9.64",
  149. czrde: "121.59",
  150. jse: "120.13",
  151. fke: "36.4",
  152. url: "./img/logos/logo6.png",
  153. },
  154. {
  155. name: "国际能源",
  156. yse: "26.79",
  157. yqhte: "9.64",
  158. czrde: "121.59",
  159. jse: "120.13",
  160. fke: "36.4",
  161. url: "./img/logos/logo7.png",
  162. },
  163. {
  164. name: "华远陆港",
  165. yse: "26.79",
  166. yqhte: "9.64",
  167. czrde: "121.59",
  168. jse: "120.13",
  169. fke: "36.4",
  170. url: "./img/logos/logo8.png",
  171. },
  172. {
  173. name: "水控集团",
  174. yse: "26.79",
  175. yqhte: "9.64",
  176. czrde: "121.59",
  177. jse: "120.13",
  178. fke: "36.4",
  179. url: "./img/logos/logo9.png",
  180. },
  181. {
  182. name: "文旅集团",
  183. yse: "26.79",
  184. yqhte: "9.64",
  185. czrde: "121.59",
  186. jse: "120.13",
  187. fke: "36.4",
  188. url: "./img/logos/logo10.png",
  189. },
  190. {
  191. name: "交控集团",
  192. yse: "26.79",
  193. yqhte: "9.64",
  194. czrde: "121.59",
  195. jse: "120.13",
  196. fke: "36.4",
  197. url: "./img/logos/logo11.png",
  198. },
  199. {
  200. name: "航产集团",
  201. yse: "26.79",
  202. yqhte: "9.64",
  203. czrde: "121.59",
  204. jse: "120.13",
  205. fke: "36.4",
  206. url: "./img/logos/logo12.png",
  207. },
  208. {
  209. name: "山西建投",
  210. yse: "26.79",
  211. yqhte: "9.64",
  212. czrde: "121.59",
  213. jse: "120.13",
  214. fke: "36.4",
  215. url: "./img/logos/logo13.png",
  216. },
  217. {
  218. name: "汾酒集团",
  219. yse: "26.79",
  220. yqhte: "9.64",
  221. czrde: "121.59",
  222. jse: "120.13",
  223. fke: "36.4",
  224. url: "./img/logos/logo14.png",
  225. },
  226. ],
  227. },
  228. inner: 0,
  229. innerDeg: 0,
  230. timer: null,
  231. witchs: 0,
  232. topIndex: 0,
  233. };
  234. },
  235. created () { },
  236. beforeDestroy () {
  237. clearInterval(this.timer);
  238. },
  239. mounted () {
  240. this.time4s();
  241. this.timeNs();
  242. this.filterLpData();
  243. this.lpRotate();
  244. setTimeout(() => {
  245. this.leftEcharts1Fun();
  246. this.leftEcharts2Fun();
  247. this.leftEcharts3Fun();
  248. this.leftEcharts4Fun();
  249. this.leftEcharts5Fun();
  250. this.leftEcharts6Fun();
  251. this.leftEcharts7Fun();
  252. this.leftEcharts8Fun();
  253. this.leftEcharts9Fun();
  254. this.chinaEchartsFun();
  255. this.initChartR1();
  256. this.initChartR2();
  257. this.initChartR3();
  258. this.initChartR4();
  259. });
  260. },
  261. methods: {
  262. initChartR1 () {
  263. let that = this;
  264. let sumA = 42;
  265. let right5 = [[1, 2, 3, 4, 5, 6]];
  266. let commonCompany = [
  267. "山西焦煤",
  268. "山西焦煤",
  269. "山西焦煤",
  270. "山西焦煤",
  271. "山西焦煤",
  272. "山西焦煤",
  273. ];
  274. // 所有在100范围外的全部变成0,其他值相应增加/减少sumA
  275. // right5.forEach((item) => {
  276. // item.forEach((item2) => {
  277. // if (Number(item2[1]) < 0) {
  278. // item2[1] = that.$set(item2, 1, Number(that.numSub(item2[1], sumA)));
  279. // } else if (Number(item2[1]) > 0) {
  280. // item2[1] = that.$set(item2, 1, Number(item2[1]) + sumA);
  281. // }
  282. // if (Number(item2[1]) < -100 - sumA) {
  283. // item2[1] = that.$set(item2, 1, 0);
  284. // item2[1] = that.$set(item2, 2, 0);
  285. // } else if (Number(item2[1]) > 100 + sumA) {
  286. // item2[1] = that.$set(item2, 1, 0);
  287. // item2[1] = that.$set(item2, 2, 0);
  288. // }
  289. // });
  290. // });
  291. const itemStyle = {
  292. // opacity: 0.8,
  293. shadowBlur: 10,
  294. shadowOffsetX: 0,
  295. shadowOffsetY: 0,
  296. shadowColor: "rgba(0,0,0,0.3)",
  297. };
  298. that.right2Chart = echarts.init(this.$refs["echartR1"]);
  299. that.right2Chart.on("showTip", (params) => {
  300. // 如果是7或者15并且满足防抖则切换
  301. if (
  302. (params.dataIndex == 5 || params.dataIndex == 11) &&
  303. that.echartR2Fd
  304. ) {
  305. that.echartR2Fd = false;
  306. setTimeout(() => {
  307. option.dataZoom[0].endValue = option.dataZoom[0].endValue + 6;
  308. option.dataZoom[0].startValue = option.dataZoom[0].startValue + 6;
  309. that.right2Chart.setOption(option);
  310. // 防止勿刷新做的防抖
  311. setTimeout(() => {
  312. that.echartR2Fd = true;
  313. }, 2000);
  314. }, 1900);
  315. // 如果是17表示到了最后一个,那么重新来一遍
  316. } else if (params.dataIndex == 17 && that.echartR2Fd) {
  317. that.echartR2Fd = false;
  318. setTimeout(() => {
  319. option.dataZoom[0].endValue = 0;
  320. option.dataZoom[0].startValue = 5;
  321. that.right2Chart.setOption(option);
  322. // 防止勿刷新做的防抖
  323. setTimeout(() => {
  324. that.echartR2Fd = true;
  325. }, 2000);
  326. }, 1900);
  327. }
  328. });
  329. let option = {
  330. color: ["#04635E", "#697143", "#4A3042"],
  331. dataZoom: [
  332. {
  333. // start: 9,//默认为@
  334. // end: 100,//黑认认为1@0
  335. type: "slider",
  336. show: false,
  337. // xAxisIndex: [0]
  338. handlesize: 0, //滑动条的 左右2个滑动条的大小
  339. startValue: 5, // 初始显示值
  340. endValue: 0, // 结束显示值
  341. height: 10, //组件高度
  342. left: "5%",
  343. right: "4%", //右边的距离
  344. bottom: "25%", //底边的距离
  345. borderColor: "#939",
  346. fillerColor: "#269cdb",
  347. borderRadius: 5,
  348. backgroundColor: "#33384b", //两边未选中的滑动条区域的额色
  349. showDataShadow: false, //是否显示数据阴影
  350. showDetail: false, //即拖拽时候是否显示详细数值信息
  351. truerealtime: true, //是否实时更新
  352. filterMode: "filter",
  353. },
  354. {
  355. type: "inside",
  356. show: true,
  357. start: 1,
  358. end: 100,
  359. zoomOnMouseWheel: false, //滚轮是否触发缩放
  360. moveOnMouseMove: false, //鼠标滚轮触发滚动
  361. },
  362. ],
  363. legend: {
  364. selectedMode: false,
  365. top: 10,
  366. right: "6%",
  367. data: ["正偏差", "容差", "负偏差"],
  368. textStyle: {
  369. fontSize: 20,
  370. color: "#fff",
  371. fontFamily: "Microsoft YaHei",
  372. },
  373. },
  374. textStyle: {
  375. color: "#fff",
  376. },
  377. // tooltip: {
  378. // show: true,
  379. // trigger: "axis",
  380. // textStyle: {
  381. // color: "#FFF", // 文字的颜色
  382. // fontSize: "20", // 文字字体大小
  383. // fontFamily: "Microsoft YaHei",
  384. // },
  385. // formatter: (data) => {
  386. // return `${
  387. // data[0].value[0]
  388. // }<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${
  389. // data[0].color
  390. // }"></span> ${data[0].seriesName}:${that.numFormat(
  391. // data[0].data[2]
  392. // )}亿<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${
  393. // data[1].color
  394. // }"></span> ${data[1].seriesName}:${that.numFormat(
  395. // data[1].data[2]
  396. // )}亿<br /><span style="display:inline-block;border-radius:50%; width:7px;height:7px;background-color:${
  397. // data[2].color
  398. // }"></span> ${data[2].seriesName}:${that.numFormat(
  399. // data[2].data[2]
  400. // )}亿`;
  401. // },
  402. // axisPointer: {
  403. // // // type: 'cross',',
  404. // },
  405. // },
  406. grid: {
  407. top: "10%",
  408. right: "7%",
  409. left: "7%",
  410. bottom: "6%",
  411. },
  412. yAxis: {
  413. min: -101 - sumA,
  414. max: 101 + sumA,
  415. maxInterval: 1,
  416. splitLine: {
  417. show: false,
  418. // interval:,
  419. lineStyle: {
  420. color: "#68b4dd66",
  421. type: "dashed",
  422. },
  423. },
  424. axisLine: {
  425. show: false,
  426. },
  427. axisTick: {
  428. show: false,
  429. },
  430. axisLabel: {
  431. show: true,
  432. // formatter: '{value}',
  433. formatter (data) {
  434. if (data == 100 + sumA) {
  435. return "100%";
  436. } else if (data == -100 - sumA) {
  437. return "-100%";
  438. } else if (data == -5 - sumA) {
  439. return "-5%";
  440. } else if (data == 5 + sumA) {
  441. return "5%";
  442. }
  443. },
  444. textStyle: {
  445. color: "#fff",
  446. fontSize: "20",
  447. fontFamily: "Microsoft YaHei",
  448. },
  449. },
  450. nameTextStyle: {
  451. color: "#fff",
  452. fontSize: 20,
  453. fontFamily: "Microsoft YaHei",
  454. },
  455. },
  456. xAxis: {
  457. data: commonCompany,
  458. axisLine: {
  459. show: false, //隐藏X轴轴线
  460. lineStyle: {
  461. color: "#005094",
  462. width: 1,
  463. },
  464. },
  465. splitLine: {
  466. show: true,
  467. lineStyle: {
  468. color: "#68b4dd66",
  469. type: "dashed",
  470. },
  471. },
  472. axisTick: {
  473. show: true, //隐藏X轴刻度
  474. },
  475. axisLabel: {
  476. show: true,
  477. rotate: 20,
  478. padding: [0, 0, 0, 0],
  479. textStyle: {
  480. color: "#fff", //X轴文字颜色
  481. fontSize: 22,
  482. fontFamily: "Microsoft YaHei",
  483. },
  484. },
  485. },
  486. series: [
  487. {
  488. name: "正偏差",
  489. type: "scatter",
  490. itemStyle: itemStyle,
  491. data: right5[0],
  492. symbolSize: function (data) {
  493. if ((data[2] > 0 && data[2] < 50) || data[2] == 50) {
  494. return 40;
  495. } else if ((data[2] > 50 && data[2] < 100) || data[2] == 100) {
  496. return 70;
  497. } else if (data[2] > 100) {
  498. return 100;
  499. }
  500. },
  501. markLine: {
  502. symbol: "none",
  503. data: [
  504. {
  505. name: "100%",
  506. yAxis: 100 + sumA,
  507. lineStyle: {
  508. // color: '#fff',
  509. },
  510. label: {
  511. show: false,
  512. formatter: "{b}",
  513. position: "right",
  514. color: "#fff",
  515. fontSize: 20,
  516. label: {
  517. show: false,
  518. },
  519. },
  520. },
  521. {
  522. name: "5%",
  523. yAxis: 5 + sumA,
  524. lineStyle: {
  525. // color: '#fff',
  526. },
  527. label: {
  528. show: false,
  529. formatter: "{b}",
  530. position: "right",
  531. color: "#fff",
  532. fontSize: 20,
  533. },
  534. },
  535. {
  536. name: "-5%",
  537. yAxis: -5 - sumA,
  538. lineStyle: {
  539. // color: '#fff',
  540. },
  541. label: {
  542. show: false,
  543. formatter: "{b}",
  544. position: "right",
  545. color: "#fff",
  546. fontSize: 20,
  547. },
  548. },
  549. {
  550. name: "100%",
  551. yAxis: -100 - sumA,
  552. lineStyle: {
  553. // color: '#fff',
  554. },
  555. label: {
  556. show: false,
  557. formatter: "{b}",
  558. position: "right",
  559. color: "#fff",
  560. fontSize: 20,
  561. },
  562. },
  563. ],
  564. },
  565. },
  566. {
  567. name: "容差",
  568. type: "scatter",
  569. itemStyle: itemStyle,
  570. data: right5[1],
  571. symbolSize: function (data) {
  572. if ((data[2] > 0 && data[2] < 50) || data[2] == 50) {
  573. return 40;
  574. } else if ((data[2] > 50 && data[2] < 100) || data[2] == 100) {
  575. return 70;
  576. } else if (data[2] > 100) {
  577. return 100;
  578. }
  579. },
  580. },
  581. {
  582. name: "负偏差",
  583. type: "scatter",
  584. itemStyle: itemStyle,
  585. data: right5[2],
  586. symbolSize: function (data) {
  587. if ((data[2] > 0 && data[2] < 50) || data[2] == 50) {
  588. return 40;
  589. } else if ((data[2] > 50 && data[2] < 100) || data[2] == 100) {
  590. return 70;
  591. } else if (data[2] > 100) {
  592. return 100;
  593. }
  594. },
  595. },
  596. ],
  597. };
  598. that.right2Chart.on("click", function (param) {
  599. if (that.versions) {
  600. that.rightAdd.modelName = 1;
  601. that.rightAdd.substraction =
  602. param.seriesName == "正偏差"
  603. ? 1
  604. : param.seriesName == "容差"
  605. ? 2
  606. : 3;
  607. that.rightAdd.projectStepCode = "";
  608. that.projectNum = 313;
  609. that.rightPenetrateTwo(
  610. 1,
  611. param.seriesName == "正偏差"
  612. ? 1
  613. : param.seriesName == "容差"
  614. ? 2
  615. : 3,
  616. that.findCode(param.name),
  617. "right"
  618. );
  619. } else {
  620. that.projectListTipShow = true;
  621. }
  622. });
  623. that.right2Chart.setOption(option);
  624. tools.loopShowTooltip(that.right2Chart, option, {
  625. interval: 2000,
  626. loopSeries: true,
  627. });
  628. },
  629. initChartR2 () {
  630. let that = this;
  631. that.right1Chart = echarts.init(this.$refs["echartR2"]);
  632. let option = {
  633. color: [
  634. {
  635. type: "linear",
  636. x: 0,
  637. y: 0,
  638. x2: 0,
  639. y2: 1,
  640. colorStops: [
  641. {
  642. offset: 0,
  643. color: "#91231F", // 0% 处的颜色
  644. },
  645. {
  646. offset: 1,
  647. color: "#F98784", // 100% 处的颜色
  648. },
  649. ],
  650. global: false, // 缺省为 false
  651. },
  652. {
  653. type: "linear",
  654. x: 0,
  655. y: 0,
  656. x2: 0,
  657. y2: 1,
  658. colorStops: [
  659. {
  660. offset: 0,
  661. color: "#9F7F00", // 0% 处的颜色
  662. },
  663. {
  664. offset: 1,
  665. color: "#FBE463", // 100% 处的颜色
  666. },
  667. ],
  668. global: false, // 缺省为 false
  669. },
  670. {
  671. type: "linear",
  672. x: 0,
  673. y: 0,
  674. x2: 0,
  675. y2: 1,
  676. colorStops: [
  677. {
  678. offset: 0,
  679. color: "#07806E", // 0% 处的颜色
  680. },
  681. {
  682. offset: 1,
  683. color: "#79FFEB", // 100% 处的颜色
  684. },
  685. ],
  686. global: false, // 缺省为 false
  687. },
  688. ],
  689. legend: {
  690. top: 10,
  691. right: 10,
  692. textStyle: {
  693. fontSize: 20,
  694. color: "#fff",
  695. fontFamily: "Microsoft YaHei",
  696. },
  697. itemStyle: {
  698. borderCap: "round",
  699. },
  700. },
  701. grid: {
  702. left: "3%",
  703. right: "4%",
  704. bottom: "3%",
  705. containLabel: true,
  706. },
  707. xAxis: [
  708. {
  709. type: "category",
  710. data: [
  711. "山西焦煤",
  712. "华阳控股",
  713. "晋能控股",
  714. "潞安化工",
  715. "国际能源",
  716. "云时代",
  717. "航产集团",
  718. ],
  719. axisLine: {
  720. lineStyle: {
  721. color: "#005094",
  722. },
  723. },
  724. axisTick: {
  725. show: false,
  726. },
  727. axisLabel: {
  728. color: "#fff",
  729. rotate: 20,
  730. fontSize: 22,
  731. },
  732. },
  733. ],
  734. yAxis: [
  735. {
  736. type: "value",
  737. axisLabel: {
  738. color: "#fff",
  739. fontSize: 22,
  740. },
  741. splitLine: {
  742. lineStyle: {
  743. type: "dashed",
  744. },
  745. },
  746. },
  747. ],
  748. series: [
  749. {
  750. name: "低风险",
  751. type: "bar",
  752. stack: "Ad",
  753. barWidth: 14,
  754. emphasis: {
  755. focus: "series",
  756. },
  757. itemStyle: {
  758. barBorderRadius: [15, 15, 15, 15],
  759. },
  760. data: [120, 132, 101, 134, 90, 230, 210],
  761. },
  762. {
  763. name: "中风险",
  764. type: "bar",
  765. stack: "Ad",
  766. itemStyle: {
  767. barBorderRadius: [15, 15, 15, 15],
  768. },
  769. emphasis: {
  770. focus: "series",
  771. },
  772. data: [220, 182, 191, 234, 290, 330, 310],
  773. },
  774. {
  775. name: "高风险",
  776. type: "bar",
  777. stack: "Ad",
  778. itemStyle: {
  779. barBorderRadius: [15, 15, 15, 15],
  780. },
  781. emphasis: {
  782. focus: "series",
  783. },
  784. data: [150, 232, 201, 154, 190, 330, 410],
  785. },
  786. ],
  787. };
  788. that.right1Chart.setOption(option);
  789. },
  790. initChartR3 () {
  791. let that = this;
  792. that.right3Chart = echarts.init(this.$refs["echartR3"]);
  793. let option = {
  794. radar: {
  795. // shape: 'circle',
  796. splitNumber: 3,
  797. splitLine: {
  798. lineStyle: {
  799. color: ["#DD5955", "#39e1d0", "#2e3d45"],
  800. },
  801. },
  802. splitArea: {
  803. areaStyle: {
  804. color: [
  805. "rgba(88,247,223,0.2)",
  806. "rgba(255, 224, 54, 0.2)",
  807. "rgba(221,89,85,0.3)",
  808. ],
  809. },
  810. },
  811. indicator: [
  812. { name: "安全风险", max: 25 },
  813. { name: "付款风险", max: 25 },
  814. { name: "合同风险", max: 25 },
  815. { name: "结算风险", max: 25 },
  816. { name: "进度风险", max: 25 },
  817. { name: "质量风险", max: 25 },
  818. ],
  819. },
  820. series: [
  821. {
  822. name: "风险",
  823. type: "radar",
  824. symbol: "circle",
  825. data: [
  826. {
  827. value: [12, 23, 21, 17, 20, 9],
  828. name: "Allocated Budget",
  829. areaStyle: {
  830. color: "#112b75",
  831. },
  832. lineStyle: {
  833. width: 4,
  834. color: "#60C1FF",
  835. },
  836. label: {
  837. fontSize: 22,
  838. },
  839. },
  840. ],
  841. },
  842. ],
  843. };
  844. that.right3Chart.setOption(option);
  845. },
  846. initChartR4 () {
  847. let that = this;
  848. that.right4Chart = echarts.init(this.$refs["echartR4"]);
  849. let option = {
  850. tooltip: {
  851. trigger: "item",
  852. show: true,
  853. formatter: function (p) {
  854. console.info(p);
  855. return p.marker + p.name + " : " + p.value;
  856. },
  857. },
  858. grid: {
  859. left: "3%",
  860. right: "4%",
  861. bottom: "3%",
  862. containLabel: true,
  863. },
  864. xAxis: {
  865. data: ["山西焦煤", "晋能控股", "华阳新材"],
  866. type: "category",
  867. splitLine: {
  868. show: false,
  869. },
  870. axisLine: {
  871. show: true,
  872. lineStyle: {
  873. color: "#fff",
  874. },
  875. },
  876. axisTick: {
  877. show: true,
  878. },
  879. axisLabel: {
  880. color: "#fff",
  881. fontSize: 22,
  882. rotate: 20,
  883. },
  884. },
  885. yAxis: {
  886. type: "value",
  887. splitNumber: 4,
  888. interval: 50,
  889. splitLine: {
  890. show: true,
  891. lineStyle: {
  892. color: "#68B4DD",
  893. type: "dashed",
  894. },
  895. },
  896. axisLine: {
  897. show: false,
  898. },
  899. axisTick: {
  900. show: false,
  901. },
  902. axisLabel: {
  903. color: "#fff",
  904. fontSize: 22,
  905. },
  906. },
  907. series: [
  908. {
  909. type: "bar",
  910. animation: false,
  911. barWidth: 2,
  912. data: [60, 85, 110],
  913. tooltip: {
  914. show: false,
  915. },
  916. itemStyle: {
  917. color: {
  918. x: 0,
  919. y: 0,
  920. x2: 0,
  921. y2: 1,
  922. colorStops: [
  923. {
  924. offset: 0,
  925. color: "rgba(85, 255, 237, 1)", // 0% 处的颜色
  926. },
  927. {
  928. offset: 1,
  929. color: "rgba(66, 142, 255, 0.05)", // 100% 处的颜色
  930. },
  931. ],
  932. },
  933. },
  934. },
  935. {
  936. type: "scatter",
  937. data: [60, 85, 110],
  938. symbolOffset: ["-120%", "0"],
  939. symbolSize: 8,
  940. itemStyle: {
  941. borderWidth: 0,
  942. opacity: 1,
  943. color: "rgba(85, 255, 237, 1)",
  944. shadowColor: "rgba(85, 255, 237, 1)",
  945. shadowBlur: 100,
  946. shadowOffsetX: 100,
  947. },
  948. },
  949. {
  950. type: "bar",
  951. animation: false,
  952. barGap: "800%",
  953. barWidth: 2,
  954. data: [60, 85, 110],
  955. tooltip: {
  956. show: false,
  957. },
  958. itemStyle: {
  959. color: {
  960. x: 0,
  961. y: 0,
  962. x2: 0,
  963. y2: 1,
  964. colorStops: [
  965. {
  966. offset: 0,
  967. color: "rgba(214, 91, 255, 1)", // 0% 处的颜色
  968. },
  969. {
  970. offset: 1,
  971. color: "rgba(184, 91, 255, 0.05)", // 100% 处的颜色
  972. },
  973. ],
  974. },
  975. },
  976. },
  977. {
  978. type: "scatter",
  979. data: [60, 85, 110],
  980. symbolOffset: ["110%", "0"],
  981. symbolSize: 8,
  982. itemStyle: {
  983. borderWidth: 0,
  984. opacity: 1,
  985. color: "#f2fec3",
  986. },
  987. },
  988. ],
  989. };
  990. that.right4Chart.setOption(option);
  991. },
  992. clickItem (index) {
  993. console.log(index);
  994. const angle = 360 / this.investData.investList.length;
  995. this.witchs = index;
  996. this.inner = index;
  997. this.innerDeg = this.witchs * angle;
  998. this.lpRotate();
  999. },
  1000. lpRotate () {
  1001. const angle = 360 / this.investData.investList.length;
  1002. clearInterval(this.timer);
  1003. this.timer = setInterval(() => {
  1004. this.inner++;
  1005. this.topIndex++;
  1006. this.topIndex = this.topIndex % this.meansList.length;
  1007. this.witchs = this.inner % this.investData.investList.length;
  1008. this.innerDeg = this.inner * angle;
  1009. }, 2000);
  1010. },
  1011. filterLpData () {
  1012. const angle = 360 / this.investData.investList.length;
  1013. for (let i in this.investData.investList) {
  1014. this.investData.investList[i].deg = i * angle;
  1015. this.$set(this.investData.investList, i, {
  1016. ...this.investData.investList[i],
  1017. deg: i * angle,
  1018. });
  1019. }
  1020. },
  1021. // 4秒定时器
  1022. time4s () {
  1023. let that = this;
  1024. // 4秒定时器
  1025. this.time1 = setInterval(() => {
  1026. that.industryProportion == 1
  1027. ? (that.industryProportion = 2)
  1028. : (that.industryProportion = 1);
  1029. that.leftEcharts1.dispose();
  1030. that.leftEcharts2.dispose();
  1031. that.leftEcharts3.dispose();
  1032. that.leftEcharts4.dispose();
  1033. that.leftEcharts1Fun();
  1034. that.leftEcharts2Fun();
  1035. that.leftEcharts3Fun();
  1036. that.leftEcharts4Fun();
  1037. }, 4000);
  1038. },
  1039. // 针对投前产业布局分析的定时器
  1040. timeNs () {
  1041. let that = this;
  1042. this.time2 = setInterval(() => {
  1043. if (that.industryLayout < 3) {
  1044. that.industryLayout = that.industryLayout + 1;
  1045. } else {
  1046. that.industryLayout = 0;
  1047. }
  1048. this.time2 && clearInterval(this.time2);
  1049. this.timeNs();
  1050. that.leftEcharts5.dispose();
  1051. that.leftEcharts5Fun();
  1052. }, left1[that.industryLayout].length * 2000);
  1053. },
  1054. // 主辅业占比点击方法
  1055. industryProportionChange (e) {
  1056. let that = this;
  1057. this.industryProportion = e;
  1058. this.time1 && clearInterval(this.time1);
  1059. that.leftEcharts1.dispose();
  1060. that.leftEcharts2.dispose();
  1061. that.leftEcharts3.dispose();
  1062. that.leftEcharts4.dispose();
  1063. that.leftEcharts1Fun();
  1064. that.leftEcharts2Fun();
  1065. that.leftEcharts3Fun();
  1066. that.leftEcharts4Fun();
  1067. this.time4s();
  1068. },
  1069. // 产业布局分析点击方法
  1070. industryLayoutChange (e) {
  1071. this.industryLayout = e;
  1072. this.time2 && clearInterval(this.time2);
  1073. this.leftEcharts5.dispose();
  1074. this.timeNs()
  1075. this.leftEcharts5Fun();
  1076. },
  1077. yuanChange (value) {
  1078. return Number((value / 100000000).toFixed(2));
  1079. },
  1080. // 逢三折断
  1081. numFormat (value) {
  1082. if (!value) return "0";
  1083. // var intPart = Number(value).toFixed(0) // 获取整数部分
  1084. var intPart = parseInt(value); // 获取整数部分
  1085. var intPartFormat = intPart
  1086. .toString()
  1087. .replace(/(\d)(?=(?:\d{3})+$)/g, "$1,"); // 将整数部分逢三一断
  1088. var floatPart = ".00"; // 预定义小数部分
  1089. var value2Array = value.toString().split(".");
  1090. // =2表示数据有小数位
  1091. if (value2Array.length === 2) {
  1092. floatPart = value2Array[1].toString(); // 拿到小数部分
  1093. if (floatPart.length === 1) {
  1094. // 补0
  1095. return intPartFormat + "." + floatPart + "0";
  1096. } else {
  1097. floatPart = floatPart.slice(0, 2);
  1098. return intPartFormat + "." + floatPart;
  1099. }
  1100. } else {
  1101. return intPartFormat;
  1102. }
  1103. },
  1104. leftEcharts1Fun () {
  1105. let that = this;
  1106. this.leftEcharts1 = echarts.init(this.$refs["leftEcharts1"]);
  1107. option = {
  1108. title: {
  1109. text: that.industryProportion == 1 ? "30%" : "70%",
  1110. x: "center",
  1111. y: "center",
  1112. textStyle: {
  1113. fontWeight: "normal",
  1114. color: "#68BDFF",
  1115. fontSize: "20",
  1116. },
  1117. },
  1118. color: ["#68BDFF", "#254F7F"],
  1119. series: [
  1120. {
  1121. name: "Line 1",
  1122. type: "pie",
  1123. clockWise: true,
  1124. radius: ["80%", "100%"],
  1125. itemStyle: {
  1126. normal: {
  1127. label: {
  1128. show: false,
  1129. },
  1130. labelLine: {
  1131. show: false,
  1132. },
  1133. },
  1134. },
  1135. hoverAnimation: false,
  1136. data: [
  1137. {
  1138. value: 80,
  1139. name: "01",
  1140. itemStyle: {
  1141. normal: {
  1142. label: {
  1143. show: false,
  1144. },
  1145. labelLine: {
  1146. show: false,
  1147. },
  1148. },
  1149. },
  1150. },
  1151. {
  1152. name: "02",
  1153. value: 20,
  1154. },
  1155. ],
  1156. },
  1157. ],
  1158. };
  1159. //轮播
  1160. // tools.loopShowTooltip(leftEcharts1, option, {
  1161. // interval: 2000,
  1162. // loopSeries: true,
  1163. // });
  1164. //注册
  1165. that.leftEcharts1.setOption(option);
  1166. },
  1167. leftEcharts2Fun () {
  1168. let that = this;
  1169. this.leftEcharts2 = echarts.init(this.$refs["leftEcharts2"]);
  1170. let nameList = ["a"];
  1171. let valueList = that.industryProportion == 1 ? [30] : [70];
  1172. let total = 100; // 数据总数
  1173. var category = nameList.map((item, index) => {
  1174. return {
  1175. value: valueList[index],
  1176. itemStyle: {
  1177. color: new echarts.graphic.LinearGradient(
  1178. 1,
  1179. 0,
  1180. 0,
  1181. 1,
  1182. [
  1183. {
  1184. offset: 0,
  1185. color: "#40A9FF50",
  1186. },
  1187. {
  1188. offset: 1,
  1189. color: "#40A9FF",
  1190. },
  1191. ],
  1192. false
  1193. ),
  1194. },
  1195. };
  1196. });
  1197. var totalList = [];
  1198. var totalBorderList = [];
  1199. nameList.map((item, index) => {
  1200. totalList.push({
  1201. value: total,
  1202. itemStyle: {
  1203. color: "rgba(51, 147, 236, 0.29)",
  1204. },
  1205. });
  1206. totalBorderList.push({
  1207. value: total,
  1208. itemStyle: {
  1209. borderColor: "rgba(51, 147, 236, 0.29)",
  1210. color: "transparent",
  1211. },
  1212. });
  1213. });
  1214. var datas = [];
  1215. category.forEach((value) => {
  1216. datas.push(value.value);
  1217. });
  1218. option = {
  1219. // backgroundColor: 'rgb(231,238,249)',
  1220. xAxis: {
  1221. max: total,
  1222. splitLine: {
  1223. show: false,
  1224. },
  1225. axisLine: {
  1226. show: false,
  1227. },
  1228. axisLabel: {
  1229. show: false,
  1230. },
  1231. axisTick: {
  1232. show: false,
  1233. },
  1234. },
  1235. grid: {
  1236. left: "0%",
  1237. top: "15%", // 设置条形图的边距
  1238. right: "15%",
  1239. bottom: "5%",
  1240. },
  1241. yAxis: [
  1242. {
  1243. type: "category",
  1244. inverse: false,
  1245. data: nameList,
  1246. axisLine: {
  1247. show: false,
  1248. },
  1249. axisTick: {
  1250. show: false,
  1251. },
  1252. axisLabel: {
  1253. show: false,
  1254. },
  1255. },
  1256. ],
  1257. series: [
  1258. {
  1259. // 内
  1260. type: "bar",
  1261. barWidth: 16,
  1262. barGap: "20%",
  1263. silent: true,
  1264. // label: {
  1265. // normal: {
  1266. // formatter: (item) => {
  1267. // return `${item['name']}:${item['value']} `;
  1268. // },
  1269. // textStyle: {
  1270. // color: 'rgba(105, 120, 136, 1)',
  1271. // fontSize: 14,
  1272. // },
  1273. // position: [0, '-25px'],
  1274. // show: true,
  1275. // },
  1276. // },
  1277. data: category,
  1278. z: 1,
  1279. itemStyle: {
  1280. normal: {
  1281. color: new echarts.graphic.LinearGradient(
  1282. 1,
  1283. 0,
  1284. 0,
  1285. 1,
  1286. [
  1287. {
  1288. offset: 0,
  1289. color: "rgba(81, 193, 156, 1)",
  1290. },
  1291. {
  1292. offset: 1,
  1293. color: "rgba(234, 177, 100, 1)",
  1294. },
  1295. ],
  1296. false
  1297. ),
  1298. },
  1299. },
  1300. animationEasing: "elasticOut",
  1301. },
  1302. {
  1303. // 分隔
  1304. type: "pictorialBar",
  1305. itemStyle: {
  1306. normal: {
  1307. color: "#143362",
  1308. },
  1309. },
  1310. symbolRepeat: "fixed",
  1311. symbolMargin: 8,
  1312. symbol: "rect",
  1313. symbolClip: false,
  1314. symbolSize: [4, 20],
  1315. symbolPosition: "start",
  1316. symbolOffset: [0, -2],
  1317. symbolBoundingData: total,
  1318. data: [total, total, total, total],
  1319. z: 2,
  1320. animationEasing: "elasticOut",
  1321. },
  1322. {
  1323. // label
  1324. type: "pictorialBar",
  1325. symbolBoundingData: total,
  1326. itemStyle: {
  1327. normal: {
  1328. color: "none",
  1329. },
  1330. },
  1331. label: {
  1332. normal: {
  1333. formatter: (params) => {
  1334. var text;
  1335. text = `${((params["data"] * 100) / total).toFixed(2)}亿`;
  1336. return text;
  1337. },
  1338. textStyle: {
  1339. // 图列内容样式
  1340. fontSize: "20",
  1341. fontWeight: 800,
  1342. },
  1343. position: "right",
  1344. offset: [0, -3],
  1345. distance: 10, // 向右偏移位置
  1346. show: true,
  1347. color: "#68BDFF",
  1348. },
  1349. },
  1350. data: datas,
  1351. z: 0,
  1352. },
  1353. {
  1354. name: "外框",
  1355. type: "bar",
  1356. barGap: "-130%", // 设置外框粗细
  1357. data: totalBorderList,
  1358. barWidth: 26,
  1359. itemStyle: {
  1360. normal: {
  1361. // barBorderRadius: [5, 5, 5, 5],
  1362. borderWidth: 1, // 边框宽度
  1363. borderColor: "rgb(51, 147, 236)", // 边框色
  1364. color: "rgb(231,238,249)",
  1365. },
  1366. },
  1367. z: 0,
  1368. },
  1369. ],
  1370. };
  1371. //轮播
  1372. // tools.loopShowTooltip(leftEcharts1, option, {
  1373. // interval: 2000,
  1374. // loopSeries: true,
  1375. // });
  1376. //注册
  1377. that.leftEcharts2.setOption(option);
  1378. },
  1379. leftEcharts3Fun () {
  1380. let that = this;
  1381. this.leftEcharts3 = echarts.init(this.$refs["leftEcharts3"]);
  1382. option = {
  1383. title: {
  1384. text: that.industryProportion == 1 ? "70%" : "30%",
  1385. x: "center",
  1386. y: "center",
  1387. textStyle: {
  1388. fontWeight: "normal",
  1389. color: "#68BDFF",
  1390. fontSize: "20",
  1391. },
  1392. },
  1393. color: ["#5BDCC8", "#254F7F"],
  1394. series: [
  1395. {
  1396. name: "Line 1",
  1397. type: "pie",
  1398. clockWise: true,
  1399. radius: ["80%", "100%"],
  1400. itemStyle: {
  1401. normal: {
  1402. label: {
  1403. show: false,
  1404. },
  1405. labelLine: {
  1406. show: false,
  1407. },
  1408. },
  1409. },
  1410. hoverAnimation: false,
  1411. data: [
  1412. {
  1413. value: 80,
  1414. name: "01",
  1415. itemStyle: {
  1416. normal: {
  1417. label: {
  1418. show: false,
  1419. },
  1420. labelLine: {
  1421. show: false,
  1422. },
  1423. },
  1424. },
  1425. },
  1426. {
  1427. name: "02",
  1428. value: 20,
  1429. },
  1430. ],
  1431. },
  1432. ],
  1433. };
  1434. //轮播
  1435. // tools.loopShowTooltip(leftEcharts1, option, {
  1436. // interval: 2000,
  1437. // loopSeries: true,
  1438. // });
  1439. //注册
  1440. that.leftEcharts3.setOption(option);
  1441. },
  1442. leftEcharts4Fun () {
  1443. let that = this;
  1444. this.leftEcharts4 = echarts.init(this.$refs["leftEcharts4"]);
  1445. let nameList = ["a"];
  1446. let valueList = that.industryProportion == 1 ? [70] : [30];
  1447. let total = 100; // 数据总数
  1448. var category = nameList.map((item, index) => {
  1449. return {
  1450. value: valueList[index],
  1451. itemStyle: {
  1452. color: new echarts.graphic.LinearGradient(
  1453. 1,
  1454. 0,
  1455. 0,
  1456. 1,
  1457. [
  1458. {
  1459. offset: 0,
  1460. color: "#5BDCC850",
  1461. },
  1462. {
  1463. offset: 1,
  1464. color: "#5BDCC8",
  1465. },
  1466. ],
  1467. false
  1468. ),
  1469. },
  1470. };
  1471. });
  1472. var totalList = [];
  1473. var totalBorderList = [];
  1474. nameList.map((item, index) => {
  1475. totalList.push({
  1476. value: total,
  1477. itemStyle: {
  1478. color: "rgba(51, 147, 236, 0.29)",
  1479. },
  1480. });
  1481. totalBorderList.push({
  1482. value: total,
  1483. itemStyle: {
  1484. borderColor: "rgba(51, 147, 236, 0.29)",
  1485. color: "transparent",
  1486. },
  1487. });
  1488. });
  1489. var datas = [];
  1490. category.forEach((value) => {
  1491. datas.push(value.value);
  1492. });
  1493. option = {
  1494. // backgroundColor: 'rgb(231,238,249)',
  1495. xAxis: {
  1496. max: total,
  1497. splitLine: {
  1498. show: false,
  1499. },
  1500. axisLine: {
  1501. show: false,
  1502. },
  1503. axisLabel: {
  1504. show: false,
  1505. },
  1506. axisTick: {
  1507. show: false,
  1508. },
  1509. },
  1510. grid: {
  1511. left: "0%",
  1512. top: "15%", // 设置条形图的边距
  1513. right: "15%",
  1514. bottom: "5%",
  1515. },
  1516. yAxis: [
  1517. {
  1518. type: "category",
  1519. inverse: false,
  1520. data: nameList,
  1521. axisLine: {
  1522. show: false,
  1523. },
  1524. axisTick: {
  1525. show: false,
  1526. },
  1527. axisLabel: {
  1528. show: false,
  1529. },
  1530. },
  1531. ],
  1532. series: [
  1533. {
  1534. // 内
  1535. type: "bar",
  1536. barWidth: 16,
  1537. barGap: "20%",
  1538. silent: true,
  1539. // label: {
  1540. // normal: {
  1541. // formatter: (item) => {
  1542. // return `${item['name']}:${item['value']} `;
  1543. // },
  1544. // textStyle: {
  1545. // color: 'rgba(105, 120, 136, 1)',
  1546. // fontSize: 14,
  1547. // },
  1548. // position: [0, '-25px'],
  1549. // show: true,
  1550. // },
  1551. // },
  1552. data: category,
  1553. z: 1,
  1554. itemStyle: {
  1555. normal: {
  1556. color: new echarts.graphic.LinearGradient(
  1557. 1,
  1558. 0,
  1559. 0,
  1560. 1,
  1561. [
  1562. {
  1563. offset: 0,
  1564. color: "rgba(81, 193, 156, 1)",
  1565. },
  1566. {
  1567. offset: 1,
  1568. color: "rgba(234, 177, 100, 1)",
  1569. },
  1570. ],
  1571. false
  1572. ),
  1573. },
  1574. },
  1575. animationEasing: "elasticOut",
  1576. },
  1577. {
  1578. // 分隔
  1579. type: "pictorialBar",
  1580. itemStyle: {
  1581. normal: {
  1582. color: "#143362",
  1583. },
  1584. },
  1585. symbolRepeat: "fixed",
  1586. symbolMargin: 8,
  1587. symbol: "rect",
  1588. symbolClip: false,
  1589. symbolSize: [4, 20],
  1590. symbolPosition: "start",
  1591. symbolOffset: [0, -2],
  1592. symbolBoundingData: total,
  1593. data: [total, total, total, total],
  1594. z: 2,
  1595. animationEasing: "elasticOut",
  1596. },
  1597. {
  1598. // label
  1599. type: "pictorialBar",
  1600. symbolBoundingData: total,
  1601. itemStyle: {
  1602. normal: {
  1603. color: "none",
  1604. },
  1605. },
  1606. label: {
  1607. normal: {
  1608. formatter: (params) => {
  1609. var text;
  1610. text = `${((params["data"] * 100) / total).toFixed(2)}亿`;
  1611. return text;
  1612. },
  1613. textStyle: {
  1614. // 图列内容样式
  1615. fontSize: "20",
  1616. fontWeight: 800,
  1617. },
  1618. position: "right",
  1619. offset: [0, -3],
  1620. distance: 10, // 向右偏移位置
  1621. show: true,
  1622. color: "#68BDFF",
  1623. },
  1624. },
  1625. data: datas,
  1626. z: 0,
  1627. },
  1628. {
  1629. name: "外框",
  1630. type: "bar",
  1631. barGap: "-130%", // 设置外框粗细
  1632. data: totalBorderList,
  1633. barWidth: 26,
  1634. itemStyle: {
  1635. normal: {
  1636. // barBorderRadius: [5, 5, 5, 5],
  1637. borderWidth: 1, // 边框宽度
  1638. borderColor: "rgb(51, 147, 236)", // 边框色
  1639. color: "rgb(231,238,249)",
  1640. },
  1641. },
  1642. z: 0,
  1643. },
  1644. ],
  1645. };
  1646. //轮播
  1647. // tools.loopShowTooltip(leftEcharts1, option, {
  1648. // interval: 2000,
  1649. // loopSeries: true,
  1650. // });
  1651. //注册
  1652. that.leftEcharts4.setOption(option);
  1653. },
  1654. leftEcharts5Fun () {
  1655. let that = this;
  1656. this.leftEcharts5 = echarts.init(this.$refs["leftEcharts5"]);
  1657. let dataList = [];
  1658. left1[that.industryLayout].forEach((item, index) => {
  1659. dataList[index] = {
  1660. value: item.y,
  1661. name: item.name,
  1662. itemStyle: {
  1663. normal: {
  1664. color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [
  1665. {
  1666. offset: 0,
  1667. color: commonColor2[index], //顶部颜色
  1668. },
  1669. {
  1670. offset: 1,
  1671. color: commonColor[index], // 底部颜色
  1672. },
  1673. ]),
  1674. borderColor: commonColor[index],
  1675. borderWidth: 3,
  1676. },
  1677. },
  1678. };
  1679. });
  1680. let option = {
  1681. tooltip: {
  1682. trigger: "item",
  1683. formatter: function (e) {
  1684. return `<span style="display:inline-block;margin-right:15px;border-radius:10px;width:20px;height:20px;background-color:${e.borderColor
  1685. };"></span>${e.name} ${e.percent}%<br>${e.value}亿 ${left1[that.industryLayout][e.seriesIndex].num
  1686. }个`;
  1687. },
  1688. backgroundColor: "rgba(50,50,50,0.7)", // 提示框浮层的背景颜色
  1689. textStyle: {
  1690. color: "#fff",
  1691. fontStyle: "normal", // 文字字体的风格('normal',无样式;'italic',斜体;'oblique',倾斜字体)
  1692. fontWeight: "normal", // 文字字体的粗细('normal',无样式;'bold',加粗;'bolder',加粗的基础上再加粗;'lighter',变细;数字定义粗细也可以,取值范围100至700)
  1693. fontSize: "28", // 文字字体大小
  1694. },
  1695. },
  1696. legend: {
  1697. top: "center",
  1698. orient: "vertical",
  1699. left: "75%",
  1700. textStyle: {
  1701. color: "#fff",
  1702. fontSize: 28,
  1703. padding: [0, 20],
  1704. },
  1705. },
  1706. graphic: {
  1707. elements: [
  1708. {
  1709. type: "image", //需要填充图片,配置image,如果不需要图片可以配置其他的, text, circle, sector, ring, polygon, polyline, rect, line, bezierCurve, arc, group,
  1710. style: {
  1711. image: "./img/whiteCircle.png", //这里添加图片地址
  1712. width: 80,
  1713. height: 80,
  1714. },
  1715. left: "center", //
  1716. top: "middle", //配置图片居中
  1717. },
  1718. ],
  1719. },
  1720. series: [
  1721. {
  1722. name: "",
  1723. type: "pie",
  1724. radius: ["20%", "80%"],
  1725. labelLine: {
  1726. normal: {
  1727. lineStyle: {
  1728. width: 1,
  1729. },
  1730. },
  1731. },
  1732. label: {
  1733. normal: {
  1734. show: false,
  1735. textStyle: {
  1736. fontSize: 28,
  1737. color: "#fff",
  1738. },
  1739. },
  1740. },
  1741. roseType: "area",
  1742. data: dataList,
  1743. },
  1744. {
  1745. tooltip: {
  1746. show: false,
  1747. },
  1748. type: "pie",
  1749. radius: ["80%", "82%"],
  1750. hoverAnimation: false,
  1751. name: "",
  1752. data: [
  1753. {
  1754. name: "",
  1755. value: 0,
  1756. itemStyle: {
  1757. normal: {
  1758. color: "#345189",
  1759. },
  1760. },
  1761. },
  1762. ],
  1763. },
  1764. ],
  1765. };
  1766. //轮播
  1767. tools.loopShowTooltip(that.leftEcharts5, option, {
  1768. interval: 2000,
  1769. loopSeries: true,
  1770. });
  1771. //注册
  1772. that.leftEcharts5.setOption(option);
  1773. },
  1774. leftEcharts6Fun () {
  1775. let that = this;
  1776. this.leftEcharts6 = echarts.init(this.$refs["leftEcharts6"]);
  1777. var dataArr = 44;
  1778. var colorSet = {
  1779. color: "#22B95E",
  1780. };
  1781. var color1 = {
  1782. type: "linear",
  1783. x: 0,
  1784. y: 0,
  1785. x2: 1,
  1786. y2: 1,
  1787. colorStops: [
  1788. {
  1789. offset: 0,
  1790. color: "rgba(255,255,255,0.1)",
  1791. },
  1792. {
  1793. offset: 1,
  1794. color: "rgba(255,255,255,0.3)",
  1795. },
  1796. ],
  1797. global: false,
  1798. };
  1799. var color2 = {
  1800. type: "linear",
  1801. x: 0,
  1802. y: 0,
  1803. x2: 1,
  1804. y2: 1,
  1805. colorStops: [
  1806. {
  1807. offset: 0,
  1808. color: "#30DBBA",
  1809. },
  1810. {
  1811. offset: 1,
  1812. color: "#2DE696",
  1813. },
  1814. ],
  1815. global: false,
  1816. };
  1817. option = {
  1818. tooltip: {
  1819. formatter: "{a} <br/>{b} : {c}%",
  1820. },
  1821. series: [
  1822. {
  1823. name: "内部进度条",
  1824. type: "gauge",
  1825. // center: ['20%', '50%'],
  1826. radius: "50%",
  1827. splitNumber: 10,
  1828. axisLine: {
  1829. lineStyle: {
  1830. color: [
  1831. [dataArr / 100, "rgba(0,0,0,0)"],
  1832. [1, "rgba(0,0,0,0)"],
  1833. ],
  1834. width: 1,
  1835. },
  1836. },
  1837. axisLabel: {
  1838. show: false,
  1839. },
  1840. axisTick: {
  1841. show: false,
  1842. },
  1843. splitLine: {
  1844. show: false,
  1845. },
  1846. itemStyle: {
  1847. color: "#ffffff",
  1848. },
  1849. detail: {
  1850. formatter: function (value) {
  1851. if (value !== 0) {
  1852. var num = Math.round(value);
  1853. return parseInt(num).toFixed(0) + "%";
  1854. } else {
  1855. return 0;
  1856. }
  1857. },
  1858. offsetCenter: [0, 117],
  1859. textStyle: {
  1860. padding: [0, 0, 0, 0],
  1861. fontSize: 60,
  1862. color: "#58F7DF",
  1863. },
  1864. },
  1865. title: {
  1866. //标题
  1867. show: true,
  1868. offsetCenter: [0, 220], // x, y,单位px
  1869. textStyle: {
  1870. color: "#40A9FF",
  1871. fontSize: 34, //表盘上的标题文字大小
  1872. fontWeight: 400,
  1873. fontFamily: "MicrosoftYaHei",
  1874. },
  1875. },
  1876. data: [
  1877. {
  1878. name: "总额度:1,323.85亿",
  1879. value: dataArr,
  1880. itemStyle: {
  1881. fontSize: "50", //y轴上方单位的大小
  1882. color: "#FFF666",
  1883. fontFamily: "MicrosoftYaHei",
  1884. },
  1885. },
  1886. ],
  1887. pointer: {
  1888. show: true,
  1889. length: "100%",
  1890. radius: "20%",
  1891. width: 3, //指针粗细
  1892. },
  1893. animationDuration: 4000,
  1894. },
  1895. {
  1896. name: "内部阴影",
  1897. type: "gauge",
  1898. radius: "75%",
  1899. splitNumber: 10,
  1900. axisLine: {
  1901. lineStyle: {
  1902. color: [
  1903. [
  1904. dataArr / 100,
  1905. new echarts.graphic.LinearGradient(0, 1, 0, 0, [
  1906. {
  1907. offset: 0,
  1908. color: "#081947",
  1909. },
  1910. {
  1911. offset: 0.5,
  1912. color: "#5DF5A9",
  1913. },
  1914. {
  1915. offset: 1,
  1916. color: "#F6F16A",
  1917. },
  1918. ]),
  1919. ],
  1920. [1, "#0E4889"],
  1921. ],
  1922. width: 70,
  1923. },
  1924. },
  1925. axisLabel: {
  1926. show: false,
  1927. },
  1928. axisTick: {
  1929. show: false,
  1930. },
  1931. splitLine: {
  1932. show: false,
  1933. },
  1934. itemStyle: {
  1935. show: false,
  1936. },
  1937. },
  1938. {
  1939. name: "外部刻度",
  1940. type: "gauge",
  1941. // center: ['20%', '50%'],
  1942. radius: "90%",
  1943. min: 0, //最小刻度
  1944. max: 100, //最大刻度
  1945. splitNumber: 5, //刻度数量
  1946. startAngle: 225,
  1947. endAngle: -45,
  1948. axisLine: {
  1949. show: true,
  1950. lineStyle: {
  1951. width: 1,
  1952. color: [[1, "rgba(0,0,0,0)"]],
  1953. },
  1954. }, //仪表盘轴线
  1955. axisLabel: {
  1956. show: false,
  1957. color: "#ffffff",
  1958. fontSize: 28,
  1959. fontFamily: "SourceHanSansSC-Regular",
  1960. fontWeight: "bold",
  1961. // position: "top",
  1962. distance: -45,
  1963. formatter: function (v) {
  1964. switch (v + "") {
  1965. case "0":
  1966. return "0";
  1967. case "10":
  1968. return "10";
  1969. case "20":
  1970. return "20";
  1971. case "30":
  1972. return "30";
  1973. case "40":
  1974. return "40";
  1975. case "50":
  1976. return "50";
  1977. case "60":
  1978. return "60";
  1979. case "70":
  1980. return "70";
  1981. case "80":
  1982. return "80";
  1983. case "90":
  1984. return "90";
  1985. case "100":
  1986. return "100";
  1987. }
  1988. },
  1989. }, //刻度标签。
  1990. axisTick: {
  1991. show: true,
  1992. splitNumber: 10,
  1993. lineStyle: {
  1994. color: "#3798D7", //用颜色渐变函数不起作用
  1995. width: 1,
  1996. },
  1997. length: -6,
  1998. }, //刻度样式
  1999. splitLine: {
  2000. show: true,
  2001. length: -12,
  2002. lineStyle: {
  2003. color: "#3798D7", //用颜色渐变函数不起作用
  2004. },
  2005. }, //分隔线样式
  2006. detail: {
  2007. show: false,
  2008. },
  2009. },
  2010. {
  2011. //指针上的圆
  2012. type: "pie",
  2013. tooltip: {
  2014. show: false,
  2015. },
  2016. hoverAnimation: false,
  2017. legendHoverLink: false,
  2018. radius: ["0%", "4%"],
  2019. center: ["50%", "50%"],
  2020. label: {
  2021. normal: {
  2022. show: false,
  2023. },
  2024. },
  2025. labelLine: {
  2026. normal: {
  2027. show: false,
  2028. },
  2029. },
  2030. data: [
  2031. {
  2032. value: 120,
  2033. itemStyle: {
  2034. normal: {
  2035. color: "#ffffff",
  2036. },
  2037. },
  2038. },
  2039. ],
  2040. },
  2041. ],
  2042. };
  2043. //轮播
  2044. // tools.loopShowTooltip(leftEcharts1, option, {
  2045. // interval: 2000,
  2046. // loopSeries: true,
  2047. // });
  2048. //注册
  2049. that.leftEcharts6.setOption(option);
  2050. },
  2051. leftEcharts7Fun () {
  2052. let that = this;
  2053. this.leftEcharts7 = echarts.init(this.$refs["leftEcharts7"]);
  2054. let option = {
  2055. title: {
  2056. text: "固定资产进度分布",
  2057. textStyle: {
  2058. color: "#fff",
  2059. fontSize: 28,
  2060. fontWeight: 500,
  2061. fontFamily: "Microsoft YaHei",
  2062. },
  2063. top: "20",
  2064. left: "220",
  2065. },
  2066. textStyle: {
  2067. color: "#fff",
  2068. },
  2069. tooltip: {
  2070. show: false,
  2071. trigger: "axis",
  2072. formatter: function (params) {
  2073. var tip =
  2074. params[0].axisValue +
  2075. "<br/>" +
  2076. params[0].marker +
  2077. params[0].data[1] +
  2078. ":" +
  2079. params[0].data[2] +
  2080. "个," +
  2081. params[0].data[3] +
  2082. "亿元" +
  2083. "<br/>" +
  2084. params[1].marker +
  2085. params[1].data[1] +
  2086. ":" +
  2087. params[1].data[2] +
  2088. "个," +
  2089. params[1].data[3] +
  2090. "亿元";
  2091. return tip;
  2092. },
  2093. textStyle: {
  2094. color: "#ffffff", // 文字的颜色
  2095. fontSize: "20", // 文字字体大小
  2096. fontFamily: "Microsoft YaHei",
  2097. },
  2098. axisPointer: {
  2099. // lineStyle: {
  2100. // type: 'dashed',
  2101. // width: 2,
  2102. // color: 'rgba(255,255,255,0.6)'
  2103. // },
  2104. animation: false,
  2105. },
  2106. },
  2107. grid: {
  2108. top: "0%",
  2109. right: "5%",
  2110. left: "15%",
  2111. bottom: "-10%",
  2112. },
  2113. yAxis: {
  2114. data: ["备案", "特别监管"],
  2115. splitLine: {
  2116. show: false,
  2117. lineStyle: {
  2118. color: "#68b4dd66",
  2119. type: "dashed",
  2120. },
  2121. },
  2122. axisLine: {
  2123. show: false,
  2124. },
  2125. axisLabel: {
  2126. show: true,
  2127. formatter: "{value}",
  2128. textStyle: {
  2129. color: function (data) {
  2130. if (data == "特别监管") {
  2131. return "#40A9FF";
  2132. } else if (data == "备案") {
  2133. return "#5BDCC8";
  2134. }
  2135. },
  2136. fontSize: 20,
  2137. padding: [0, -10, 0, 0],
  2138. fontFamily: "Microsoft YaHei",
  2139. },
  2140. },
  2141. nameTextStyle: {
  2142. color: "#ebf8ac",
  2143. fontSize: 16,
  2144. fontFamily: "Microsoft YaHei",
  2145. },
  2146. },
  2147. xAxis: {
  2148. data: ["项目储备", "项目立项", "可研论证", "投资决策"],
  2149. axisLine: {
  2150. show: true, //隐藏X轴轴线
  2151. lineStyle: {
  2152. color: "red",
  2153. width: 1,
  2154. },
  2155. },
  2156. axisTick: {
  2157. show: false, //隐藏X轴刻度
  2158. },
  2159. axisLabel: {
  2160. show: true,
  2161. textStyle: {
  2162. color: "#fff", //X轴文字颜色
  2163. fontSize: 20,
  2164. padding: [-80, 0, 0, 0],
  2165. fontFamily: "Microsoft YaHei",
  2166. },
  2167. },
  2168. },
  2169. series: [
  2170. {
  2171. name: "特别监管",
  2172. type: "scatter",
  2173. symbol: "circle", //'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2174. symbolSize: function (data) {
  2175. return Math.sqrt(data[2]) * 5;
  2176. },
  2177. // label: {
  2178. // emphasis: {
  2179. // show: true,
  2180. // formatter: function (param) {
  2181. // return param.data[2];
  2182. // },
  2183. // position: 'top'
  2184. // }
  2185. // },
  2186. itemStyle: {
  2187. normal: {
  2188. color: "#69c0ff",
  2189. },
  2190. },
  2191. // data: left13[0]
  2192. },
  2193. {
  2194. name: "备案",
  2195. type: "scatter",
  2196. symbol: "circle", //'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2197. symbolSize: function (data) {
  2198. return Math.sqrt(data[2]) * 5;
  2199. },
  2200. // label: {
  2201. // emphasis: {
  2202. // show: true,
  2203. // formatter: function (param) {
  2204. // return param.data[2];
  2205. // },
  2206. // position: 'top'
  2207. // }
  2208. // },
  2209. itemStyle: {
  2210. normal: {
  2211. color: "#957DFF",
  2212. },
  2213. },
  2214. // data: left13[1]
  2215. },
  2216. ],
  2217. };
  2218. //轮播
  2219. // tools.loopShowTooltip(leftEcharts1, option, {
  2220. // interval: 2000,
  2221. // loopSeries: true,
  2222. // });
  2223. //注册
  2224. that.leftEcharts7.setOption(option);
  2225. },
  2226. leftEcharts8Fun () {
  2227. let that = this;
  2228. this.leftEcharts8 = echarts.init(this.$refs["leftEcharts8"]);
  2229. let option = {
  2230. title: {
  2231. text: "固定资产进度分布",
  2232. textStyle: {
  2233. color: "#fff",
  2234. fontSize: 28,
  2235. fontWeight: 500,
  2236. fontFamily: "Microsoft YaHei",
  2237. },
  2238. top: "20",
  2239. left: "220",
  2240. },
  2241. textStyle: {
  2242. color: "#fff",
  2243. },
  2244. tooltip: {
  2245. show: false,
  2246. trigger: "axis",
  2247. formatter: function (params) {
  2248. var tip =
  2249. params[0].axisValue +
  2250. "<br/>" +
  2251. params[0].marker +
  2252. params[0].data[1] +
  2253. ":" +
  2254. params[0].data[2] +
  2255. "个," +
  2256. params[0].data[3] +
  2257. "亿元" +
  2258. "<br/>" +
  2259. params[1].marker +
  2260. params[1].data[1] +
  2261. ":" +
  2262. params[1].data[2] +
  2263. "个," +
  2264. params[1].data[3] +
  2265. "亿元";
  2266. return tip;
  2267. },
  2268. textStyle: {
  2269. color: "#ffffff", // 文字的颜色
  2270. fontSize: "20", // 文字字体大小
  2271. fontFamily: "Microsoft YaHei",
  2272. },
  2273. axisPointer: {
  2274. // lineStyle: {
  2275. // type: 'dashed',
  2276. // width: 2,
  2277. // color: 'rgba(255,255,255,0.6)'
  2278. // },
  2279. animation: false,
  2280. },
  2281. },
  2282. grid: {
  2283. top: "0%",
  2284. right: "5%",
  2285. left: "15%",
  2286. bottom: "-10%",
  2287. },
  2288. yAxis: {
  2289. data: ["备案", "特别监管"],
  2290. splitLine: {
  2291. show: false,
  2292. lineStyle: {
  2293. color: "#68b4dd66",
  2294. type: "dashed",
  2295. },
  2296. },
  2297. axisLine: {
  2298. show: false,
  2299. },
  2300. axisLabel: {
  2301. show: false,
  2302. formatter: "{value}",
  2303. textStyle: {
  2304. color: "#fff",
  2305. fontSize: 20,
  2306. padding: [0, -10, 0, 0],
  2307. fontFamily: "Microsoft YaHei",
  2308. },
  2309. },
  2310. nameTextStyle: {
  2311. color: "#ebf8ac",
  2312. fontSize: 16,
  2313. fontFamily: "Microsoft YaHei",
  2314. },
  2315. },
  2316. xAxis: {
  2317. data: ["项目储备", "项目立项", "可研论证", "投资决策"],
  2318. axisLine: {
  2319. show: true, //隐藏X轴轴线
  2320. lineStyle: {
  2321. color: "red",
  2322. width: 1,
  2323. },
  2324. },
  2325. axisTick: {
  2326. show: false, //隐藏X轴刻度
  2327. },
  2328. axisLabel: {
  2329. show: true,
  2330. textStyle: {
  2331. color: "#fff", //X轴文字颜色
  2332. fontSize: 20,
  2333. padding: [-80, 0, 0, 0],
  2334. fontFamily: "Microsoft YaHei",
  2335. },
  2336. },
  2337. },
  2338. series: [
  2339. {
  2340. name: "特别监管",
  2341. type: "scatter",
  2342. symbol: "circle", //'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2343. symbolSize: function (data) {
  2344. return Math.sqrt(data[2]) * 5;
  2345. },
  2346. // label: {
  2347. // emphasis: {
  2348. // show: true,
  2349. // formatter: function (param) {
  2350. // return param.data[2];
  2351. // },
  2352. // position: 'top'
  2353. // }
  2354. // },
  2355. itemStyle: {
  2356. normal: {
  2357. color: "#69c0ff",
  2358. },
  2359. },
  2360. // data: left13[0]
  2361. },
  2362. {
  2363. name: "备案",
  2364. type: "scatter",
  2365. symbol: "circle", //'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
  2366. symbolSize: function (data) {
  2367. return Math.sqrt(data[2]) * 5;
  2368. },
  2369. // label: {
  2370. // emphasis: {
  2371. // show: true,
  2372. // formatter: function (param) {
  2373. // return param.data[2];
  2374. // },
  2375. // position: 'top'
  2376. // }
  2377. // },
  2378. itemStyle: {
  2379. normal: {
  2380. color: "#957DFF",
  2381. },
  2382. },
  2383. // data: left13[1]
  2384. },
  2385. ],
  2386. };
  2387. //轮播
  2388. // tools.loopShowTooltip(leftEcharts1, option, {
  2389. // interval: 2000,
  2390. // loopSeries: true,
  2391. // });
  2392. //注册
  2393. that.leftEcharts8.setOption(option);
  2394. },
  2395. chinaEchartsFun () {
  2396. let that = this
  2397. this.geoCoordMap = []
  2398. /*获取地图数据*/
  2399. this.shanxiMap = echarts.init(this.$refs["shanxi"]);
  2400. // echarts.registerMap('china', china)
  2401. echarts.registerMap("china", shanxi);
  2402. // var mapFeatures = echarts.getMap('china').geoJson.features
  2403. // mapFeatures.forEach(v => {
  2404. // // 地区名称
  2405. // var name = v.properties.name
  2406. // // 地区经纬度
  2407. // this.geoCoordMap[name] = v.properties.cp
  2408. // data.push({ name: v.properties.name, value: v.properties.cp[0], value2: v.properties.cp[1] })
  2409. // })
  2410. // var data = [
  2411. // { "name": "新疆", value: 29780 },
  2412. // { "name": "西藏", value: 2186 },
  2413. // { "name": "内蒙古", value: 1135 },
  2414. // { "name": "青海", value: 29780 },
  2415. // { "name": "四川", value: 2568 },
  2416. // { "name": "黑龙江", value: 29780 },
  2417. // { "name": "甘肃", value: 6959 },
  2418. // { "name": "云南", value: 5632 },
  2419. // { "name": "广西", value: 6707 },
  2420. // { "name": "湖南", value: 29780 },
  2421. // { "name": "陕西", value: 1894 },
  2422. // { "name": "广东", value: 15769 },
  2423. // { "name": "吉林", value: 8259 },
  2424. // { "name": "河北", value: 5741 },
  2425. // { "name": "湖北", value: 3030 },
  2426. // { "name": "贵州", value: 4542 },
  2427. // { "name": "山东", value: 19780 },
  2428. // { "name": "江西", value: 3157 },
  2429. // { "name": "河南", value: 6690 },
  2430. // { "name": "辽宁", value: 8678 },
  2431. // { "name": "山西", value: 5303 },
  2432. // { "name": "安徽", value: 29780 },
  2433. // { "name": "福建", value: 10259 },
  2434. // { "name": "浙江", value: 3016 },
  2435. // { "name": "江苏", value: 3202 },
  2436. // { "name": "重庆", value: 4540 },
  2437. // { "name": "宁夏", value: 19780 },
  2438. // { "name": "海南", value: 8626 },
  2439. // { "name": "台湾", value: 4361 },
  2440. // { "name": "北京", value: 20000 },
  2441. // { "name": "天津", value: 4080 },
  2442. // { "name": "上海", value: 19780 },
  2443. // { "name": "香港", value: 6991 },
  2444. // { "name": "澳门", value: 13873 },
  2445. // { "name": "南海诸岛", value: 0 }
  2446. // ];
  2447. // var geoCoordMap = {
  2448. // "新疆": [86.9023, 41.148],
  2449. // "西藏": [87.8695, 31.6846],
  2450. // "内蒙古": [110.5977, 41.3408],
  2451. // "青海": [95.2402, 35.4199],
  2452. // "四川": [102.9199, 30.1904],
  2453. // "黑龙江": [128.1445, 46.7156],
  2454. // "甘肃": [102.7129, 38.166],
  2455. // "云南": [101.0652, 24.6807],
  2456. // "广西": [108.7813, 23.6426],
  2457. // "湖南": [111.5332, 27.3779],
  2458. // "陕西": [108.5996, 33.7396],
  2459. // "广东": [113.8668, 22.8076],
  2460. // "吉林": [126.1746, 43.5938],
  2461. // "河北": [115.4004, 38.1688],
  2462. // "湖北": [112.2363, 30.8572],
  2463. // "贵州": [106.6113, 26.6385],
  2464. // "山东": [118.2402, 36.2307],
  2465. // "江西": [115.7156, 27.99],
  2466. // "河南": [113.0668, 33.8818],
  2467. // "辽宁": [123.0438, 41.0889],
  2468. // "山西": [112.44, 37.73],
  2469. // "安徽": [117.2461, 31.0361],
  2470. // "福建": [118.3008, 25.9277],
  2471. // "浙江": [120.498, 29.0918],
  2472. // "江苏": [119.8586, 32.915],
  2473. // "重庆": [107.7539, 29.8904],
  2474. // "宁夏": [105.9961, 37.1096],
  2475. // "海南": [109.9512, 19.2041],
  2476. // "台湾": [120.8254, 23.5986],
  2477. // "北京": [116.4551, 40.2539],
  2478. // "天津": [117.4219, 39.4189],
  2479. // "上海": [121.4648, 31.2891],
  2480. // "香港": [114.6178, 22.3242],
  2481. // "澳门": [113.5547, 21.6484],
  2482. // '南海诸岛': [128.8254, 21.5986]
  2483. // };
  2484. var data = [
  2485. { name: "大同市", value: 6035, value2: 28 },
  2486. { name: "朔州市", value: 3361, value2: 13 },
  2487. { name: "忻州市", value: 7335, value2: 25 },
  2488. { name: "吕梁市", value: 10904, value2: 45 },
  2489. { name: "太原市", value: 25167, value2: 113 },
  2490. { name: "阳泉市", value: 2512, value2: 28 },
  2491. { name: "晋中市", value: 14857, value2: 52 },
  2492. { name: "临汾市", value: 13055, value2: 30 },
  2493. { name: "长治市", value: 10300, value2: 23 },
  2494. { name: "运城市", value: 4106, value2: 23 },
  2495. { name: "晋城市", value: 4543, value2: 31 },
  2496. ];
  2497. var geoCoordMap = {
  2498. 太原市: [112.53, 37.87],
  2499. 大同市: [113.3, 40.12],
  2500. 阳泉市: [113.57, 37.85],
  2501. 长治市: [113.08, 36.18],
  2502. 晋城市: [112.83, 35.52],
  2503. 朔州市: [112.43, 39.33],
  2504. 晋中市: [112.94, 37.4],
  2505. 运城市: [110.97, 35.03],
  2506. 忻州市: [112.53, 38.72],
  2507. 临汾市: [111.5, 36.08],
  2508. 吕梁市: [111.13, 37.52],
  2509. };
  2510. var convertData = function (data) {
  2511. var res = [];
  2512. for (var i = 0; i < data.length; i++) {
  2513. var geoCoord = geoCoordMap[data[i].name];
  2514. if (geoCoord) {
  2515. res.push({
  2516. name: data[i].name,
  2517. value: geoCoord.concat(data[i].value,data[i].value2),
  2518. });
  2519. }
  2520. }
  2521. return res;
  2522. };
  2523. var convertedData = [
  2524. convertData(data),
  2525. convertData(
  2526. data
  2527. .sort(function (a, b) {
  2528. return b.value - a.value;
  2529. })
  2530. .slice(0, 6)
  2531. ),
  2532. ];
  2533. data.sort(function (a, b) {
  2534. return a.value - b.value;
  2535. });
  2536. option = {
  2537. backgroundColor: '#404a5900',
  2538. animation: true,
  2539. animationDuration: 1000,
  2540. animationEasing: "cubicInOut",
  2541. animationDurationUpdate: 1000,
  2542. animationEasingUpdate: "cubicInOut",
  2543. geo: {
  2544. map: "china",
  2545. center: [112.53, 37.67],
  2546. zoom: 4.5,
  2547. label: {
  2548. emphasis: {
  2549. show: false,
  2550. },
  2551. },
  2552. roam: false,
  2553. itemStyle: {
  2554. normal: {
  2555. borderColor: '#7fb3ff',
  2556. borderWidth: 3,
  2557. areaColor: {
  2558. type: 'radial',
  2559. x: 0.5,
  2560. y: 0.5,
  2561. r: 0.8,
  2562. colorStops: [{
  2563. offset: 0,
  2564. color: '#468ff8' // 0% 处的颜色
  2565. }, {
  2566. offset: 1,
  2567. color: '#0a2c6d' // 100% 处的颜色
  2568. }],
  2569. globalCoord: false // 缺省为 false
  2570. },
  2571. // shadowColor: 'rgba(128, 217, 248, 1)',
  2572. shadowColor: '#468ff8',
  2573. shadowOffsetX: -2,
  2574. shadowOffsetY: 2,
  2575. shadowBlur: 20
  2576. },
  2577. emphasis: {
  2578. areaColor: {
  2579. colorStops: [{
  2580. offset: 0,
  2581. color: '#3844aa' // 0% 处的颜色
  2582. }, {
  2583. offset: 1,
  2584. color: '#7284fc' // 100% 处的颜色
  2585. }],
  2586. },
  2587. borderColor: '#b3baff',
  2588. borderWidth: 5
  2589. }
  2590. },
  2591. tooltip: {
  2592. trigger: "item",
  2593. className: "custom-tooltip-box",
  2594. confine: true, // 不超出当前表
  2595. formatter: (params, ticket, callback) => {
  2596. console.log(params,'?????????')
  2597. // 清空所有轮播
  2598. for (var k in geoCoordMap) {
  2599. that.shanxiMap.dispatchAction({
  2600. // type: 'geoUnSelect',
  2601. type: 'downplay',
  2602. name: k,
  2603. geoIndex: 0
  2604. })
  2605. that.shanxiMap.dispatchAction({
  2606. // type: 'geoUnSelect',
  2607. type: 'downplay',
  2608. name: k,
  2609. seriesName: params.seriesName
  2610. })
  2611. that.shanxiMap.dispatchAction({
  2612. // type: 'geoUnSelect',
  2613. type: 'downplay',
  2614. name: k,
  2615. seriesName: 'series\u00001'
  2616. })
  2617. }
  2618. that.shanxiMap.dispatchAction({
  2619. // type: 'geoSelect',
  2620. type: 'highlight',
  2621. name: params.name,
  2622. geoIndex: 0
  2623. })
  2624. that.shanxiMap.dispatchAction({
  2625. // type: 'geoSelect',
  2626. type: 'highlight',
  2627. name: params.name,
  2628. seriesName: params.seriesName
  2629. })
  2630. that.shanxiMap.dispatchAction({
  2631. // type: 'geoSelect',
  2632. type: 'highlight',
  2633. name: params.name,
  2634. seriesName: 'series\u00001'
  2635. })
  2636. return `<div class="bgTooltip" style="background: url('../img/shanxi/${params.name}.png') no-repeat center center;background-size: 100% 100%;font-size:36px">
  2637. <div class="flex items-center">
  2638. <img src="./img/yellowArrow.png" style="width: 12px;height: 22px;margin-right:10px" alt=""><span class="fb">${params.name}</span>
  2639. </div>
  2640. <div class="blueIcon flex items-center">项目数量:<span class="fb" style="color:#68BDFF;">${params.value[3]}<span style="font-size:20px" class="fn">个</span></span></div>
  2641. <div class="blueIcon flex items-center">投资总额:<span class="fb" style="color:#68BDFF">${params.value[2]}<span style="font-size:20px" class="fn">亿</span></span></div>
  2642. </div>`
  2643. },
  2644. },
  2645. regions: [
  2646. {
  2647. name: "太原市",
  2648. value: 2000,
  2649. itemStyle: {
  2650. emphasis: {
  2651. borderColor: "#ffe036",
  2652. borderWidth: 5,
  2653. areaColor: {
  2654. type: "radial",
  2655. x: 0.5,
  2656. y: 0.5,
  2657. r: 0.8,
  2658. colorStops: [
  2659. {
  2660. offset: 0,
  2661. color: "#ffe036", // 0% 处的颜色
  2662. },
  2663. {
  2664. offset: 1,
  2665. color: "#7c732a", // 100% 处的颜色
  2666. },
  2667. ],
  2668. globalCoord: false, // 缺省为 false
  2669. },
  2670. },
  2671. },
  2672. },
  2673. {
  2674. name: "南海诸岛",
  2675. itemStyle: {
  2676. // 隐藏地图
  2677. normal: {
  2678. opacity: 0, // 为 0 时不绘制该图形
  2679. },
  2680. },
  2681. label: {
  2682. show: false, // 隐藏文字
  2683. },
  2684. },
  2685. ],
  2686. },
  2687. tooltip: {
  2688. trigger: "item",
  2689. className: "custom-tooltip-box",
  2690. confine: true, // 不超出当前表
  2691. },
  2692. xAxis: {
  2693. type: "value",
  2694. scale: true,
  2695. position: "top",
  2696. boundaryGap: false,
  2697. splitLine: {
  2698. show: false,
  2699. },
  2700. axisLine: {
  2701. show: false,
  2702. },
  2703. axisTick: {
  2704. show: false,
  2705. },
  2706. axisLabel: {
  2707. margin: 2,
  2708. textStyle: {
  2709. color: "#aaa",
  2710. },
  2711. },
  2712. },
  2713. yAxis: {
  2714. type: "category",
  2715. nameGap: 16,
  2716. axisLine: {
  2717. show: false,
  2718. lineStyle: {
  2719. color: "#ddd",
  2720. },
  2721. },
  2722. axisTick: {
  2723. show: false,
  2724. lineStyle: {
  2725. color: "#ddd",
  2726. },
  2727. },
  2728. axisLabel: {
  2729. interval: 0,
  2730. textStyle: {
  2731. color: "#ddd",
  2732. },
  2733. },
  2734. data: categoryData,
  2735. },
  2736. series: [
  2737. {
  2738. type: 'effectScatter',
  2739. colorBy: 'data',
  2740. coordinateSystem: 'geo',
  2741. data: convertedData[0],
  2742. symbolSize: function (val) {
  2743. return Math.max(val[2] / 500, 8);
  2744. },
  2745. showEffectOn: "emphasis",
  2746. rippleEffect: {
  2747. brushType: "stroke",
  2748. color:'#58F7DF'
  2749. },
  2750. hoverAnimation: true,
  2751. label: {
  2752. normal: {
  2753. formatter: "{b}",
  2754. position: "right",
  2755. show: true,
  2756. fontSize: "30",
  2757. color: "#fff",
  2758. },
  2759. },
  2760. itemStyle: {
  2761. normal: {
  2762. color: "#ffc809",
  2763. shadowBlur: 50,
  2764. shadowColor: "#ffc809",
  2765. },
  2766. emphasis: {
  2767. color: '#58F7DF',
  2768. shadowBlur: 50,
  2769. shadowColor: '#58F7DF',
  2770. },
  2771. },
  2772. zlevel: 99
  2773. },
  2774. {
  2775. type: 'effectScatter',
  2776. colorBy: 'data',
  2777. coordinateSystem: 'geo',
  2778. data: [
  2779. {
  2780. "name": "太原市",
  2781. "value": [
  2782. 112.53,
  2783. 37.87,
  2784. 25167
  2785. ]
  2786. }
  2787. ],
  2788. symbolSize: function (val) {
  2789. return Math.max(val[2] / 500, 8);
  2790. },
  2791. showEffectOn: "emphasis",
  2792. rippleEffect: {
  2793. brushType: "stroke",
  2794. color:'#DF62F2'
  2795. },
  2796. hoverAnimation: true,
  2797. label: {
  2798. normal: {
  2799. formatter: "{b}",
  2800. position: "right",
  2801. show: true,
  2802. fontSize: "30",
  2803. color: "#fff",
  2804. },
  2805. },
  2806. itemStyle: {
  2807. normal: {
  2808. color: "#ffc809",
  2809. shadowBlur: 50,
  2810. shadowColor: "#ffc809",
  2811. },
  2812. emphasis: {
  2813. color: '#DF62F2',
  2814. shadowBlur: 50,
  2815. shadowColor: '#DF62F2',
  2816. },
  2817. },
  2818. zlevel: 999
  2819. }
  2820. ]
  2821. };
  2822. var categoryData = [];
  2823. var barData = [];
  2824. var sum = 0;
  2825. for (var i = 0; i < data.length; i++) {
  2826. categoryData.push(data[i].name);
  2827. barData.push(data[i].value);
  2828. sum += data[i].value;
  2829. }
  2830. // this.shanxiMap.on('click', function (params) {
  2831. // if (params.name == '山西') {
  2832. // that.shanxiMap.dispose()
  2833. // that.centerShow = true
  2834. // setTimeout(() => {
  2835. // })
  2836. // }
  2837. // })
  2838. tools.loopShowTooltip(this.shanxiMap, option, {
  2839. interval: 2000,
  2840. loopSeries: false,
  2841. seriesIndex: 0
  2842. });
  2843. this.shanxiMap.setOption(option);
  2844. },
  2845. leftEcharts9Fun () {
  2846. let that = this;
  2847. this.leftEcharts9 = echarts.init(this.$refs["leftEcharts9"]);
  2848. // var ROOT_PATH = 'https://echarts.apache.org/examples';
  2849. let option = {
  2850. backgroundColor: '#00000000',
  2851. globe: {
  2852. globeRadius:65,
  2853. baseTexture: './img/3D/world1.jpg',
  2854. heightTexture: './img/3D/world1.jpg',
  2855. displacementScale: 0.04,
  2856. shading: 'realistic',
  2857. // environment: './img/3D/world2.jpg',
  2858. realisticMaterial: {
  2859. roughness: 0.9
  2860. },
  2861. postEffect: {
  2862. enable: true
  2863. },
  2864. light: {
  2865. main: {
  2866. intensity: 0,
  2867. shadow: true
  2868. },
  2869. }
  2870. }
  2871. };
  2872. that.leftEcharts9.setOption(option);
  2873. }
  2874. },
  2875. });