index3MT.js 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399
  1. let barImg =
  2. 'data:image/png;base64,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'
  3. let app = new Vue({
  4. el: '#app',
  5. data () {
  6. return {
  7. start: 0,
  8. end: 9,
  9. touch: true,
  10. timeCommon: '',
  11. echartC1: {
  12. national: '',
  13. province: ''
  14. },
  15. echartC2: {
  16. national: '',
  17. province: ''
  18. },
  19. titleName: '',
  20. twinkle7: [],
  21. twinkle8: [],
  22. twinkleR6: [],
  23. showTip: false,
  24. tipNum: '',
  25. time: '',
  26. year: '2022',
  27. config1: {
  28. number: [100],
  29. content: '{nt}个',
  30. },
  31. centerData: '',
  32. storageRecordConfig: {
  33. header: ['', '公司名称', '工作情况'],
  34. headerBGC: '#05507b33',
  35. oddRowBGC: '#69c0ff0f',
  36. evenRowBGC: '',
  37. headerHeight: '50',
  38. rowNum: 4,
  39. align: ['center', 'center', 'center', 'center'],
  40. data: [],
  41. },
  42. storageRecordConfig2: {
  43. header: ['企业名称', '预警内容', '数据抓取日期', '累计未获取数据日期'],
  44. headerBGC: '#05507b33',
  45. oddRowBGC: '#05507b33',
  46. evenRowBGC: '',
  47. headerHeight: '50',
  48. rowNum: 4,
  49. align: ['center', 'center', 'center', 'center'],
  50. data: [],
  51. },
  52. companyList: companyList,
  53. companyListTitle: companyListTitle,
  54. commonOption: []
  55. }
  56. },
  57. beforeMount () {
  58. },
  59. mounted () {
  60. this.getUrlParams()
  61. this.time = formatDate()
  62. this.timer = setInterval(() => {
  63. this.time = formatDate()
  64. }, 1000)
  65. this.centerData = data
  66. },
  67. beforeDestroy () {
  68. clearInterval(this.timer);
  69. clearInterval(this.timeCommon);
  70. },
  71. methods: {
  72. handleGoIndex () {
  73. window.location.href = './index.html'
  74. },
  75. change () {
  76. if (this.end < this.companyList.length) {
  77. this.start += 9
  78. this.end += 9
  79. } else {
  80. this.start = 0
  81. this.end = 9
  82. }
  83. },
  84. judgeCarousel () {
  85. let a = {
  86. title: {
  87. text: 'xxx',
  88. x: 'center',
  89. y: '3%',
  90. textStyle: {
  91. color: '#69C0FF',
  92. fontSize: 24,
  93. },
  94. },
  95. tooltip: {
  96. trigger: 'axis',
  97. axisPointer: {
  98. type: 'shadow',
  99. },
  100. },
  101. grid: {
  102. top: '22%',
  103. right: '5%',
  104. left: '8%',
  105. bottom: '25%',
  106. },
  107. legend: {
  108. data: '',
  109. top: '12%',
  110. right: '5%',
  111. textStyle: {
  112. color: 'rgba(250,250,250,0.6)',
  113. fontSize: 16,
  114. },
  115. },
  116. xAxis: {
  117. // data: companyList.map(item => item.name),
  118. data: '',
  119. axisLine: {
  120. show: true, //隐藏X轴轴线
  121. lineStyle: {
  122. color: '#005094',
  123. width: 1,
  124. },
  125. },
  126. axisTick: {
  127. show: false, //隐藏X轴刻度
  128. },
  129. axisLabel: {
  130. show: true,
  131. rotate: 15,
  132. textStyle: {
  133. color: 'rgba(255,255,255,0.6)', //X轴文字颜色
  134. fontSize: 16,
  135. },
  136. },
  137. },
  138. yAxis: [
  139. {
  140. type: 'value',
  141. nameTextStyle: {
  142. color: '#ebf8ac',
  143. fontSize: 16,
  144. },
  145. splitLine: {
  146. show: true,
  147. lineStyle: {
  148. color: '#68b4dd66',
  149. type: 'dashed',
  150. },
  151. },
  152. axisLine: {
  153. show: false,
  154. },
  155. axisLabel: {
  156. show: true,
  157. textStyle: {
  158. color: 'rgba(250,250,250,0.6)',
  159. fontSize: 16,
  160. },
  161. },
  162. },
  163. ],
  164. }
  165. a.xAxis.data = this.companyList.map(item => item.name)
  166. if (this.companyList.length > 18) {
  167. a.dataZoom = [
  168. {
  169. // start: 9,//默认为@
  170. // end: 100,//黑认认为1@0
  171. type: "slider",
  172. show: false,
  173. // xAxisIndex: [0]
  174. handlesize: 0,//滑动条的 左右2个滑动条的大小
  175. startValue: 17,// 初始显示值
  176. endValue: 0,// 结束显示值
  177. height: 10,//组件高度
  178. left: "5%",
  179. right: "4%",//右边的距离
  180. bottom: "25%",//底边的距离
  181. borderColor: "#939",
  182. fillerColor: "#269cdb",
  183. borderRadius: 5,
  184. backgroundColor: "#33384b",//两边未选中的滑动条区域的额色
  185. showDataShadow: false,//是否显示数据阴影
  186. showDetail: false,//即拖拽时候是否显示详细数值信息
  187. truerealtime: true,//是否实时更新
  188. filterMode: "filter"
  189. }, {
  190. type: 'inside',
  191. show: true,
  192. start: 1,
  193. end: 100
  194. }
  195. ]
  196. }
  197. this.commonOption = a
  198. },
  199. generateEcharts(){
  200. // 左侧图表
  201. this.initChartL1()
  202. this.initChartL2()
  203. this.initChartL3()
  204. this.initChartL4()
  205. this.initChartL5()
  206. this.initChartL6()
  207. this.initChartL7()
  208. this.initChartL8()
  209. // 中间图表
  210. this.initChartC1()
  211. this.initChartC2()
  212. // 右侧图表
  213. this.initChartR1()
  214. this.initChartR2()
  215. this.initChartR3()
  216. this.initChartR4()
  217. this.initChartR5()
  218. this.initChartR6()
  219. this.initChartR7()
  220. this.initChartR8()
  221. },
  222. // 获取地址栏参数
  223. getUrlParams (id) {
  224. let url = window.location.href
  225. // 通过 ? 分割获取后面的参数字符串
  226. let urlStr = url.split('?')[1]
  227. // 创建空对象存储参数
  228. let obj = {};
  229. // 再通过 & 将每一个参数单独分割出来
  230. let paramsArr = urlStr.split('&')
  231. for (let i = 0, len = paramsArr.length; i < len; i++) {
  232. // 再通过 = 将每一个参数分割为 key:value 的形式
  233. let arr = paramsArr[i].split('=')
  234. obj[arr[0]] = arr[1];
  235. }
  236. this.access_token = obj.access_token
  237. this.orgNumber = obj.id
  238. this.titleName = decodeURIComponent(obj.name)
  239. // Promise.all([this.getData(), this.getInstitutional()])
  240. // .then((arr) => {
  241. // this.generateEcharts()
  242. // })
  243. // .catch((err) => console.log(err));
  244. this.getInstitutional()
  245. },
  246. // 获取组织机构
  247. getInstitutional () {
  248. return new Promise((resolve, err) => {
  249. let value = {
  250. access_token: this.access_token,
  251. "Data": {
  252. "paramType": "ORG",
  253. "orgNumber": this.orgNumber
  254. // "orgNumber": '1494979736584079360'
  255. }
  256. }
  257. post('/ierp/kapi/v2/mdnb/mdnb_das/Data/CockpitScreen', value).then(res => {
  258. this.companyList = res.data.map(item => {
  259. return { name: item.orgName, id: item.orgNumber }
  260. })
  261. this.getData()
  262. this.judgeCarousel()
  263. resolve(1);
  264. })
  265. });
  266. },
  267. getData () {
  268. return new Promise((resolve, err) => {
  269. let value = {
  270. access_token: this.access_token,
  271. "Data": {
  272. "paramType": "DATA",
  273. "orgNumber": this.orgNumber
  274. }
  275. }
  276. post('/ierp/kapi/v2/mdnb/mdnb_das/Data/CockpitScreen', value).then(res => {
  277. res.orgData = res.data[0]
  278. // 定机构
  279. // 弹窗
  280. // return
  281. // 左侧图表
  282. tipData.analysis[0] = res.orgData.area1.intAnalysis.map(item => item.analysis)
  283. //各二级企业本部机构数
  284. dataL1[0] = []
  285. dataL1[1] = []
  286. dataL1[2] = []
  287. res.orgData.area1.card1.forEach(item => {
  288. dataL1[0].push(item['ZBPZ0010'])
  289. dataL1[1].push(item['ZBPZ0088'])
  290. dataL1[2].push(item['ZBPZ0089'])
  291. })
  292. // 各二级企业所属架构数
  293. dataL2[0] = []
  294. res.orgData.area1.card2.forEach(item => {
  295. dataL2[0].push(item['ZBPZ0090'])
  296. })
  297. // 定职数
  298. // 弹窗
  299. // 左侧图表
  300. tipData.analysis[2] = res.orgData.area2.intAnalysis.map(item => item.analysis)
  301. //各二级企业本部中层管理人数
  302. dataL3[0] = []
  303. dataL3[1] = []
  304. res.orgData.area2.card1.forEach(item => {
  305. dataL3[0].push(item['ZBPZ0031'])
  306. dataL3[1].push(item['ZBPZ0049'])
  307. })
  308. // 各二级企业管理人员数
  309. dataL4[1] = []
  310. dataL4[0] = []
  311. dataL4[2] = []
  312. res.orgData.area2.card2.forEach(item => {
  313. dataL4[1].push(item['ZBPZ0091'])
  314. dataL4[0].push(item['ZBPZ0093'])
  315. dataL4[2].push(item['ZBPZ0092'])
  316. })
  317. // 定员额
  318. // 弹窗
  319. tipData.analysis[1] = res.orgData.area3.intAnalysis.map(item => item.analysis)
  320. // 各二级企业总人数
  321. dataL5[0] = []
  322. dataL5[1] = []
  323. res.orgData.area3.card1.forEach(item => {
  324. dataL5[0].push(item['ZBPZ0006'])
  325. dataL5[1].push(item['ZBPZ0050'])
  326. })
  327. // 各二级企业本部员额数
  328. dataL6[0] = []
  329. dataL6[2] = []
  330. dataL6[1] = []
  331. res.orgData.area3.card2.forEach(item => {
  332. dataL6[0].push(item['ZBPZ0031'])
  333. dataL6[2].push(item['ZBPZ0094'])
  334. dataL6[1].push(item['ZBPZ0095'])
  335. })
  336. // 人数变化和全员劳动生产率变化率分析
  337. dataL7[0] = []
  338. dataL7[1] = []
  339. res.orgData.area3.card3.forEach(item => {
  340. dataL7[0].push(item['ZBPZ0050'])
  341. dataL7[1].push(item['ZBPZ0039'])
  342. })
  343. // 人数变化和人工利润率变化分析
  344. dataL8[0] = []
  345. dataL8[1] = []
  346. res.orgData.area3.card4.forEach(item => {
  347. dataL8[0].push(item['ZBPZ0050'])
  348. dataL8[1].push(item['ZBPZ0041'])
  349. })
  350. // 定机制
  351. // 弹窗
  352. tipData.analysis[6] = res.orgData.area4.intAnalysis.map(item => item.analysis)
  353. // 各二级企业招聘需求公告人次情况
  354. dataR1[0] = []
  355. dataR1[1] = []
  356. res.orgData.area4.card1.forEach(item => {
  357. dataR1[0].push(item['ZBPZ0057'])
  358. dataR1[1].push(item['ZBPZ0058'])
  359. })
  360. // 各二级企业录用结果公示人次
  361. dataR2[0] = []
  362. dataR2[1] = []
  363. res.orgData.area4.card2.forEach(item => {
  364. dataR2[0].push(item['ZBPZ0059'])
  365. dataR2[1].push(item['ZBPZ0060'])
  366. })
  367. // 各二级企业年利润与招聘情况分析
  368. dataR3[0] = []
  369. dataR3[1] = []
  370. res.orgData.area4.card3.forEach(item => {
  371. dataR3[0].push(item['ZBPZ0054'])
  372. dataR3[1].push(item['ZBPZ0055'])
  373. })
  374. // 各二级企业"退二进一"完成情况
  375. dataR4[0] = []
  376. dataR4[1] = []
  377. res.orgData.area4.card4.forEach(item => {
  378. dataR4[0].push(item['ZBPZ0056'])
  379. dataR4[1].push(item['ZBPZ0055'])
  380. })
  381. // 定薪酬
  382. // 弹窗
  383. tipData.analysis[5] = res.orgData.area5.intAnalysis.map(item => item.analysis)
  384. // 各二级企业在岗职工平均薪酬
  385. dataR5[0] = []
  386. dataR5[1] = []
  387. res.orgData.area5.card1.forEach(item => {
  388. dataR5[0].push(item['ZBPZ0063'])
  389. dataR5[1].push(item['ZBPZ0064'])
  390. })
  391. // 各二级企业利润与薪酬变动情况
  392. dataR6[0] = []
  393. dataR6[1] = []
  394. res.orgData.area5.card2.forEach(item => {
  395. dataR6[0].push(item['ZBPZ0061'])
  396. dataR6[1].push(item['ZBPZ0062'])
  397. })
  398. // 定任期
  399. // 弹窗
  400. tipData.analysis[6] = res.orgData.area6.intAnalysis.map(item => item.analysis)
  401. // 各二级企业全员绩效考核
  402. dataR7[0] = []
  403. res.orgData.area6.card1.forEach(item => {
  404. dataR7[0].push(item['ZBPZ0066'])
  405. })
  406. // 各二级企业任期制契约化考核完成率
  407. dataR8[0] = []
  408. res.orgData.area6.card2.forEach(item => {
  409. dataR8[0].push(item['ZBPZ0065'])
  410. })
  411. // 中间
  412. // 架岗人员
  413. this.centerData.info.value1 = res.orgData.area7.ZBPZ0037
  414. this.centerData.info.value2 = res.orgData.area7.ZBPZ0038
  415. this.centerData.info.value3 = res.orgData.area7.ZBPZ0006
  416. // 六定改革成效
  417. this.centerData.changeInfo[0].value1 = res.orgData.area8.ZBPZ0067
  418. this.centerData.changeInfo[0].value2 = res.orgData.area8.ZBPZ0068
  419. this.centerData.changeInfo[0].value3 = res.orgData.area8.ZBPZ0069
  420. this.centerData.changeInfo[2].value1 = res.orgData.area8.ZBPZ0074
  421. this.centerData.changeInfo[2].value2 = res.orgData.area8.ZBPZ0075
  422. this.centerData.changeInfo[2].value3 = res.orgData.area8.ZBPZ0076
  423. this.centerData.changeInfo[1].value1 = res.orgData.area8.ZBPZ0071
  424. this.centerData.changeInfo[1].value2 = res.orgData.area8.ZBPZ0072
  425. this.centerData.changeInfo[1].value3 = res.orgData.area8.ZBPZ0073
  426. // 核心指标监测
  427. // 弹窗
  428. tipData.analysis[3] = res.orgData.area9.intAnalysis.map(item => item.analysis)
  429. // 各二级企业全员劳动生产率
  430. dataC1[0] = []
  431. dataC1[1] = []
  432. res.orgData.area9.card1.forEach(item => {
  433. dataC1[0].push(item['ZBPZ0035'])
  434. dataC1[1].push(item['ZBPZ0039'])
  435. })
  436. // 各二级企业人工成本利润率
  437. dataC2[1] = []
  438. dataC2[0] = []
  439. res.orgData.area9.card2.forEach(item => {
  440. dataC2[1].push(item['ZBPZ0040'])
  441. dataC2[0].push(item['ZBPZ0041'])
  442. })
  443. // 分析预警中心
  444. // 工作台分析
  445. this.storageRecordConfig.data = []
  446. res.orgData.area10.card1.forEach(item => {
  447. this.storageRecordConfig.data.push(['<span class="lightOut"><span class="light ' + (item.lightsup === '0' ? 'red' : item.lightsup === '1' ? 'yellow' : 'green') + '"></span></span>', item.enterprise, item.work])
  448. })
  449. this.storageRecordConfig = { ...this.storageRecordConfig }
  450. // 数据库预警
  451. // this.storageRecordConfig2.data = []
  452. // res.orgData.area10.card2.forEach(item => {
  453. // this.storageRecordConfig.data.push(['<span class="lightOut"><span class="light ' + (item.lightsup === '0' ? 'red' : item.lightsup === '1' ? 'yellow' : 'green') + '"></span></span>', item.warning, item.date])
  454. // })
  455. // 数据整理
  456. dataL7[0].forEach((item, index) => {
  457. if (dataL7[1][index] < 0 && dataL7[0][index] > 0) {
  458. let obj = { value: [this.companyList[index].name, dataL7[0][index]], symbolSize: 15 }
  459. this.twinkle7.push(obj)
  460. }
  461. })
  462. // if (dataL8[1][params.dataIndex] < 0 && params.value > 0) {
  463. dataL8[0].forEach((item, index) => {
  464. if (dataL8[1][index] < 0 && dataL8[0][index] > 0) {
  465. let obj = { value: [this.companyList[index].name, dataL8[0][index]], symbolSize: 15 }
  466. this.twinkle8.push(obj)
  467. }
  468. })
  469. // params.value > 0 && fjxdataL2[0][params.dataIndex] < 0
  470. // fjxdataL2[0].forEach((item, index) => {
  471. // if (fjxdataL2[1][index] > 0 && fjxdataL2[0][index] < 0) {
  472. // let obj = { value: [this.companyList[index].name, fjxdataL2[1][index]], symbolSize: 15 }
  473. // this.twinkleR6.push(obj)
  474. // }
  475. // })
  476. this.generateEcharts()
  477. if (this.companyList.length > 18) {
  478. this.timeCommon = setInterval(() => {
  479. if (that.touch) {
  480. if (that.commonOption.dataZoom[0].startValue < that.companyList.length) {
  481. that.commonOption.dataZoom[0].endValue += 18
  482. that.commonOption.dataZoom[0].startValue += 18
  483. } else {
  484. that.commonOption.dataZoom[0].endValue = 0
  485. that.commonOption.dataZoom[0].startValue = 18
  486. }
  487. that.generateEcharts()
  488. }
  489. }, 15000)
  490. }
  491. resolve(1)
  492. })
  493. });
  494. },
  495. handleShowTip (index) {
  496. this.showTip = true
  497. this.tipNum = index
  498. },
  499. handleGoPage (id, name) {
  500. window.location.href = './index4.html?id=' + id + `&access_token=${this.access_token}` + `&name=${name}`
  501. },
  502. handleGoBack () {
  503. window.history.go(-1)
  504. },
  505. numFormat (value) {
  506. if (!value) return '0'
  507. // var intPart = Number(value).toFixed(0) // 获取整数部分
  508. var intPart = parseInt(value)// 获取整数部分
  509. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
  510. var floatPart = '.00' // 预定义小数部分
  511. var value2Array = value.toString().split('.')
  512. // =2表示数据有小数位
  513. if (value2Array.length === 2) {
  514. floatPart = value2Array[1].toString() // 拿到小数部分
  515. if (floatPart.length === 1) {
  516. // 补0
  517. return intPartFormat + '.' + floatPart + '0'
  518. } else {
  519. return intPartFormat + '.' + floatPart
  520. }
  521. } else {
  522. return intPartFormat
  523. }
  524. },
  525. initChartL1 () {
  526. let myChart = echarts.init(this.$refs['echartL1'])
  527. let option = {
  528. ..._.cloneDeep(this.commonOption),
  529. color: [
  530. {
  531. x: 0,
  532. y: 0,
  533. x2: 0,
  534. y2: 1,
  535. colorStops: [{
  536. offset: 0,
  537. color: '#5e7ae9',
  538. },
  539. {
  540. offset: 1,
  541. color: '#082550',
  542. },],
  543. }
  544. ],
  545. series: [
  546. {
  547. name: '各三级企业本部机构数核定上限',
  548. type: 'line',
  549. // yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  550. smooth: true, //平滑曲线显示
  551. showAllSymbol: true, //显示所有图形。
  552. symbol: 'circle', //标记的图形为实心圆
  553. symbolSize: 8, //标记的大小
  554. smooth: false,
  555. itemStyle: {
  556. //折线拐点标志的样式
  557. color: '#fbe138',
  558. borderColor: '#fbe138',
  559. width: 2,
  560. shadowColor: '#fbe138',
  561. shadowBlur: 4,
  562. },
  563. lineStyle: {
  564. color: '#fbe138',
  565. width: 2,
  566. },
  567. data: dataL1[2],
  568. },
  569. {
  570. name: '六定改革前各三级企业本部机构数',
  571. type: 'bar',
  572. barWidth: 15,
  573. itemStyle: {
  574. normal: {
  575. color: params => {
  576. if (params.value > dataL1[2][params.dataIndex]) {
  577. return 'yellow'
  578. } else {
  579. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  580. {
  581. offset: 0,
  582. color: '#5e7ae9',
  583. },
  584. {
  585. offset: 1,
  586. color: '#082550',
  587. },
  588. ])
  589. }
  590. },
  591. },
  592. },
  593. data: dataL1[0],
  594. },
  595. {
  596. name: '当前各三级企业本部机构数',
  597. type: 'bar',
  598. barWidth: 15,
  599. itemStyle: {
  600. color: params => {
  601. if (params.value > 0 && dataL1[2][params.dataIndex]) {
  602. return 'red'
  603. } else {
  604. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  605. {
  606. offset: 0,
  607. color: '#69c0ff',
  608. },
  609. {
  610. offset: 1,
  611. color: '#082550',
  612. },
  613. ])
  614. }
  615. },
  616. },
  617. data: dataL1[1],
  618. },
  619. ],
  620. }
  621. option.title.text = '本部机构数'
  622. option.legend.data = ['六定改革前各三级企业本部机构数', '当前各三级企业本部机构数', '各三级企业本部机构数核定上限']
  623. option.yAxis.push({
  624. splitLine: {
  625. show: false,
  626. },
  627. axisLine: {
  628. show: false,
  629. },
  630. })
  631. myChart.setOption(option)
  632. },
  633. initChartL2 () {
  634. let myChart = echarts.init(this.$refs['echartL2'])
  635. let option = {
  636. ..._.cloneDeep(this.commonOption),
  637. color: [
  638. {
  639. x: 0,
  640. y: 0,
  641. x2: 0,
  642. y2: 1,
  643. colorStops: [{
  644. offset: 0,
  645. color: '#69c0ff',
  646. },
  647. {
  648. offset: 1,
  649. color: '#082550',
  650. },],
  651. }
  652. ],
  653. series: [
  654. {
  655. name: '当前各三级企业所属架构数',
  656. type: 'bar',
  657. barWidth: 15,
  658. itemStyle: {
  659. normal: {
  660. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  661. {
  662. offset: 0,
  663. color: '#69c0ff',
  664. },
  665. {
  666. offset: 1,
  667. color: '#082550',
  668. },
  669. ]),
  670. },
  671. },
  672. data: dataL2[0]
  673. }
  674. ],
  675. }
  676. option.title.text = '各三级企业所属架构数'
  677. option.legend.data = ['当前各三级企业所属架构数']
  678. option.yAxis.push({
  679. splitLine: {
  680. show: false,
  681. },
  682. axisLine: {
  683. show: false,
  684. },
  685. })
  686. myChart.setOption(option)
  687. },
  688. initChartL3 () {
  689. let myChart = echarts.init(this.$refs['echartL3'])
  690. let option = {
  691. ..._.cloneDeep(this.commonOption),
  692. series: [
  693. {
  694. name: '当前各三级管理人员数',
  695. type: 'bar',
  696. barWidth: 15,
  697. itemStyle: {
  698. normal: {
  699. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  700. {
  701. offset: 0,
  702. color: '#5e7ae9',
  703. },
  704. {
  705. offset: 1,
  706. color: '#082550',
  707. },
  708. ]),
  709. },
  710. },
  711. data: dataL3[0],
  712. },
  713. {
  714. name: '各三级管理人员数占总人数比值',
  715. type: 'line',
  716. yAxisIndex: 1,
  717. smooth: true, //平滑曲线显示
  718. showAllSymbol: true, //显示所有图形。
  719. symbol: 'circle', //标记的图形为实心圆
  720. symbolSize: 8, //标记的大小
  721. smooth: false,
  722. itemStyle: {
  723. //折线拐点标志的样式
  724. color: '#fbe138',
  725. borderColor: '#fbe138',
  726. width: 2,
  727. shadowColor: '#fbe138',
  728. shadowBlur: 4,
  729. },
  730. lineStyle: {
  731. color: '#fbe138',
  732. width: 2,
  733. },
  734. markLine: {
  735. data: [
  736. {
  737. name: '管理人员数占总人数的合理比值线',
  738. yAxis: 15,
  739. lineStyle: {
  740. color: '#fff',
  741. },
  742. label: {
  743. formatter: '{b}',
  744. position: 'middle',
  745. color: '#fff',
  746. fontSize: 16,
  747. },
  748. },
  749. ],
  750. label: {
  751. distance: [20, 8],
  752. },
  753. },
  754. data: dataL3[1],
  755. },
  756. ],
  757. }
  758. option.title.text = '各三级企业管理人员数'
  759. option.legend.data = ['当前各三级管理人员数', '各三级管理人员数占总人数比值']
  760. option.yAxis[0] = {
  761. type: 'log',
  762. min: 1,
  763. logBase: 10,
  764. axisLine: {
  765. show: false,
  766. },
  767. splitLine: {
  768. show: true,
  769. lineStyle: {
  770. color: '#68b4dd66',
  771. type: 'dashed',
  772. },
  773. },
  774. axisLabel: {
  775. show: true,
  776. formatter: function (value) {
  777. return value === 1 ? 0 : value
  778. },
  779. textStyle: {
  780. color: 'rgba(250,250,250,0.6)',
  781. },
  782. },
  783. }
  784. option.yAxis.push({
  785. type: 'value',
  786. axisLine: {
  787. show: false,
  788. },
  789. splitLine: {
  790. show: false,
  791. },
  792. axisLabel: {
  793. show: true,
  794. formatter: '{value} %',
  795. textStyle: {
  796. color: 'rgba(250,250,250,0.6)',
  797. },
  798. },
  799. })
  800. option.tooltip.formatter = '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  801. myChart.setOption(option)
  802. },
  803. initChartL4 () {
  804. let myChart = echarts.init(this.$refs['echartL4'])
  805. let option = {
  806. ..._.cloneDeep(this.commonOption),
  807. color: [
  808. {
  809. x: 0,
  810. y: 0,
  811. x2: 0,
  812. y2: 1,
  813. colorStops: [{
  814. offset: 0,
  815. color: '#6480f3',
  816. },
  817. {
  818. offset: 1,
  819. color: '#082550',
  820. },],
  821. }
  822. ],
  823. series: [
  824. {
  825. name: '六定改革前各三级本部中层管理人数',
  826. type: 'bar',
  827. barWidth: 15,
  828. label: {
  829. normal: {
  830. show: true,
  831. position: 'top',
  832. textStyle: {
  833. color: '#69c0ff',
  834. fontStyle: 'normal',
  835. textAlign: 'left',
  836. fontSize: 16,
  837. },
  838. formatter: function (data) {
  839. if (data.name == '云时代') {
  840. return data.value
  841. } else {
  842. return ''
  843. }
  844. }
  845. }
  846. },
  847. itemStyle: {
  848. normal: {
  849. color: params => {
  850. if (params.value > dataL4[2][params.dataIndex] || params.value > dataL4[0][params.dataIndex]) {
  851. return 'red'
  852. } else {
  853. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  854. {
  855. offset: 0,
  856. color: '#6480f3',
  857. },
  858. {
  859. offset: 1,
  860. color: '#082550',
  861. },
  862. ])
  863. }
  864. },
  865. },
  866. },
  867. data: dataL4[0],
  868. },
  869. {
  870. name: '当前各三级本部中层管理人数',
  871. type: 'bar',
  872. barWidth: 15,
  873. label: {
  874. normal: {
  875. show: true,
  876. position: 'top',
  877. textStyle: {
  878. color: '#6480f3',
  879. fontStyle: 'normal',
  880. textAlign: 'left',
  881. fontSize: 16,
  882. },
  883. formatter: function (data) {
  884. if (data.name == '云时代') {
  885. return data.value
  886. } else {
  887. return ''
  888. }
  889. }
  890. }
  891. },
  892. itemStyle: {
  893. normal: {
  894. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  895. {
  896. offset: 0,
  897. color: '#43ede3',
  898. },
  899. {
  900. offset: 1,
  901. color: '#082550',
  902. },
  903. ]),
  904. },
  905. },
  906. data: dataL4[1],
  907. },
  908. {
  909. name: '各三级本部中层管理人数核定上限',
  910. type: 'line',
  911. // yAxisIndex: 1,
  912. smooth: true, //平滑曲线显示
  913. showAllSymbol: true, //显示所有图形。
  914. symbol: 'circle', //标记的图形为实心圆
  915. symbolSize: 8, //标记的大小
  916. smooth: false,
  917. label: {
  918. normal: {
  919. show: true,
  920. position: 'top',
  921. textStyle: {
  922. color: '#fbe138',
  923. fontStyle: 'normal',
  924. textAlign: 'left',
  925. fontSize: 16,
  926. },
  927. formatter: function (data) {
  928. if (data.name == '云时代') {
  929. return data.value
  930. } else {
  931. return ''
  932. }
  933. }
  934. }
  935. },
  936. itemStyle: {
  937. //折线拐点标志的样式
  938. color: '#fbe138',
  939. borderColor: '#fbe138',
  940. width: 2,
  941. shadowColor: '#fbe138',
  942. shadowBlur: 4,
  943. },
  944. lineStyle: {
  945. color: '#fbe138',
  946. width: 2,
  947. },
  948. data: dataL4[2],
  949. },
  950. ],
  951. }
  952. option.title.text = '各三级企业本部中层管理人数'
  953. option.legend.data = ['六定改革前各三级本部中层管理人数', '当前各三级本部中层管理人数', '各三级本部中层管理人数核定上限']
  954. option.legend.show = true
  955. // option.yAxis.push({
  956. // splitLine: {
  957. // show: false,
  958. // },
  959. // axisLine: {
  960. // show: false,
  961. // },
  962. // })
  963. myChart.setOption(option)
  964. },
  965. initChartL5 () {
  966. let myChart = echarts.init(this.$refs['echartL5'])
  967. let option = {
  968. ..._.cloneDeep(this.commonOption),
  969. color: [
  970. {
  971. x: 0,
  972. y: 0,
  973. x2: 0,
  974. y2: 1,
  975. colorStops: [{
  976. offset: 0,
  977. color: '#69c0ff',
  978. },
  979. {
  980. offset: 1,
  981. color: '#082550',
  982. },],
  983. }
  984. ],
  985. series: [
  986. {
  987. name: '各三级企业总人数',
  988. type: 'bar',
  989. barWidth: 15,
  990. itemStyle: {
  991. normal: {
  992. color: params => {
  993. if (params.dataIndex > 0 && Math.abs(params.value - dataL5[0][params.dataIndex - 1]) > params.value * 0.1) {
  994. return 'yellow'
  995. } else {
  996. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  997. {
  998. offset: 0,
  999. color: '#69c0ff',
  1000. },
  1001. {
  1002. offset: 1,
  1003. color: '#082550',
  1004. },
  1005. ])
  1006. }
  1007. }
  1008. },
  1009. },
  1010. data: dataL5[0],
  1011. },
  1012. {
  1013. name: '人数变化率',
  1014. type: 'line',
  1015. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1016. smooth: true, //平滑曲线显示
  1017. showAllSymbol: true, //显示所有图形。
  1018. symbol: 'circle', //标记的图形为实心圆
  1019. symbolSize: 8, //标记的大小
  1020. smooth: false,
  1021. itemStyle: {
  1022. //折线拐点标志的样式
  1023. color: '#b889ea',
  1024. borderColor: '#b889ea',
  1025. width: 2,
  1026. shadowColor: '#b889ea',
  1027. shadowBlur: 4,
  1028. },
  1029. lineStyle: {
  1030. color: '#b889ea',
  1031. width: 2,
  1032. },
  1033. data: dataL5[1],
  1034. },
  1035. ],
  1036. }
  1037. option.title.text = '各三级企业总人数'
  1038. option.legend.data = ['各三级企业总人数', '人数变化率']
  1039. option.legend.show = true
  1040. option.tooltip = {
  1041. trigger: 'axis',
  1042. formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  1043. }
  1044. option.yAxis.push({
  1045. type: 'value',
  1046. axisLine: {
  1047. show: false,
  1048. },
  1049. splitLine: {
  1050. show: false,
  1051. },
  1052. axisLabel: {
  1053. show: true,
  1054. formatter: '{value} %',
  1055. textStyle: {
  1056. color: 'rgba(250,250,250,0.6)',
  1057. },
  1058. },
  1059. })
  1060. myChart.setOption(option)
  1061. },
  1062. initChartL6 () {
  1063. let myChart = echarts.init(this.$refs['echartL6'])
  1064. let option = {
  1065. ..._.cloneDeep(this.commonOption),
  1066. color: [
  1067. {
  1068. x: 0,
  1069. y: 0,
  1070. x2: 0,
  1071. y2: 1,
  1072. colorStops: [{
  1073. offset: 0,
  1074. color: '#43ede3',
  1075. },
  1076. {
  1077. offset: 1,
  1078. color: '#082550',
  1079. },],
  1080. }
  1081. ],
  1082. series: [
  1083. {
  1084. name: '各三级本部员额数',
  1085. type: 'bar',
  1086. barWidth: 15,
  1087. itemStyle: {
  1088. color: params => {
  1089. if (params.value > dataL6[1][params.dataIndex]) {
  1090. return 'red'
  1091. } else {
  1092. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1093. {
  1094. offset: 0,
  1095. color: '#43ede3',
  1096. },
  1097. {
  1098. offset: 1,
  1099. color: '#082550',
  1100. },
  1101. ])
  1102. }
  1103. },
  1104. },
  1105. data: dataL6[0],
  1106. },
  1107. {
  1108. name: '六定改革前各三级本部员额数',
  1109. type: 'bar',
  1110. barWidth: 15,
  1111. itemStyle: {
  1112. normal: {
  1113. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1114. {
  1115. offset: 0,
  1116. color: '#5e7ae9',
  1117. },
  1118. {
  1119. offset: 1,
  1120. color: '#082550',
  1121. },
  1122. ]),
  1123. },
  1124. },
  1125. data: dataL6[2],
  1126. },
  1127. {
  1128. name: '各三级本部员额数核定上限',
  1129. type: 'line',
  1130. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1131. smooth: true, //平滑曲线显示
  1132. showAllSymbol: true, //显示所有图形。
  1133. symbol: 'circle', //标记的图形为实心圆
  1134. symbolSize: 8, //标记的大小
  1135. smooth: false,
  1136. itemStyle: {
  1137. //折线拐点标志的样式
  1138. color: '#fbe138',
  1139. borderColor: '#fbe138',
  1140. width: 2,
  1141. shadowColor: '#fbe138',
  1142. shadowBlur: 4,
  1143. },
  1144. lineStyle: {
  1145. color: '#fbe138',
  1146. width: 2,
  1147. },
  1148. data: dataL6[1],
  1149. },
  1150. ],
  1151. }
  1152. option.title.text = '各三级企业本部员额数'
  1153. option.legend.data = ['各三级本部员额数', '六定改革前各三级本部员额数', '各三级本部员额数核定上限']
  1154. option.legend.show = true
  1155. option.yAxis.push({
  1156. splitLine: {
  1157. show: false,
  1158. },
  1159. axisLine: {
  1160. show: false,
  1161. },
  1162. })
  1163. myChart.setOption(option)
  1164. },
  1165. initChartL7 () {
  1166. let myChart = echarts.init(this.$refs['echartL7'])
  1167. let option = {
  1168. ..._.cloneDeep(this.commonOption),
  1169. color: ['#43ede3'],
  1170. series: [
  1171. {
  1172. name: '人数变化',
  1173. type: 'line',
  1174. barWidth: 15,
  1175. showAllSymbol: true, //显示所有图形。
  1176. symbol: 'circle', //标记的图形为实心圆
  1177. symbolSize: 15, //标记的大小
  1178. smooth: false,
  1179. itemStyle: {
  1180. color: params => {
  1181. if (dataL7[1][params.dataIndex] < 0 && params.value > 0) {
  1182. return 'red'
  1183. } else if (params.value < 0 && dataL7[1][params.dataIndex] > 0) {
  1184. return 'green'
  1185. }
  1186. else {
  1187. return '#43ede3'
  1188. }
  1189. },
  1190. },
  1191. // markLine: {
  1192. // data: [{ type: 'average', name: 'Avg' }],
  1193. // },
  1194. data: dataL7[0],
  1195. },
  1196. {
  1197. name: '劳动生产率同比变化',
  1198. type: 'line',
  1199. barWidth: 15,
  1200. // yAxisIndex: 1,
  1201. showAllSymbol: true, //显示所有图形。
  1202. symbol: 'circle', //标记的图形为实心圆
  1203. symbolSize: 15, //标记的大小
  1204. smooth: false,
  1205. itemStyle: {
  1206. //折线拐点标志的样式
  1207. color: '#b889ea',
  1208. borderColor: '#b889ea',
  1209. width: 2,
  1210. shadowColor: '#b889ea',
  1211. shadowBlur: 4,
  1212. },
  1213. data: dataL7[1],
  1214. },
  1215. {
  1216. type: 'effectScatter',
  1217. coordinateSystem: 'cartesian2d',
  1218. showEffectOn: 'render',
  1219. rippleEffect: {
  1220. period: 10,
  1221. scale: 4,
  1222. brushType: 'stroke'
  1223. },
  1224. hoverAnimation: true,
  1225. itemStyle: {
  1226. color: 'red'
  1227. },
  1228. lineStyle: {
  1229. color: '#43ede3',
  1230. width: 2,
  1231. },
  1232. data: this.twinkle7,
  1233. },
  1234. ],
  1235. }
  1236. option.title.text = '人数变化和全员劳动生产率变化分析'
  1237. option.legend.data = ['人数变化', '劳动生产率同比变化']
  1238. option.legend.show = true
  1239. option.tooltip = {
  1240. trigger: 'axis',
  1241. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  1242. }
  1243. option.yAxis = [
  1244. {
  1245. type: 'value',
  1246. axisLine: {
  1247. show: false,
  1248. },
  1249. splitLine: {
  1250. show: true,
  1251. lineStyle: {
  1252. color: '#68b4dd66',
  1253. type: 'dashed',
  1254. },
  1255. },
  1256. axisLabel: {
  1257. show: true,
  1258. formatter: '{value} %',
  1259. textStyle: {
  1260. color: 'rgba(250,250,250,0.6)',
  1261. },
  1262. },
  1263. },
  1264. {
  1265. type: 'value',
  1266. axisLine: {
  1267. show: false,
  1268. },
  1269. splitLine: {
  1270. show: false,
  1271. },
  1272. axisLabel: {
  1273. show: true,
  1274. formatter: '{value} %',
  1275. textStyle: {
  1276. color: 'rgba(250,250,250,0.6)',
  1277. },
  1278. },
  1279. }
  1280. ]
  1281. myChart.setOption(option)
  1282. },
  1283. initChartL8 () {
  1284. let myChart = echarts.init(this.$refs['echartL8'])
  1285. let option = {
  1286. ..._.cloneDeep(this.commonOption),
  1287. color: ['#43ede3'],
  1288. series: [
  1289. {
  1290. name: '人数变化',
  1291. type: 'line',
  1292. barWidth: 15,
  1293. showAllSymbol: true, //显示所有图形。
  1294. symbol: 'circle', //标记的图形为实心圆
  1295. symbolSize: 15, //标记的大小
  1296. smooth: false,
  1297. itemStyle: {
  1298. color: params => {
  1299. if (dataL8[1][params.dataIndex] < 0 && params.value > 0) {
  1300. return 'red'
  1301. } else if (params.value < 0 && dataL8[1][params.dataIndex] > 0) {
  1302. return 'green'
  1303. }
  1304. else {
  1305. return '#43ede3'
  1306. }
  1307. },
  1308. },
  1309. lineStyle: {
  1310. color: '#43ede3',
  1311. width: 2,
  1312. },
  1313. // markLine: {
  1314. // data: [{ type: 'average', name: 'Avg' }],
  1315. // },
  1316. data: dataL8[0],
  1317. },
  1318. {
  1319. name: '人工成本利润率同比变化',
  1320. type: 'line',
  1321. barWidth: 15,
  1322. // yAxisIndex: 1,
  1323. showAllSymbol: true, //显示所有图形。
  1324. symbol: 'circle', //标记的图形为实心圆
  1325. symbolSize: 15, //标记的大小
  1326. smooth: false,
  1327. itemStyle: {
  1328. //折线拐点标志的样式
  1329. color: '#b889ea',
  1330. borderColor: '#b889ea',
  1331. width: 2,
  1332. shadowColor: '#b889ea',
  1333. shadowBlur: 4,
  1334. },
  1335. data: dataL8[1],
  1336. },
  1337. {
  1338. type: 'effectScatter',
  1339. coordinateSystem: 'cartesian2d',
  1340. showEffectOn: 'render',
  1341. rippleEffect: {
  1342. period: 10,
  1343. scale: 4,
  1344. brushType: 'stroke'
  1345. },
  1346. hoverAnimation: true,
  1347. itemStyle: {
  1348. color: 'red'
  1349. },
  1350. lineStyle: {
  1351. color: '#43ede3',
  1352. width: 2,
  1353. },
  1354. data: this.twinkle8,
  1355. },
  1356. ],
  1357. }
  1358. option.title.text = '人数变化和人工成本利润率变化分析'
  1359. option.legend.data = ['人数变化', '人工成本利润率同比变化']
  1360. option.legend.show = true
  1361. option.tooltip = {
  1362. trigger: 'axis',
  1363. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  1364. }
  1365. option.yAxis = [
  1366. {
  1367. type: 'value',
  1368. axisLine: {
  1369. show: false,
  1370. },
  1371. splitLine: {
  1372. show: true,
  1373. lineStyle: {
  1374. color: '#68b4dd66',
  1375. type: 'dashed',
  1376. },
  1377. },
  1378. axisLabel: {
  1379. show: true,
  1380. formatter: '{value} %',
  1381. textStyle: {
  1382. color: 'rgba(250,250,250,0.6)',
  1383. },
  1384. },
  1385. },
  1386. {
  1387. type: 'value',
  1388. axisLine: {
  1389. show: false,
  1390. },
  1391. splitLine: {
  1392. show: false,
  1393. },
  1394. axisLabel: {
  1395. show: true,
  1396. formatter: '{value} %',
  1397. textStyle: {
  1398. color: 'rgba(250,250,250,0.6)',
  1399. },
  1400. },
  1401. }
  1402. ]
  1403. myChart.setOption(option)
  1404. },
  1405. // 中间图表---------------------------------------------开始
  1406. initChartC1 () {
  1407. let myChart = echarts.init(this.$refs['echartC1'])
  1408. let option = {
  1409. ..._.cloneDeep(this.commonOption),
  1410. color: [
  1411. {
  1412. x: 0,
  1413. y: 0,
  1414. x2: 0,
  1415. y2: 1,
  1416. colorStops: [{
  1417. offset: 0,
  1418. color: '#69c0ff',
  1419. },
  1420. {
  1421. offset: 1,
  1422. color: '#082550',
  1423. },],
  1424. }
  1425. ],
  1426. series: [
  1427. {
  1428. name: '全员劳动生产率(万/人)',
  1429. type: 'bar',
  1430. barWidth: 12,
  1431. smooth: true, //平滑曲线显示
  1432. showAllSymbol: true, //显示所有图形。
  1433. symbol: 'circle', //标记的图形为实心圆
  1434. symbolSize: 8, //标记的大小
  1435. smooth: false,
  1436. itemStyle: {
  1437. color: params => {
  1438. if (params.value < 0 && dataC1[1][params.dataIndex] < 0) {
  1439. return 'red'
  1440. } else if (params.value > this.echartC1.province) {
  1441. return 'green'
  1442. } else {
  1443. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1444. {
  1445. offset: 0,
  1446. color: '#69c0ff',
  1447. },
  1448. {
  1449. offset: 1,
  1450. color: '#082550',
  1451. },
  1452. ])
  1453. }
  1454. },
  1455. },
  1456. lineStyle: {
  1457. color: '#B889EA',
  1458. width: 2,
  1459. },
  1460. data: dataC1[0],
  1461. markLine: {
  1462. data: [
  1463. {
  1464. name: '省属企业平均水平',
  1465. yAxis: this.echartC1.national,
  1466. lineStyle: {
  1467. color: '#fff',
  1468. },
  1469. label: {
  1470. formatter: '{b}',
  1471. position: 'end',
  1472. padding: [20, 100, 10, 30],
  1473. color: '#fff',
  1474. },
  1475. },
  1476. {
  1477. name: '央企平均水平',
  1478. yAxis: this.echartC1.province,
  1479. lineStyle: {
  1480. color: '#fff',
  1481. },
  1482. label: {
  1483. formatter: '{b}',
  1484. position: 'end',
  1485. padding: [-4, 150, 10, 30],
  1486. color: '#fff',
  1487. },
  1488. },
  1489. ],
  1490. label: {
  1491. distance: [20, 8],
  1492. },
  1493. },
  1494. },
  1495. {
  1496. name: '全员劳动生产率同比变化',
  1497. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1498. type: 'line',
  1499. itemStyle: {
  1500. normal: {
  1501. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1502. {
  1503. offset: 0,
  1504. color: '#69c0ff',
  1505. },
  1506. {
  1507. offset: 1,
  1508. color: '#082550',
  1509. },
  1510. ]),
  1511. },
  1512. },
  1513. data: dataC1[1],
  1514. },
  1515. ],
  1516. }
  1517. option.title.text = '各三级全员劳动生产率'
  1518. option.legend.data = ['全员劳动生产率(万/人)','全员劳动生产率同比变化']
  1519. option.legend.show = true
  1520. option.grid.right = '15%'
  1521. option.tooltip = {
  1522. trigger: 'axis',
  1523. formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
  1524. }
  1525. option.yAxis.push({
  1526. type: 'value',
  1527. axisLine: {
  1528. show: false,
  1529. },
  1530. splitLine: {
  1531. show: false,
  1532. },
  1533. axisLabel: {
  1534. show: true,
  1535. formatter: '{value} %',
  1536. textStyle: {
  1537. color: 'rgba(250,250,250,0.6)',
  1538. },
  1539. },
  1540. })
  1541. myChart.setOption(option)
  1542. tools.loopShowTooltip(myChart, option, {
  1543. nterval: 2000,
  1544. loopSeries: true,
  1545. });
  1546. },
  1547. initChartC2 () {
  1548. let myChart = echarts.init(this.$refs['echartC2'])
  1549. let option = {
  1550. ..._.cloneDeep(this.commonOption),
  1551. color: [
  1552. {
  1553. x: 0,
  1554. y: 0,
  1555. x2: 0,
  1556. y2: 1,
  1557. colorStops: [{
  1558. offset: 0,
  1559. color: '#69c0ff',
  1560. },
  1561. {
  1562. offset: 1,
  1563. color: '#082550',
  1564. },],
  1565. }
  1566. ],
  1567. series: [
  1568. {
  1569. name: '人工成本利润率同比变化',
  1570. type: 'line',
  1571. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1572. smooth: true, //平滑曲线显示
  1573. showAllSymbol: true, //显示所有图形。
  1574. symbol: 'circle', //标记的图形为实心圆
  1575. symbolSize: 8, //标记的大小
  1576. smooth: false,
  1577. itemStyle: {
  1578. //折线拐点标志的样式
  1579. color: '#B889EA',
  1580. borderColor: '#B889EA',
  1581. width: 2,
  1582. shadowColor: '#B889EA',
  1583. shadowBlur: 4,
  1584. },
  1585. lineStyle: {
  1586. color: '#B889EA',
  1587. width: 2,
  1588. },
  1589. data: dataC2[0],
  1590. },
  1591. {
  1592. name: '人工成本利润率',
  1593. type: 'bar',
  1594. barWidth: 15,
  1595. itemStyle: {
  1596. color: params => {
  1597. if (params.value < 0 && dataC2[1][params.dataIndex] < 0) {
  1598. return 'red'
  1599. } else if (params.value > this.echartC2.province) {
  1600. return 'green'
  1601. } else {
  1602. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1603. {
  1604. offset: 0,
  1605. color: '#69c0ff',
  1606. },
  1607. {
  1608. offset: 1,
  1609. color: '#082550',
  1610. },
  1611. ])
  1612. }
  1613. },
  1614. },
  1615. data: dataC2[1],
  1616. markLine: {
  1617. data: [
  1618. {
  1619. name: '省属企业平均水平',
  1620. yAxis: this.echartC2.province,
  1621. lineStyle: {
  1622. color: '#fff',
  1623. },
  1624. label: {
  1625. formatter: '{b}',
  1626. position: 'end',
  1627. padding: [24, 100, 10, 30],
  1628. color: '#fff',
  1629. },
  1630. },
  1631. {
  1632. name: '央企平均水平',
  1633. yAxis: this.echartC2.national,
  1634. lineStyle: {
  1635. color: '#fff',
  1636. },
  1637. label: {
  1638. formatter: '{b}',
  1639. position: 'end',
  1640. padding: [-24, 200, 10, 30],
  1641. color: '#fff',
  1642. },
  1643. },
  1644. ],
  1645. label: {
  1646. distance: [20, 8],
  1647. },
  1648. },
  1649. },
  1650. ],
  1651. }
  1652. option.title.text = '各三级人工成本利润率'
  1653. option.legend.data = ['人工成本利润率','人工成本利润率同比变化']
  1654. option.legend.show = true
  1655. option.tooltip = {
  1656. trigger: 'axis',
  1657. formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  1658. }
  1659. option.grid.right = '15%'
  1660. option.yAxis = [
  1661. {
  1662. axisLine: {
  1663. show: false,
  1664. },
  1665. splitLine: {
  1666. show: true,
  1667. lineStyle: {
  1668. color: '#68b4dd66',
  1669. type: 'dashed',
  1670. },
  1671. },
  1672. axisLabel: {
  1673. show: true,
  1674. formatter: '{value} %',
  1675. textStyle: {
  1676. color: 'rgba(250,250,250,0.6)',
  1677. },
  1678. },
  1679. },
  1680. {
  1681. splitLine: {
  1682. show: false,
  1683. },
  1684. axisLine: {
  1685. show: false,
  1686. },
  1687. axisLabel: {
  1688. show: true,
  1689. formatter: '{value} %',
  1690. textStyle: {
  1691. color: 'rgba(250,250,250,0.6)',
  1692. },
  1693. },
  1694. }
  1695. ]
  1696. myChart.setOption(option)
  1697. tools.loopShowTooltip(myChart, option, {
  1698. nterval: 2000,
  1699. loopSeries: true,
  1700. });
  1701. },
  1702. // 右侧图表---------------------------------------------开始
  1703. initChartR1 () {
  1704. let myChart = echarts.init(this.$refs['echartR1'])
  1705. let commonOptions = this.commonOption
  1706. commonOptions.yAxis[0].splitNumber = 2
  1707. let option = {
  1708. ..._.cloneDeep(commonOptions),
  1709. series: [
  1710. {
  1711. name: '招聘需求公告次数',
  1712. type: 'bar',
  1713. barWidth: 15,
  1714. itemStyle: {
  1715. normal: {
  1716. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1717. {
  1718. offset: 0,
  1719. color: '#69c0ff',
  1720. },
  1721. {
  1722. offset: 1,
  1723. color: '#082550',
  1724. },
  1725. ]),
  1726. },
  1727. },
  1728. data: dataR1[0],
  1729. },
  1730. {
  1731. name: '招聘需求公告累计公开招聘人数',
  1732. type: 'bar',
  1733. barWidth: 15,
  1734. itemStyle: {
  1735. normal: {
  1736. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1737. {
  1738. offset: 0,
  1739. color: '#43ede3',
  1740. },
  1741. {
  1742. offset: 1,
  1743. color: '#082550',
  1744. },
  1745. ]),
  1746. },
  1747. },
  1748. data: dataR1[1],
  1749. },
  1750. ],
  1751. }
  1752. option.title.text = '各三级企业招聘招聘需求公示人次'
  1753. option.legend.data = ['招聘需求公告次数', '招聘需求公告累计公开招聘人数']
  1754. option.legend.show = true
  1755. option.yAxis.push({
  1756. splitLine: {
  1757. show: false,
  1758. },
  1759. axisLine: {
  1760. show: false,
  1761. },
  1762. })
  1763. myChart.setOption(option)
  1764. },
  1765. initChartR2 () {
  1766. let myChart = echarts.init(this.$refs['echartR2'])
  1767. let commonOptions = this.commonOption
  1768. commonOptions.yAxis[0].splitNumber = 2
  1769. let option = {
  1770. ..._.cloneDeep(commonOptions),
  1771. series: [
  1772. {
  1773. name: '录用结果公示次数',
  1774. type: 'bar',
  1775. barWidth: 15,
  1776. itemStyle: {
  1777. normal: {
  1778. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1779. {
  1780. offset: 0,
  1781. color: '#69c0ff',
  1782. },
  1783. {
  1784. offset: 1,
  1785. color: '#082550',
  1786. },
  1787. ]),
  1788. },
  1789. },
  1790. data: dataR2[0],
  1791. },
  1792. {
  1793. name: '录用结果公示累计公示人数',
  1794. type: 'bar',
  1795. barWidth: 15,
  1796. itemStyle: {
  1797. normal: {
  1798. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1799. {
  1800. offset: 0,
  1801. color: '#45DAD1',
  1802. },
  1803. {
  1804. offset: 1,
  1805. color: '#082550',
  1806. },
  1807. ]),
  1808. },
  1809. },
  1810. data: dataR2[1],
  1811. },
  1812. ],
  1813. }
  1814. option.title.text = '各三级企业录用结果公示人次'
  1815. option.legend.data = ['录用结果公示次数', '录用结果公示累计公示人数']
  1816. option.legend.show = true
  1817. option.yAxis.push({
  1818. type: 'value',
  1819. axisLine: {
  1820. show: false,
  1821. },
  1822. splitLine: {
  1823. show: false,
  1824. },
  1825. })
  1826. myChart.setOption(option)
  1827. },
  1828. initChartR3 () {
  1829. let myChart = echarts.init(this.$refs['echartR3'])
  1830. let commonOptions = this.commonOption
  1831. commonOptions.yAxis[0].splitNumber = 2
  1832. let option = {
  1833. ..._.cloneDeep(commonOptions),
  1834. color: [
  1835. {
  1836. x: 0,
  1837. y: 0,
  1838. x2: 0,
  1839. y2: 1,
  1840. colorStops: [ {
  1841. offset: 0,
  1842. color: '#45DAD1',
  1843. },
  1844. {
  1845. offset: 1,
  1846. color: '#082550',
  1847. },],
  1848. }
  1849. ],
  1850. series: [
  1851. {
  1852. name: '年利润(万)',
  1853. type: 'bar',
  1854. barWidth: 15,
  1855. itemStyle: {
  1856. normal: {
  1857. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1858. {
  1859. offset: 0,
  1860. color: '#69c0ff',
  1861. },
  1862. {
  1863. offset: 1,
  1864. color: '#082550',
  1865. },
  1866. ]),
  1867. },
  1868. },
  1869. data: dataR3[0],
  1870. },
  1871. {
  1872. name: '2022年招聘人数和2023年当前累计招聘人数之和',
  1873. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  1874. type: 'bar',
  1875. barWidth: 15,
  1876. itemStyle: {
  1877. color: params => {
  1878. if (params.value > 0 && dataR3[0][params.dataIndex] < 0) {
  1879. return 'red'
  1880. } else {
  1881. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  1882. {
  1883. offset: 0,
  1884. color: '#45DAD1',
  1885. },
  1886. {
  1887. offset: 1,
  1888. color: '#082550',
  1889. },
  1890. ])
  1891. }
  1892. },
  1893. },
  1894. data: dataR3[1],
  1895. },
  1896. ],
  1897. }
  1898. option.title.text = '各三级企业年利润与当年累计招聘人数'
  1899. option.legend.data = ['年利润(万)', '2022年招聘人数和2023年当前累计招聘人数之和']
  1900. option.legend.show = true
  1901. option.yAxis[0].max = function (value) {
  1902. if (Math.abs(value.max) > Math.abs(value.min)) {
  1903. return (Math.abs(value.max) * 1.2).toFixed(2);
  1904. } else {
  1905. return (Math.abs(value.min) * 1.2).toFixed(2);
  1906. }
  1907. }
  1908. option.yAxis[0].min = function (value) {
  1909. if (Math.abs(value.max) > Math.abs(value.min)) {
  1910. return (-Math.abs(value.max) * 1.2).toFixed(2);
  1911. } else {
  1912. return (-Math.abs(value.min) * 1.2).toFixed(2);
  1913. }
  1914. }
  1915. option.yAxis.push({
  1916. splitLine: {
  1917. show: false,
  1918. },
  1919. axisLine: {
  1920. show: false,
  1921. },
  1922. axisLabel: {
  1923. show: true,
  1924. formatter: '{value}',
  1925. textStyle: {
  1926. color: 'rgba(250,250,250,0.6)',
  1927. },
  1928. },
  1929. max: function (value) {
  1930. if (Math.abs(value.max) > Math.abs(value.min)) {
  1931. return (Math.abs(value.max) * 1.2).toFixed(2);
  1932. } else {
  1933. return (Math.abs(value.min) * 1.2).toFixed(2);
  1934. }
  1935. },
  1936. min: function (value) {
  1937. if (Math.abs(value.max) > Math.abs(value.min)) {
  1938. return (-Math.abs(value.max) * 1.2).toFixed(2);
  1939. } else {
  1940. return (-Math.abs(value.min) * 1.2).toFixed(2);
  1941. }
  1942. }
  1943. })
  1944. // option.yAxis = [
  1945. // {
  1946. // max: function (val) {
  1947. // if (Math.abs(val.max) > Math.abs(val.min)) {
  1948. // return (Math.abs(val.max) * 1.2).toFixed(0)
  1949. // } else {
  1950. // return (Math.abs(val.min) * 1.2).toFixed(0)
  1951. // }
  1952. // },
  1953. // min: function (val) {
  1954. // if (Math.abs(val.max) > Math.abs(val.min)) {
  1955. // return (-Math.abs(val.max) * 1.2).toFixed(0)
  1956. // } else {
  1957. // return (Math.abs(val.min) * 1.2).toFixed(0)
  1958. // }
  1959. // },
  1960. // splitLine: {
  1961. // show: false,
  1962. // },
  1963. // axisLine: {
  1964. // show: false,
  1965. // },
  1966. // axisLabel: {
  1967. // show: true,
  1968. // formatter: '{value}',
  1969. // textStyle: {
  1970. // color: 'rgba(250,250,250,0.6)',
  1971. // },
  1972. // },
  1973. // }
  1974. // ]
  1975. myChart.setOption(option)
  1976. },
  1977. initChartR4 () {
  1978. let myChart = echarts.init(this.$refs['echartR4'])
  1979. let commonOptions = this.commonOption
  1980. commonOptions.yAxis[0].splitNumber = 2
  1981. let option = {
  1982. ..._.cloneDeep(commonOptions),
  1983. color: [
  1984. {
  1985. x: 0,
  1986. y: 0,
  1987. x2: 0,
  1988. y2: 1,
  1989. colorStops: [{
  1990. offset: 0,
  1991. color: '#6480f3',
  1992. },
  1993. {
  1994. offset: 1,
  1995. color: '#082550',
  1996. },],
  1997. }
  1998. ],
  1999. series: [
  2000. {
  2001. name: '2022年退出人数和2023年当前累计退出人数之和',
  2002. type: 'bar',
  2003. barWidth: 15,
  2004. itemStyle: {
  2005. normal: {
  2006. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2007. {
  2008. offset: 0,
  2009. color: '#69c0ff',
  2010. },
  2011. {
  2012. offset: 1,
  2013. color: '#082550',
  2014. },
  2015. ]),
  2016. },
  2017. },
  2018. data: dataR4[0],
  2019. },
  2020. {
  2021. name: '2022年招聘人数和2023年当前累计招聘人数之和',
  2022. type: 'bar',
  2023. barWidth: 15,
  2024. itemStyle: {
  2025. normal: {
  2026. color: params => {
  2027. if (dataR4[0][params.dataIndex] / 2 < params.value) {
  2028. return 'red'
  2029. }
  2030. else {
  2031. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2032. {
  2033. offset: 0,
  2034. color: '#6480f3',
  2035. },
  2036. {
  2037. offset: 1,
  2038. color: '#082550',
  2039. },
  2040. ])
  2041. }
  2042. },
  2043. },
  2044. },
  2045. data: dataR4[1],
  2046. },
  2047. ],
  2048. }
  2049. option.title.text = '各三级企业"退二进一"完成情况'
  2050. option.legend.data = ['2022年退出人数和2023年当前累计退出人数之和', '2022年招聘人数和2023年当前累计招聘人数之和']
  2051. option.legend.show = true
  2052. option.yAxis.push({
  2053. splitLine: {
  2054. show: false,
  2055. },
  2056. axisLine: {
  2057. show: false,
  2058. },
  2059. })
  2060. myChart.setOption(option)
  2061. },
  2062. initChartR5 () {
  2063. let myChart = echarts.init(this.$refs['echartR5'])
  2064. let option = {
  2065. ..._.cloneDeep(this.commonOption),
  2066. series: [
  2067. {
  2068. name: '去年同期在岗职工平均薪酬',
  2069. type: 'bar',
  2070. barWidth: 15,
  2071. itemStyle: {
  2072. normal: {
  2073. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2074. {
  2075. offset: 0,
  2076. color: '#69c0ff',
  2077. },
  2078. {
  2079. offset: 1,
  2080. color: '#082550',
  2081. },
  2082. ]),
  2083. },
  2084. },
  2085. data: dataR5[0],
  2086. },
  2087. {
  2088. name: '在岗职工平均薪酬',
  2089. type: 'bar',
  2090. barWidth: 15,
  2091. itemStyle: {
  2092. normal: {
  2093. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2094. {
  2095. offset: 0,
  2096. color: '#6682F5',
  2097. },
  2098. {
  2099. offset: 1,
  2100. color: '#082550',
  2101. },
  2102. ]),
  2103. },
  2104. },
  2105. data: dataR5[1],
  2106. }
  2107. ],
  2108. }
  2109. option.title.text = '各三级企业在岗职工平均薪酬'
  2110. option.legend.data = ['去年同期在岗职工平均薪酬', '在岗职工平均薪酬']
  2111. option.legend.show = true
  2112. option.yAxis.push({
  2113. splitLine: {
  2114. show: false,
  2115. },
  2116. axisLine: {
  2117. show: false,
  2118. },
  2119. })
  2120. myChart.setOption(option)
  2121. },
  2122. initChartR6 () {
  2123. let myChart = echarts.init(this.$refs['echartR6'])
  2124. let option = {
  2125. ..._.cloneDeep(this.commonOption),
  2126. color: ['#69c0ff'],
  2127. series: [
  2128. {
  2129. name: '各三级企业月利润总额同期变化率',
  2130. type: 'line',
  2131. smooth: true, //平滑曲线显示
  2132. showAllSymbol: true, //显示所有图形。
  2133. symbol: 'circle', //标记的图形为实心圆
  2134. symbolSize: 8, //标记的大小
  2135. smooth: false,
  2136. label: {
  2137. normal: {
  2138. show: true,
  2139. lineHeight: '20',
  2140. position: 'top',
  2141. textStyle: {
  2142. color: '#B889EA',
  2143. fontStyle: 'normal',
  2144. textAlign: 'left',
  2145. fontSize: 16,
  2146. },
  2147. formatter: function (data) {
  2148. if (data.name == '文旅集团') {
  2149. return data.value
  2150. } else {
  2151. return ''
  2152. }
  2153. }
  2154. }
  2155. },
  2156. itemStyle: {
  2157. //折线拐点标志的样式
  2158. color: '#B889EA',
  2159. borderColor: '#B889EA',
  2160. width: 2,
  2161. shadowColor: '#B889EA',
  2162. shadowBlur: 4,
  2163. },
  2164. lineStyle: {
  2165. color: '#B889EA',
  2166. width: 2,
  2167. },
  2168. data: fjxdataL2[0],
  2169. },
  2170. {
  2171. name: '各三级企业月薪酬总额同期变化率',
  2172. type: 'line',
  2173. smooth: true, //平滑曲线显示
  2174. showAllSymbol: true, //显示所有图形。
  2175. symbol: 'circle', //标记的图形为实心圆
  2176. symbolSize: 12, //标记的大小
  2177. smooth: false,
  2178. label: {
  2179. normal: {
  2180. show: true,
  2181. position: 'top',
  2182. lineHeight: '35',
  2183. textStyle: {
  2184. color: '#69c0ff',
  2185. fontStyle: 'normal',
  2186. textAlign: 'left',
  2187. fontSize: 16,
  2188. },
  2189. formatter: function (data) {
  2190. if (data.name == '文旅集团') {
  2191. return data.value
  2192. } else {
  2193. return ''
  2194. }
  2195. }
  2196. }
  2197. },
  2198. itemStyle: {
  2199. color: params => {
  2200. if (params.value > 0 && fjxdataL2[0][params.dataIndex] < 0) {
  2201. return 'yellow'
  2202. } else if (params.value < 0 && fjxdataL2[0][params.dataIndex] > 0) {
  2203. return 'green'
  2204. }
  2205. else {
  2206. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2207. {
  2208. offset: 0,
  2209. color: '#69c0ff',
  2210. },
  2211. {
  2212. offset: 1,
  2213. color: '#082550',
  2214. },
  2215. ])
  2216. }
  2217. },
  2218. },
  2219. lineStyle: {
  2220. color: '#69C0FF',
  2221. width: 2,
  2222. },
  2223. data: fjxdataL2[1],
  2224. },
  2225. {
  2226. type: 'effectScatter',
  2227. coordinateSystem: 'cartesian2d',
  2228. showEffectOn: 'render',
  2229. rippleEffect: {
  2230. period: 10,
  2231. scale: 4,
  2232. brushType: 'stroke'
  2233. },
  2234. hoverAnimation: true,
  2235. itemStyle: {
  2236. color: 'yellow'
  2237. },
  2238. lineStyle: {
  2239. color: '#43ede3',
  2240. width: 2,
  2241. },
  2242. data: this.twinkleR6,
  2243. },
  2244. ],
  2245. }
  2246. option.title.text = '各三级企业利润与薪酬变动情况'
  2247. option.legend.data = ['各三级企业月利润总额同期变化率', '各三级企业月薪酬总额同期变化率']
  2248. option.tooltip.formatter = '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
  2249. option.yAxis[0].axisLabel.formatter = '{value} %'
  2250. myChart.setOption(option)
  2251. },
  2252. initChartR7 () {
  2253. let myChart = echarts.init(this.$refs['echartR7'])
  2254. let option = {
  2255. ..._.cloneDeep(this.commonOption),
  2256. color: [
  2257. {
  2258. x: 0,
  2259. y: 0,
  2260. x2: 0,
  2261. y2: 1,
  2262. colorStops: [{
  2263. offset: 0,
  2264. color: '#B889EA',
  2265. },
  2266. {
  2267. offset: 1,
  2268. color: '#082550',
  2269. },],
  2270. }
  2271. ],
  2272. series: [
  2273. {
  2274. name: '全员绩效考核完成率',
  2275. type: 'bar',
  2276. barWidth: 15,
  2277. itemStyle: {
  2278. normal: {
  2279. color: params => {
  2280. if (params.value < 50) {
  2281. return 'yellow'
  2282. }
  2283. else {
  2284. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2285. {
  2286. offset: 0,
  2287. color: '#B889EA',
  2288. },
  2289. {
  2290. offset: 1,
  2291. color: '#082550',
  2292. },
  2293. ])
  2294. }
  2295. },
  2296. },
  2297. },
  2298. data: dataR7[0],
  2299. },
  2300. ],
  2301. }
  2302. option.title.text = '各三级企业全员绩效考核 '
  2303. // option.legend.data = ['劳动合同签约完成率', '目标值']
  2304. option.tooltip = {
  2305. trigger: 'axis',
  2306. formatter: '{a0}:{c0}' + '%'
  2307. }
  2308. option.yAxis[0].axisLabel = {
  2309. show: true,
  2310. formatter: '{value} %',
  2311. textStyle: {
  2312. color: 'rgba(250,250,250,0.6)',
  2313. },
  2314. }
  2315. myChart.setOption(option)
  2316. },
  2317. initChartR8 () {
  2318. let myChart = echarts.init(this.$refs['echartR8'])
  2319. let option = {
  2320. ..._.cloneDeep(this.commonOption),
  2321. color: [
  2322. {
  2323. x: 0,
  2324. y: 0,
  2325. x2: 0,
  2326. y2: 1,
  2327. colorStops: [{
  2328. offset: 0,
  2329. color: '#43ede3',
  2330. },
  2331. {
  2332. offset: 1,
  2333. color: '#082550',
  2334. },],
  2335. }
  2336. ],
  2337. series: [
  2338. {
  2339. name: '任期制契约化管理',
  2340. type: 'bar',
  2341. barWidth: 15,
  2342. itemStyle: {
  2343. normal: {
  2344. color: params => {
  2345. if (params.value < 50) {
  2346. return 'yellow'
  2347. }
  2348. else {
  2349. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  2350. {
  2351. offset: 0,
  2352. color: '#43ede3',
  2353. },
  2354. {
  2355. offset: 1,
  2356. color: '#082550',
  2357. },
  2358. ])
  2359. }
  2360. },
  2361. },
  2362. },
  2363. data: dataR8[0],
  2364. },
  2365. ],
  2366. }
  2367. option.title.text = '各三级企业任期制契约化管理'
  2368. option.tooltip = {
  2369. trigger: 'axis',
  2370. formatter: '{a0}:{c0}' + '%'
  2371. }
  2372. option.yAxis[0].axisLabel = {
  2373. show: true,
  2374. formatter: '{value} %',
  2375. textStyle: {
  2376. color: 'rgba(250,250,250,0.6)',
  2377. },
  2378. }
  2379. myChart.setOption(option)
  2380. },
  2381. },
  2382. })