Brak opisu

index.js 96KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726
  1. var myChart = echarts.init(document.getElementById('main'));
  2. var myChart1 = echarts.init(document.getElementById('main1'));
  3. var myChart3 = echarts.init(document.getElementById('main3'));
  4. var img = './images/frame.png';
  5. var sourceImg = './images/1.png'
  6. var workStateAct;
  7. let acceptId; //受理id
  8. let sourceId; //渠道id
  9. let handling; //督办
  10. let detailId;
  11. getSourceCount(); //受理渠道统计(一二级)
  12. getAcceptanceCount(); //受理量统计(一级)
  13. timeTable(); //单位办理时长统计(一级)
  14. testTable(); //月度考核(一级)
  15. areaMap(); //地图(一级)
  16. chart4(); //受理关键词热度分析(一级)
  17. getData()
  18. getNowFormatDate() //时间
  19. //滚动
  20. //原理:把marquee下面的子盒子都复制一遍 加入到marquee中
  21. // 然后动画向上滚动,滚动到一半重新开始滚动
  22. //因为选取的是两个marquee 所以要遍历
  23. $('.time_statistics .maquee ul').each(function(index, dom) {
  24. //将每个 的所有子级都复制一遍
  25. var rows = $(dom).children().clone();
  26. //再将新的到的加入原来的
  27. $(dom).append(rows);
  28. });
  29. $('.test_rank .maquee ul').each(function(index, dom) {
  30. //将每个 的所有子级都复制一遍
  31. var rows = $(dom).children().clone();
  32. //再将新的到的加入原来的
  33. $(dom).append(rows);
  34. });
  35. //每两分钟刷新一次
  36. setInterval(function() {
  37. getSourceCount(); //受理渠道统计(一二级)
  38. getAcceptanceCount(); //受理量统计(一级)
  39. testTable(); //月度考核(一级)
  40. timeTable(); //单位办理时长统计(一级)
  41. areaMap(); //地图(一级)
  42. }, 120000)
  43. //二级话务坐席
  44. $('.call_situation').click(function() {
  45. $('.bulletFrame').show();
  46. $('.traffic_wrap').show();
  47. $('.traffic_wrap').siblings().hide()
  48. if ($('.bulletFrame').css('display') == 'block') {
  49. $('.body').css('opacity', '0.4')
  50. }
  51. let trafficName = [];
  52. let trafficTime = [];
  53. let sum = [];
  54. let consult = [];
  55. let help = [];
  56. let complaint = [];
  57. let proposal = [];
  58. let praise = [];
  59. let report = [];
  60. let other = [];
  61. new doAjax({
  62. url: huayi.config.callcenter_url + "/InfoNew/GetTypeCount24ByNow",
  63. data: {},
  64. callBack: function(res) {
  65. console.log(res)
  66. trafficName = res.data.cols;
  67. trafficTime = res.data.hours;
  68. sum = res.data.counts[0];
  69. consult = res.data.counts[1];
  70. help = res.data.counts[2];
  71. complaint = res.data.counts[3];
  72. proposal = res.data.counts[4];
  73. praise = res.data.counts[5];
  74. report = res.data.counts[6];
  75. other = res.data.counts[7]
  76. traffic_chart(trafficName, trafficTime, sum, consult, help, complaint, proposal, praise,
  77. report, other)
  78. }
  79. });
  80. })
  81. //二级今日受理量统计
  82. $('.accept_statistics').click(function() {
  83. let acceptanceTime = []; //时间
  84. let callInData = []; //呼入
  85. let callOutData = []; //呼出
  86. let directData = []; //工单录入
  87. let inputData = []; //工单直办
  88. $('.bulletFrame').show();
  89. $('.acceptance_wrap').show();
  90. $('.acceptance_wrap').siblings().hide()
  91. if ($('.bulletFrame').css('display') == 'block') {
  92. $('.body').css('opacity', '0.4')
  93. }
  94. new doAjax({
  95. url: huayi.config.callcenter_url + "/InfoNew/GetAcceptanceCount24ByNow",
  96. data: {},
  97. callBack: function(res) {
  98. acceptanceTime = res.data.hours;
  99. callInData = res.data.hrcount[0];
  100. callOutData = res.data.jtcount[0];
  101. directData = res.data.counts[0];
  102. inputData = res.data.count[0];
  103. acceptance_chart(acceptanceTime, callInData, callOutData, inputData, directData)
  104. }
  105. });
  106. })
  107. //受理渠道
  108. $('.accept_channel').click(function() {
  109. $('.bulletFrame').show();
  110. $('.channel_wrap').show();
  111. $('.channel_wrap').siblings().hide()
  112. if ($('.bulletFrame').css('display') == 'block') {
  113. $('.body').css('opacity', '0.4')
  114. }
  115. })
  116. //二级关键词热度分析
  117. $('.key_word').click(function() {
  118. $('.bulletFrame').show();
  119. $('.keyword_wrap').show();
  120. $('.keyword_wrap').siblings().hide()
  121. if ($('.bulletFrame').css('display') == 'block') {
  122. $('.body').css('opacity', '0.4')
  123. }
  124. keyWordTable()
  125. })
  126. //二级办理时长统计
  127. $('.time_statistics').click(function() {
  128. $('.bulletFrame').show();
  129. $('.timeSta_wrap').show();
  130. $('.timeSta_wrap').siblings().hide()
  131. if ($('.bulletFrame').css('display') == 'block') {
  132. $('.body').css('opacity', '0.4')
  133. }
  134. timeSecTable();
  135. })
  136. //二级月度考核
  137. $('.test_rank').click(function() {
  138. $('.bulletFrame').show();
  139. $('.rank_wrap').show();
  140. $('.rank_wrap').siblings().hide()
  141. if ($('.bulletFrame').css('display') == 'block') {
  142. $('.body').css('opacity', '0.4')
  143. }
  144. testSecTable('#orderlist2', 0);
  145. testSecTable('#orderlist4', 1, 0);
  146. testSecTable('#orderlist5', 1, 1);
  147. testSecTable('#orderlist6', 2);
  148. })
  149. $('.acceptance_state').click(function() {
  150. $('.bulletFrame').show();
  151. //二级受理情况
  152. $('.acceptanceState_wrap').show();
  153. $('.acceptanceState_wrap').siblings().hide()
  154. if ($('.bulletFrame').css('display') == 'block') {
  155. $('.body').css('opacity', '0.4')
  156. }
  157. new doAjax({
  158. url: huayi.config.callcenter_url + "/InfoNew/GetHandling",
  159. data: {},
  160. callBack: function(res) {
  161. $('.db').text(res[0].db)
  162. $('.bdrate').text(res[0].dbrate)
  163. $('.zb').text(res[0].zhib)
  164. $('.zbrate').text(res[0].zhibrate)
  165. $('.zub').text(res[0].zub)
  166. $('.zubrate').text(res[0].zubrate)
  167. $('.cb').text(res[0].cb)
  168. $('.cbrate').text(res[0].cbrate)
  169. $('.stattotal').text(res[0].total)
  170. let handingData = [{
  171. value: res[0].db,
  172. name: '督办'
  173. }, {
  174. value: res[0].zhib,
  175. name: '直办'
  176. }, {
  177. value: res[0].zub,
  178. name: '转办'
  179. },
  180. {
  181. value: res[0].cb,
  182. name: '催办'
  183. }
  184. ]
  185. getHandling(handingData);
  186. }
  187. });
  188. })
  189. //关闭按钮
  190. $('.close_icon').click(function() {
  191. $('.bulletFrame').hide();
  192. if ($('.bulletFrame').css('display') == 'none') {
  193. $('.body').css('opacity', '1')
  194. }
  195. })
  196. $('.close_iconT').click(function() {
  197. $('.bulletFrameT').hide();
  198. if ($('.bulletFrameT').css('display') == 'none') {
  199. $('.body').css('opacity', '1')
  200. }
  201. })
  202. $('.close_iconP').click(function() {
  203. $('.workDetails').show();
  204. $('.workDetails').siblings().hide()
  205. // $('#timeline').html('');
  206. })
  207. $('.close_iconR').click(function() {
  208. $('.rankList').show();
  209. $('.rankList').siblings().hide()
  210. })
  211. //受理分析
  212. $('.state-share').click(function(e) {
  213. if (e.target.tagName == 'DIV' || e.target.tagName == 'P' || e.target.tagName == 'LI') {
  214. if ($(e.target).attr('pos') == '1') {
  215. handling = 0
  216. } else if ($(e.target).attr('pos') == '2') {
  217. handling = 1
  218. } else if ($(e.target).attr('pos') == '3') {
  219. handling = 2
  220. } else if ($(e.target).attr('pos') == '4') {
  221. handling = 3
  222. }
  223. $('.bulletFrameT').show()
  224. $('.acceptCont').show();
  225. $('.acceptCont').siblings().hide()
  226. acceptlist(handling);
  227. }
  228. })
  229. //受理量统计
  230. function getAcceptanceCount() {
  231. new doAjax({
  232. url: huayi.config.callcenter_url + "/InfoNew/GetAcceptanceCountByNow",
  233. data: {},
  234. callBack: function(res) {
  235. var traffic = [{
  236. name: '呼出',
  237. value: res.data.hw[0].hccount
  238. }, {
  239. name: '呼入',
  240. value: res.data.hw[0].hrcount
  241. }, {
  242. name: '接通',
  243. value: res.data.hw[0].jtcount
  244. }]; //话务
  245. var workOrde = [{
  246. name: '处理',
  247. value: res.data.gd[0].lrcount
  248. }, {
  249. name: '录入',
  250. value: res.data.gd[0].blcount
  251. }, {
  252. name: '完结',
  253. value: res.data.gd[0].wjcount
  254. }]; //工单
  255. let lineHeifht = 0;
  256. let fq = setInterval(function() {
  257. lineHeifht++;
  258. if (lineHeifht == 55) {
  259. clearInterval(fq);
  260. }
  261. acceptStatistics('main2', traffic, lineHeifht)
  262. acceptStatistics('main5', workOrde, lineHeifht)
  263. }, 20)
  264. }
  265. });
  266. }
  267. //受理渠道统计
  268. function getSourceCount() {
  269. var nameData = [];
  270. var conNum = [];
  271. var maxNum = []
  272. var secData = [];
  273. new doAjax({
  274. url: huayi.config.callcenter_url + "/InfoNew/GetSourceCountByNow",
  275. data: {},
  276. callBack: function(res) {
  277. res.data.forEach(function(v, n) {
  278. nameData.push(v.TypeName);
  279. conNum.push(v.Count)
  280. secData.push({
  281. level: v.TypeName,
  282. landArea: v.Count
  283. })
  284. })
  285. for (var i = 0; i < secData.length; i++) {
  286. maxNum.push(Math.max.apply(null, conNum) + 200);
  287. }
  288. chart2(nameData, conNum, maxNum)
  289. channel_chart(secData);
  290. }
  291. });
  292. }
  293. //一级话务坐席
  294. function chart1(data) {
  295. option = {
  296. tooltip: {
  297. trigger: 'item',
  298. textStyle: {
  299. color: '#ffe400',
  300. fontSize: '14',
  301. fontWeight: '500'
  302. },
  303. position: 'top',
  304. backgroundColor: 'rgba(250,250,250,0)',
  305. transitionDuration: 0.4,
  306. formatter: function(params) {
  307. return '<div style="background-image: url(images/reminder_box2.png);width:50px;height:33px;line-height:30px;background-size: 100% 100%;text-align:center;">' +
  308. params.value + '</div>';
  309. }
  310. },
  311. grid: {
  312. left: "4%",
  313. right: "4%",
  314. bottom: "3%",
  315. top: "15%",
  316. containLabel: true
  317. },
  318. xAxis: {
  319. type: "category",
  320. triggerEvent: true,
  321. boundaryGap: true,
  322. data: ['坐席数量', '签入', '通话中', '话后处理', '置忙', '置闲', '离线'],
  323. axisLabel: {
  324. //坐标轴刻度标签的相关设置。
  325. interval: 0, //设置为 1,表示『隔一个标签显示一个标签』
  326. // margin:15,
  327. textStyle: {
  328. color: "#fff",
  329. fontStyle: "normal",
  330. fontSize: 10
  331. }
  332. },
  333. axisTick: {
  334. //坐标轴刻度相关设置。
  335. show: false
  336. },
  337. axisLine: {
  338. //坐标轴轴线相关设置
  339. lineStyle: {
  340. color: "#036376"
  341. }
  342. },
  343. splitLine: {
  344. //坐标轴在 grid 区域中的分隔线。
  345. show: false,
  346. lineStyle: {
  347. color: "rgba(77, 128, 254, 0.2)"
  348. }
  349. }
  350. },
  351. yAxis: [{
  352. type: "value",
  353. // splitNumber: 3,
  354. axisLabel: {
  355. textStyle: {
  356. color: "#fff",
  357. fontStyle: "normal",
  358. fontSize: 12
  359. },
  360. formatter: function() {
  361. return "";
  362. }
  363. },
  364. axisLine: {
  365. show: false
  366. },
  367. axisTick: {
  368. show: false
  369. },
  370. splitLine: {
  371. show: false,
  372. lineStyle: {
  373. color: "rgba(77, 128, 254, 0.2)"
  374. }
  375. }
  376. }],
  377. // color: ["#e54035"],
  378. series: [{
  379. name: "数量",
  380. barMinHeight: 10,
  381. type: "pictorialBar",
  382. barCategoryGap: "60%",
  383. symbol: 'path://M0,10 L10,10 L5,0 L0,10 z',
  384. // symbol: "path://M12.000,-0.000 C12.000,-0.000 16.074,60.121 22.731,60.121 C26.173,60.121 -3.234,60.121 0.511,60.121 C7.072,60.121 12.000,-0.000 12.000,-0.000 Z",
  385. itemStyle: {
  386. normal: {
  387. color: {
  388. type: "linear",
  389. x: 0,
  390. y: 0,
  391. x2: 0,
  392. y2: 1,
  393. colorStops: [{
  394. offset: 0,
  395. color: "#00edfc" // 0% 处的颜色
  396. },
  397. {
  398. offset: 1,
  399. color: "#05293d" // 100% 处的颜色
  400. }
  401. ],
  402. globalCoord: false // 缺省为 false
  403. } //渐变颜色
  404. }
  405. },
  406. label: {
  407. normal: {
  408. show: false
  409. }
  410. },
  411. emphasis: {
  412. itemStyle: {
  413. color: new echarts.graphic.LinearGradient(
  414. 0, 0, 0, 1,
  415. [{
  416. offset: 0,
  417. color: '#fde301'
  418. },
  419. {
  420. offset: 1,
  421. color: '#0a2f3e'
  422. }
  423. ]
  424. )
  425. }
  426. },
  427. data: data
  428. }]
  429. }
  430. myChart.setOption(option);
  431. myChart.resize();
  432. }
  433. //一级受理渠道
  434. function chart2(data, count, count1) {
  435. myChart1.resize();
  436. option = {
  437. "textStyle": {
  438. "color": "#c0c3cd",
  439. "fontSize": 11
  440. },
  441. "toolbox": {
  442. "show": false,
  443. "feature": {
  444. "saveAsImage": {
  445. "backgroundColor": "#031245"
  446. },
  447. "restore": {}
  448. },
  449. "iconStyle": {
  450. "borderColor": "#c0c3cd"
  451. }
  452. },
  453. "legend": {
  454. "top": 10,
  455. "itemWidth": 8,
  456. "itemHeight": 8,
  457. "icon": "circle",
  458. "left": "center",
  459. "padding": 0,
  460. "textStyle": {
  461. "color": "#c0c3cd",
  462. "fontSize": 11,
  463. "padding": [2, 0, 0, 0]
  464. }
  465. },
  466. "color": ["#63caff", "#49beff", "#395568", "#395568", "#395568", "#6c93ee", "#a9abff", "#f7a23f", "#27bae7",
  467. "#ff6d9d", "#cb79ff", "#f95b5a", "#ccaf27", "#38b99c", "#93d0ff", "#bd74e0", "#fd77da", "#dea700"
  468. ],
  469. "grid": {
  470. "containLabel": true,
  471. "left": 20,
  472. "right": 20,
  473. "bottom": 10,
  474. "top": 40
  475. },
  476. "xAxis": {
  477. "nameTextStyle": {
  478. "color": "#c0c3cd",
  479. "padding": [0, 0, -10, 0],
  480. "fontSize": 11
  481. },
  482. "axisLabel": {
  483. "color": "#c0c3cd",
  484. "fontSize": 11,
  485. "interval": 0,
  486. "formatter": function(value) {
  487. var ret = ""; //拼接加\n返回的类目项
  488. var maxLength = 3; //每项显示文字个数
  489. var valLength = value.length; //X轴类目项的文字个数
  490. var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
  491. if (rowN > 1) {
  492. for (var i = 0; i < rowN; i++) {
  493. var temp = ""; //每次截取的字符串
  494. var start = i * maxLength; //开始截取的位置
  495. var end = start + maxLength; //结束截取的位置
  496. //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
  497. temp = value.substring(start, end) + "\n";
  498. ret += temp; //凭借最终的字符串
  499. }
  500. return ret;
  501. } else {
  502. return value;
  503. }
  504. }
  505. },
  506. "axisTick": {
  507. "lineStyle": {
  508. "color": "#384267",
  509. "width": 1
  510. },
  511. "show": false
  512. },
  513. "minorTick": {
  514. "length": 8
  515. },
  516. "splitLine": {
  517. "show": false
  518. },
  519. "axisLine": {
  520. "lineStyle": {
  521. "color": "#384267",
  522. "width": 1,
  523. "type": "solid"
  524. },
  525. "show": true
  526. },
  527. "data": data,
  528. "type": "category"
  529. },
  530. "yAxis": {
  531. "nameTextStyle": {
  532. "color": "#c0c3cd",
  533. "padding": [0, 0, 10, -5],
  534. "fontSize": 11
  535. },
  536. "axisLabel": {
  537. "color": "#c0c3cd",
  538. "fontSize": 11
  539. },
  540. "axisTick": {
  541. "lineStyle": {
  542. "color": "#384267",
  543. "width": 1
  544. },
  545. "show": true
  546. },
  547. "splitLine": {
  548. "show": true,
  549. "lineStyle": {
  550. "color": "#384267",
  551. "type": "dashed"
  552. }
  553. },
  554. "axisLine": {
  555. "lineStyle": {
  556. "color": "#384267",
  557. "width": 1,
  558. "type": "solid"
  559. },
  560. "show": true,
  561. // "symbol":['none', 'arrow'],
  562. "symbol": ['none', 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'],
  563. 'symbolOffset': 5,
  564. 'symbolSize': [35, 38],
  565. },
  566. "name": "条"
  567. },
  568. "series": [{
  569. "data": count,
  570. "type": "bar",
  571. "barMaxWidth": "auto",
  572. "barWidth": 15,
  573. "itemStyle": {
  574. "color": {
  575. "x": 0,
  576. "y": 0,
  577. "x2": 0,
  578. "y2": 1,
  579. "type": "linear",
  580. "global": false,
  581. "colorStops": [{
  582. "offset": 0,
  583. "color": "#3ffeea"
  584. }, {
  585. "offset": 1,
  586. "color": "#0181ff"
  587. }]
  588. },
  589. barBorderRadius: [30, 30, 0, 0]
  590. },
  591. "label": {
  592. "show": true,
  593. "position": "insideBottom",
  594. "distance": 125,
  595. "color": "rgb(62,252,235)",
  596. "fontSize": 12,
  597. "fontWeight": 'bold',
  598. // "position": [30, 10],
  599. },
  600. emphasis: {
  601. itemStyle: {
  602. color: new echarts.graphic.LinearGradient(
  603. 0, 0, 0, 1,
  604. [{
  605. offset: 0,
  606. color: '#fde301'
  607. },
  608. {
  609. offset: 1,
  610. color: '#0a2f3e'
  611. }
  612. ]
  613. )
  614. }
  615. },
  616. }, {
  617. "data": [1, 1, 1, 1, 1, 1],
  618. "type": "pictorialBar",
  619. "barMaxWidth": "20",
  620. "symbol": "none",
  621. },
  622. {
  623. // "data": [1500, 1148, 756, 1395, 1750, 1148],
  624. "type": "pictorialBar",
  625. "barMaxWidth": "20",
  626. "symbolPosition": "end",
  627. "symbol": "none",
  628. "symbolOffset": [0, "-50%"],
  629. "symbolSize": [30, 12],
  630. "zlevel": 1
  631. },
  632. {
  633. "data": count1,
  634. "type": "bar",
  635. "barMaxWidth": "auto",
  636. "barWidth": 15,
  637. "barGap": "-100%",
  638. "zlevel": -1
  639. }, {
  640. "data": [1, 1, 1, 1, 1, 1],
  641. "type": "pictorialBar",
  642. "barMaxWidth": "20",
  643. "symbol": "none",
  644. "symbolOffset": [0, "50%"],
  645. "symbolSize": [30, 15],
  646. "zlevel": -2
  647. }, {
  648. "data": count1,
  649. "type": "pictorialBar",
  650. "barMaxWidth": "20",
  651. "symbolPosition": "end",
  652. "symbol": "circle",
  653. "symbolOffset": [0, "-60%"],
  654. "symbolSize": [15, 12],
  655. "zlevel": -1
  656. },
  657. ]
  658. }
  659. myChart1.setOption(option);
  660. }
  661. //一级受理统计
  662. function acceptStatistics(dom, dataList, lineH) {
  663. let myChart = echarts.init(document.getElementById(dom));
  664. myChart.resize();
  665. var data = [];
  666. var color = ['#00ffff', '#ffe000', '#006ced']
  667. for (var i = 0; i < dataList.length; i++) {
  668. data.push({
  669. value: dataList[i].value,
  670. name: dataList[i].name,
  671. itemStyle: {
  672. normal: {
  673. borderWidth: 3,
  674. shadowBlur: 10,
  675. borderColor: color[i],
  676. shadowColor: color[i]
  677. }
  678. }
  679. });
  680. }
  681. var seriesOption = [{
  682. name: '',
  683. type: 'pie',
  684. clockWise: false,
  685. radius: [53, 57],
  686. hoverAnimation: false,
  687. itemStyle: {
  688. normal: {
  689. label: {
  690. show: true,
  691. position: 'outside',
  692. color: '#ddd',
  693. fontSize: 13,
  694. formatter: function(params) {
  695. return params.name + ':' + params.value
  696. },
  697. padding: [0, -50, 15, -55]
  698. },
  699. labelLine: {
  700. length: 0,
  701. length2: lineH,
  702. show: true,
  703. color: '#00ffff',
  704. lineStyle: {
  705. width: 2,
  706. join: 'bevel'
  707. },
  708. minTurnAngle: 180
  709. },
  710. borderWidth: 1,
  711. }
  712. },
  713. data: data
  714. }];
  715. option = {
  716. color: color,
  717. title: {
  718. text: '',
  719. top: '48%',
  720. textAlign: "center",
  721. left: "49%",
  722. textStyle: {
  723. color: '#fff',
  724. fontSize: 22,
  725. fontWeight: '400'
  726. }
  727. },
  728. graphic: {
  729. elements: [{
  730. type: "image",
  731. z: 3,
  732. style: {
  733. image: img,
  734. width: 92,
  735. height: 92
  736. },
  737. left: 'center',
  738. top: 'center',
  739. position: [100, 100]
  740. }]
  741. },
  742. tooltip: {
  743. show: false
  744. },
  745. toolbox: {
  746. show: false
  747. },
  748. series: seriesOption
  749. }
  750. myChart.setOption(option);
  751. }
  752. //一级关键字热度分析
  753. function chart4() {
  754. myChart3.resize();
  755. var reslult;
  756. let num = 0;
  757. let ldValue = 0;
  758. let ldR = 45;
  759. let aqValue = 0;
  760. let aqR = 50;
  761. let aqL = 45;
  762. let hjValue = 0;
  763. let hjR = 50;
  764. let hjL = 45;
  765. let ysValue = 0;
  766. let ysR = 50;
  767. let ysL = 45;
  768. let wtValue = 0;
  769. let wtR = 50;
  770. let wtL = 45;
  771. let wsValue = 0;
  772. let wsR = 50;
  773. let wsL = 45;
  774. let jtValue = 0;
  775. let jtR = 50;
  776. let jtL = 45;
  777. var fq = setInterval(function() {
  778. num++;
  779. if (ldR != 0) {
  780. ldR--;
  781. }
  782. if (aqR != 35) {
  783. aqR--;
  784. }
  785. if (aqL != 22) {
  786. aqL--;
  787. }
  788. if (aqValue != 70) {
  789. aqValue++;
  790. }
  791. if (hjValue != 60) {
  792. hjValue++;
  793. }
  794. if (hjR != 65) {
  795. hjR++;
  796. }
  797. if (hjL != 18) {
  798. hjL--;
  799. }
  800. if (ysValue != 55) {
  801. ysValue++;
  802. }
  803. if (ysR != 66) {
  804. ysR++;
  805. }
  806. if (ysL != 95) {
  807. ysL++;
  808. }
  809. if (wtValue != 65) {
  810. wtValue++;
  811. }
  812. if (wtR != 58) {
  813. wtR++;
  814. }
  815. if (wtL != 70) {
  816. wtL++;
  817. }
  818. if (wsValue != 60) {
  819. wsValue++;
  820. }
  821. if (wsR != 30) {
  822. wsR--;
  823. }
  824. if (wsL != 70) {
  825. wsL++;
  826. }
  827. if (jtValue != 75) {
  828. jtValue++;
  829. }
  830. if (jtR != 40) {
  831. jtR--;
  832. }
  833. if (jtL != 90) {
  834. jtL++;
  835. }
  836. if (ldValue != 90) {
  837. ldValue++;
  838. }
  839. if (num == 95) {
  840. clearInterval(fq);
  841. }
  842. reslult = [{
  843. name: "劳动和社会保障",
  844. value: ldValue,
  845. color: "#d1c00d",
  846. position: [ldR, 50],
  847. fontSize: "14",
  848. number: "4",
  849. },
  850. {
  851. name: "公共安全",
  852. value: aqValue,
  853. color: "#d1c00d",
  854. position: [aqL, aqR],
  855. fontSize: "14",
  856. number: "4",
  857. },
  858. {
  859. name: "环境保护",
  860. value: hjValue,
  861. color: "#d1c00d",
  862. position: [hjL, hjR],
  863. number: "4",
  864. fontSize: "14",
  865. },
  866. {
  867. name: "公共服务",
  868. value: 95,
  869. color: "#064d60",
  870. position: [45, 50],
  871. number: "4",
  872. fontSize: "16"
  873. },
  874. {
  875. name: "营商管理",
  876. value: ysValue,
  877. color: "#03d1d3",
  878. position: [ysL, ysR],
  879. fontSize: "12",
  880. number: "4",
  881. },
  882. {
  883. name: "文体科教",
  884. value: wtValue,
  885. color: "#03d1d3",
  886. position: [wtL, wtR],
  887. fontSize: "14",
  888. number: "4",
  889. },
  890. {
  891. name: "卫生健康",
  892. value: wsValue,
  893. color: "#00FFFF",
  894. position: [wsL, wsR],
  895. number: "4",
  896. fontSize: "14",
  897. },
  898. {
  899. name: "交通管理",
  900. value: jtValue,
  901. color: "#00FFFF",
  902. position: [jtL, jtR],
  903. fontSize: "14",
  904. number: "4",
  905. },
  906. ];
  907. var data = [];
  908. // 渲染数据,并写入chart
  909. reslult.map((item) => {
  910. data.push({
  911. name: item.name,
  912. value: item.position,
  913. symbolSize: item.value,
  914. label: {
  915. normal: {
  916. formatter: function(param) {
  917. var newParamsName = ""; //返回文字格式
  918. var paramsNameNumber = param.name.length; //获取显示文字长度
  919. var number = parseInt(item.number); //超过多少字换行
  920. var rowNumber = Math.ceil(paramsNameNumber / number); //最多能显示几行
  921. if (paramsNameNumber > number) {
  922. //如果长度大于每行最多显示的字数
  923. for (var p = 0; p < rowNumber; p++) {
  924. //循环次数就是行数
  925. var tempStr = ""; //每次截取的字符
  926. var start = p * number; //截取的起点
  927. var end = start + number; //截取的终点
  928. if (p == rowNumber - 1) {
  929. //最后一行就不换行了
  930. tempStr = param.name.substring(start);
  931. } else {
  932. tempStr = param.name.substring(start, end) + "\n";
  933. }
  934. newParamsName += tempStr; //拼接字符串
  935. }
  936. } else {
  937. newParamsName = param.name; //如果小于每行最多显示的字数就返回原来的字符串
  938. }
  939. return newParamsName;
  940. },
  941. show: true,
  942. textStyle: {
  943. fontSize: item.fontSize,
  944. fontFamily: "Microsoft YaHei",
  945. color: "#FFFFFF",
  946. fontWeight: "bold",
  947. opacity: 1,
  948. },
  949. },
  950. },
  951. itemStyle: {
  952. normal: { //右 下 左
  953. color: new echarts.graphic.RadialGradient(0, 0, 1, [{
  954. offset: 0.2,
  955. color: "#2a413b",
  956. },
  957. {
  958. offset: 1,
  959. color: item.color,
  960. },
  961. ]),
  962. opacity: 1,
  963. borderWidth: 1,
  964. borderColor: item.color,
  965. },
  966. },
  967. });
  968. });
  969. option = {
  970. // backgroundColor:'#092844',
  971. grid: {
  972. show: false,
  973. top: 10,
  974. bottom: 10,
  975. },
  976. graphic: {
  977. elements: [{
  978. type: "image",
  979. z: 3,
  980. style: {
  981. image: sourceImg,
  982. },
  983. left: '33%',
  984. top: '27%',
  985. }]
  986. },
  987. xAxis: [{
  988. gridIndex: 0,
  989. type: "value",
  990. show: false,
  991. min: 0,
  992. max: 100,
  993. nameLocation: "middle",
  994. nameGap: 5,
  995. }, ],
  996. yAxis: [{
  997. gridIndex: 0,
  998. min: 0,
  999. show: false,
  1000. max: 100,
  1001. nameLocation: "middle",
  1002. nameGap: 30,
  1003. }, ],
  1004. series: [{
  1005. type: "scatter",
  1006. symbol: "circle",
  1007. symbolSize: 120,
  1008. label: {
  1009. normal: {
  1010. show: true,
  1011. formatter: "{b}",
  1012. color: "#fff",
  1013. textStyle: {
  1014. fontSize: "20",
  1015. },
  1016. },
  1017. },
  1018. animationDurationUpdate: 500,
  1019. animationEasingUpdate: 500,
  1020. animationDelay: function(idx) {
  1021. // 越往后的数据延迟越大
  1022. return idx * 100;
  1023. },
  1024. data: data,
  1025. }, ],
  1026. }
  1027. myChart3.setOption(option)
  1028. }, 5)
  1029. // console.log(valueNum)
  1030. }
  1031. //一级地图
  1032. function areaMap() {
  1033. //地图
  1034. let lz;
  1035. let ay;
  1036. let yx;
  1037. let la;
  1038. let bg;
  1039. let gx;
  1040. let yd;
  1041. let ty;
  1042. let nh;
  1043. let wf;
  1044. let newJson;
  1045. //平台受理情况概况
  1046. new doAjax({
  1047. url: huayi.config.callcenter_url + "/InfoNew/GetAreaAcceptance",
  1048. data: {},
  1049. callBack: function(res) {
  1050. console.log(res)
  1051. console.log(res[0].jttate.split('%')[0])
  1052. $('.sqcount').text(res[0].sqcount)
  1053. $('.jttate').text(Number(res[0].jttate.split('%')[0]))
  1054. $('.zbrate').text(Number(res[0].zbrate.split('%')[0]))
  1055. $('.hfrate').text(Number(res[0].hfrate.split('%')[0]))
  1056. $('.contNum').countUp();
  1057. }
  1058. });
  1059. new doAjax({
  1060. url: huayi.config.callcenter_url + "/InfoNew/GetAreaCount",
  1061. data: {},
  1062. callBack: function(res) {
  1063. res.splice(0, 1);
  1064. wf = res[0];
  1065. bg = res[1];
  1066. yd = res[2];
  1067. la = res[3];
  1068. ay = res[4];
  1069. ty = res[5];
  1070. nh = res[6];
  1071. hx = res[7];
  1072. lz = res[8];
  1073. gx = res[9];
  1074. $('.map').click(function(e) {
  1075. $('.bulletFrame').show();
  1076. $('.map_wrap').show();
  1077. $('.map_wrap').siblings().hide()
  1078. if ($('.bulletFrame').css('display') == 'block') {
  1079. $('.body').css('opacity', '0.4')
  1080. }
  1081. if (e.target.tagName != 'LI') {
  1082. return;
  1083. }
  1084. if ($(e.target).text() == '林州市') {
  1085. map(lz.Areaid)
  1086. } else if ($(e.target).text() == '安阳县') {
  1087. map(ay.Areaid)
  1088. } else if ($(e.target).text() == '滑县') {
  1089. map(hx.Areaid)
  1090. } else if ($(e.target).text() == '龙安区') {
  1091. map(la.Areaid)
  1092. } else if ($(e.target).text() == '北关区') {
  1093. map(bg.Areaid)
  1094. } else if ($(e.target).text() == '高新区') {
  1095. map(gx.Areaid)
  1096. } else if ($(e.target).text() == '殷都区') {
  1097. map(yd.Areaid)
  1098. } else if ($(e.target).text() == '文峰区') {
  1099. map(wf.Areaid)
  1100. } else if ($(e.target).text() == '汤阴县') {
  1101. map(ty.Areaid)
  1102. } else if ($(e.target).text() == '内黄县') {
  1103. map(nh.Areaid)
  1104. }
  1105. })
  1106. }
  1107. });
  1108. //地图
  1109. $('.lzmap,.aymap,.lamap,.bgmap,.gxmap,.ydmap,.wfmap,.tymap,.nhmap,.hxmap').mouseleave(function(e) {
  1110. $('.wrap').css({
  1111. 'display': 'none'
  1112. })
  1113. })
  1114. $('.map').mouseover(function(e) {
  1115. if (e.target.tagName != 'LI') {
  1116. return;
  1117. }
  1118. if ($(e.target).text() == '林州市') {
  1119. $('.wrap').css({
  1120. 'display': 'block',
  1121. 'top': '30px',
  1122. 'left': '35px'
  1123. })
  1124. newJson = Object.assign({}, lz);
  1125. console.log(newJson)
  1126. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1127. delete newJson.AreaName;
  1128. delete newJson.Areaid;
  1129. }
  1130. Object.keys(newJson).forEach((key, n) => {
  1131. $('.lable_num')[n].innerText = newJson[key];
  1132. })
  1133. }
  1134. if ($(e.target).text() == '安阳县') {
  1135. $('.wrap').css({
  1136. 'display': 'block',
  1137. 'top': '-59px',
  1138. 'left': '161px'
  1139. })
  1140. console.log(newJson)
  1141. newJson = Object.assign({}, ay);
  1142. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1143. delete newJson.AreaName;
  1144. delete newJson.Areaid;
  1145. }
  1146. Object.keys(newJson).forEach((key, n) => {
  1147. $('.lable_num')[n].innerText = newJson[key];
  1148. // if(key=='blrate'||key=='mydrate'){
  1149. // newJson[key]=Number(newJson[key].split('%')[0])
  1150. // }
  1151. // console.log(Number(newJson[key]))
  1152. // $('.lable_num')[n].innerText =Number(newJson[key]);
  1153. })
  1154. // $('.lable_num').countUp();
  1155. }
  1156. if ($(e.target).text() == '滑县') {
  1157. $('.wrap').css({
  1158. 'display': 'block',
  1159. 'top': '343px',
  1160. 'left': '439px'
  1161. })
  1162. newJson = Object.assign({}, hx);
  1163. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1164. delete newJson.AreaName;
  1165. delete newJson.Areaid;
  1166. }
  1167. Object.keys(newJson).forEach((key, n) => {
  1168. $('.lable_num')[n].innerText = newJson[key];
  1169. })
  1170. }
  1171. if ($(e.target).text() == '龙安区') {
  1172. $('.wrap').css({
  1173. 'display': 'block',
  1174. 'top': '-53px',
  1175. 'left': '240px'
  1176. })
  1177. newJson = Object.assign({}, la);
  1178. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1179. delete newJson.AreaName;
  1180. delete newJson.Areaid;
  1181. }
  1182. Object.keys(newJson).forEach((key, n) => {
  1183. $('.lable_num')[n].innerText = newJson[key];
  1184. })
  1185. }
  1186. if ($(e.target).text() == '北关区') {
  1187. $('.wrap').css({
  1188. 'display': 'block',
  1189. 'top': '-58px',
  1190. 'left': '279px'
  1191. })
  1192. newJson = Object.assign({}, bg);
  1193. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1194. delete newJson.AreaName;
  1195. delete newJson.Areaid;
  1196. }
  1197. Object.keys(newJson).forEach((key, n) => {
  1198. $('.lable_num')[n].innerText = newJson[key];
  1199. })
  1200. }
  1201. if ($(e.target).text() == '高新区') {
  1202. $('.wrap').css({
  1203. 'display': 'block',
  1204. 'top': '-26px',
  1205. 'left': '270px'
  1206. })
  1207. newJson = Object.assign({}, gx);
  1208. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1209. delete newJson.AreaName;
  1210. delete newJson.Areaid;
  1211. }
  1212. Object.keys(newJson).forEach((key, n) => {
  1213. $('.lable_num')[n].innerText = newJson[key];
  1214. })
  1215. }
  1216. if ($(e.target).text() == '殷都区') {
  1217. $('.wrap').css({
  1218. 'display': 'block',
  1219. 'top': '-13px',
  1220. 'left': '228px'
  1221. })
  1222. newJson = Object.assign({}, yd);
  1223. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1224. delete newJson.AreaName;
  1225. delete newJson.Areaid;
  1226. }
  1227. Object.keys(newJson).forEach((key, n) => {
  1228. $('.lable_num')[n].innerText = newJson[key];
  1229. })
  1230. }
  1231. if ($(e.target).text() == '文峰区') {
  1232. $('.wrap').css({
  1233. 'display': 'block',
  1234. 'top': '-13px',
  1235. 'left': '300px'
  1236. })
  1237. newJson = Object.assign({}, wf);
  1238. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1239. delete newJson.AreaName;
  1240. delete newJson.Areaid;
  1241. }
  1242. Object.keys(newJson).forEach((key, n) => {
  1243. $('.lable_num')[n].innerText = newJson[key];
  1244. })
  1245. }
  1246. if ($(e.target).text() == '汤阴县') {
  1247. $('.wrap').css({
  1248. 'display': 'block',
  1249. 'top': '90px',
  1250. 'left': '327px'
  1251. })
  1252. newJson = Object.assign({}, ty);
  1253. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1254. delete newJson.AreaName;
  1255. delete newJson.Areaid;
  1256. }
  1257. Object.keys(newJson).forEach((key, n) => {
  1258. $('.lable_num')[n].innerText = newJson[key];
  1259. })
  1260. }
  1261. if ($(e.target).text() == '内黄县') {
  1262. $('.wrap').css({
  1263. 'display': 'block',
  1264. 'top': '76px',
  1265. 'left': '501px'
  1266. })
  1267. newJson = Object.assign({}, nh);
  1268. if (newJson.AreaName != undefined || newJson.Areaid != undefined) {
  1269. delete newJson.AreaName;
  1270. delete newJson.Areaid;
  1271. }
  1272. Object.keys(newJson).forEach((key, n) => {
  1273. $('.lable_num')[n].innerText = newJson[key];
  1274. })
  1275. }
  1276. })
  1277. }
  1278. //二级坐席
  1279. function traffic_chart(trafficName, trafficTime, sum, consult, help, complaint, proposal, praise, report, other) {
  1280. let trafficChart = echarts.init(document.getElementById('traffic'));
  1281. trafficChart.resize();
  1282. option = {
  1283. tooltip: {
  1284. trigger: 'axis',
  1285. axisPointer: {
  1286. show: true,
  1287. type: 'line',
  1288. lineStyle: {
  1289. type: 'dashed'
  1290. }
  1291. },
  1292. textStyle: {
  1293. color: '#ffe400',
  1294. fontSize: '14'
  1295. },
  1296. backgroundColor: 'rgba(250,250,250,0)',
  1297. formatter: function(params) {
  1298. let trafficStr = ''
  1299. params.forEach(function(v, n) {
  1300. trafficStr += '<li><h5>' + v.seriesName + ':</h5><div><span>' + parseInt(v.value %
  1301. 10000 / 1000) +
  1302. '</span><span>' + parseInt(v.value % 1000 / 100) +
  1303. '</span><span>' + parseInt((v.value % 100) / 10) +
  1304. '</span><span>' + parseInt(v.value % 10) + '</span></div></li>';
  1305. })
  1306. $('.traffic').html(trafficStr);
  1307. let str =
  1308. '<div style="background-image: url(images/secondary_img/reminder_box3.png);width:90px;height:195px;line-height:22px;background-size: 100% 100%;padding:8px 15px;">'
  1309. params.forEach(function(v, n) {
  1310. str +=
  1311. '<div><span style="color:#fff;width:50%;text-align: center;display: inline-block;">' +
  1312. v.seriesName +
  1313. ': </span><span style="width:45%;text-align: center;display: inline-block;">' +
  1314. v.value + '</span></div>'
  1315. })
  1316. str += '</div>';
  1317. return str;
  1318. }
  1319. },
  1320. toolbox: {
  1321. feature: {
  1322. saveAsImage: {
  1323. show: false
  1324. }
  1325. }
  1326. },
  1327. legend: {
  1328. data: trafficName,
  1329. textStyle: {
  1330. color: '#fff',
  1331. fontSize:16,
  1332. padding: [0, 5]
  1333. }
  1334. },
  1335. grid: {
  1336. left: '3%',
  1337. right: '4%',
  1338. bottom: '3%',
  1339. containLabel: true,
  1340. tooltip: {
  1341. textStyle: {
  1342. color: '#fff'
  1343. }
  1344. }
  1345. },
  1346. xAxis: [{
  1347. type: 'category',
  1348. boundaryGap: false,
  1349. axisLabel: {
  1350. color: "#f4f5f5",
  1351. fontSize: 16
  1352. },
  1353. data: trafficTime
  1354. }],
  1355. yAxis: [{
  1356. nameTextStyle: {
  1357. color: "#f4f5f5",
  1358. padding: [0, 0, 10, -5],
  1359. fontSize: 16
  1360. },
  1361. axisLabel: {
  1362. color: "#f4f5f5",
  1363. fontSize: 16
  1364. },
  1365. axisTick: {
  1366. lineStyle: {
  1367. color: "#687f8a",
  1368. width: 1
  1369. },
  1370. show: true
  1371. },
  1372. splitLine: {
  1373. show: true,
  1374. lineStyle: {
  1375. color: "#687f8a",
  1376. type: "dashed"
  1377. }
  1378. },
  1379. axisLine: {
  1380. lineStyle: {
  1381. color: "#687f8a",
  1382. width: 1,
  1383. type: "solid"
  1384. },
  1385. show: true,
  1386. // "symbol":['none', 'arrow'],
  1387. symbol: ['none',
  1388. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1389. ],
  1390. symbolOffset: 5,
  1391. symbolSize: [35, 38],
  1392. },
  1393. name: "条"
  1394. }],
  1395. series: [{
  1396. name: '总数',
  1397. type: 'line',
  1398. smooth: true,
  1399. symbol: 'circle',
  1400. // symbolSize: 3,
  1401. showSymbol: false,
  1402. lineStyle: {
  1403. normal: {
  1404. width: 0
  1405. }
  1406. },
  1407. areaStyle: {
  1408. normal: {
  1409. opacity: 0.8,
  1410. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1411. offset: 0,
  1412. color: '#8bffab'
  1413. }, {
  1414. offset: 1,
  1415. color: '#8bf0ff'
  1416. }], false),
  1417. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1418. shadowBlur: 10
  1419. }
  1420. },
  1421. itemStyle: {
  1422. normal: {
  1423. color: '#8bffab',
  1424. borderColor: '#8bffab',
  1425. borderWidth: 2
  1426. }
  1427. },
  1428. data: sum
  1429. }, {
  1430. name: '咨询',
  1431. type: 'line',
  1432. smooth: true,
  1433. // symbolSize: 5,
  1434. symbol: 'circle',
  1435. showSymbol: false,
  1436. lineStyle: {
  1437. normal: {
  1438. width: 0
  1439. }
  1440. },
  1441. areaStyle: {
  1442. normal: {
  1443. opacity: 0.8,
  1444. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1445. offset: 0,
  1446. color: '#2e90ff'
  1447. }, {
  1448. offset: 1,
  1449. color: '#2ddffe'
  1450. }], false),
  1451. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1452. shadowBlur: 10
  1453. }
  1454. },
  1455. itemStyle: {
  1456. normal: {
  1457. color: '#2e90ff',
  1458. borderColor: '#2e90ff',
  1459. borderWidth: 2
  1460. }
  1461. },
  1462. data: consult
  1463. }, {
  1464. name: '求助',
  1465. type: 'line',
  1466. smooth: true,
  1467. symbol: 'circle',
  1468. symbolSize: 5,
  1469. showSymbol: false,
  1470. lineStyle: {
  1471. normal: {
  1472. width: 0
  1473. }
  1474. },
  1475. areaStyle: {
  1476. normal: {
  1477. opacity: 0.8,
  1478. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1479. offset: 0,
  1480. color: '#3d2eff'
  1481. }, {
  1482. offset: 1,
  1483. color: '#39a5fc'
  1484. }], false),
  1485. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1486. shadowBlur: 10
  1487. }
  1488. },
  1489. itemStyle: {
  1490. normal: {
  1491. color: '#3d2eff',
  1492. borderColor: '#3d2eff',
  1493. borderWidth: 2
  1494. }
  1495. },
  1496. data: help
  1497. }, {
  1498. name: '建议',
  1499. type: 'line',
  1500. smooth: true,
  1501. symbol: 'circle',
  1502. symbolSize: 5,
  1503. showSymbol: false,
  1504. lineStyle: {
  1505. normal: {
  1506. width: 0
  1507. }
  1508. },
  1509. areaStyle: {
  1510. normal: {
  1511. opacity: 0.8,
  1512. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1513. offset: 0,
  1514. color: '#ff9126'
  1515. }, {
  1516. offset: 1,
  1517. color: '#fff226'
  1518. }], false),
  1519. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1520. shadowBlur: 10
  1521. }
  1522. },
  1523. itemStyle: {
  1524. normal: {
  1525. color: '#ff9126',
  1526. borderColor: '#ff9126',
  1527. borderWidth: 2
  1528. }
  1529. },
  1530. data: proposal
  1531. }, {
  1532. name: '投诉',
  1533. type: 'line',
  1534. smooth: true,
  1535. symbol: 'circle',
  1536. symbolSize: 5,
  1537. showSymbol: false,
  1538. lineStyle: {
  1539. normal: {
  1540. width: 0
  1541. }
  1542. },
  1543. areaStyle: {
  1544. normal: {
  1545. opacity: 0.8,
  1546. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1547. offset: 0,
  1548. color: '#fa0084'
  1549. }, {
  1550. offset: 1,
  1551. color: '#fa004c'
  1552. }], false),
  1553. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1554. shadowBlur: 10
  1555. }
  1556. },
  1557. itemStyle: {
  1558. normal: {
  1559. color: '#fa0084',
  1560. borderColor: '#fa0084',
  1561. borderWidth: 2
  1562. }
  1563. },
  1564. data: complaint
  1565. }, {
  1566. name: '表扬',
  1567. type: 'line',
  1568. smooth: true,
  1569. symbol: 'circle',
  1570. symbolSize: 5,
  1571. showSymbol: false,
  1572. lineStyle: {
  1573. normal: {
  1574. width: 0
  1575. }
  1576. },
  1577. areaStyle: {
  1578. normal: {
  1579. opacity: 0.8,
  1580. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1581. offset: 0,
  1582. color: '#36ff00'
  1583. }, {
  1584. offset: 1,
  1585. color: '#8dff6e'
  1586. }], false),
  1587. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1588. shadowBlur: 10
  1589. }
  1590. },
  1591. itemStyle: {
  1592. normal: {
  1593. color: '#36ff00',
  1594. borderColor: '#36ff00',
  1595. borderWidth: 2
  1596. }
  1597. },
  1598. data: praise
  1599. }, {
  1600. name: '举报',
  1601. type: 'line',
  1602. smooth: true,
  1603. symbol: 'circle',
  1604. symbolSize: 5,
  1605. showSymbol: false,
  1606. lineStyle: {
  1607. normal: {
  1608. width: 0
  1609. }
  1610. },
  1611. areaStyle: {
  1612. normal: {
  1613. opacity: 0.8,
  1614. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1615. offset: 0,
  1616. color: '#e097ff'
  1617. }, {
  1618. offset: 1,
  1619. color: '#b400ff'
  1620. }], false),
  1621. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1622. shadowBlur: 10
  1623. }
  1624. },
  1625. itemStyle: {
  1626. normal: {
  1627. color: '#e097ff',
  1628. borderColor: '#e097ff',
  1629. borderWidth: 2
  1630. }
  1631. },
  1632. data: report
  1633. }, {
  1634. name: '其他',
  1635. type: 'line',
  1636. smooth: true,
  1637. symbol: 'circle',
  1638. symbolSize: 5,
  1639. showSymbol: false,
  1640. lineStyle: {
  1641. normal: {
  1642. width: 0
  1643. }
  1644. },
  1645. areaStyle: {
  1646. normal: {
  1647. opacity: 0.8,
  1648. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1649. offset: 0,
  1650. color: '#00fff6'
  1651. }, {
  1652. offset: 1,
  1653. color: '#45fff8'
  1654. }], false),
  1655. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1656. shadowBlur: 10
  1657. }
  1658. },
  1659. itemStyle: {
  1660. normal: {
  1661. color: '#00fff6',
  1662. borderColor: '#00fff6',
  1663. borderWidth: 1
  1664. }
  1665. },
  1666. data: other
  1667. }]
  1668. };
  1669. trafficChart.setOption(option);
  1670. trafficChart.on('click', function(params) {
  1671. if (params.seriesName == '总数') {
  1672. acceptId = 0;
  1673. } else if (params.seriesName == '咨询') {
  1674. acceptId = 9;
  1675. } else if (params.seriesName == '求助') {
  1676. acceptId = 10;
  1677. } else if (params.seriesName == '投诉') {
  1678. acceptId = 11;
  1679. } else if (params.seriesName == '建议') {
  1680. acceptId = 12;
  1681. } else if (params.seriesName == '表扬') {
  1682. acceptId = 13;
  1683. } else if (params.seriesName == "举报") {
  1684. acceptId = 89;
  1685. } else {
  1686. acceptId = 90;
  1687. }
  1688. workTable(Number(params.name), acceptId)
  1689. });
  1690. }
  1691. //二级受理量统计
  1692. function acceptance_chart(data, data1, data2, data3, data4) {
  1693. let acceptanceChart = echarts.init(document.getElementById('acceptance'));
  1694. option = {
  1695. tooltip: {
  1696. trigger: 'axis',
  1697. axisPointer: {
  1698. show: true,
  1699. type: 'line',
  1700. lineStyle: {
  1701. type: 'dashed'
  1702. }
  1703. },
  1704. textStyle: {
  1705. color: '#ffe400',
  1706. fontSize: '14'
  1707. },
  1708. backgroundColor: 'rgba(250,250,250,0)',
  1709. formatter: function(params) {
  1710. let acceptanceStr = ''
  1711. params.forEach(function(v, n) {
  1712. acceptanceStr += '<li><label>' + v.seriesName + ':</label><span>' + parseInt(v
  1713. .value % 10000 / 1000) +
  1714. '</span><span>' + parseInt(v.value % 1000 / 100) +
  1715. '</span><span>' + parseInt((v.value % 100) / 10) +
  1716. '</span><span>' + parseInt(v.value % 10) + '</span></li>'
  1717. })
  1718. $('.acceptance_info').html(acceptanceStr);
  1719. let str =
  1720. '<div style="background-image: url(images/secondary_img/reminder_box3.png);width:134px;height:170px;line-height:25px;background-size: 100% 100%;padding:10px 20px;">'
  1721. let connectionRate = ((params[1].value / params[0].value) * 100).toFixed() + '%';
  1722. let workorderRate = ((params[3].value / params[2].value) * 100).toFixed() + '%';
  1723. params.splice(2, 0, {
  1724. seriesName: '电话接通率',
  1725. value: connectionRate
  1726. })
  1727. params.splice(5, 0, {
  1728. seriesName: '工单直办率',
  1729. value: workorderRate
  1730. })
  1731. params.forEach(function(v, n) {
  1732. str +=
  1733. '<div><span style="color:#fff;width:75px;text-align: center;display: inline-block;">' +
  1734. v.seriesName +
  1735. ':</span><span style:"width:55px;text-align: center;display: inline-block;">' +
  1736. v.value + '</span></div>'
  1737. })
  1738. str += '</div>';
  1739. return str;
  1740. }
  1741. },
  1742. toolbox: {
  1743. feature: {
  1744. saveAsImage: {
  1745. show: false
  1746. }
  1747. }
  1748. },
  1749. legend: {
  1750. data: ['电话呼入量', '电话接通量', '工单录入量', '工单直办量'],
  1751. textStyle: {
  1752. color: '#fff',
  1753. fontSize:16,
  1754. padding: [0, 5]
  1755. }
  1756. },
  1757. grid: {
  1758. left: '3%',
  1759. right: '4%',
  1760. bottom: '3%',
  1761. containLabel: true
  1762. },
  1763. xAxis: [{
  1764. type: 'category',
  1765. boundaryGap: false,
  1766. axisLabel: {
  1767. color: "#f4f5f5",
  1768. fontSize: 16
  1769. },
  1770. data: data
  1771. }],
  1772. yAxis: [{
  1773. nameTextStyle: {
  1774. color: "#f4f5f5",
  1775. padding: [0, 0, 10, -5],
  1776. fontSize: 16
  1777. },
  1778. axisLabel: {
  1779. color: "#f4f5f5",
  1780. fontSize: 16
  1781. },
  1782. axisTick: {
  1783. lineStyle: {
  1784. color: "#687f8a",
  1785. width: 1
  1786. },
  1787. show: true
  1788. },
  1789. splitLine: {
  1790. show: true,
  1791. lineStyle: {
  1792. color: "#687f8a",
  1793. type: "dashed"
  1794. }
  1795. },
  1796. axisLine: {
  1797. lineStyle: {
  1798. color: "#687f8a",
  1799. width: 1,
  1800. type: "solid"
  1801. },
  1802. show: true,
  1803. // "symbol":['none', 'arrow'],
  1804. symbol: ['none',
  1805. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  1806. ],
  1807. symbolOffset: 5,
  1808. symbolSize: [35, 38],
  1809. },
  1810. name: "条"
  1811. }],
  1812. series: [{
  1813. name: '电话呼入量',
  1814. type: 'line',
  1815. smooth: true,
  1816. symbol: 'circle',
  1817. symbolSize: 5,
  1818. showSymbol: false,
  1819. lineStyle: {
  1820. normal: {
  1821. width: 2
  1822. }
  1823. },
  1824. areaStyle: {
  1825. normal: {
  1826. opacity: 0.8,
  1827. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1828. offset: 0,
  1829. color: '#3ca086'
  1830. }, {
  1831. offset: 0.8,
  1832. color: '#257f76'
  1833. }], false),
  1834. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1835. shadowBlur: 10
  1836. }
  1837. },
  1838. itemStyle: {
  1839. normal: {
  1840. color: '#85f8a8',
  1841. borderColor: '#8bffab',
  1842. borderWidth: 2
  1843. }
  1844. },
  1845. data: data1
  1846. }, {
  1847. name: '电话接通量',
  1848. type: 'line',
  1849. smooth: true,
  1850. symbol: 'circle',
  1851. symbolSize: 5,
  1852. showSymbol: false,
  1853. lineStyle: {
  1854. normal: {
  1855. width: 2
  1856. }
  1857. },
  1858. areaStyle: {
  1859. normal: {
  1860. opacity: 0.8,
  1861. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1862. offset: 0,
  1863. color: '#30b5b9'
  1864. }, {
  1865. offset: 0.8,
  1866. color: '#24999d'
  1867. }], false),
  1868. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1869. shadowBlur: 10
  1870. }
  1871. },
  1872. itemStyle: {
  1873. normal: {
  1874. color: '#30b5b9',
  1875. borderColor: '#2ddffe',
  1876. borderWidth: 2
  1877. }
  1878. },
  1879. data: data2
  1880. }, {
  1881. name: '工单录入量',
  1882. type: 'line',
  1883. smooth: true,
  1884. symbol: 'circle',
  1885. symbolSize: 5,
  1886. showSymbol: false,
  1887. lineStyle: {
  1888. normal: {
  1889. width: 2
  1890. }
  1891. },
  1892. areaStyle: {
  1893. normal: {
  1894. opacity: 0.8,
  1895. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1896. offset: 0,
  1897. color: '#1682c4'
  1898. }, {
  1899. offset: 0.8,
  1900. color: '#1276aa'
  1901. }], false),
  1902. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1903. shadowBlur: 10
  1904. }
  1905. },
  1906. itemStyle: {
  1907. normal: {
  1908. color: '#38a4fa',
  1909. borderColor: '#39a5fc',
  1910. borderWidth: 2
  1911. }
  1912. },
  1913. data: data3
  1914. }, {
  1915. name: '工单直办量',
  1916. type: 'line',
  1917. smooth: true,
  1918. symbol: 'circle',
  1919. symbolSize: 5,
  1920. showSymbol: false,
  1921. lineStyle: {
  1922. normal: {
  1923. width: 2
  1924. }
  1925. },
  1926. areaStyle: {
  1927. normal: {
  1928. opacity: 0.8,
  1929. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  1930. offset: 0,
  1931. color: '#dd8d38'
  1932. }, {
  1933. offset: 0.8,
  1934. color: '#225f67'
  1935. }], false),
  1936. shadowColor: 'rgba(0, 0, 0, 0.1)',
  1937. shadowBlur: 10
  1938. }
  1939. },
  1940. itemStyle: {
  1941. normal: {
  1942. color: '#dd8d38',
  1943. borderColor: '#ac8753',
  1944. borderWidth: 2
  1945. }
  1946. },
  1947. data: data4
  1948. }]
  1949. };
  1950. acceptanceChart.setOption(option);
  1951. acceptanceChart.on('click', function(params) {
  1952. $('.bulletFrameT').show();
  1953. $('.callLogList').show();
  1954. $('.callLogList').siblings().hide()
  1955. if ($('.bulletFrameT').css('display') == 'block') {
  1956. $('.body').css('opacity', '0.4')
  1957. }
  1958. getCallList(Number(params.name))
  1959. })
  1960. }
  1961. //二级渠道统计
  1962. function channel_chart(data) {
  1963. let channelChart = echarts.init(document.getElementById('channel'));
  1964. const CubeLeft = echarts.graphic.extendShape({
  1965. shape: {
  1966. x: 0,
  1967. y: 0
  1968. },
  1969. buildPath: function(ctx, shape) {
  1970. const xAxisPoint = shape.xAxisPoint
  1971. const c0 = [shape.x, shape.y]
  1972. const c1 = [shape.x - 20, shape.y - 4]
  1973. const c2 = [xAxisPoint[0] - 20, xAxisPoint[1] - 4]
  1974. const c3 = [xAxisPoint[0], xAxisPoint[1]]
  1975. ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1])
  1976. .closePath()
  1977. }
  1978. })
  1979. const CubeRight = echarts.graphic.extendShape({
  1980. shape: {
  1981. x: 0,
  1982. y: 0
  1983. },
  1984. buildPath: function(ctx, shape) {
  1985. const xAxisPoint = shape.xAxisPoint
  1986. const c1 = [shape.x, shape.y]
  1987. const c2 = [xAxisPoint[0], xAxisPoint[1]]
  1988. const c3 = [xAxisPoint[0] + 8, xAxisPoint[1] - 4]
  1989. const c4 = [shape.x + 8, shape.y - 4]
  1990. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
  1991. .closePath()
  1992. }
  1993. })
  1994. const CubeTop = echarts.graphic.extendShape({
  1995. shape: {
  1996. x: 0,
  1997. y: 0
  1998. },
  1999. buildPath: function(ctx, shape) {
  2000. // 逆时针 角 y 负数向上 X 负数向左
  2001. const c1 = [shape.x, shape.y]
  2002. const c2 = [shape.x + 8, shape.y - 4]
  2003. const c3 = [shape.x - 11, shape.y - 8]
  2004. const c4 = [shape.x - 20, shape.y - 4]
  2005. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1])
  2006. .closePath()
  2007. }
  2008. })
  2009. echarts.graphic.registerShape('CubeLeft', CubeLeft)
  2010. echarts.graphic.registerShape('CubeRight', CubeRight)
  2011. echarts.graphic.registerShape('CubeTop', CubeTop)
  2012. let MAX = []
  2013. let VALUE = []
  2014. let LEV = []
  2015. let chartData = [].concat(data)
  2016. chartData.forEach(item => {
  2017. VALUE.push(item.landArea)
  2018. LEV.push(item.level)
  2019. })
  2020. let maxItem = [].concat(VALUE).sort((a, b) => b - a)[0]
  2021. let SUM = 0
  2022. for (let item of VALUE) {
  2023. SUM += item
  2024. MAX.push(maxItem)
  2025. }
  2026. option = {
  2027. tooltip: {
  2028. trigger: 'item',
  2029. textStyle: {
  2030. color: '#ffe400',
  2031. fontSize: '16',
  2032. fontWeight: '500'
  2033. },
  2034. position: 'top',
  2035. backgroundColor: 'rgba(250,250,250,0)',
  2036. transitionDuration: 0.4,
  2037. formatter: function(params) {
  2038. return '<div style="background-image: url(images/reminder_box2.png);width:50px;height:33px;line-height:30px;background-size: 100% 100%;text-align:center;">' +
  2039. VALUE[params.dataIndex] + '</div>';
  2040. }
  2041. },
  2042. grid: {
  2043. right: "5%",
  2044. top: "20%",
  2045. left: "5%",
  2046. bottom: "5%",
  2047. containLabel: true
  2048. },
  2049. xAxis: {
  2050. type: 'category',
  2051. data: LEV,
  2052. axisLine: {
  2053. show: true,
  2054. lineStyle: {
  2055. color: '#687e89'
  2056. }
  2057. },
  2058. offset: 10,
  2059. axisTick: {
  2060. show: false
  2061. },
  2062. axisLabel: {
  2063. fontSize: 14,
  2064. color: '#fff'
  2065. }
  2066. },
  2067. yAxis: [{
  2068. nameTextStyle: {
  2069. color: "#f4f5f5",
  2070. padding: [0, 0, 10, -5],
  2071. fontSize: 16
  2072. },
  2073. axisLabel: {
  2074. color: "#f4f5f5",
  2075. fontSize: 16
  2076. },
  2077. axisTick: {
  2078. lineStyle: {
  2079. color: "#687f8a",
  2080. width: 1
  2081. },
  2082. show: true
  2083. },
  2084. splitLine: {
  2085. show: true,
  2086. lineStyle: {
  2087. color: "#687f8a",
  2088. type: "dashed"
  2089. }
  2090. },
  2091. axisLine: {
  2092. lineStyle: {
  2093. color: "#687f8a",
  2094. width: 1,
  2095. type: "solid"
  2096. },
  2097. show: true,
  2098. // "symbol":['none', 'arrow'],
  2099. symbol: ['none',
  2100. 'path://M5, 20 L5, 5 L8, 8 L5, 2 L2, 8 L5, 5 L5.3, 6 L5.3, 20'
  2101. ],
  2102. symbolOffset: 5,
  2103. symbolSize: [35, 38],
  2104. },
  2105. name: "条"
  2106. }],
  2107. series: [{
  2108. type: 'custom',
  2109. renderItem: (params, api) => {
  2110. const location = api.coord([api.value(0), api.value(1)])
  2111. return {
  2112. type: 'group',
  2113. children: [{
  2114. type: 'CubeLeft',
  2115. shape: {
  2116. api,
  2117. xValue: api.value(0),
  2118. yValue: api.value(1),
  2119. x: location[0],
  2120. y: location[1],
  2121. xAxisPoint: api.coord([api.value(0), 0])
  2122. },
  2123. style: {
  2124. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2125. offset: 0,
  2126. color: '#3fffea'
  2127. }, {
  2128. offset: 1,
  2129. color: '#007eff'
  2130. }])
  2131. },
  2132. },
  2133. {
  2134. type: 'CubeRight',
  2135. shape: {
  2136. api,
  2137. xValue: api.value(0),
  2138. yValue: api.value(1),
  2139. x: location[0],
  2140. y: location[1],
  2141. xAxisPoint: api.coord([api.value(0), 0])
  2142. },
  2143. style: {
  2144. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2145. offset: 0,
  2146. color: '#2fbeaf' // 顶部
  2147. }, {
  2148. offset: 1,
  2149. color: '#015fbf' // 底部
  2150. }])
  2151. }
  2152. }, {
  2153. type: 'CubeTop',
  2154. shape: {
  2155. api,
  2156. xValue: api.value(0),
  2157. yValue: api.value(1),
  2158. x: location[0],
  2159. y: location[1],
  2160. xAxisPoint: api.coord([api.value(0), 0])
  2161. },
  2162. style: {
  2163. fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  2164. offset: 0,
  2165. color: '#9ffff5'
  2166. }, {
  2167. offset: 1,
  2168. color: '#9ffff5'
  2169. }])
  2170. },
  2171. }
  2172. ]
  2173. }
  2174. },
  2175. data: VALUE
  2176. }, {
  2177. type: 'bar',
  2178. itemStyle: {
  2179. color: 'rgba(255,255,255,0)'
  2180. },
  2181. emphasis: {
  2182. itemStyle: {
  2183. opacity: 0.2,
  2184. color: 'rgb(60,118,77)'
  2185. }
  2186. },
  2187. data: MAX
  2188. }, ]
  2189. }
  2190. channelChart.setOption(option);
  2191. channelChart.on('click', function(params) {
  2192. if (params.name == '市长信箱') {
  2193. sourceId = 2;
  2194. } else if (params.name == '市长电话') {
  2195. sourceId = 1;
  2196. } else if (params.name == '微博') {
  2197. sourceId = 3;
  2198. } else if (params.name == '微信') {
  2199. sourceId = 5;
  2200. } else if (params.name == '短信平台') {
  2201. sourceId = 6;
  2202. } else if (params.name == '中国政府网') {
  2203. sourceId = 2459;
  2204. } else if (params.name == "人民网") {
  2205. sourceId = 4;
  2206. } else if (params.name == '连线政府') {
  2207. sourceId = 2458;
  2208. } else if (params.name == "连线政府") {
  2209. acceptId = 2501;
  2210. } else {
  2211. sourceId = 7;
  2212. }
  2213. workTable('', '', sourceId)
  2214. })
  2215. }
  2216. //二级关键字饼图
  2217. function keyword_chart(id, data, data1) {
  2218. let keywordPieChart = echarts.init(document.getElementById(id));
  2219. let keywordNum = [];
  2220. let keywordName = [];
  2221. var rich = {
  2222. percent: {
  2223. color: "#FFF",
  2224. align: 'right',
  2225. fontSize: 15,
  2226. fontWeight: '500',
  2227. //padding: [0, 5]
  2228. }
  2229. }
  2230. data.forEach(function(v, n) {
  2231. keywordNum.push({
  2232. num: Number(v.substr(v.length - 2, 2)),
  2233. value: v
  2234. })
  2235. })
  2236. let max;
  2237. for (let i = 0; i < keywordNum.length; i++) {
  2238. for (let j = i; j < keywordNum.length; j++) {
  2239. if (keywordNum[i].num < keywordNum[j].num) {
  2240. max = keywordNum[j];
  2241. keywordNum[j] = keywordNum[i];
  2242. keywordNum[i] = max;
  2243. }
  2244. }
  2245. }
  2246. keywordNum.forEach(function(v, n) {
  2247. keywordName.push(v.value);
  2248. })
  2249. keywordName.reverse();
  2250. option = {
  2251. legend: [{
  2252. icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
  2253. orient: 'vertical',
  2254. top: '680',
  2255. data: keywordName.slice(0, 8),
  2256. width: 28,
  2257. height: 25,
  2258. textStyle: {
  2259. color: '#fff',
  2260. padding: [0, 5],
  2261. fontSize: 15
  2262. },
  2263. padding: [40, 10]
  2264. }, {
  2265. icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
  2266. orient: 'vertical',
  2267. top: '670',
  2268. data: keywordName.slice(8, 16),
  2269. width: 28,
  2270. height: 25,
  2271. itemGap: 20,
  2272. textStyle: {
  2273. color: '#fff',
  2274. padding: [0, 5],
  2275. fontSize: 15
  2276. },
  2277. padding: [80, 10]
  2278. }],
  2279. color: ['#008aff', '#88ffb7', '#00bba7', '#fddb6a', '#fb6a76',
  2280. '#ff0000', '#e5a0ff', '#9b56ff', '#8200f0', '#68f6ff',
  2281. '#FF8352', '#E271DE', '#F8456B', '#3751E6', '#FFC722',
  2282. '#00BFA5', "#EAEA26"
  2283. ],
  2284. series: [{
  2285. name: '访问来源',
  2286. type: 'pie',
  2287. radius: '58%',
  2288. data: data1,
  2289. emphasis: {
  2290. itemStyle: {
  2291. shadowBlur: 10,
  2292. shadowOffsetX: 0,
  2293. shadowColor: 'rgba(0, 0, 0, 0.5)'
  2294. }
  2295. },
  2296. label: {
  2297. normal: {
  2298. show: false,
  2299. position: 'inner',
  2300. formatter: params => {
  2301. return (
  2302. '{percent|' + params.percent.toFixed(0) + '%}'
  2303. );
  2304. },
  2305. rich: rich,
  2306. }
  2307. },
  2308. // label: {
  2309. // normal: {
  2310. // show: false,
  2311. // formatter: function(params) {
  2312. // return params.name + ':' + params.value
  2313. // // return
  2314. // },
  2315. // },
  2316. // emphasis: {
  2317. // position: 'left',
  2318. // show: true,
  2319. // textStyle: {
  2320. // color: '#fff',
  2321. // fontSize: '14',
  2322. // fontWeight: 'bold'
  2323. // },
  2324. // length: 1
  2325. // }
  2326. // },
  2327. }]
  2328. };
  2329. keywordPieChart.setOption(option);
  2330. }
  2331. //二级关键字表格
  2332. function keyWordTable(id) {
  2333. var $tableLeft = $('#orderlist');
  2334. $tableLeft.bootstrapTable('destroy');
  2335. //初始化表格,动态从服务器加载数据
  2336. $tableLeft.bootstrapTable({
  2337. method: "get", //使用get请求到服务器获取数据
  2338. url: huayi.config.callcenter_url + "/InfoNew/GetKeyCountByNow",
  2339. striped: false, //表格显示条纹
  2340. pagination: false, //启动分页
  2341. pageSize: 12, //每页显示的记录数
  2342. pageNumber: 1, //当前第几页
  2343. fixedColumns: false,
  2344. fixedNumber: 3,
  2345. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  2346. search: false, //是否启用查询
  2347. showColumns: false, //显示下拉框勾选要显示的列
  2348. showRefresh: false, //显示刷新按钮
  2349. sidePagination: "server", //表示服务端请求
  2350. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2351. //设置为limit可以获取limit, offset, search, sort, order
  2352. queryParamsType: "undefined",
  2353. queryParams: function queryParams(params) { //设置查询参数
  2354. var param = {
  2355. pid: id
  2356. }
  2357. return param
  2358. },
  2359. onLoadSuccess: function(data) { //加载成功时执行
  2360. const newDataL = {};
  2361. const piData = [];
  2362. newDataL.state = data.state;
  2363. newDataL.message = data.message;
  2364. newDataL.rows = data.data.Date;
  2365. // newDataL.total = data.data.total;
  2366. console.log(newDataL);
  2367. data.data.Date.forEach(function(v, n) {
  2368. piData.push({
  2369. value: v.Count,
  2370. name: v.KeyName
  2371. })
  2372. })
  2373. var nameArray = piData.map(item => {
  2374. return item.name
  2375. })
  2376. keyword_chart('keywordPie', nameArray, piData);
  2377. $('.total').text(data.data.Total)
  2378. $('.classTotal').text(data.data.ClaseeCount)
  2379. $('.prot').text(data.data.ClassTotal)
  2380. $tableLeft.bootstrapTable('load', newDataL);
  2381. },
  2382. onLoadError: function() { //加载失败时执行
  2383. layer.msg("加载数据失败", {
  2384. time: 1500,
  2385. icon: 2
  2386. });
  2387. }
  2388. });
  2389. }
  2390. function getHandling(cont) {
  2391. let sortPie = echarts.init(document.getElementById('sortPie'));
  2392. option = {
  2393. legend: [{
  2394. icon: `path://M881.387 297.813c38.08 65.387 57.28 136.747 57.28 214.187s-19.094 148.8-57.28 214.187c-38.187 65.28-89.92 117.12-155.2 155.2S589.44 938.667 512 938.667s-148.8-19.094-214.187-57.28c-65.28-38.08-117.013-89.814-155.306-155.307C104.427 660.8 85.333 589.44 85.333 512c0-77.333 19.094-148.693 57.28-214.187 38.08-65.28 89.814-117.013 155.307-155.306C363.2 104.533 434.56 85.333 512 85.333c77.333 0 148.693 19.094 214.187 57.28 65.28 38.187 117.013 89.92 155.2 155.2z m-217.707-47.36C617.387 223.467 566.827 209.92 512 209.92s-105.387 13.547-151.68 40.533-82.987 63.68-109.973 109.974c-26.987 46.293-40.534 96.853-40.534 151.68s13.547 105.386 40.534 151.68c26.986 46.293 63.68 82.986 109.973 109.973 46.293 26.987 96.853 40.533 151.68 40.533s105.387-13.546 151.68-40.533c46.293-26.987 82.987-63.68 109.973-109.973 26.987-46.294 40.534-96.854 40.534-151.68s-13.547-105.387-40.534-151.68c-27.093-46.294-63.786-82.987-109.973-109.974z`,
  2395. orient: 'vertical',
  2396. data: ['督办', '直办', '转办', '催办'],
  2397. left: '80%',
  2398. top: 'center',
  2399. align: 'left',
  2400. textStyle: {
  2401. color: "#fff",
  2402. fontSize:18
  2403. },
  2404. padding: [10, 60],
  2405. itemGap: 20
  2406. }],
  2407. color: ['#c046ff', '#00a8ff', '#00ffe4', '#f1b31e'],
  2408. series: [{
  2409. name: '访问来源',
  2410. type: 'pie',
  2411. radius: '58%',
  2412. data: cont,
  2413. emphasis: {
  2414. itemStyle: {
  2415. shadowBlur: 10,
  2416. shadowOffsetX: 0,
  2417. shadowColor: 'rgba(0, 0, 0, 0.5)'
  2418. }
  2419. },
  2420. label: {
  2421. normal: {
  2422. show: false,
  2423. formatter: function(params) {
  2424. return params.name + ':' + params.value
  2425. // return
  2426. },
  2427. },
  2428. emphasis: {
  2429. position: 'left',
  2430. show: true,
  2431. textStyle: {
  2432. color: '#fff',
  2433. fontSize: '18',
  2434. fontWeight: 'bold'
  2435. },
  2436. length: 1
  2437. }
  2438. },
  2439. }]
  2440. };
  2441. sortPie.setOption(option);
  2442. }
  2443. function getNowFormatDate() {
  2444. var date = new Date();
  2445. var year = date.getFullYear();
  2446. var month = date.getMonth() + 1;
  2447. var strDate = date.getDate();
  2448. var Hour = date.getHours(); // 获取当前小时数(0-23)
  2449. var Minute = date.getMinutes(); // 获取当前分钟数(0-59)
  2450. var Second = date.getSeconds(); // 获取当前秒数(0-59)
  2451. var show_day = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
  2452. var day = date.getDay();
  2453. if (Hour < 10) {
  2454. Hour = "0" + Hour;
  2455. }
  2456. if (Minute < 10) {
  2457. Minute = "0" + Minute;
  2458. }
  2459. if (Second < 10) {
  2460. Second = "0" + Second;
  2461. }
  2462. if (month >= 1 && month <= 9) {
  2463. month = "0" + month;
  2464. }
  2465. if (strDate >= 0 && strDate <= 9) {
  2466. strDate = "0" + strDate;
  2467. }
  2468. var currentdate = '<div><p>' + year + '-' + month + '-' + strDate + '&nbsp;</p></div>';
  2469. var HMS = Hour + ':' + Minute + ':' + Second;
  2470. var temp_time = year + '-' + month + '-' + strDate + ' ' + HMS;
  2471. $('.nowTime li:nth-child(2)').html(HMS);
  2472. $('.nowTime li:nth-child(3)').html(currentdate);
  2473. $('.statisticsTime').text(temp_time);
  2474. setTimeout(getNowFormatDate, 1000); //每隔1秒重新调用一次该函数
  2475. }
  2476. function getData() {
  2477. const date = new Date();
  2478. const year = date.getFullYear();
  2479. const month = date.getMonth() + 1;
  2480. const lastdate = new Date(); //中国标准时间
  2481. lastdate.setMonth(lastdate.getMonth());
  2482. const y = lastdate.getFullYear(); //获取完整的年份(4位)
  2483. const m = lastdate.getMonth(); //获取当前月份(0-11,0代表1月)
  2484. $('.data_time').text(y + '-' + m + '-20' + ' 至 ' + year + '-' + month + '-21');
  2485. $('.renkList_time').text(y + '-' + m + '-20' + ' 至 ' + year + '-' + month + '-21');
  2486. }
  2487. function map(id) {
  2488. let typeId = 0
  2489. mapTable(typeId, id);
  2490. $('.showInfo .btn_left').click(function() {
  2491. if (typeId != 0) {
  2492. typeId--;
  2493. }
  2494. mapTable(typeId, id);
  2495. })
  2496. $('.showInfo .btn_right').click(function() {
  2497. if (typeId != 2) {
  2498. typeId++;
  2499. }
  2500. mapTable(typeId, id);
  2501. })
  2502. // 在指定容器创建地图实例并设置最大最小缩放级别
  2503. var map = new BMap.Map("allmap", {
  2504. minZoom: 5,
  2505. maxZoom: 19
  2506. });
  2507. // 初始化地图,设置中心点和显示级别
  2508. var point = new BMap.Point(114.364451, 36.097709);
  2509. map.centerAndZoom(point, 13);
  2510. var myIcon = new BMap.Icon("./images/secondary_img/map_icon.png", new BMap.Size(45, 45));
  2511. var marker = new BMap.Marker(point, {
  2512. icon: myIcon
  2513. }); // 创建标注
  2514. map.addOverlay(marker);
  2515. // 开启鼠标滚轮缩放功能,仅对PC上有效
  2516. map.enableScrollWheelZoom(true);
  2517. //将控件(平移缩放控件)添加到地图上
  2518. map.addControl(new BMap.NavigationControl({
  2519. type: BMAP_NAVIGATION_CONTROL_LARGE, //缩放控件类型 仅包含缩放按钮
  2520. anchor: BMAP_ANCHOR_BOTTOM_RIGHT, //右下角
  2521. }));
  2522. var opts = {
  2523. boxStyle: {
  2524. width: "350px",
  2525. height: "195px"
  2526. },
  2527. // enableAutoPan: true,
  2528. // align: INFOBOX_AT_TOP,
  2529. // closeIconUrl: 'icon/close.png',
  2530. closeIconMargin: '0px',
  2531. closeIconZIndex: 1,
  2532. closeIconWidth: '15px'
  2533. }
  2534. var html = "<div class='modal' style='height: 160px;width:350px;font-size:12px;margin-left:20px'>" +
  2535. "<div><table>\n" +
  2536. "<tr><td >工单编号:<a href='#'>###########################</a></td></tr>\n" +
  2537. "<tr><td >地址:########################### </td></tr>\n" +
  2538. "<tr><td >问题分类:###########################</td></tr>\n" +
  2539. "<tr><td >来电人:赵先生</td></tr>\n" +
  2540. "<tr><td >来电号码:158#######</td></tr>\n" +
  2541. "<tr><td >办理单位:安阳市文峰区市政府</td></tr>\n" +
  2542. "<tr><td >来电类别:求助</td></tr>\n" +
  2543. "<tr><td >是否按期办理:按期办理</td></tr>\n" +
  2544. "</table></div></div>";
  2545. var infoWindow = new BMap.InfoWindow(html, opts); // 创建信息窗口对象
  2546. marker.addEventListener("click", function() {
  2547. map.openInfoWindow(infoWindow, point); //开启信息窗口
  2548. });
  2549. }
  2550. function timeTable() {
  2551. new doAjax({
  2552. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime",
  2553. data: {},
  2554. callBack: function(res) {
  2555. // res.reverse();
  2556. let str = ''
  2557. let num;
  2558. res.forEach(function(v, n) {
  2559. num = 1 + n
  2560. if (n == 0) {
  2561. str += '<li><div><img src="./images/No1.png" alt=""></div><div>' + v.deptname +
  2562. '</div><div>' + v.timeday + 'h</div></li>'
  2563. } else if (n == 1) {
  2564. str += '<li><div><img src="./images/No2.png" alt=""></div><div>' + v.deptname +
  2565. '</div><div>' + v.timeday + 'h</div></li>'
  2566. } else if (n == 2) {
  2567. str += '<li><div><img src="./images/No3.png" alt=""></div><div>' + v.deptname +
  2568. '</div><div>' + v.timeday + 'h</div></li>'
  2569. } else {
  2570. str += '<li><div>' + num + '</div><div>' + v.deptname + '</div><div>' + v
  2571. .timeday + 'h</div></li>'
  2572. }
  2573. })
  2574. $('.time_statistics ul').html(str);
  2575. }
  2576. });
  2577. }
  2578. function timeSecTable() {
  2579. var $tableLeft = $('#timeSecList');
  2580. $tableLeft.bootstrapTable('destroy');
  2581. //初始化表格,动态从服务器加载数据
  2582. $tableLeft.bootstrapTable({
  2583. method: "get", //使用get请求到服务器获取数据
  2584. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDayTime",
  2585. striped: false, //表格显示条纹
  2586. pagination: false, //启动分页
  2587. pageSize: 12, //每页显示的记录数
  2588. pageNumber: 1, //当前第几页
  2589. fixedColumns: false,
  2590. fixedNumber: 3,
  2591. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  2592. search: false, //是否启用查询
  2593. showColumns: false, //显示下拉框勾选要显示的列
  2594. showRefresh: false, //显示刷新按钮
  2595. sidePagination: "server", //表示服务端请求
  2596. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2597. //设置为limit可以获取limit, offset, search, sort, order
  2598. queryParamsType: "undefined",
  2599. queryParams: function queryParams(params) { //设置查询参数
  2600. },
  2601. onLoadSuccess: function(data) { //加载成功时执行
  2602. // data.reverse();
  2603. const newDataL = {};
  2604. newDataL.state = "success";
  2605. newDataL.message = "加载成功";
  2606. newDataL.rows = data;
  2607. $tableLeft.bootstrapTable('load', newDataL);
  2608. },
  2609. onLoadError: function() { //加载失败时执行
  2610. layer.msg("加载数据失败", {
  2611. time: 1500,
  2612. icon: 2
  2613. });
  2614. }
  2615. });
  2616. }
  2617. function testTable() {
  2618. new doAjax({
  2619. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDeptAchievements",
  2620. data: {},
  2621. callBack: function(data) {
  2622. var max;
  2623. for (var i = 0; i < data.length; i++) {
  2624. for (var j = i; j < data.length; j++) {
  2625. if (data[i].total < data[j].total) {
  2626. max = data[j];
  2627. data[j] = data[i];
  2628. data[i] = max;
  2629. }
  2630. }
  2631. }
  2632. let str = ''
  2633. let num;
  2634. data.forEach(function(v, n) {
  2635. num = 1 + n
  2636. if (n == 0) {
  2637. str += '<li><div><img src="./images/No1.png" alt=""></div><div>' + v.deptname +
  2638. '</div><div>' + v.total + '</div></li>'
  2639. } else if (n == 1) {
  2640. str += '<li><div><img src="./images/No2.png" alt=""></div><div>' + v.deptname +
  2641. '</div><div>' + v.total + '</div></li>'
  2642. } else if (n == 2) {
  2643. str += '<li><div><img src="./images/No3.png" alt=""></div><div>' + v.deptname +
  2644. '</div><div>' + v.total + '</div></li>'
  2645. } else {
  2646. str += '<li><div>' + num + '</div><div>' + v.deptname + '</div><div>' + v
  2647. .total + '</div></li>'
  2648. }
  2649. })
  2650. console.log(str)
  2651. $('.test_rank ul').html(str);
  2652. }
  2653. });
  2654. //表格滚动
  2655. }
  2656. function testSecTable(id, type, group) {
  2657. var $tableLeft = $(id);
  2658. $tableLeft.bootstrapTable('destroy');
  2659. //初始化表格,动态从服务器加载数据
  2660. $tableLeft.bootstrapTable({
  2661. method: "get", //使用get请求到服务器获取数据
  2662. url: huayi.config.callcenter_url + "/InfoNew/GetDeptDeptAchievements",
  2663. striped: false, //表格显示条纹
  2664. pagination: false, //启动分页
  2665. pageSize: 12, //每页显示的记录数
  2666. pageNumber: 1, //当前第几页
  2667. fixedColumns: false,
  2668. fixedNumber: 3,
  2669. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  2670. search: false, //是否启用查询
  2671. showColumns: false, //显示下拉框勾选要显示的列
  2672. showRefresh: false, //显示刷新按钮
  2673. sidePagination: "server", //表示服务端请求
  2674. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2675. //设置为limit可以获取limit, offset, search, sort, order
  2676. queryParamsType: "undefined",
  2677. queryParams: function queryParams(params) { //设置查询参数
  2678. return {
  2679. type: type,
  2680. }
  2681. },
  2682. onLoadSuccess: function(data) { //加载成功时执行
  2683. const newDataL = {};
  2684. const typeData1 = [];
  2685. const typeData2 = [];
  2686. var max;
  2687. for (var i = 0; i < data.length; i++) {
  2688. for (var j = i; j < data.length; j++) {
  2689. if (data[i].total < data[j].total) {
  2690. max = data[j];
  2691. data[j] = data[i];
  2692. data[i] = max;
  2693. }
  2694. }
  2695. }
  2696. if (type == 1) {
  2697. data.forEach(function(v, n) {
  2698. if (v.workordrcount <= 10) {
  2699. typeData1.push(v)
  2700. } else {
  2701. typeData2.push(v)
  2702. }
  2703. })
  2704. if (group == 0) {
  2705. newDataL.rows = typeData2;
  2706. } else {
  2707. newDataL.rows = typeData1;
  2708. }
  2709. } else {
  2710. newDataL.rows = data;
  2711. }
  2712. newDataL.state = "success";
  2713. newDataL.message = "加载成功";
  2714. $tableLeft.bootstrapTable('load', newDataL);
  2715. },
  2716. onLoadError: function() { //加载失败时执行
  2717. layer.msg("加载数据失败", {
  2718. time: 1500,
  2719. icon: 2
  2720. });
  2721. }
  2722. });
  2723. }
  2724. function workTable(hours, type, source, handling, deptid, timetype, KeyId, kpcontent, kptype, key, sourceArea, Satisfie,dptype) {
  2725. $('.bulletFrameT').show();
  2726. $('.workList').show();
  2727. $('.workList').siblings().hide()
  2728. if ($('.bulletFrameT').css('display') == 'block') {
  2729. $('.body').css('opacity', '0.4')
  2730. }
  2731. //先销毁表格
  2732. $('#workList').bootstrapTable('destroy');
  2733. //初始化表格,动态从服务器加载数据
  2734. $('#workList').bootstrapTable({
  2735. method: "get", //使用get请求到服务器获取数据
  2736. url: huayi.config.callcenter_url + "/InfoNew/WorkOrdrList", //获取数据的Servlet地址
  2737. // url:"http://192.168.8.9:1042/InfoNew/WorkOrdrList", //获取数据的Servlet地址
  2738. contentType: "application/x-www-form-urlencoded",
  2739. striped: false, //表格显示条纹
  2740. pagination: true, //启动分页
  2741. pageSize: 13, //每页显示的记录数
  2742. pageNumber: 1, //当前第几页
  2743. pageList: [15, 30, 60, 100], //记录数可选列表
  2744. search: false, //是否启用查询
  2745. showColumns: false, //显示下拉框勾选要显示的列
  2746. showRefresh: false, //显示刷新按钮
  2747. sidePagination: "server", //表示服务端请求
  2748. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2749. //设置为limit可以获取limit, offset, search, sort, order
  2750. queryParamsType: "undefined",
  2751. queryParams: function queryParams(params) { //设置查询参数
  2752. var param = {
  2753. page: params.pageNumber,
  2754. pagesize: params.pageSize,
  2755. hours: hours,
  2756. type: type,
  2757. source: source,
  2758. deptid: deptid,
  2759. timetype: timetype,
  2760. KeyId: KeyId,
  2761. kpcontent: kpcontent,
  2762. kptype: kptype,
  2763. key: key,
  2764. sourceArea: sourceArea,
  2765. Satisfie: Satisfie,
  2766. dptype: dptype
  2767. };
  2768. return param;
  2769. },
  2770. responseHandler: function(res) {
  2771. // //格式化数据
  2772. return {
  2773. "rows": res.rows, //数据
  2774. "total": res.total
  2775. };
  2776. },
  2777. onLoadSuccess: function(res) { //加载成功时执行
  2778. },
  2779. onLoadError: function() { //加载失败时执行
  2780. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  2781. }
  2782. });
  2783. }
  2784. function getCallList(hours) {
  2785. $('#callList').bootstrapTable('destroy');
  2786. //初始化表格,动态从服务器加载数据
  2787. $('#callList').bootstrapTable({
  2788. method: "get", //使用get请求到服务器获取数据
  2789. url: huayi.config.callcenter_url + "/InfoNew/GetCallList", //获取数据的Servlet地址
  2790. contentType: "application/x-www-form-urlencoded",
  2791. striped: true, //表格显示条纹
  2792. smartDisplay: false,
  2793. pagination: true, //启动分页
  2794. pageSize: 13, //每页显示的记录数
  2795. pageNumber: 1, //当前第几页
  2796. // pageList: [10, 20, 50, 100], //记录数可选列表
  2797. search: false, //是否启用查询
  2798. showColumns: false, //显示下拉框勾选要显示的列
  2799. showRefresh: false, //显示刷新按钮
  2800. sidePagination: "server", //表示服务端请求
  2801. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2802. //设置为limit可以获取limit, offset, search, sort, order
  2803. queryParamsType: "undefined",
  2804. queryParams: function queryParams(params) { //设置查询参数
  2805. var param = {
  2806. PageIndex: params.pageNumber,
  2807. PageSize: params.pageSize,
  2808. hours: hours,
  2809. callstate: 1,
  2810. calltype: 0
  2811. };
  2812. return param;
  2813. },
  2814. responseHandler: function(res) {
  2815. //格式化数据
  2816. return {
  2817. "rows": res.rows, //数据
  2818. "total": res.total
  2819. };
  2820. },
  2821. onLoadSuccess: function(res) { //加载成功时执行
  2822. },
  2823. onLoadError: function() { //加载失败时执行
  2824. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  2825. }
  2826. });
  2827. }
  2828. //二级地图
  2829. function mapTable(type, areaid) {
  2830. $('.bulletFrameT').hide();
  2831. $('.bulletFrame').show();
  2832. $('.map_wrap').show();
  2833. $('.map_wrap').siblings().hide();
  2834. $('#mapList').bootstrapTable('destroy');
  2835. //初始化表格,动态从服务器加载数据
  2836. $('#mapList').bootstrapTable({
  2837. method: "get", //使用get请求到服务器获取数据
  2838. url: huayi.config.callcenter_url + "/InfoNew/GetMapByNow", //获取数据的Servlet地址
  2839. // url:"http://192.168.8.9:1042/InfoNew/GetMapByNow",
  2840. contentType: "application/x-www-form-urlencoded",
  2841. striped: true, //表格显示条纹
  2842. pagination: false, //启动分页
  2843. pageSize: 10, //每页显示的记录数
  2844. pageNumber: 1, //当前第几页
  2845. pageList: [10, 20, 50, 100], //记录数可选列表
  2846. search: false, //是否启用查询
  2847. showColumns: false, //显示下拉框勾选要显示的列
  2848. showRefresh: false, //显示刷新按钮
  2849. sidePagination: "server", //表示服务端请求
  2850. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2851. //设置为limit可以获取limit, offset, search, sort, order
  2852. queryParamsType: "undefined",
  2853. queryParams: function queryParams(params) { //设置查询参数
  2854. var param = {
  2855. type: type,
  2856. areaid: areaid
  2857. };
  2858. return param;
  2859. },
  2860. // responseHandler: function(res) {
  2861. // return {
  2862. // "rows": res.rows, //数据
  2863. // // "total":res.total
  2864. // };
  2865. // },
  2866. onLoadSuccess: function(res) { //加载成功时执行
  2867. const newDataL = {};
  2868. let str = ''
  2869. res.forEach(function(v, n) {
  2870. str += '<li><label><img src="./images/secondary_img/map' + n +
  2871. '_icon.png" alt=""><span>' + v.name + '</span></label></li>'
  2872. v.areaid = areaid;
  2873. v.type = type;
  2874. })
  2875. console.log(res)
  2876. newDataL.state = "success";
  2877. newDataL.message = "加载成功";
  2878. newDataL.rows = res;
  2879. console.log(newDataL)
  2880. $('#mapList').bootstrapTable('load', newDataL);
  2881. $('.infoTitle').html(str);
  2882. },
  2883. onLoadError: function() { //加载失败时执行
  2884. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  2885. }
  2886. });
  2887. }
  2888. //平台状况表格
  2889. function acceptlist(id) {
  2890. if (id == 0) {
  2891. $('.acceptCont .key_content h3').text('督办分类统计')
  2892. } else if (id == 1) {
  2893. $('.acceptCont .key_content h3').text('直办分类统计')
  2894. } else if (id == 2) {
  2895. $('.acceptCont .key_content h3').text('转办分类统计')
  2896. } else {
  2897. $('.acceptCont .key_content h3').text('催办分类统计')
  2898. }
  2899. var $tableLeft = $('#acceptContlist');
  2900. $tableLeft.bootstrapTable('destroy');
  2901. //初始化表格,动态从服务器加载数据
  2902. $tableLeft.bootstrapTable({
  2903. method: "get", //使用get请求到服务器获取数据
  2904. // url: huayi.config.callcenter_url + "handling",
  2905. url: huayi.config.callcenter_url + "InfoNew/GetHandleCount",
  2906. striped: false, //表格显示条纹
  2907. pagination: false, //启动分页
  2908. pageSize: 12, //每页显示的记录数
  2909. pageNumber: 1, //当前第几页
  2910. fixedColumns: false,
  2911. fixedNumber: 3,
  2912. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  2913. search: false, //是否启用查询
  2914. showColumns: false, //显示下拉框勾选要显示的列
  2915. showRefresh: false, //显示刷新按钮
  2916. sidePagination: "server", //表示服务端请求
  2917. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2918. //设置为limit可以获取limit, offset, search, sort, order
  2919. queryParamsType: "undefined",
  2920. queryParams: function queryParams(params) { //设置查询参数
  2921. var param = {
  2922. type: id
  2923. }
  2924. return param
  2925. },
  2926. onLoadSuccess: function(data) { //加载成功时执行
  2927. const newDataL = {};
  2928. const piData = [];
  2929. const totalSum = [];
  2930. newDataL.state = "success";
  2931. newDataL.message = "加载成功";
  2932. newDataL.rows = data;
  2933. data.forEach(function(v, n) {
  2934. piData.push({
  2935. value: v.total,
  2936. name: v.deptname
  2937. })
  2938. console.log(v.total)
  2939. if (n > 9) {
  2940. totalSum.push(v.total);
  2941. }
  2942. })
  2943. var nameArray = piData.map(item => {
  2944. return item.name
  2945. })
  2946. let newpiData = piData.splice(0, 13);
  2947. newpiData.push({
  2948. value: totalSum.reduce(function(prev, curr, idx, arr) {
  2949. return prev + curr;
  2950. }),
  2951. name: '其他'
  2952. })
  2953. let newnameArray = nameArray.splice(0, 13);
  2954. newnameArray.push('其他')
  2955. keyword_chart('keywordPie2', newnameArray, newpiData);
  2956. $tableLeft.bootstrapTable('load', newDataL);
  2957. },
  2958. onLoadError: function() { //加载失败时执行
  2959. layer.msg("加载数据失败", {
  2960. time: 1500,
  2961. icon: 2
  2962. });
  2963. }
  2964. });
  2965. }
  2966. function acceptlist1(id, con) {
  2967. // debugger
  2968. $('.bulletFrameT').show()
  2969. $('.acceptCont2').show();
  2970. $('.acceptCont2').siblings().hide()
  2971. $('.acceptContTitle').text(con + '分类统计')
  2972. var $tableLeft = $('#acceptContlist2');
  2973. $tableLeft.bootstrapTable('destroy');
  2974. //初始化表格,动态从服务器加载数据
  2975. $tableLeft.bootstrapTable({
  2976. method: "get", //使用get请求到服务器获取数据
  2977. // url: huayi.config.callcenter_url + "handling",
  2978. url: huayi.config.callcenter_url + "InfoNew/GetKeyByNow",
  2979. striped: false, //表格显示条纹
  2980. pagination: false, //启动分页
  2981. pageSize: 12, //每页显示的记录数
  2982. pageNumber: 1, //当前第几页
  2983. fixedColumns: false,
  2984. fixedNumber: 3,
  2985. pageList: [5, 10, 20, 50, 100], //记录数可选列表
  2986. search: false, //是否启用查询
  2987. showColumns: false, //显示下拉框勾选要显示的列
  2988. showRefresh: false, //显示刷新按钮
  2989. sidePagination: "server", //表示服务端请求
  2990. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  2991. //设置为limit可以获取limit, offset, search, sort, order
  2992. queryParamsType: "undefined",
  2993. queryParams: function queryParams(params) { //设置查询参数
  2994. var param = {
  2995. deptid: id
  2996. }
  2997. return param
  2998. },
  2999. onLoadSuccess: function(data) { //加载成功时执行
  3000. const newDataL = {};
  3001. const piData = [];
  3002. const totalSum = [];
  3003. newDataL.state = data.state;
  3004. newDataL.message = data.message;
  3005. newDataL.rows = data.data.Date;
  3006. // newDataL.total = data.data.total;
  3007. console.log(newDataL);
  3008. data.data.Date.forEach(function(v, n) {
  3009. piData.push({
  3010. value: v.Count,
  3011. name: v.KeyName
  3012. })
  3013. })
  3014. var nameArray = piData.map(item => {
  3015. return item.name
  3016. })
  3017. keyword_chart('keywordPie3', nameArray, piData);
  3018. $('.total').text(data.data.Total)
  3019. $('.classTotal').text(data.data.ClaseeCount)
  3020. $('.prot').text(data.data.ClassTotal)
  3021. $tableLeft.bootstrapTable('load', newDataL);
  3022. },
  3023. onLoadError: function() { //加载失败时执行
  3024. layer.msg("加载数据失败", {
  3025. time: 1500,
  3026. icon: 2
  3027. });
  3028. }
  3029. });
  3030. }
  3031. //整理代码处
  3032. function acceptlist2(id) {
  3033. workTable('', '', '', '', '', '', '', '', '', id)
  3034. }
  3035. //表格操作
  3036. //获取序号
  3037. function Code(val, row, index) {
  3038. return index + 1;
  3039. }
  3040. //二级地图
  3041. function getCallTypeId(v, r) {
  3042. if (r.type == 0) {
  3043. // console.log(r)
  3044. return '<div class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + Number(r.id) + '\',\'' +
  3045. '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' +
  3046. Number(r.areaid) + '\')">' + v + '</div>'
  3047. } else if (r.type == 1) {
  3048. return '<div class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' +
  3049. '\',\'' + '' + '\',\'' + '' + '\',\'' + Number(r.id) + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' +
  3050. '\',\'' + Number(r.areaid) + '\')">' + v + '</div>'
  3051. } else if (r.type == 2) {
  3052. if (r.name == '满意') {
  3053. return '<div class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' +
  3054. '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' +
  3055. Number(r.areaid) + '\',\'' + 1 + '\')">' + v + '</div>'
  3056. } else {
  3057. return '<div class="workAct" onclick="workTable(\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' +
  3058. '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' + '' + '\',\'' +
  3059. Number(r.areaid) + '\',\'' + 2 + '\')">' + v + '</div>'
  3060. }
  3061. }
  3062. }
  3063. //单位名称
  3064. function getDeptname(val, row) {
  3065. return '<span class="workAct" style="display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:100px">' +
  3066. val + '</span>'
  3067. }
  3068. //平台办理二级单位
  3069. function getDeptnameP(v, r) {
  3070. return '<span class="workAct" onclick="acceptlist1(\'' + r.deptid + '\',\'' + r.deptname + '\')">' + v + '</span>'
  3071. }
  3072. //平台办理三级单位
  3073. function getCompanyNameP2(v, r) {
  3074. // return '<span class="workAct" onclick="acceptlist2(\'' + r.KeyId + '\')">' + v + '</span>'
  3075. return '<span class="workAct" onclick="workTable(\'' + ''+ '\',\'' +''+ '\',\'' +''+ '\',\'' +''+ '\',\'' +''+ '\',\'' +''+ '\',\'' +''+ '\',\'' +''+ '\',\'' +''+ '\',\'' +r.KeyId+ '\')">' + v + '</span>'
  3076. }
  3077. //通话列表的呼叫类型
  3078. function getCallType(v, r) {
  3079. if (v == 0) {
  3080. return "<span>呼入</span>"
  3081. } else if (v == 1) {
  3082. return "<span>呼出</span>"
  3083. }
  3084. }
  3085. //通话列表的呼叫状态
  3086. function getCallState(v) {
  3087. if (v == 0) {
  3088. return "<span>未接通电话</span>"
  3089. } else if (v == 1) {
  3090. return "<span>已接通电话</span>"
  3091. }
  3092. }
  3093. //内容省略
  3094. function getDeptnameC(v) {
  3095. return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:150px'>" +
  3096. v + "</span>"
  3097. }
  3098. //通话列表的处理方式
  3099. function getDisposalType(v) {
  3100. if (v == 0) {
  3101. return "<spanIVR处理</span>"
  3102. } else if (v == 1) {
  3103. return "<span骚扰电话</span>"
  3104. } else if (v == 2) {
  3105. return "<span自助服务</span>"
  3106. } else if (v == 3) {
  3107. return "<span>转值班电话</span>"
  3108. } else if (v == 4) {
  3109. return "<span>留言</span>"
  3110. } else if (v == 5) {
  3111. return "<span>呼损</span>"
  3112. } else if (v == 6) {
  3113. return "<span>人工处理</span>"
  3114. }
  3115. }
  3116. //通话列表工单详情
  3117. function getWorkOrder(v) {
  3118. if (v == null) {
  3119. v = '';
  3120. }
  3121. workStateAct = 1
  3122. return '<span class="workAct" onclick="btn_detail(\'' + v + '\',\'' + workStateAct + '\')">' + v + '</span>'
  3123. }
  3124. //通话列表的话机类型
  3125. function getActionType(v, r) {
  3126. if (v == 1) {
  3127. if (r.CallType == 0) {
  3128. return '<div>呼入</div>'
  3129. } else {
  3130. return '<div>呼出</div>'
  3131. }
  3132. } else if (v == 2) {
  3133. return '<div>转移</div>'
  3134. } else {
  3135. return '<div>三方通话</div>'
  3136. }
  3137. }
  3138. //工单状态
  3139. function getWorkState(v, r) {
  3140. if (r.F_WorkState == 0) {
  3141. return "<span>新工单</span>";
  3142. } else if (r.F_WorkState == 1) {
  3143. return "<span>待交办</span>";
  3144. } else if (r.F_WorkState == 2) {
  3145. return "<span>待查收</span>";
  3146. } else if (r.F_WorkState == 3) {
  3147. return "<span>退回审核中</span>";
  3148. } else if (r.F_WorkState == 4) {
  3149. return "<span>办理中</span>";
  3150. } else if (r.F_WorkState == 5) {
  3151. return "<span>延时审核中</span>";
  3152. } else if (r.F_WorkState == 6) {
  3153. return "<span>已办理</span>";
  3154. } else if (r.F_WorkState == 7) {
  3155. return "<span>已回访</span>";
  3156. } else if (r.F_WorkState == 8) {
  3157. return "<span>重办中</span>";
  3158. } else if (r.F_WorkState == 9) {
  3159. return "<span>已结案</span>";
  3160. } else if (r.F_WorkState == 10) {
  3161. return "<span>待审核</span>";
  3162. } else if (r.F_WorkState == 11) {
  3163. return "<span>重办待交办</span>";
  3164. } else if (r.F_WorkState == 13) {
  3165. return "<span>重办驳回</span>";
  3166. }
  3167. }
  3168. //工单详情
  3169. function getformatter(v) {
  3170. workStateAct = 2
  3171. return '<span class="workAct" onclick="btn_detail(\'' + v + '\',\'' + workStateAct + '\')">' + v + '</span>'
  3172. }
  3173. //工单详情
  3174. function btn_detail(id, state) {
  3175. detailId = id;
  3176. $('.bulletFrameT').show();
  3177. $('.workDetails').show();
  3178. $('.workDetails').siblings().hide()
  3179. if ($('.bulletFrameT').css('display') == 'block') {
  3180. $('.body').css('opacity', '0.4')
  3181. }
  3182. $('.btn_right').click(function() {
  3183. if (state == 1) {
  3184. $('.callLogList').show();
  3185. $('.callLogList').siblings().hide()
  3186. } else {
  3187. $('.workList').show();
  3188. $('.workList').siblings().hide()
  3189. }
  3190. })
  3191. $('.urgency').text('');
  3192. $('.workState').text("");
  3193. $('.acceptType').text("");
  3194. $('.isSecrecy').text("");
  3195. $('.workNo').text(''); //工单编号
  3196. $('.acceptNumber').text(''); //受理人工号
  3197. $('.acceptName').text(''); //受理人
  3198. $('.contacts').text(''); //来单联系人
  3199. $('.phone').text(''); //联系号码
  3200. $('.contactInformation').text(''); //联系方式
  3201. $('.contactAddress').text('');
  3202. $('.acceptChannel').text('');
  3203. $('.phoneType').text('');
  3204. $('.KeyName').text('');
  3205. $('.F_ComContent').text('');
  3206. $('.deptname').text('');
  3207. $('.AreaName').text('');
  3208. $('.F_ComTitle').text('');
  3209. $('.deptname').text('');
  3210. $('.F_Result').text('');
  3211. new doAjax({
  3212. url: huayi.config.callcenter_url + "/InfoNew/GetWorkOrder",
  3213. data: {
  3214. workorderid: id
  3215. },
  3216. Type: 'GET',
  3217. callBack: function(res) {
  3218. let data = res.data[0];
  3219. let level; //紧急程度
  3220. for (i in data) {
  3221. if (data[i] == '' || data[i] == null) {
  3222. data[i] = '-'
  3223. }
  3224. }
  3225. if (data.F_Level == 1) {
  3226. $('.urgency').text('一般');
  3227. } else {
  3228. $('.urgency').text('严重');
  3229. }
  3230. if (data.F_WorkState == 0) {
  3231. $('.workState').text("新工单");
  3232. } else if (data.F_WorkState == 1) {
  3233. $('.workState').text("待交办");
  3234. } else if (data.F_WorkState == 2) {
  3235. $('.workState').text("待查收");
  3236. } else if (data.F_WorkState == 3) {
  3237. $('.workState').text("退回审核中");
  3238. } else if (data.F_WorkState == 4) {
  3239. $('.workState').text("办理中");
  3240. } else if (data.F_WorkState == 5) {
  3241. $('.workState').text("延时审核中");
  3242. } else if (data.F_WorkState == 6) {
  3243. $('.workState').text("已办理");
  3244. } else if (data.F_WorkState == 7) {
  3245. $('.workState').text("已回访");
  3246. } else if (data.F_WorkState == 8) {
  3247. if (data.F_Identification === 0) {
  3248. $('.workState').text("重置转发");
  3249. } else if (data.F_Identification === 1) {
  3250. $('.workState').text("退回重办");
  3251. } else {
  3252. $('.workState').text("重办中");
  3253. }
  3254. } else if (data.F_WorkState == 9) {
  3255. $('.workState').text("已结案");
  3256. } else if (data.F_WorkState == 10) {
  3257. $('.workState').text("待审核");
  3258. } else if (data.F_WorkState == 11) {
  3259. $('.workState').text("重办待交办");
  3260. } else if (data.F_WorkState == 13) {
  3261. $('.workState').text("重办驳回");
  3262. }
  3263. if (data.F_IsResult == 0) {
  3264. $('.acceptType').text("网络转办");
  3265. } else {
  3266. $('.acceptType').text("当即办理");
  3267. }
  3268. if (data.F_IsProtect == 0) {
  3269. $('.isSecrecy').text("否");
  3270. } else {
  3271. $('.isSecrecy').text("是");
  3272. }
  3273. $('.workNo').text(data.F_WorkOrderId); //工单编号
  3274. $('.acceptNumber').text(data.F_CreateUser); //受理人工号
  3275. $('.acceptName').text(data.UserName); //受理人
  3276. $('.contacts').text(data.F_CusName); //来单联系人
  3277. $('.phone').text(data.F_CusPhone); //联系号码
  3278. $('.contactInformation').text(data.F_ConPhone); //联系方式
  3279. $('.contactAddress').text(data.F_CusAddress);
  3280. $('.acceptChannel').text(data.SourceName);
  3281. $('.phoneType').text(data.TypeName1);
  3282. $('.KeyName').text(data.KeyName);
  3283. $('.F_ComContent').text(data.F_ComContent);
  3284. $('.deptname').text(data.deptname);
  3285. $('.AreaName').text(data.AreaName);
  3286. $('.F_ComTitle').text(data.F_ComTitle);
  3287. $('.deptname').text(data.deptname);
  3288. $('.F_Result').text(data.F_Result);
  3289. }
  3290. });
  3291. }
  3292. function getClick() {
  3293. $('#timeline').html('');
  3294. $('.bulletFrameT').show();
  3295. $('.workProcedure').show();
  3296. $('.workProcedure').siblings().hide()
  3297. if ($('.bulletFrameT').css('display') == 'block') {
  3298. $('.body').css('opacity', '0.4')
  3299. }
  3300. new doAjax({
  3301. url: huayi.config.callcenter_url + "InfoNew/GetWorkOrderProcess",
  3302. data: {
  3303. workorderid: detailId
  3304. },
  3305. Type: 'GET',
  3306. callBack: function(res) {
  3307. let str = '';
  3308. res.data.forEach(function(v, n) {
  3309. str +=
  3310. "<li class='work'><input class='radio' id='work5' name='works' type='radio' checked><div class='relative'>" +
  3311. "<span class='date'>" + v.F_CreateTime +
  3312. "</span><span class='circle'></span></div><div class='content'><p>" + v
  3313. .F_Message+ "</p></div></li>"
  3314. })
  3315. $('#timeline').html(str);
  3316. }
  3317. });
  3318. }
  3319. //绩效排名
  3320. function rankingOperate(val, row, index) {
  3321. var str = '';
  3322. if (index < 3) {
  3323. str = '<ul class="tool_downs">' +
  3324. '<li><img src="./images/No' + (index + 1) + '.png" alt=""><li>' +
  3325. '</ul>';
  3326. } else {
  3327. str = '<ul class="tool_downs">' +
  3328. '<li>' + (index + 1) + '<li>' +
  3329. '</ul>';
  3330. }
  3331. return str
  3332. }
  3333. //趋势
  3334. function trend(val, row) {
  3335. var str = '';
  3336. if (row.trend.substring(0, 1) == '-' && row.trend.length > 1) {
  3337. str = '<ul class="tool_downs">' +
  3338. '<li><img src="./images/down_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
  3339. .trend.substring(1) + '<li>' +
  3340. '</ul>';
  3341. } else if (row.trend.substring(0, 1) != '-' && row.trend.length > 1) {
  3342. str = '<ul class="tool_downs">' +
  3343. '<li><img src="./images/up_arrow.png" alt="" style="vertical-align: middle;padding-right: 3px;">' + row
  3344. .trend + '<li>' +
  3345. '</ul>';
  3346. } else {
  3347. str = '<ul class="tool_downs">' +
  3348. '<li>' + row.trend + '<li>' +
  3349. '</ul>';
  3350. }
  3351. return str
  3352. }
  3353. //办理时长
  3354. function getCompanyName(v, r) {
  3355. return '<span class="workAct" onclick="btn_getWorkList(\'' + r.deptid + '\')">' + v + '</span>'
  3356. }
  3357. //办理时长转工单详情(整理代码)
  3358. function btn_getWorkList(name) {
  3359. workTable('', '', '', '', name, '');
  3360. }
  3361. //绩效
  3362. function getWorkList(v, r) {
  3363. return '<span class="workAct">' + v + '</span>'
  3364. }
  3365. function btn_getRankList(row) {
  3366. $('.rankList').siblings().hide()
  3367. $('.rankList').show();
  3368. let rowJson = row;
  3369. $('.Satisfaction').text(rowJson.Satisfaction)
  3370. $('.Onschedule').text(rowJson.Onschedule)
  3371. $('.Processingrate').text(rowJson.Processingrate)
  3372. $('.backrate').text(rowJson.backrate)
  3373. $('.knowledgerate').text(rowJson.knowledgerate)
  3374. $('.secrecyrate').text(rowJson.secrecyrate)
  3375. $('.total').text(rowJson.total)
  3376. //绩效的点击事件
  3377. $('.myd').click(function() {
  3378. $('.rankListDetial').show();
  3379. $('.rankListDetial').siblings().hide()
  3380. let formula = '40*(1-' + rowJson.dissatisfied + '/' + rowJson.workordrcount + ')';
  3381. $('.headline').text('综合满意度');
  3382. $('.totalScore').text('40');
  3383. $('.headline1').text('权重');
  3384. $('.headline1_score').text('40');
  3385. $('.formula1').text('权重分数*(1-不满意工单量/承办工单量)');
  3386. $('.nowScore').text(rowJson.Satisfaction);
  3387. $('.headline2').text('承办工单量');
  3388. $('.headline2_score').text(rowJson.workordrcount);
  3389. $('.formula2').text('权重分数*(1-不满意率)');
  3390. $('.headline3').text('不满意工单量');
  3391. $('.headline3_score').text(rowJson.dissatisfied);
  3392. $('.formula3').text(formula);
  3393. })
  3394. $('.aqbl').click(function() {
  3395. $('.rankListDetial').show();
  3396. $('.rankListDetial').siblings().hide()
  3397. let formula = '20*(1-' + rowJson.overcount + '/' + rowJson.workordrcount + ')';
  3398. $('.headline').text('按期办理');
  3399. $('.totalScore').text('20');
  3400. $('.headline1').text('权重');
  3401. $('.headline1_score').text('20');
  3402. $('.formula1').text('权重分数*(1-超期工单量/承办工单量)');
  3403. $('.nowScore').text(rowJson.Onschedule);
  3404. $('.headline2').text('承办工单量');
  3405. $('.headline2_score').text(rowJson.workordrcount);
  3406. $('.formula2').text('权重分数*(1-超期率)');
  3407. $('.headline3').text('超期工单量');
  3408. $('.headline3_score').text(rowJson.overcount);
  3409. $('.formula3').text(formula);
  3410. })
  3411. $('.blsc').click(function() {
  3412. $('.rankListDetial').show();
  3413. $('.rankListDetial').siblings().hide()
  3414. let formula = '10*(1-' + rowJson.Processing + ')';
  3415. $('.headline').text('平均办理时长');
  3416. $('.totalScore').text('10');
  3417. $('.headline1').text('权重');
  3418. $('.headline1_score').text('10');
  3419. $('.formula1').text('权重分数*(1-平均办理时长)');
  3420. $('.nowScore').text(rowJson.Processingrate);
  3421. $('.headline2').text('承办工单量');
  3422. $('.headline2_score').text(rowJson.workordrcount);
  3423. $('.formula2').text('权重分数*(1-平均办理时长)');
  3424. $('.headline3').text('平均办理时长');
  3425. $('.headline3_score').text(rowJson.Processing);
  3426. $('.formula3').text(formula);
  3427. })
  3428. $('.jsth').click(function() {
  3429. $('.rankListDetial').show();
  3430. $('.rankListDetial').siblings().hide()
  3431. let formula = '10*(1-' + rowJson.backover + '/' + rowJson.back + ')';
  3432. $('.headline').text('及时退回');
  3433. $('.totalScore').text('10');
  3434. $('.headline1').text('权重');
  3435. $('.headline1_score').text('10');
  3436. $('.formula1').text('权重分数*(1-退回超期量/退回工单量)');
  3437. $('.nowScore').text(rowJson.backrate);
  3438. $('.headline2').text('退回工单量');
  3439. $('.headline2_score').text(rowJson.back);
  3440. $('.formula2').text('权重分数*(1-退回超期率)');
  3441. $('.headline3').text('退回超期量');
  3442. $('.headline3_score').text(rowJson.backover);
  3443. $('.formula3').text(formula);
  3444. })
  3445. $('.zskgx').click(function() {
  3446. $('.rankListDetial').show();
  3447. $('.rankListDetial').siblings().hide()
  3448. let formula = '10*(1-' + rowJson.knowledgeover + '/' + rowJson.knowledge + ')';
  3449. $('.headline').text('知识库及时更新');
  3450. $('.totalScore').text('10');
  3451. $('.headline1').text('权重');
  3452. $('.headline1_score').text('10');
  3453. $('.formula1').text('权重分数*(1-未及时提交数量/知识索要数量)');
  3454. $('.nowScore').text(rowJson.knowledgerate);
  3455. $('.headline2').text('知识索要数量');
  3456. $('.headline2_score').text(rowJson.knowledge);
  3457. $('.formula2').text('权重分数*(1-未及时提交率)');
  3458. $('.headline3').text('未及时提交数量');
  3459. $('.headline3_score').text(rowJson.knowledgeover);
  3460. $('.formula3').text(formula);
  3461. })
  3462. $('.bmgd').click(function() {
  3463. $('.rankListDetial').show();
  3464. $('.rankListDetial').siblings().hide()
  3465. let formula = '10*(1-' + rowJson.secrecy + '*5-' + rowJson.divulge + '*5)';
  3466. $('.headline').text('保密规定');
  3467. $('.totalScore').text('10');
  3468. $('.headline1').text('权重');
  3469. $('.headline1_score').text('10');
  3470. $('.formula1').text('权重分数-公民信息泄密次数*5-工单处理泄密次数*5');
  3471. $('.nowScore').text(rowJson.secrecyrate);
  3472. $('.headline2').text('公民信息泄密次数');
  3473. $('.headline2_score').text(rowJson.secrecy);
  3474. $('.formula2').text('权重分数-公民信息泄密次数*5-工单处理泄密次数*5');
  3475. $('.headline3').text('工单处理泄密次数');
  3476. $('.headline3_score').text(rowJson.divulge);
  3477. $('.formula3').text(formula);
  3478. })
  3479. }
  3480. //绩效退回工单
  3481. function numReturned(v, r) {
  3482. return '<span class="workAct" style="cursor: pointer;" onclick="btn_numReturned(\'' + r.deptid + '\',\'' + 0 +
  3483. '\')">' + v + '</span>';
  3484. }
  3485. function numReturnedOverdue(v, r) {
  3486. return '<span class="workAct" style="cursor: pointer;" onclick="btn_numReturned(\'' + r.deptid + '\',\'' + 1 +
  3487. '\')">' + v + '</span>';
  3488. }
  3489. function btn_numReturned(deptid, id) {
  3490. $('.backworkList').show();
  3491. $('.bulletFrameT').show()
  3492. $('.backworkList').siblings().hide()
  3493. $('#backworkList').bootstrapTable('destroy');
  3494. //初始化表格,动态从服务器加载数据
  3495. $('#backworkList').bootstrapTable({
  3496. method: "get", //使用get请求到服务器获取数据
  3497. url: huayi.config.callcenter_url + "/InfoNew/WorkBackOrdrList", //获取数据的Servlet地址
  3498. // url:"http://192.168.8.9:1042/InfoNew/WorkBackOrdrList", //获取数据的Servlet地址
  3499. contentType: "application/x-www-form-urlencoded",
  3500. striped: true, //表格显示条纹
  3501. pagination: true, //启动分页
  3502. pageSize: 13, //每页显示的记录数
  3503. pageNumber: 1, //当前第几页
  3504. pageList: [10, 20, 50, 100], //记录数可选列表
  3505. search: false, //是否启用查询
  3506. showColumns: false, //显示下拉框勾选要显示的列
  3507. showRefresh: false, //显示刷新按钮
  3508. sidePagination: "server", //表示服务端请求
  3509. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  3510. //设置为limit可以获取limit, offset, search, sort, order
  3511. queryParamsType: "undefined",
  3512. queryParams: function queryParams(params) { //设置查询参数
  3513. var param = {
  3514. page: params.pageNumber,
  3515. pagesize: params.pageSize,
  3516. deptid: deptid,
  3517. type: id
  3518. };
  3519. return param;
  3520. },
  3521. responseHandler: function(res) {
  3522. // //格式化数据
  3523. return {
  3524. "rows": res.rows, //数据
  3525. "total": res.total
  3526. };
  3527. },
  3528. onLoadSuccess: function(res) { //加载成功时执行
  3529. },
  3530. onLoadError: function() { //加载失败时执行
  3531. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  3532. }
  3533. });
  3534. }
  3535. //绩效知识库列表
  3536. function getKnowledge(v, r) {
  3537. return '<span class="workAct" style="cursor: pointer;" onclick="btn_Knowledge(\'' + r.deptid + '\',\'' + 0 +
  3538. '\')">' + v + '</span>';
  3539. }
  3540. function getKnowledgeNo(v, r) {
  3541. return '<span class="workAct" style="cursor: pointer;" onclick="btn_Knowledge(\'' + r.deptid + '\',\'' + 1 +
  3542. '\')">' + v + '</span>';
  3543. }
  3544. function btn_Knowledge(deptid, id) {
  3545. $('.knowledgeBase').show();
  3546. $('.bulletFrameT').show()
  3547. $('.knowledgeBase').siblings().hide()
  3548. $('#orderlist3').bootstrapTable('destroy');
  3549. //初始化表格,动态从服务器加载数据
  3550. $('#orderlist3').bootstrapTable({
  3551. method: "get", //使用get请求到服务器获取数据
  3552. url: huayi.config.callcenter_url + "/InfoNew/GetListDemands", //获取数据的Servlet地址
  3553. contentType: "application/x-www-form-urlencoded",
  3554. striped: true, //表格显示条纹
  3555. pagination: true, //启动分页
  3556. pageSize: 13, //每页显示的记录数
  3557. pageNumber: 1, //当前第几页
  3558. pageList: [10, 20, 50, 100], //记录数可选列表
  3559. search: false, //是否启用查询
  3560. showColumns: false, //显示下拉框勾选要显示的列
  3561. showRefresh: false, //显示刷新按钮
  3562. sidePagination: "server", //表示服务端请求
  3563. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  3564. //设置为limit可以获取limit, offset, search, sort, order
  3565. queryParamsType: "undefined",
  3566. queryParams: function queryParams(params) { //设置查询参数
  3567. var param = {
  3568. page: params.pageNumber,
  3569. pagesize: params.pageSize,
  3570. deptid: deptid,
  3571. type: id
  3572. };
  3573. return param;
  3574. },
  3575. responseHandler: function(res) {
  3576. // //格式化数据
  3577. return {
  3578. "rows": res.rows, //数据
  3579. "total": res.total
  3580. };
  3581. },
  3582. onLoadSuccess: function(res) { //加载成功时执行
  3583. },
  3584. onLoadError: function() { //加载失败时执行
  3585. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  3586. }
  3587. });
  3588. }
  3589. function minusPoints(v) {
  3590. return '<span class="workAct">' + v + '</span>'
  3591. }
  3592. function extraPoints(v) {
  3593. return '<span class="workAct">' + v + '</span>'
  3594. }
  3595. $('#orderlist2').on('click-cell.bs.table', function(e, field, value, row, $element) {
  3596. let cont;
  3597. let id;
  3598. if (JSON.stringify(field) == '\"secrecy\"') {
  3599. cont = '公民信息保密';
  3600. id = 1;
  3601. workTable('', '', '', '', row.deptid, '', '', cont, id);
  3602. } else if (JSON.stringify(field) == '\"divulge\"') {
  3603. cont = '工单处理保密';
  3604. id = 1;
  3605. workTable('', '', '', '', row.deptid, '', '', cont, id);
  3606. } else if (JSON.stringify(field) == '\"cityinformation\"') {
  3607. cont = '市媒体宣传';
  3608. id = 2;
  3609. workTable('', '', '', '', row.deptid, '', '', cont, id);
  3610. } else if (JSON.stringify(field) == '\"knowledgerate\"') {
  3611. cont = '省媒体宣传';
  3612. id = 2;
  3613. workTable('', '', '', '', row.deptid, '', '', cont, id);
  3614. } else if (JSON.stringify(field) == '\"inspection\"') {
  3615. cont = '市领导视察';
  3616. id = 2;
  3617. workTable('', '', '', '', row.deptid, '', '', cont, id);
  3618. } else if (JSON.stringify(field) == '\"extension\"') {
  3619. cont = '全市推广或收入市平台汇报材料';
  3620. id = 2;
  3621. workTable('', '', '', '', row.deptid, '', '', cont, id);
  3622. } else if (JSON.stringify(field) == '\"notice\"') {
  3623. cont = '涉及民生重大事项及时报送';
  3624. id = 2;
  3625. workTable('', '', '', '', row.deptid, '', '', cont, id);
  3626. } else if (JSON.stringify(field) == '\"deptname\"') {
  3627. $('.bulletFrameT').show()
  3628. $('.rankList').siblings().hide()
  3629. $('.rankList').show();
  3630. btn_getRankList(row)
  3631. } else if (JSON.stringify(field) == '\"workordrcount\"') {
  3632. workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 3);
  3633. } else if (JSON.stringify(field) == '\"dissatisfied\"') {
  3634. workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 4);
  3635. } else if (JSON.stringify(field) == '\"overcount\"') {
  3636. workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 5);
  3637. } else if (JSON.stringify(field) == '\"Processing\"') {
  3638. workTable('', '', '', '', row.deptid, '', '', '', '', '', '', '', 1);
  3639. } else {
  3640. return;
  3641. }
  3642. })
  3643. //关键字热度分析
  3644. function getKeyName(v, r) {
  3645. console.log(r)
  3646. return '<span class="workAct" onclick="btn_keyName(\'' + r.KeyId + '\',\'' + r.ClassCount + '\',\'' + r.KeyName +
  3647. '\')">' + v + '</span>'
  3648. }
  3649. function btn_keyName(id, classId, con) {
  3650. if (classId == '1') {
  3651. $('.keyword_wrap').hide()
  3652. $('.bulletFrame').hide()
  3653. workTable('', '', '', '', '', '', id);
  3654. } else {
  3655. $('.keyWordTitle').text(con.substring(0, con.length - 2) + '问题分类')
  3656. keyWordTable(id);
  3657. }
  3658. }