index.js 79 KB

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