index3.js 72 KB

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