situationScreen.vue 105 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095
  1. <template>
  2. <v-scale-screen width="2200" height="1080">
  3. <div class="task_screen_cotainer" >
  4. <div class="task_header">
  5. 历史态势
  6. </div>
  7. <div class="tag" @click="jumpToCurrent">
  8. 当前态势
  9. <!-- <el-button @click="jumpToCurrent">当前态势</el-button>-->
  10. </div>
  11. <div class="content_cotainer">
  12. <div class="task_base_info_table">
  13. <div class="task_outer_cotnainer">
  14. <div class="task_number_box">
  15. <div class="task_num_left_style">
  16. <el-image
  17. style="width: 45px; height: 45px;margin-right:20px;"
  18. :src="require('../assets/img/taskNum.png')"
  19. fit="contain"
  20. >
  21. </el-image>
  22. 任务数
  23. </div>
  24. <div class="taskNumber_style">
  25. {{ taskList.length }}
  26. </div>
  27. </div>
  28. <div class="task_list_container">
  29. <div class="map_more_box">
  30. <div class="task_list_header" style="font-size:16px; margin: 0 24px 8px 0; white-space: nowrap;">
  31. <el-image
  32. style="width: 30px; height: 22px; margin-right:6px;"
  33. :src="require('../assets/img/rightIcon.svg')"
  34. fit="contain"
  35. >
  36. </el-image>
  37. 全部任务
  38. </div>
  39. </div>
  40. <div class="select_lsit_box">
  41. <el-date-picker
  42. v-model="currentYear"
  43. style="width:100%;"
  44. type="datetimerange"
  45. placeholder="请选择"
  46. value-format="yyyy-MM-dd HH:mm:ss"
  47. range-separator="至"
  48. start-placeholder="开始日期"
  49. end-placeholder="结束日期">
  50. </el-date-picker>
  51. </div>
  52. <div class="search_box">
  53. <div class="select_lsit_box">
  54. <el-select
  55. v-model="systemTaskId"
  56. placeholder="切换系统名称"
  57. style="width:55%; margin-right:10px;"
  58. clearable
  59. filterable
  60. >
  61. <el-option
  62. v-for="item in systemOption"
  63. :key="item.value"
  64. :label="item.label"
  65. :value="item.value"
  66. >
  67. </el-option>
  68. </el-select>
  69. <el-select
  70. v-model="unitTaskValue"
  71. placeholder="切换单位名称"
  72. style="width:55%;"
  73. clearable
  74. filterable
  75. >
  76. <el-option
  77. v-for="item in unitOption"
  78. :key="item.value"
  79. :label="item.label"
  80. :value="item.value"
  81. >
  82. </el-option>
  83. </el-select>
  84. <div class="search_button" @click="conditionalSearch()">
  85. 查询
  86. </div>
  87. </div>
  88. </div>
  89. <div v-if="taskList.length" class="task_scroll_box">
  90. <template v-for="(item,index) in taskList">
  91. <div class="task_item_container" :key="index">
  92. <div class="task_item_left">
  93. <div class="left_point"></div>
  94. <div class="left_line"></div>
  95. <div v-if="index == taskList.length-1 " class="left_point"></div>
  96. </div>
  97. <div class="task_content_right">
  98. <div class="task_content_header">状态:{{ item.status || '-' }}</div>
  99. <div class="task_content_description">
  100. <div class="file_icon">
  101. <el-image
  102. style="width: 14px; height: 13px; margin-right:8px; margin-top:4px;"
  103. :src="require('../assets/img/fileIcon.svg')"
  104. fit="contain"
  105. >
  106. </el-image>
  107. </div>
  108. <div class="task_content_box">
  109. <div class="grade_box">
  110. <div class="name_task_participantName">
  111. <div class="task_name">{{ item.taskName || '-' }}</div>
  112. <div class="task_participantName">
  113. 组织人员:{{ item.organizers && item.organizers.join(',') || '-' }}
  114. </div>
  115. </div>
  116. <div class="grade_item">
  117. {{ item.syntheticTaskScore }}
  118. </div>
  119. </div>
  120. <div class="task_date_box">
  121. <div class="task_data">
  122. <div class="date_between">
  123. <span> {{ item.startTime || '-' }} </span>
  124. <span> {{ item.endTime || '-' }} </span>
  125. </div>
  126. </div>
  127. <div class="view_more" @click="viewMore(item)">
  128. 查看详情
  129. </div>
  130. <div class="view_more" @click="viewTaskSituation(item)">
  131. 查看态势
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </template>
  139. </div>
  140. <div class="noTaskData" v-else>
  141. 暂无任务
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="center_chart_cotainer" id="taskItem">
  147. <div class="task_detail_cotainer">
  148. <div class="header_line_style">
  149. <div class="headerTitle"></div>
  150. </div>
  151. <div class="task_name_header">「{{ currentTaskName }}」历史态势</div>
  152. <!-- 任务屏幕 -->
  153. <div class="task_item_header">
  154. <!-- <el-select-->
  155. <!-- v-model="wholeOutTaskId"-->
  156. <!-- placeholder="「切换任务」"-->
  157. <!-- style="width:270px;"-->
  158. <!-- @change="changeTask"-->
  159. <!-- filterable-->
  160. <!-- >-->
  161. <!-- <el-option-->
  162. <!-- v-for="item in taskOPtion"-->
  163. <!-- :key="item.value"-->
  164. <!-- :label="item.label"-->
  165. <!-- :value="item.value"-->
  166. <!-- >-->
  167. <!-- </el-option>-->
  168. <!-- </el-select>-->
  169. <el-image
  170. v-if="false"
  171. @click="showMoreInfo('more')"
  172. class="showLessStyle"
  173. style="width: 30px; height: 22px; margin-right:6px; margin-left: 10px;"
  174. :src="require('../assets/img/small.svg')"
  175. fit="contain"
  176. >
  177. </el-image>
  178. <el-image
  179. @click="showMoreInfo('less')"
  180. :src="require('../assets/img/iconMore.svg')"
  181. fit="contain"
  182. class="showLessStyle"
  183. style="width: 30px; height: 22px; margin-right:6px; margin-left: 10px;"
  184. >
  185. </el-image>
  186. </div>
  187. <div class="task_header_top">
  188. <div class="subject_task_item">
  189. <div class="task_outer_cotnainer_status">
  190. <div class="map_more_box">
  191. <div class="task_list_header" style="font-size:16px; margin: 0 24px 8px 0; white-space: nowrap; ">
  192. <el-image
  193. style="width: 30px; height: 22px; margin-right:6px;"
  194. :src="require('../assets/img/rightIcon.svg')"
  195. fit="contain"
  196. >
  197. </el-image>
  198. 课目分布
  199. </div>
  200. <!-- <div class="select_lsit_box">-->
  201. <!-- <el-select-->
  202. <!-- v-model="systemSubjectId"-->
  203. <!-- placeholder="切换系统名称"-->
  204. <!-- style="width:55%; margin-right:5px;"-->
  205. <!-- @change="changeTaskAndSystem"-->
  206. <!-- clearable-->
  207. <!-- filterable-->
  208. <!-- >-->
  209. <!-- <el-option-->
  210. <!-- v-for="item in systemOption"-->
  211. <!-- :key="item.value"-->
  212. <!-- :label="item.label"-->
  213. <!-- :value="item.value"-->
  214. <!-- >-->
  215. <!-- </el-option>-->
  216. <!-- </el-select>-->
  217. <!-- <el-select-->
  218. <!-- v-model="unitSubjectValue"-->
  219. <!-- placeholder="切换单位名称"-->
  220. <!-- style="width:55%;"-->
  221. <!-- clearable-->
  222. <!-- @change="changeTaskAndUnit"-->
  223. <!-- filterable-->
  224. <!-- >-->
  225. <!-- <el-option-->
  226. <!-- v-for="item in unitOption"-->
  227. <!-- :key="item.value"-->
  228. <!-- :label="item.label"-->
  229. <!-- :value="item.value"-->
  230. <!-- >-->
  231. <!-- </el-option>-->
  232. <!-- </el-select>-->
  233. <!-- </div>-->
  234. </div>
  235. <div class="subject_list_container" id="subjectList">
  236. <template v-for="(item,index) in subjectDatas">
  237. <div class="subject_list_item" :key="index">
  238. <div class="subject_list_header">
  239. <div>
  240. <div class="subject_list_name">
  241. {{ item.subjectName ||'-' }}
  242. </div>
  243. <div class="SubjectNumber_style" style="color: #F1D73A;">
  244. {{ item.overallScore || '-' }}
  245. </div>
  246. <div class="orgainzers">
  247. 参与人员:{{ item.participatingPeople && item.participatingPeople.join(',') || '-' }}
  248. </div>
  249. </div>
  250. <el-image
  251. style="width: 36px; height: 36px; "
  252. :src="subjectMap[item.status]"
  253. fit="contain"
  254. >
  255. </el-image>
  256. </div>
  257. <div class="system_task_style">
  258. <div>参加系统:{{ item.participatingSystems && item.participatingSystems.join(',') || '-'}}</div>
  259. <div
  260. v-if="item.status=='已完成'"
  261. class="view_table_style"
  262. @click="viewManData(item)">
  263. 表格查看
  264. </div>
  265. </div>
  266. </div>
  267. </template>
  268. </div>
  269. </div>
  270. </div>
  271. <div class="unit_map_box">
  272. <div class="map_more_box" style="align-items: flex-start;">
  273. <div class="task_list_header" style="font-size:16px; margin-bottom: 10px;">
  274. <el-image
  275. style="width: 30px; height: 22px; margin-right:6px;"
  276. :src="require('../assets/img/rightIcon.svg')"
  277. fit="contain"
  278. >
  279. </el-image>
  280. 单位维度统计
  281. </div>
  282. <el-select
  283. v-model="unitSubGradeValue"
  284. placeholder="切换单位名称"
  285. style="width:43%;"
  286. @change="changeunitSubGrade"
  287. filterable
  288. >
  289. <el-option
  290. v-for="item in unitOptionForTask"
  291. :key="item.value"
  292. :label="item.label"
  293. :value="item.value"
  294. >
  295. </el-option>
  296. </el-select>
  297. </div>
  298. <div class="num_subject_box_new">
  299. <div style="margin-bottom:20px;">
  300. <div style="font-size:12px;">成绩统计</div>
  301. <div>
  302. <el-row type="flex" justify="end" style="margin-top: -20px;margin-right: -20px;">
  303. <el-pagination
  304. small
  305. :pager-count="4"
  306. :total="this.danweiweidu.length"
  307. :current-page="this.danweiweidu.currentPage"
  308. :page-size="this.danweiweidu.pageSize"
  309. :page-sizes="[5,10,15,20]"
  310. layout="total, prev, pager, next, sizes"
  311. @current-change="onCurrentPageChange_grade"
  312. @size-change="onPageSizeChange_grade" >
  313. <!-- @prev-click="previousPage"-->
  314. <!-- @next-click="nextPage"-->
  315. </el-pagination>
  316. </el-row>
  317. </div>
  318. <div
  319. id="subjectGradeStatistics"
  320. style=" left:5px; width:430px; height:180px; "
  321. :style="{ top: participantScoreFlag ? '-15px' : '2px' }"
  322. ></div>
  323. </div>
  324. <div style="position: relative;">
  325. <div style="font-size:12px;" class="new_style_grade">成绩分布</div>
  326. <div id="subjectGradeDistribute" style="height: 160px; width:430px; bottom: 55px; position: relative; left:5px;"></div>
  327. </div>
  328. </div>
  329. </div>
  330. <div class="commandMonitoring">
  331. <div class="task_outer_cotnainer_status">
  332. <div class="map_more_box">
  333. <div class="task_list_header" style="font-size:16px; margin-bottom:8px;">
  334. <el-image
  335. style="width: 30px; height: 22px; margin-right:6px;"
  336. :src="require('../assets/img/rightIcon.svg')"
  337. fit="contain"
  338. >
  339. </el-image>
  340. 指令监控
  341. </div>
  342. </div>
  343. <div class="subject_list_container_int" id="moninter">
  344. <div class="task_other_cotainer_scrool">
  345. <myscrollBoard
  346. :key="updatekey"
  347. :config="scrollTableConfig"
  348. style="width:100%; height:100%"
  349. />
  350. </div>
  351. </div>
  352. </div>
  353. </div>
  354. </div>
  355. <div class="task_header_footer">
  356. <div class="subject_task_item">
  357. <div class="task_outer_cotnainer_status">
  358. <div class="map_more_box" style="align-items: flex-start; margin-bottom:18px;">
  359. <div class="task_list_header" style="font-size:16px; margin-bottom: 10px;">
  360. <el-image
  361. style="width: 30px; height: 22px; margin-right:6px;"
  362. :src="require('../assets/img/rightIcon.svg')"
  363. fit="contain"
  364. >
  365. </el-image>
  366. 任务评估结果
  367. </div>
  368. </div>
  369. <div class="num_subject_box">
  370. <div class="num_subject_left">
  371. <div class="subject_number_box" style="margin-bottom:24px;">
  372. <div class="subject_num_left_style">
  373. <el-image
  374. style="width: 45px; height: 45px;margin-right:10px;"
  375. :src="require('../assets/img/subjectNum.png')"
  376. fit="contain"
  377. >
  378. </el-image>
  379. 课目数
  380. </div>
  381. <div class="SubjectNumber_style">
  382. {{ subjectNumbers }}
  383. </div>
  384. </div>
  385. <div class="subject_number_box">
  386. <div class="subject_num_left_style" >
  387. <el-image
  388. style="width: 45px; height: 45px;margin-right:1px;"
  389. :src="require('../assets/img/taksGrade.png')"
  390. fit="contain"
  391. >
  392. </el-image>
  393. 任务分数
  394. </div>
  395. <div class="SubjectNumber_style" style="color: #F1D73A;">
  396. {{ currentTaskGrade || '-' }}
  397. </div>
  398. </div>
  399. </div>
  400. <div class="num_subject_right">
  401. <div class="subject_status_precent">课目状态占比</div>
  402. <div id="subjectStatus" style="height: 170px; width:220px; left:18px; right:0px; top:8px; "></div>
  403. </div>
  404. </div>
  405. <div class="num_subject_box" v-if="false">
  406. <div>
  407. <div
  408. id="subjectGradeStatistics"
  409. style="width:230px; height: 180px;"
  410. :style="{ bottom: participantScoreFlag ? '15px' : '0' }"
  411. ></div>
  412. </div>
  413. <div>
  414. <div id="subjectGradeDistribute" style="height: 180px; width:230px; bottom: 0px; position: relative; left:10px;"></div>
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. <div class="unit_map_box">
  420. <div class="map_more_box" style="align-items: flex-start;">
  421. <div class="task_list_header" style="font-size:16px; margin-bottom: 10px;">
  422. <el-image
  423. style="width: 30px; height: 22px; margin-right:6px;"
  424. :src="require('../assets/img/rightIcon.svg')"
  425. fit="contain"
  426. >
  427. </el-image>
  428. 系统维度统计
  429. </div>
  430. <el-select
  431. v-model="systemSubGradeValue"
  432. placeholder="切换系统名称"
  433. style="width:43%;"
  434. @change="changeSystemSubGrade"
  435. filterable
  436. >
  437. <el-option
  438. v-for="item in systemOptionForTask"
  439. :key="item.value"
  440. :label="item.label"
  441. :value="item.value"
  442. >
  443. </el-option>
  444. </el-select>
  445. </div>
  446. <div class="num_subject_box_new">
  447. <div style="margin-bottom:20px;">
  448. <div style="font-size:12px;">成绩统计</div>
  449. <div
  450. id="subjectGradeStatistics"
  451. style=" left:5px; width:430px; height:180px; "
  452. :style="{ top: participantScoreFlag ? '-15px' : '2px' }"
  453. ></div>
  454. </div>
  455. <div style="position: relative;">
  456. <div style="font-size:12px;" class="new_style_grade">成绩分布</div>
  457. <div id="subjectGradeDistribute" style="height: 160px; width:430px; bottom: 55px; position: relative; left:5px;"></div>
  458. </div>
  459. </div>
  460. </div>
  461. <div class="commandMonitoring">
  462. <div class="task_outer_cotnainer_status">
  463. <div class="map_more_box">
  464. <div class="task_list_header" style="font-size:16px; margin-bottom:8px;">
  465. <el-image
  466. style="width: 30px; height: 22px; margin-right:6px;"
  467. :src="require('../assets/img/rightIcon.svg')"
  468. fit="contain"
  469. >
  470. </el-image>
  471. 单位分布
  472. </div>
  473. <!-- <el-image-->
  474. <!-- @click="showFull('chart-earth')"-->
  475. <!-- style="width: 20px; height: 20px; margin-right:6px; margin-top: -10px;"-->
  476. <!-- :src="require('../assets/img/iconMore.svg')"-->
  477. <!-- fit="contain"-->
  478. <!-- class="moreBtn_style"-->
  479. <!-- >-->
  480. <!-- </el-image>-->
  481. </div>
  482. <!-- <div v-if="!echartMapFlag" id="mapData" style="height:260px; width:100%; top:-20px;"></div>
  483. <div v-if="echartMapFlag" class="tempalte_no_data" style="height:86%;"> 暂无数据</div> -->
  484. <div id="chart-earth" style="height:260px; width:100%; top:-20px;"></div>
  485. <div class="center_no_data" v-if="false">
  486. <el-image
  487. style="width: 100px; height: 100px; margin-right:6px;"
  488. :src="require('../assets/img/build.png')"
  489. fit="contain"
  490. >
  491. </el-image>
  492. <div>系统正在建设中,敬请期待~</div>
  493. </div>
  494. </div>
  495. </div>
  496. </div>
  497. </div>
  498. <div class="task_footer_chart">
  499. <div class="chart_item_box_foooter" style="margin-right:10px;">
  500. <div class="inner_info_table_status">
  501. <div class="task_outer_cotnainer_status">
  502. <div class="task_list_header" style="font-size:16px;">
  503. <el-image
  504. style="width: 30px; height: 22px; margin-right:6px;"
  505. :src="require('../assets/img/rightIcon.svg')"
  506. fit="contain"
  507. >
  508. </el-image>
  509. 任务分数统计
  510. </div>
  511. </div>
  512. <div id="gradeStatistics" style="height: 240px; width:100%; margin-top:-60px; "></div>
  513. </div>
  514. </div>
  515. <div class="chart_item_box_foooter">
  516. <div class="inner_info_table_status">
  517. <div class="task_outer_cotnainer_status">
  518. <div class="task_list_header" style="font-size:16px;">
  519. <el-image
  520. style="width: 30px; height: 22px; margin-right:6px;"
  521. :src="require('../assets/img/rightIcon.svg')"
  522. fit="contain"
  523. >
  524. </el-image>
  525. 任务分数分布
  526. </div>
  527. </div>
  528. <div id="gradeDistribute" style="height: 240px; width:100%; margin-top:-60px;"></div>
  529. </div>
  530. </div>
  531. </div>
  532. </div>
  533. <div class="task_chart_cotainer">
  534. <div class="chart_item_box">
  535. <div class="inner_info_table_status" v-if="!taskStatusFlag">
  536. <div class="task_outer_cotnainer_status">
  537. <div class="task_list_header" style="font-size:16px;">
  538. <el-image
  539. style="width: 30px; height: 22px; margin-right:6px;"
  540. :src="require('../assets/img/rightIcon.svg')"
  541. fit="contain"
  542. >
  543. </el-image>
  544. 任务状态占比
  545. </div>
  546. </div>
  547. <div id="taskStatus" style="height:280px; width:314px; top:-50px;"></div>
  548. </div>
  549. <div v-if="taskStatusFlag" class="tempalte_no_data">暂无数据</div>
  550. </div>
  551. <div class="chart_item_box">
  552. <div class="inner_info_table_precent" >
  553. <div class="task_outer_cotnainer_status">
  554. <div class="task_list_header" style="font-size:16px;">
  555. <el-image
  556. style="width: 30px; height: 22px; margin-right:6px;"
  557. :src="require('../assets/img/rightIcon.svg')"
  558. fit="contain"
  559. >
  560. </el-image>
  561. {{this.unitTaskValue == '' ? getName(this.unitOption, this.unitFinshedValue) : getName(this.unitOption, this.unitTaskValue)}} 单位任务完成率
  562. </div>
  563. </div>
  564. <div v-if="!completionRate" id="taskPrecent" style="height:200px; width:310px; margin-top:-5px; right: 0px; "></div>
  565. <div v-if="completionRate" class="tempalte_no_data" style="height:200px; width:310px; margin-top:-10px; right: 0px; ">
  566. 暂无数据
  567. </div>
  568. <!-- <el-select-->
  569. <!-- v-model="unitFinshedValue"-->
  570. <!-- placeholder="「此处为单位名称」"-->
  571. <!-- style="margin-top:20px; width:270px;"-->
  572. <!-- filterable-->
  573. <!-- @change="changeUnit"-->
  574. <!-- >-->
  575. <!-- <el-option-->
  576. <!-- v-for="item in unitOption"-->
  577. <!-- :key="item.value"-->
  578. <!-- :label="item.label"-->
  579. <!-- :value="item.value"-->
  580. <!-- >-->
  581. <!-- </el-option>-->
  582. <!-- </el-select>-->
  583. </div>
  584. </div>
  585. <div class="chart_item_box" style="margin-bottom:0;">
  586. <div class="inner_info_table_precent" >
  587. <div class="task_outer_cotnainer_status">
  588. <div class="task_list_header" style="font-size:16px;">
  589. <el-image
  590. style="width: 30px; height: 22px; margin-right:6px;"
  591. :src="require('../assets/img/rightIcon.svg')"
  592. fit="contain"
  593. >
  594. </el-image>
  595. {{this.systemTaskId == '' ? getName(this.systemOption, this.systemFinshedValue) : getName(this.systemOption, this.systemTaskId)}} 系统任务完成率
  596. </div>
  597. </div>
  598. <div v-if="!systemcompletionRate" id="taskPrecentSystem" style="height:200px; width:310px; margin-top:-5px; "></div>
  599. <div v-if="systemcompletionRate" class="tempalte_no_data" style="height:200px; width:310px; margin-top:-10px; ">暂无数据</div>
  600. <!-- <el-select-->
  601. <!-- v-model="systemFinshedValue"-->
  602. <!-- placeholder="「此处为系统名称」"-->
  603. <!-- style="margin-top:20px; width:270px;"-->
  604. <!-- filterable-->
  605. <!-- @change="changeSystem"-->
  606. <!-- >-->
  607. <!-- <el-option-->
  608. <!-- v-for="item in systemOption"-->
  609. <!-- :key="item.value"-->
  610. <!-- :label="item.label"-->
  611. <!-- :value="item.value"-->
  612. <!-- >-->
  613. <!-- </el-option>-->
  614. <!-- </el-select>-->
  615. </div>
  616. </div>
  617. </div>
  618. <!-- 任务详情弹窗 -->
  619. <el-dialog
  620. title=""
  621. :show-close="false"
  622. :destroy-on-close="true"
  623. :visible.sync="dialogVisible"
  624. :width=" dialogType ==1 ? '650px' : '650px'"
  625. top="10%"
  626. >
  627. <div>
  628. <div class="task_detail_dialog">
  629. <div class="header_line_style"></div>
  630. <div class="task_dialog_box" v-if="dialogType==1">
  631. <div class="grade_box">
  632. <div class="name_task_participantName" style="margin-bottom:12px;">
  633. <div class="task_dialog_name">{{ subjectItem.taskName || '-' }}</div>
  634. <div class="task_dialog_particpater">
  635. 组织人员:{{ subjectItem.organizers && subjectItem.organizers.length && subjectItem.organizers.join(',') || '-' }}
  636. </div>
  637. </div>
  638. <div class="grade_item" style="margin-top:10px;">
  639. {{ subjectItem.syntheticTaskScore }}
  640. </div>
  641. </div>
  642. <div class="task_date_status">
  643. <div class="date_task_dialog">{{ subjectItem.startTime || '-' }} 至 {{ subjectItem.endTime || '-' }} </div>
  644. <div class="status_task_dialog">任务状态:{{ subjectItem.status }}</div>
  645. </div>
  646. <div class="subject_dialog_container">
  647. <template v-for="(item,index) in subjectItem.subjects">
  648. <div :key="index" style="margin-bottom: 8px;">
  649. <div class="subject_item_header" @click="item.moreFlag=!item.moreFlag">
  650. <div class="subject_name">{{ item.subjectName || '-' }}</div>
  651. <div class="subject_icon">
  652. <el-image
  653. style="width: 12px; height: 12px; margin-left:8px; margin-top:3px;"
  654. :src="item.moreFlag ? require('../assets/img/more.svg') : require('../assets/img/less.svg') "
  655. fit="cover"
  656. >
  657. </el-image>
  658. </div>
  659. </div>
  660. <div v-if="!item.moreFlag" class="suvject_item_container">
  661. <div class="subject_child_item" style="padding-left:0; margin-bottom:4px;">· {{ item.subjectName }}</div>
  662. <div class="subject_child_item"> 课目名称:{{ item.subjectName }}</div>
  663. <div class="subject_child_item"> 参加人员:{{ item.participatingPeople.join(',') || '-' }}</div>
  664. <div class="subject_child_item"> 参加系统:{{ item.participatingSystems.join(',') || '-' }}</div>
  665. <div class="subject_child_item"> 参加单位:{{ item.participatingUnits.join(',') || '-' }}</div>
  666. <div class="subject_child_item" v-if="false">
  667. 课目附件:
  668. <span class="download_file" stlye="color:#6CFCDB;">下载附件</span>
  669. </div>
  670. </div>
  671. </div>
  672. </template>
  673. </div>
  674. </div>
  675. <div class="task_dialog_box_other" v-if="dialogType==2">
  676. <el-table
  677. :data="pagedData"
  678. :header-cell-style="changeHeaderCellStyle"
  679. :cell-style="changeCellStyle"
  680. stripe
  681. :border="true"
  682. >
  683. <el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="getTableIndex" />
  684. <el-table-column align="center" property="participantName" label="姓名" max-width="350"></el-table-column>
  685. <el-table-column align="center" property="score" label="成绩" max-width="300"></el-table-column>
  686. </el-table>
  687. <el-row type="flex" justify="end" style="margin-top: 10px;">
  688. <el-pagination
  689. :total="this.gridData2.length"
  690. :current-page="this.gridData2.currentPage"
  691. :page-size="this.gridData2.pageSize"
  692. :page-sizes="[5,10,15, 20]"
  693. layout="total, prev, pager, next, sizes"
  694. @current-change="onCurrentPageChange"
  695. @size-change="onPageSizeChange">
  696. </el-pagination>
  697. </el-row>
  698. <operation-space v-if="showOperationSpace" :flow-instance="currentFlowInstance" @close="onOperationSpaceClose"></operation-space>
  699. </div>
  700. <div class="dialog_footer_box">
  701. <div class="view_more" @click="dialogVisible=false" style="color:#fff; padding: 3px 30px ;">
  702. 关闭
  703. </div>
  704. </div>
  705. </div>
  706. </div>
  707. </el-dialog>
  708. </div>
  709. </div>
  710. </v-scale-screen>
  711. </template>
  712. <script>
  713. import * as echarts from 'echarts';
  714. import myFlylineChartEnhanced from '../components/my-flyline-chart-enhanced/index'
  715. import myscrollBoard from '../components/myscroll-board/src/main'
  716. import sacleBox from '../components/sacle-box/index'
  717. import { request } from '../utils/request';
  718. var uploadedDataURL = require('../../public/json/taiyuan.json')
  719. import './situationScreen.css'
  720. import Videojs from "video.js"; // 引入Videojs
  721. import 'echarts-gl';
  722. export default {
  723. components:{
  724. myFlylineChartEnhanced,
  725. sacleBox,
  726. myscrollBoard,
  727. },
  728. data() {
  729. return {
  730. danweiweidu:{
  731. data: [],
  732. length:0,
  733. danwei_name:[],
  734. danwei_grade:[],
  735. currentPage:1,
  736. totalPage:0,
  737. pageSize:15,
  738. paged:true,
  739. },
  740. showOperationSpace: false,
  741. currentFlowInstance: undefined,
  742. systemTaskId:'',
  743. unitTaskValue:'',
  744. systemFinshedValue:'',
  745. unitFinshedValue:'',
  746. wholeOutTaskId:'',
  747. systemSubjectId:'',
  748. unitSubjectValue:'',
  749. subjectItem:{},
  750. moreFlag:true,
  751. dialogVisible:false,
  752. taskList:[],
  753. websocket: null, //建立的连接
  754. websocketOrder: null, //建立的连接
  755. updatekey:'1',
  756. myChart:'',
  757. myChart1:'',
  758. myChart2:'',
  759. myChart3:'',
  760. myChart4:'',
  761. myChart5:'',
  762. myChart6:'',
  763. myChart7:'',
  764. myChart8:'',
  765. myChart9:'',
  766. scrollTableConfig:{
  767. header: ['课目名称', '指令分类', '特情注入', '指令内容', '模训系统', '时间'],
  768. waitTime:1500,
  769. data: [],
  770. columnWidth: [80],
  771. oddRowBGC:'#072347',
  772. evenRowBGC:'#021736'
  773. },
  774. taiYuanMapData:{
  775. "小店区": [112.564273, 37.817974],
  776. "迎泽区": [112.558851, 37.855804],
  777. "杏花岭区": [112.560743, 37.879291],
  778. "尖草坪区": [112.487122, 37.939893],
  779. "万柏林区": [112.522258, 37.862653],
  780. "晋源区": [112.477849, 37.715619],
  781. "清徐县": [112.357961, 37.60729],
  782. "阳曲县": [112.673818, 38.058797],
  783. "娄烦县": [111.793798, 38.066035],
  784. "古交市": [112.174353, 37.908534],
  785. },
  786. taiYuanDatas:[],
  787. unitValue:'',
  788. unitOptions:[],
  789. dialogType:1,
  790. subjectDatas:[],
  791. subjectMap:{
  792. '待执行':require('../assets/img/waite.png'),
  793. '执行中':require('../assets/img/doing.png'),
  794. '已完成':require('../assets/img/finshed.png') ,
  795. },
  796. instructList:[],
  797. unitOption:[],
  798. unitOptionForTask:[],
  799. systemOption:[],
  800. systemOptionForTask:[],
  801. currrentSystem:'',
  802. currentUnit:'',
  803. taskOPtion:[],
  804. currentTaskName:'',
  805. currentTaskGrade:'',
  806. subjectNumbers:'',
  807. unitSubGradeValue:'',
  808. systemSubGradeValue:'',
  809. gridData:[],
  810. gridData2:{
  811. data: [],
  812. length:0,
  813. currentPage:1,
  814. pageSize:10,
  815. paged:true,
  816. },
  817. dataSrc:'https://cctvwbndbd.a.bdydns.com/cctvwbnd/cctv1_2/index.m3u8?BR=single',
  818. completionRate:false,
  819. systemcompletionRate:false,
  820. taskStatusFlag: false,
  821. echartMapFlag:false,
  822. participantScoreFlag:true,
  823. playerList:[],
  824. updatekeyOther:'1',
  825. currentYear:'',
  826. }
  827. },
  828. computed:{
  829. pagedData() { // 动态计算当前页的数据
  830. const start = (this.gridData2.currentPage - 1) * this.gridData2.pageSize
  831. const end = start + this.gridData2.pageSize
  832. if(this.gridData2.data!=null){
  833. console.log("hhhh1: ",start+"---"+end )
  834. console.log("hhhh2: ",this.gridData2.data )
  835. console.log("hhhh3: ",this.gridData2.data.slice(start, end) )
  836. return this.gridData2.data.slice(start, end)
  837. }else{
  838. return null
  839. }
  840. }
  841. },
  842. methods:{
  843. /**
  844. * 获取每一行的index信息
  845. * @param {Integer} index 表格在本页位置
  846. */
  847. getTableIndex (index) {
  848. let a
  849. console.log("参数: "+this.gridData2.paged+" "+this.gridData2.pageSize+" "+index)
  850. a=((this.gridData2.currentPage - 1) * this.gridData2.pageSize + (index + 1))
  851. console.log(".....a "+a)
  852. return a;
  853. },
  854. onCurrentPageChange (newCurrentPage) {
  855. console.log("1: ",newCurrentPage )
  856. console.log("2: ",this.gridData2.pageSize )
  857. console.log("3: ",this.oldPage)
  858. this.loadTableDataImpl2(newCurrentPage, this.gridData2.pageSize).then(() => {//数据加载成功
  859. this.gridData2.currentPage = newCurrentPage;
  860. this.oldPage = this.gridData2.currentPage-1
  861. console.log("4: ",newCurrentPage)
  862. console.log("5: ",this.gridData2.currentPage)
  863. console.log("6: ",this.oldPage)
  864. if(this.gridData2.data.length <= newCurrentPage*this.gridData2.pageSize ){
  865. this.gridData2.paged=true
  866. }else{
  867. this.gridData2.paged=false
  868. }
  869. }).catch(() => {//数据加载失败
  870. this.gridData2.currentPage = this.oldPage;
  871. console.log("7: ",this.oldPage)
  872. console.log("8: ",this.gridData2.currentPage)
  873. });
  874. },
  875. /**
  876. * 表格分页每页显示数量变化
  877. * @param {Integer} newPageSize 变化后的每页显示数量
  878. */
  879. onPageSizeChange (newPageSize) {
  880. console.log("hhhh2: ",newPageSize )
  881. this.gridData2.pageSize = newPageSize;
  882. this.gridData2.currentPage = 1
  883. this.loadTableDataImpl2(1, newPageSize).then(() => {
  884. this.oldPage = this.gridData2.currentPage;
  885. this.oldPageSize = this.gridData2.pageSize;
  886. }).catch(e => {
  887. this.gridData2.currentPage = this.oldPage;
  888. this.gridData2.pageSize = this.oldPageSize;
  889. });
  890. },
  891. /**
  892. * 获取表格数据
  893. * @param {Integer} pageNum 当前分页
  894. * @param {Integer} pageSize 每页数量
  895. * @param {Boolean} reload 是否重新获取数据
  896. */
  897. loadTableDataImpl2 (pageNum, pageSize, reload = false) {
  898. console.log("11: ",pageNum+"---"+pageSize+"---"+reload)
  899. // 判断是否需要重新加载数据
  900. if (reload || !this.gridData2.data || this.gridData2.data.length === 0) {
  901. // 调用后端接口或其他数据来源获取数据
  902. // 这里省略具体实现
  903. // 模拟一个返回结果的 Promise 对象
  904. const mockData = new Promise(resolve => {
  905. const data = [];
  906. for (let i = 1; i <= pageSize; i++) {
  907. data.push({
  908. id: pageNum * pageSize + i,
  909. name: `任务${pageNum * pageSize + i}`,
  910. status: Math.floor(Math.random() * 4)
  911. });
  912. }
  913. resolve(data);
  914. });
  915. // 返回 Promise 对象,以便分页组件可以在数据加载完成后进行下一步处理。
  916. return mockData.then(data => {
  917. // 更新任务列表数据
  918. this.gridData2.data = data;
  919. // 返回新的任务列表数据
  920. return this.gridData2.data.slice((pageNum - 1) * pageSize, pageNum * pageSize);
  921. });
  922. } else {// 直接返回已有的任务列表数据
  923. return Promise.resolve(this.gridData2.data.slice((pageNum - 1) * pageSize, pageNum * pageSize));
  924. }
  925. },
  926. refreshFormAllInstance (reloadData = false) {
  927. if (reloadData) {
  928. this.renwuliebiao.refreshTable(true, 1);
  929. } else {
  930. this.renwuliebiao.refreshTable();
  931. }
  932. if (!this.isInit) {
  933. // 初始化下拉数据
  934. }
  935. this.isInit = true;
  936. },
  937. onOperationSpaceClose () {
  938. this.showOperationSpace = false;
  939. this.currentFlowInstance = null;
  940. this.refreshFormAllInstance()
  941. },
  942. jumpToCurrent() {
  943. this.$router.push("/mainScreen")
  944. },
  945. getEarth(){
  946. // 获取DOM容器
  947. const chartContainer = document.getElementById('chart-earth');
  948. // 初始化ECharts图表
  949. this.myChart = echarts.init(chartContainer);
  950. var datas = [];
  951. console.log('this.taiyuanMapDatas :>> ', this.taiyuanMapData);
  952. for (let item in this.taiYuanMapData){
  953. var array = this.taiYuanMapData[item]
  954. let data = {
  955. value:[array[0],array[1],0],
  956. name:item
  957. }
  958. console.log('data :>> ', data);
  959. datas.push(data)
  960. }
  961. console.log('datas :>> ', datas);
  962. // 设置图表的配置项和数据
  963. const option = {
  964. backgroundColor: '#000',
  965. globe: {
  966. // zoom3D: 1000000000, // 调整为合适的初始缩放级别
  967. baseTexture: require('../assets/img/earth.jpg'),
  968. heightTexture: require('../assets/img/bathymetry_bw_composite_4k.jpg'),
  969. displacementScale: 0.1,
  970. shading: 'lambert',
  971. environment: require('../assets/img/starfield.jpg'),
  972. viewControl: {
  973. distance: 1, // 地球与相机之间的距离
  974. targetCoord: [112.548879, 37.87059], // 设置地球的目标位置为太原市的经纬度
  975. autoRotate: false, // 自动旋转地球
  976. },
  977. light: {
  978. ambient: {
  979. intensity: 0.1
  980. },
  981. main: {
  982. intensity: 1.5
  983. }
  984. },
  985. layers: [
  986. {
  987. type: 'blend',
  988. blendTo: 'emission',
  989. texture: require('../assets/img/night.jpg')
  990. },
  991. {
  992. type: 'overlay',
  993. texture: require('../assets/img/clouds.png'),
  994. shading: 'lambert',
  995. distance: 5
  996. }
  997. ]
  998. },
  999. toolbox: {
  1000. feature: {
  1001. // dataZoom: { yAxisIndex: 'none' }, // 数据区域缩放
  1002. restore: { show: true }, // 重置
  1003. saveAsImage: { show: true }, // 导出图片
  1004. myFull: { // 全屏
  1005. show: true,
  1006. title: '全屏',
  1007. icon: 'path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891',
  1008. onclick: (e) => {// 全屏查看
  1009. const element = document.getElementById('chart-earth');
  1010. if (element.requestFullScreen) {
  1011. // HTML W3C 提议
  1012. console.log(1)
  1013. element.requestFullScreen()
  1014. } else if (element.msRequestFullscreen) {
  1015. // IE11
  1016. console.log(2)
  1017. element.msRequestFullScreen()
  1018. } else if (element.webkitRequestFullScreen) {
  1019. // Webkit (works in Safari5.1 and Chrome 15)
  1020. console.log(3)
  1021. element.webkitRequestFullScreen()
  1022. } else if (element.mozRequestFullScreen) {
  1023. // Firefox (works in nightly)
  1024. console.log(4)
  1025. element.mozRequestFullScreen()
  1026. }
  1027. // 退出全屏
  1028. if (element.requestFullScreen) {
  1029. document.exitFullscreen()
  1030. } else if (element.msRequestFullScreen) {
  1031. document.msExitFullscreen()
  1032. } else if (element.webkitRequestFullScreen) {
  1033. document.webkitCancelFullScreen()
  1034. } else if (element.mozRequestFullScreen) {
  1035. document.mozCancelFullScreen()
  1036. }
  1037. }
  1038. }
  1039. },
  1040. },
  1041. // xAxis: {
  1042. // type: 'value',
  1043. // min: 'dataMin',
  1044. // max: 'dataMax',
  1045. // splitLine: {
  1046. // show: true
  1047. // }
  1048. // },
  1049. // yAxis: {
  1050. // type: 'value',
  1051. // min: 'dataMin',
  1052. // max: 'dataMax',
  1053. // splitLine: {
  1054. // show: true
  1055. // }
  1056. // },
  1057. // dataZoom: [
  1058. // {
  1059. // type: 'slider',
  1060. // show: true,
  1061. // xAxisIndex: [0],
  1062. // yAxisIndex: [0],
  1063. // start: 0,
  1064. // end: 100
  1065. // },
  1066. //
  1067. // {
  1068. // type: 'inside',
  1069. // show: true,
  1070. // xAxisIndex: [0],
  1071. // yAxisIndex: [0],
  1072. // start: 0,
  1073. // end: 100
  1074. // },
  1075. // ],
  1076. series: [ {
  1077. type: 'scatter3D',
  1078. symbolSize: 10,
  1079. coordinateSystem: 'globe',
  1080. data: datas,
  1081. itemStyle: {
  1082. color: 'red' // 设置标记点的颜色
  1083. },
  1084. label: {
  1085. show: true,
  1086. formatter: '{b}', // 设置标记点的文本显示为数据的名称
  1087. position: 'top'
  1088. }
  1089. }]
  1090. };
  1091. // echarts.chart.map._mapDataMap下能看到x,y以及基础basescale的设置信息,画的时候是适应你的节点的高宽,而不是去适应浏览器。适应浏览器是页面你定义的dom节点去做的。
  1092. // this.myChart.map._map;
  1093. // 使用配置项和数据显示图表
  1094. this.myChart.setOption(option);
  1095. window.onresize = this.myChart.resize;
  1096. },
  1097. // 获取单位名称
  1098. getName(list, id) {
  1099. var tmp = list.find(k => k["value"] == id)
  1100. return tmp["label"]
  1101. },
  1102. // 表格样式修改
  1103. changeHeaderCellStyle(row,column, rowIndex, columnIndex){
  1104. if(row.columnIndex === 0){
  1105. return 'background: #004279 ; color:#fff;'; // 修改的样式
  1106. }else {
  1107. return 'background: #004279 ;color:#fff; ';
  1108. }
  1109. },
  1110. changeCellStyle(row,column, rowIndex, columnIndex){
  1111. if(row.columnIndex === 0){
  1112. return 'background: #0A427C ; color:#fff;'; // 修改的样式
  1113. }else {
  1114. return 'background: #0A427C ; color:#fff;';
  1115. }
  1116. },
  1117. viewMore(item){
  1118. this.dialogType=1
  1119. console.log('ckx debug item', item )
  1120. if(!item.subjects){
  1121. return this.$message.warning('暂无课目信息')
  1122. }
  1123. item.subjects.forEach((childItem)=>{
  1124. childItem.moreFlag=true
  1125. })
  1126. this.subjectItem= JSON.parse(JSON.stringify(item))
  1127. this.dialogVisible=true
  1128. },
  1129. // 查看任务态势
  1130. viewTaskSituation(item) {
  1131. console.log("查看态势1",this.wholeOutTaskId)
  1132. this.wholeOutTaskId = item.taskId;
  1133. console.log("查看态势2",this.wholeOutTaskId)
  1134. this.changeTask()
  1135. },
  1136. // 地图
  1137. initechartsMap(){
  1138. if(this.myChart1 !=null && this.myChart1 != "" && this.myChart1 != undefined){
  1139. this.myChart1.dispose();
  1140. }
  1141. this.myChart1 = echarts.init(document.getElementById('mapData'),'dark');
  1142. console.log("100",this)
  1143. echarts.registerMap('taiyuan', uploadedDataURL);
  1144. var chinaGeoCoordMap = this.taiYuanMapData
  1145. var chinaDatas = this.taiYuanDatas
  1146. var convertData = function(data) {
  1147. var res = [];
  1148. for (var i = 0; i < data.length; i++) {
  1149. var dataItem = data[i];
  1150. var fromCoord = chinaGeoCoordMap[dataItem[0].name];
  1151. var toCoord = [chinaDatas[0][0].longitude, chinaDatas[0][0].dimension];
  1152. if (fromCoord && toCoord) {
  1153. res.push([{
  1154. coord: fromCoord,
  1155. value: dataItem[0].value,
  1156. }, {
  1157. coord: toCoord,
  1158. }]);
  1159. }
  1160. }
  1161. return res;
  1162. };
  1163. var series = [];
  1164. // console.log('ckx debug chinaDatas ', this.taiYuanDatas, )
  1165. [[chinaDatas[0][0].name, chinaDatas]].forEach(function(item, i) {
  1166. console.log('debug asdfasd',item)
  1167. series.push({
  1168. type: 'lines',
  1169. zlevel: 2,
  1170. effect: {
  1171. show: true,
  1172. period: 4, //箭头指向速度,值越小速度越快
  1173. trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
  1174. symbol: 'arrow', //箭头图标
  1175. symbolSize: 8, //图标大小
  1176. // color:'#f00' // 箭头的颜色
  1177. },
  1178. lineStyle: {
  1179. normal: {
  1180. width: 1, //尾迹线条宽度
  1181. opacity: 1, //尾迹线条透明度
  1182. curveness: .3, //尾迹线条曲直度
  1183. }
  1184. },
  1185. data: convertData(item[1]),
  1186. }, {
  1187. type: 'effectScatter',
  1188. coordinateSystem: 'geo',
  1189. zlevel: 2,
  1190. rippleEffect: { //涟漪特效
  1191. period: 4, //动画时间,值越小速度越快
  1192. brushType: 'stroke', //波纹绘制方式 stroke, fill
  1193. scale: 8, //波纹圆环最大限制,值越大波纹越大,
  1194. // color:'#f00', // 波动的颜色
  1195. },
  1196. label: {
  1197. normal: {
  1198. show: true,
  1199. position: 'right', //显示位置
  1200. offset: [5, 0], //偏移设置
  1201. formatter: function(params) { //圆环显示文字
  1202. // return params.data.name;
  1203. return '';
  1204. },
  1205. fontSize: 13,
  1206. color:'#DC1861',
  1207. },
  1208. emphasis: {
  1209. show: true
  1210. }
  1211. },
  1212. symbol: 'circle',
  1213. symbolSize: function(val) {
  1214. return 5 + val[2] * 5; //圆环大小
  1215. },
  1216. itemStyle: {
  1217. normal: {
  1218. show: false,
  1219. color: '#f00'
  1220. }
  1221. },
  1222. data: item[1].map(function(dataItem) {
  1223. console.log('ckx debug dataItem ', dataItem )
  1224. return {
  1225. name: dataItem[0].name,
  1226. value: chinaGeoCoordMap[dataItem[0].name].concat([dataItem[0].value]),
  1227. participatingSubjects: dataItem[0].participatingSubjects
  1228. };
  1229. }),
  1230. tooltip: {
  1231. trigger: 'item',
  1232. backgroundColor: '#041937',
  1233. textStyle: {
  1234. color: "white" //设置文字颜色
  1235. },
  1236. borderColor: '#FFFFCC',
  1237. showDelay: 0,
  1238. hideDelay: 0,
  1239. enterable: false,
  1240. transitionDuration: 0,
  1241. extraCssText: 'z-index:100',
  1242. formatter: function(params, ticket, callback) {
  1243. console.log('ckx debug params', params,ticket )
  1244. //根据业务自己拓展要显示的内容
  1245. var res = "";
  1246. var name = params.name;
  1247. var value = params.value[params.seriesIndex + 1];
  1248. if(name){
  1249. res = `
  1250. <div style="background:#041937;;">
  1251. <div style='color:#fff;'>单位名称:${name} </div>
  1252. <div style='color:#fff; margin-top:4px;'>参与课目名称: ${params.data.participatingSubjects} </div>
  1253. </div>
  1254. `
  1255. return res;
  1256. }else {
  1257. return ''
  1258. }
  1259. },
  1260. show:true,
  1261. },
  1262. },
  1263. //被攻击点
  1264. {
  1265. type: 'scatter',
  1266. coordinateSystem: 'geo',
  1267. zlevel: 2,
  1268. rippleEffect: {
  1269. period: 4,
  1270. brushType: 'stroke',
  1271. scale: 4
  1272. },
  1273. label: {
  1274. normal: {
  1275. show: false,
  1276. position: 'right',
  1277. color: 'red',
  1278. formatter: '{b}',
  1279. textStyle: {
  1280. color: "red"
  1281. }
  1282. },
  1283. emphasis: {
  1284. show: false,
  1285. color: "#f60"
  1286. }
  1287. },
  1288. showSymbol: false,
  1289. symbol: 'pin',
  1290. symbolSize: 0,
  1291. data: [{
  1292. name: item[0],
  1293. value: chinaGeoCoordMap[item[0]].concat([10]),
  1294. }],
  1295. }
  1296. );
  1297. });
  1298. let option = {
  1299. tooltip: {
  1300. show:false,
  1301. },
  1302. backgroundColor: "transparent",
  1303. visualMap: { //图例值控制
  1304. show: false,
  1305. },
  1306. geo: {
  1307. map: 'taiyuan',
  1308. zoom: 1,
  1309. label: {
  1310. normal: {
  1311. show: true,
  1312. position: 'right',
  1313. textStyle: {
  1314. color: "#fff",
  1315. fontSize: 10
  1316. }
  1317. },
  1318. emphasis: {
  1319. show: true,
  1320. color:'#fff'
  1321. }
  1322. },
  1323. roam: false, //是否允许缩放
  1324. itemStyle: {
  1325. normal: {
  1326. color: '#153295', //地图背景色
  1327. borderColor: '#516a89', //省市边界线00fcff 516a89
  1328. borderWidth: 1
  1329. },
  1330. emphasis: {
  1331. color: '#0068FB' //悬浮背景
  1332. }
  1333. }
  1334. },
  1335. series: series
  1336. };
  1337. if(option){
  1338. console.log('111',option)
  1339. // console.log('222',this.myChart1.get())
  1340. console.log('112',this)
  1341. this.myChart1.setOption(option)
  1342. }
  1343. let that =this
  1344. window.addEventListener('resize',function () {//执行
  1345. console.log('cuowu');
  1346. that.myChart1.resize();
  1347. })
  1348. },
  1349. conditionalSearch() {
  1350. this.getTaskList()
  1351. this.getItemUnits()
  1352. this.getItemSystem()
  1353. },
  1354. // 获取任务列表
  1355. async getTaskList(){
  1356. let params={}
  1357. if (this.currentYear !== null) {
  1358. params["startTime"] = this.currentYear[0];
  1359. params["endTime"] = this.currentYear[1];
  1360. }
  1361. if (this.unitTaskValue !== null) {
  1362. params["unitId"] = this.unitTaskValue;
  1363. }
  1364. if (this.systemTaskId !== null) {
  1365. params["systemId"] = this.systemTaskId;
  1366. }
  1367. const res = await request('/dt_screen/rest/v2/task/listHistoricTask/', 'post', params, false)
  1368. const { errorCode, errorMessage, success,data } = res.data;
  1369. if (success) {
  1370. console.log('获取任务列表', data);
  1371. this.taskList= data
  1372. this.taskOPtion = data.map((item)=>{
  1373. return {
  1374. label: item.taskName,
  1375. value: item.taskId
  1376. }
  1377. })
  1378. this.wholeOutTaskId=data[0].taskId
  1379. this.currentTaskName= data[0].taskName
  1380. this.currentTaskGrade= data[0].syntheticTaskScore
  1381. // 获取地图的信息
  1382. if(data.length){
  1383. // 获取任务的单位列表
  1384. this.getUnitListByTaskId(data[0].taskId)
  1385. // 获取任务的系统列表
  1386. this.getSystemListByTaskId(data[0].taskId)
  1387. // 获取地图的信息
  1388. this.getMapDetail(data[0].taskId)
  1389. // 获取任务的课目信息
  1390. this.getSubjectList(data[0].taskId)
  1391. // 获取任务的指令信息
  1392. this.getinstructList(data[0].taskId)
  1393. // 获取一个任务的课目数量
  1394. // this.getTaskSubjectNum(data[0].taskId)
  1395. // 获取某一个任务的全部课目状态占比
  1396. // this.getAllSubjectDetail(data[0].taskId)
  1397. // // 获取某个任务下单位参与与课目人员的的成绩统计
  1398. // this.getUnitSubjectPeopleScore(data[0].taskId,this.unitSubGradeValue)
  1399. // // 获取某个任务下单位参与与课目人员的的成绩分布
  1400. // this.getUnitSubjectPeopleDistribution(data[0].taskId,this.unitSubGradeValue)
  1401. // 获取全部任务成绩统计
  1402. this.getAllTaskScore()
  1403. // 获取全部任务成绩分布
  1404. this.getAllTaskDistribution()
  1405. // 建立指令websocket 链接
  1406. this.initInstructWebsoket()
  1407. }
  1408. } else {
  1409. this.$message.error(errorMessage)
  1410. }
  1411. },
  1412. // 获取任务单位列表
  1413. async getUnitListByTaskId(taskId) {
  1414. let params={}
  1415. if (taskId !== null) {
  1416. params["taskId"] = taskId
  1417. const res = await request('/dt_screen/rest/v2/task/listUnit/', 'post', params, false)
  1418. const { errorCode, errorMessage, success,data } = res.data;
  1419. if (success) {
  1420. console.log("sgw debug", data);
  1421. this.unitOptionForTask = data.map((item)=>{
  1422. return {
  1423. label:item.unitName,
  1424. value: item.unitId
  1425. }
  1426. })
  1427. this.unitSubGradeValue = this.unitOptionForTask[0].value
  1428. // 获取某个任务下单位参与与课目人员的的成绩统计
  1429. this.getUnitSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
  1430. // 获取某个任务下单位参与与课目人员的的成绩分布
  1431. this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
  1432. }
  1433. }
  1434. },
  1435. // 获取任务系统列表
  1436. async getSystemListByTaskId(taskId) {
  1437. let params={}
  1438. if (taskId !== null) {
  1439. params["taskId"] = taskId
  1440. const res = await request('/dt_screen/rest/v2/task/listSystem/', 'post', params, false)
  1441. const { errorCode, errorMessage, success,data } = res.data;
  1442. if (success) {
  1443. console.log("sgw debug", data);
  1444. this.systemOptionForTask = data.map((item)=>{
  1445. return {
  1446. label:item.systemName,
  1447. value: item.systemId
  1448. }
  1449. })
  1450. this.systemSubGradeValue = this.systemOptionForTask[0].value
  1451. }
  1452. }
  1453. },
  1454. // 切换任务
  1455. changeTask(){
  1456. this.systemSubjectId=''
  1457. this.unitSubjectValue=''
  1458. this.currentTaskName = this.taskOPtion.find( item => item.value== this.wholeOutTaskId ).label
  1459. this.currentTaskGrade = this.taskList.find( item=> item.taskId==this.wholeOutTaskId).syntheticTaskScore
  1460. this.getUnitListByTaskId(this.wholeOutTaskId)
  1461. // 获取任务的系统列表
  1462. this.getSystemListByTaskId(this.wholeOutTaskId)
  1463. // 获取地图的信息
  1464. this.getMapDetail(this.wholeOutTaskId)
  1465. // 获取任务的课目信息
  1466. this.getSubjectList(this.wholeOutTaskId)
  1467. // 获取任务的指令信息
  1468. this.getinstructList(this.wholeOutTaskId)
  1469. // 获取一个任务的课目数量
  1470. // this.getTaskSubjectNum(this.wholeOutTaskId)
  1471. // 获取某一个任务的全部课目状态占比
  1472. // this.getAllSubjectDetail(this.wholeOutTaskId)
  1473. // 获取某个任务下单位参与与课目人员的的成绩统计
  1474. this.getUnitSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
  1475. // 获取某个任务下单位参与与课目人员的的成绩分布
  1476. this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
  1477. // 建立指令websocket 链接
  1478. this.initInstructWebsoket()
  1479. console.log('this.taiYuanMapData :>> ', this.taiYuanMapData);
  1480. },
  1481. // 获取任务地图的信息
  1482. async getMapDetail(taskId){
  1483. let params={
  1484. taskId: taskId
  1485. }
  1486. // const res = await request(`/dt_screen/rest/v1/participatingUnit/list/${taskId}`, 'get', params, false)
  1487. const res = await request(`/dt_screen/rest/v2/task/listParticipatingUnit`, 'post', params, false)
  1488. const { errorCode, errorMessage, success,data } = res.data;
  1489. if (success) {
  1490. console.log('获取地图的信息', data);
  1491. if(data.length){
  1492. // this.taiYuanMapData={}
  1493. data.forEach((item)=>{
  1494. // item.participatingSubjects= item.participatingSubjects
  1495. this.taiYuanMapData[item.participantUnitName]=[item.longitude,item.dimension]
  1496. this.taiYuanDatas.push([
  1497. {
  1498. value:0,
  1499. name:item.participantUnitName,
  1500. // participatingSubjects: item.participatingSubjects,
  1501. dimension: item.dimension,
  1502. longitude: item.longitude
  1503. }
  1504. ])
  1505. })
  1506. console.log("666",echarts.version);
  1507. console.log("667",this);
  1508. // this.initechartsMap()
  1509. this.echartMapFlag=false
  1510. }else{
  1511. this.echartMapFlag=true
  1512. }
  1513. } else {
  1514. this.$message.error(errorMessage)
  1515. }
  1516. },
  1517. // 获取一个任务的课目数量
  1518. // async getTaskSubjectNum(taskId){
  1519. // let params={}
  1520. // const res = await request(`/dt_screen/rest/v1/subject/subjectNum/task/${taskId}/`, 'get', params, false)
  1521. // const { errorCode, errorMessage, success,data } = res.data;
  1522. // if (success) {
  1523. // console.log('获取一个任务的课目数量', data);
  1524. // this.subjectNumbers=data
  1525. //
  1526. // } else {
  1527. // this.$message.error(errorMessage)
  1528. // }
  1529. // },
  1530. // 获取任务的课目信息
  1531. async getSubjectList(taskId){
  1532. let params={}
  1533. params["taskId"] = taskId;
  1534. if (this.unitTaskValue !== null) {
  1535. params["unitId"] = this.unitTaskValue;
  1536. }
  1537. if (this.systemTaskId !== null) {
  1538. params["systemId"] = this.systemTaskId;
  1539. }
  1540. const res = await request(`/dt_screen/rest/v2/subject/listByCondition`, 'post', params, false)
  1541. const { errorCode, errorMessage, success,data } = res.data;
  1542. if (success) {
  1543. console.log('获取任务的课目信息', data);
  1544. this.subjectDatas=data
  1545. this.subjectNumbers=data.length
  1546. let statusData1 = {
  1547. name: "待执行",
  1548. value: this.subjectDatas.reduce((acc, obj) => {
  1549. if (obj.status == "待执行") {
  1550. return acc + 1;
  1551. } else {
  1552. return acc;
  1553. }
  1554. }, 0),
  1555. };
  1556. let statusData2 = {
  1557. name: "执行中",
  1558. value: this.subjectDatas.reduce((acc, obj) => {
  1559. if (obj.status == "执行中") {
  1560. return acc + 1;
  1561. } else {
  1562. return acc;
  1563. }
  1564. }, 0),
  1565. };
  1566. let statusData3 = {
  1567. name: "已完成",
  1568. value: this.subjectDatas.reduce((acc, obj) => {
  1569. if (obj.status == "已完成") {
  1570. return acc + 1;
  1571. } else {
  1572. return acc;
  1573. }
  1574. }, 0),
  1575. };
  1576. let allTaskStatusData = [];
  1577. allTaskStatusData.push(statusData1);
  1578. allTaskStatusData.push(statusData2);
  1579. allTaskStatusData.push(statusData3);
  1580. this.initEchartsSubjectStatus(allTaskStatusData)
  1581. } else {
  1582. this.$message.error(errorMessage)
  1583. }
  1584. },
  1585. // 切换单位再结合任务id 获取课目课目列表
  1586. async getUnitSubjectList(taskId,unitId){
  1587. let params={}
  1588. const res = await request(`/dt_screen/rest/v1/subject/list/task/${taskId}/unit/${unitId}`, 'get', params, false)
  1589. const { errorCode, errorMessage, success,data } = res.data;
  1590. if (success) {
  1591. console.log('获取任务的课目信息', data);
  1592. this.subjectDatas=data
  1593. } else {
  1594. this.$message.error(errorMessage)
  1595. }
  1596. },
  1597. // unitSubjectValue ,unitSubjectValue
  1598. changeTaskAndUnit() {
  1599. this.systemSubjectId=''
  1600. if(this.unitSubjectValue){
  1601. this.getUnitSubjectList(this.wholeOutTaskId, this.unitSubjectValue)
  1602. }else {
  1603. this.getSubjectList(this.wholeOutTaskId)
  1604. }
  1605. },
  1606. changeTaskSystem(){
  1607. console.log('ckx debug this.systemTaskId ', this.systemTaskId )
  1608. this.getTaskList()
  1609. },
  1610. changeTaskUnit(){
  1611. console.log('ckx debug this.unitTaskValue ', this.unitTaskValue )
  1612. this.getTaskList()
  1613. },
  1614. // 切换年度
  1615. changeYear(){
  1616. console.log('ckx debug this.currentYear ', this.currentYear )
  1617. this.getTaskList()
  1618. },
  1619. // 切换系统再结合任务id 获取课目课目列表
  1620. async getSystemSubjectList(taskId,systemId){
  1621. let params={}
  1622. const res = await request(`/dt_screen/rest/v1/subject/list/task/${taskId}/system/${systemId}`, 'get', params, false)
  1623. const { errorCode, errorMessage, success,data } = res.data;
  1624. if (success) {
  1625. console.log('获取任务的课目信息', data);
  1626. this.subjectDatas=data
  1627. } else {
  1628. this.$message.error(errorMessage)
  1629. }
  1630. },
  1631. // unitSubjectValue ,unitSubjectValue
  1632. changeTaskAndSystem() {
  1633. this.unitSubjectValue=''
  1634. if(this.systemSubjectId){
  1635. this.getSystemSubjectList(this.wholeOutTaskId, this.systemSubjectId)
  1636. }else {
  1637. this.getSubjectList(this.wholeOutTaskId)
  1638. }
  1639. },
  1640. // 获取任务的指令
  1641. async getinstructList (taskId) {
  1642. let params={}
  1643. const res = await request(`/dt_screen/rest/v2/order/list/${taskId}`, 'get', params, false)
  1644. const { errorCode, errorMessage, success,data } = res.data;
  1645. if (success) {
  1646. console.log('获取任务的指令', data);
  1647. this.instructList=data
  1648. let tempData=[]
  1649. data.forEach((item)=>{
  1650. tempData.push([item.subjectName, item.name, item.situation, item.content, item.system,item.time])
  1651. })
  1652. this.scrollTableConfig.data=tempData
  1653. this.updatekey=new Date().getTime()
  1654. } else {
  1655. this.$message.error(errorMessage)
  1656. }
  1657. },
  1658. // 获取全部单位
  1659. async getAllUnits (){
  1660. let params={}
  1661. const res = await request('/dt_screen/rest/v1/screen/listUnit/', 'get', params, false)
  1662. const { errorCode, errorMessage, success,data } = res.data;
  1663. if (success) {
  1664. console.log('获取全部单位', data);
  1665. // 获取任务数据
  1666. this.getTaskList()
  1667. // 获取全部任务状态占比
  1668. this.getAllTaskDetail()
  1669. // // 获取全部任务成绩统计
  1670. // this.getAllTaskScore()
  1671. // // 获取全部任务成绩分布
  1672. // this.getAllTaskDistribution()
  1673. // this.instructList=data
  1674. // unitId,unitName
  1675. this.unitOption = data.map((item)=>{
  1676. return {
  1677. label:item.unitName,
  1678. value: item.unitId
  1679. }
  1680. })
  1681. this.unitFinshedValue=this.unitOption[0].value
  1682. // this.unitSubGradeValue=this.unitOption[0].value
  1683. this.getItemUnits()
  1684. } else {
  1685. this.$message.error(errorMessage)
  1686. }
  1687. },
  1688. // 切换某一个单位
  1689. changeUnit(){
  1690. console.log('ckx debug this.unitFinshedValue ', this.unitFinshedValue )
  1691. this.getItemUnits()
  1692. },
  1693. // 获取全部系统
  1694. async getAllSystems(){
  1695. let params={}
  1696. const res = await request('/dt_screen/rest/v1/screen/listSystem/', 'get', params, false)
  1697. const { errorCode, errorMessage, success,data } = res.data;
  1698. if (success) {
  1699. console.log('获取全部系统', data);
  1700. this.systemOption = data.map((item)=>{
  1701. return {
  1702. label:item.systemName,
  1703. value: item.systemId
  1704. }
  1705. })
  1706. this.systemFinshedValue=this.systemOption[0].value
  1707. // this.systemSubGradeValue=this.systemOption[0].value
  1708. this.getItemSystem()
  1709. } else {
  1710. this.$message.error(errorMessage)
  1711. }
  1712. },
  1713. // 切换某一个系统
  1714. changeSystem(){
  1715. console.log('ckx debug this.unitFinshedValue ', this.unitFinshedValue )
  1716. this.getItemSystem()
  1717. },
  1718. // 获取全部任务状态占比
  1719. async getAllTaskDetail(){
  1720. let params={}
  1721. const res = await request('/dt_screen/rest/v1/statistics/taskStatus', 'get', params, false)
  1722. const { errorCode, errorMessage, success,data } = res.data;
  1723. if (success) {
  1724. console.log('获取全部任务状态占比', data);
  1725. const { category, value } = data
  1726. let allTaskStatusData=[]
  1727. if(category.length){
  1728. category.forEach((item,index)=>{
  1729. allTaskStatusData.push({
  1730. name: item,
  1731. value: value[index]
  1732. })
  1733. })
  1734. this.initEchartsTaskStatus(allTaskStatusData)
  1735. this.taskStatusFlag=false
  1736. }else {
  1737. this.taskStatusFlag=true
  1738. }
  1739. } else {
  1740. this.$message.error(errorMessage)
  1741. }
  1742. },
  1743. // 切换一个单位查看课目的分数
  1744. changeunitSubGrade(){
  1745. // this.unitSubGradeValue
  1746. // 获取某个任务下单位参与与课目人员的的成绩统计
  1747. this.getUnitSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
  1748. // 获取某个任务下单位参与与课目人员的的成绩分布
  1749. this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
  1750. },
  1751. // 切换一个系统查看课目的分数
  1752. changeSystemSubGrade(){
  1753. console.log('ckx debug systemSubGradeValue ', this.systemSubGradeValue )
  1754. // 获取某个任务下单位参与与课目人员的的成绩统计
  1755. this.getSystemSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
  1756. // 获取某个任务下单位参与与课目人员的的成绩分布
  1757. this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
  1758. },
  1759. // 获取某一个任务课目状态占比
  1760. // async getAllSubjectDetail(taskId){
  1761. // let params={}
  1762. // const res = await request(`/dt_screen/rest/v1/statistics/${taskId}/subjectStatus`, 'get', params, false)
  1763. // const { errorCode, errorMessage, success,data } = res.data;
  1764. // if (success) {
  1765. // console.log('获取全部任务状态占比', data);
  1766. // const { category, value } = data
  1767. // let allTaskStatusData=[]
  1768. // if(category.length){
  1769. // category.forEach((item,index)=>{
  1770. // allTaskStatusData.push({
  1771. // name: item,
  1772. // value: value[index]
  1773. // })
  1774. // })
  1775. // this.initEchartsSubjectStatus(allTaskStatusData)
  1776. // }
  1777. // } else {
  1778. // this.$message.error(errorMessage)
  1779. // }
  1780. // },
  1781. // 全部任务分数统计
  1782. async getAllTaskScore(){
  1783. let params={}
  1784. params["taskIds"] = this.taskOPtion.map(item => item.value)
  1785. console.log("sgw debug:", params);
  1786. const res = await request('/dt_screen/rest/v2/statistics/taskScore', 'post', params, false)
  1787. const { errorCode, errorMessage, success,data } = res.data;
  1788. if (success) {
  1789. console.log('全部任务分数统计', data);
  1790. const { category, value } = data
  1791. value.forEach(item=>Number(item))
  1792. this.initEchartsgradeStatistics(category, value)
  1793. } else {
  1794. this.$message.error(errorMessage)
  1795. }
  1796. },
  1797. // 获取某个任务下单位参与与课目人员的的成绩统计
  1798. async getUnitSubjectPeopleScore(taskId,unitId){
  1799. let params={}
  1800. const res = await request(`/dt_screen/rest/v1/statistics/${taskId}/unit/${unitId}/participantScore`, 'get', params, false)
  1801. const { errorCode, errorMessage, success,data } = res.data;
  1802. if (success) {
  1803. console.log('全部任务分数统计', data);
  1804. const { category, value } = data
  1805. this.danweiweidu.danwei_name = category
  1806. this.danweiweidu.danwei_grade = value
  1807. value.forEach(item=>Number(item))
  1808. if(category.length){
  1809. this.participantScoreFlag=false
  1810. }else {
  1811. this.participantScoreFlag=true
  1812. }
  1813. this.updatekeyOther=new Date().getTime()
  1814. // console.log("name and grade: ", this.danweiweidu.danwei_name,this.danweiweidu.danwei_grade)
  1815. this.danweiweidu.length=value.length
  1816. this.danweiweidu.totalPage= (value.length)/(this.danweiweidu.pageSize)
  1817. this.danweiweidu.totalPage=Math.ceil(this.danweiweidu.totalPage);
  1818. console.log("数据量,页面数据量,当前页面,页面数",value.length,this.danweiweidu.pageSize,this.danweiweidu.currentPage,this.danweiweidu.totalPage)
  1819. // this.initEchartsSubjectGradeStatistics(category, value)
  1820. this.updateChart();
  1821. } else {
  1822. this.$message.error(errorMessage)
  1823. }
  1824. },
  1825. previousPage() {
  1826. console.log("向前",this.danweiweidu.currentPage)
  1827. if (this.danweiweidu.currentPage > 1) {
  1828. this.danweiweidu.currentPage--;
  1829. this.updateChart();
  1830. }
  1831. },
  1832. nextPage() {
  1833. console.log("向后",this.danweiweidu.currentPage)
  1834. if (this.danweiweidu.currentPage < this.danweiweidu.totalPage) {
  1835. this.danweiweidu.currentPage++;
  1836. this.updateChart();
  1837. }
  1838. },
  1839. updateChart() {
  1840. const start = (this.danweiweidu.currentPage - 1) * this.danweiweidu.pageSize;
  1841. const end = start + this.danweiweidu.pageSize;
  1842. // 获取当前页需要显示的数据
  1843. // const pageData = this.value.slice(start, end);
  1844. const pageData1 = this.danweiweidu.danwei_name.slice(start, end);
  1845. const pageData2 = this.danweiweidu.danwei_grade.slice(start, end);
  1846. // 更新echarts的data选项,设置为当前页的数据
  1847. console.log("数据",pageData1, pageData2)
  1848. this.initEchartsSubjectGradeStatistics(pageData1, pageData2)
  1849. },
  1850. onCurrentPageChange_grade (newCurrentPage) {
  1851. this.danweiweidu.currentPage=newCurrentPage
  1852. console.log("1: ",newCurrentPage )//当前页面
  1853. console.log("2: ",this.danweiweidu.pageSize )
  1854. console.log("3: ",this.oldPage)
  1855. this.updateChart()
  1856. },
  1857. /**
  1858. * 表格分页每页显示数量变化
  1859. * @param {Integer} newPageSize 变化后的每页显示数量
  1860. */
  1861. onPageSizeChange_grade (newPageSize) {
  1862. console.log("hhhh2: ",newPageSize )
  1863. this.danweiweidu.pageSize = newPageSize;
  1864. this.danweiweidu.currentPage = 1
  1865. this.updateChart()
  1866. },
  1867. // 获取全部任务分布
  1868. async getAllTaskDistribution(){
  1869. let params={}
  1870. params["taskIds"] = this.taskOPtion.map(item => item.value)
  1871. const res = await request('/dt_screen/rest/v2/statistics/taskScore/distribution', 'post', params, false)
  1872. const { errorCode, errorMessage, success,data } = res.data;
  1873. if (success) {
  1874. console.log('获取全部任务成绩分布', data);
  1875. const { category, value } = data
  1876. let alldistributionData=[]
  1877. if(category.length){
  1878. category.forEach((item,index)=>{
  1879. alldistributionData.push({
  1880. name: item,
  1881. value: value[index]
  1882. })
  1883. })
  1884. this.initEchartsgradeDistribute(alldistributionData)
  1885. }
  1886. } else {
  1887. this.$message.error(errorMessage)
  1888. }
  1889. },
  1890. // 获取某个任务下单位参与与课目人员的的成绩分布
  1891. async getUnitSubjectPeopleDistribution(taskId,unitId){
  1892. let params={}
  1893. const res = await request(`/dt_screen/rest/v1/statistics/${taskId}/unit/${unitId}/participantScore/distribution`, 'get', params, false)
  1894. const { errorCode, errorMessage, success,data } = res.data;
  1895. if (success) {
  1896. console.log('获取某个任务下单位参与与课目人员的的成绩分布', data);
  1897. const { category, value } = data
  1898. let alldistributionData=[]
  1899. if(category.length){
  1900. category.forEach((item,index)=>{
  1901. alldistributionData.push({
  1902. name: item,
  1903. value: value[index]
  1904. })
  1905. })
  1906. this.initEchartsSubjectgradeDistribute(alldistributionData)
  1907. }
  1908. } else {
  1909. this.$message.error(errorMessage)
  1910. }
  1911. },
  1912. // 获取某一个单位的任务完成率
  1913. async getItemUnits(){
  1914. let params={}
  1915. if (this.currentYear !== null) {
  1916. params["startTime"] = this.currentYear[0];
  1917. params["endTime"] = this.currentYear[1];
  1918. }
  1919. if (this.unitTaskValue !== '') {
  1920. console.log("sgw debug conditionUnit", this.unitTaskValue);
  1921. params["unitId"] = this.unitTaskValue;
  1922. } else {
  1923. console.log("sgw debug selectUnit", this.unitFinshedValue);
  1924. params["unitId"] = this.unitFinshedValue
  1925. }
  1926. const res = await request(`/dt_screen/rest/v2/statistics/unit/completionRate`, 'post', params, false)
  1927. const { errorCode, errorMessage, success,data } = res.data;
  1928. if (success) {
  1929. console.log('获取某一个单位的任务完成率', data);
  1930. const { category, value } = data
  1931. let alldistributionData=[]
  1932. if (category != null) {
  1933. if(category.length){
  1934. category.forEach((item,index)=>{
  1935. alldistributionData.push({
  1936. name: item,
  1937. value: value[index]
  1938. })
  1939. })
  1940. let precentData='无数据'
  1941. let isFinshedIndex = category.findIndex( item => item=='已完成')
  1942. if(isFinshedIndex != -1){
  1943. let isFinshedData = value[isFinshedIndex]
  1944. var totalData = value.reduce(function(a, b) {
  1945. return Number(a) + Number(b);
  1946. });
  1947. if(totalData==0){
  1948. precentData='无数据'
  1949. }else {
  1950. precentData= Number((Number(isFinshedData)/ Number(totalData))*100)
  1951. precentData= precentData % 10 ==0 ? precentData +'%' : Number(precentData).toFixed(1)+'%'
  1952. }
  1953. }
  1954. this.initEchartsTaskPrecent(alldistributionData,precentData)
  1955. this.completionRate=false
  1956. }else {
  1957. this.completionRate=true
  1958. }
  1959. } else {
  1960. this.completionRate = true;
  1961. }
  1962. } else {
  1963. this.$message.error(errorMessage)
  1964. }
  1965. },
  1966. // 获取某一个系统的任务完成率
  1967. async getItemSystem(){
  1968. let params={}
  1969. if (this.currentYear !== null) {
  1970. params["startTime"] = this.currentYear[0];
  1971. params["endTime"] = this.currentYear[1];
  1972. }
  1973. if (this.systemTaskId !== '') {
  1974. params["systemId"] = this.systemTaskId;
  1975. } else {
  1976. params["systemId"] = this.systemFinshedValue
  1977. }
  1978. const res = await request(`/dt_screen/rest/v2/statistics/system/completionRate`, 'post', params, false)
  1979. const { errorCode, errorMessage, success,data } = res.data;
  1980. if (success) {
  1981. console.log('获取某一个系统的任务完成率', data);
  1982. const { category, value } = data
  1983. let alldistributionData=[]
  1984. if(category.length){
  1985. category.forEach((item,index)=>{
  1986. alldistributionData.push({
  1987. name: item,
  1988. value: value[index]
  1989. })
  1990. })
  1991. let precentData='无数据'
  1992. let isFinshedIndex = category.findIndex( item => item=='已完成')
  1993. if(isFinshedIndex != -1){
  1994. let isFinshedData = value[isFinshedIndex]
  1995. var totalData = value.reduce(function(a, b) {
  1996. return Number(a) + Number(b);
  1997. });
  1998. if(totalData==0){
  1999. precentData='无数据'
  2000. }else {
  2001. precentData= Number((Number(isFinshedData)/ Number(totalData))*100)
  2002. precentData= precentData % 10 ==0 ? precentData +'%' : Number(precentData).toFixed(1)+'%'
  2003. }
  2004. }
  2005. this.initEchartsTaskPreSystem(alldistributionData,precentData)
  2006. this.systemcompletionRate=false
  2007. }else {
  2008. this.systemcompletionRate=true
  2009. }
  2010. } else {
  2011. this.$message.error(errorMessage)
  2012. }
  2013. },
  2014. // 全部任务状态占比
  2015. initEchartsTaskStatus(allTaskStatusData){
  2016. if(this.myChart2 !=null && this.myChart2 != "" && this.myChart2 != undefined){
  2017. this.myChart2.dispose();
  2018. }
  2019. this.myChart2 = echarts.init(document.getElementById('taskStatus'));
  2020. var option = {
  2021. tooltip: {
  2022. trigger: "item",
  2023. confine: true,
  2024. textStyle: {
  2025. fontSize: 11 // 字体大小
  2026. },
  2027. },
  2028. legend: {//显示图例
  2029. show: true,
  2030. y:'92%',
  2031. itemHeight: 10,
  2032. itemWidth: 10,
  2033. textStyle:{
  2034. fontSize: 12,//字体大小
  2035. color: '#37D3F3'//字体颜色
  2036. },
  2037. },
  2038. grid: {
  2039. top:'160',
  2040. left: '0',
  2041. right: '0',
  2042. bottom:'-20',
  2043. containLabel: true
  2044. },
  2045. series: [
  2046. {
  2047. name: '任务状态占比',
  2048. type: 'pie',
  2049. radius: [0, 70],
  2050. center: ['50%', '50%'],
  2051. label: {
  2052. normal: {
  2053. fontSize: 14,
  2054. color:'#fff',
  2055. fontFamily:'YouSheBiaoTiHei',
  2056. formatter: (params) => {
  2057. // console.log(params);
  2058. //只有“直接访问”使用大标签,其他都使用小标签
  2059. return params.data.name
  2060. },
  2061. },
  2062. },
  2063. itemStyle: {
  2064. borderRadius: 8,
  2065. normal: {
  2066. color: function (colors) {
  2067. var colorList = [
  2068. '#377FE3',
  2069. '#47D2F4',
  2070. '#0BBC84',
  2071. ];
  2072. return colorList[colors.dataIndex];
  2073. }
  2074. },
  2075. },
  2076. data: allTaskStatusData,
  2077. }
  2078. ]
  2079. };
  2080. this.myChart2.setOption(option);
  2081. let that =this
  2082. window.addEventListener('resize',function () {//执行
  2083. that.myChart2.resize();
  2084. })
  2085. },
  2086. // 单位任务完成率
  2087. initEchartsTaskPrecent(alldistributionData,precent){
  2088. if(this.myChart3 !=null && this.myChart3 != "" && this.myChart3 != undefined){
  2089. this.myChart3.dispose();
  2090. }
  2091. this.myChart3 = echarts.init(document.getElementById('taskPrecent'));
  2092. var data1 = alldistributionData
  2093. var colorList = ['#296DE0','#47D2F4','#08B389'];
  2094. var option = {
  2095. title: {
  2096. text: '',
  2097. top: '39%',
  2098. textAlign: 'center',
  2099. left: '50%',
  2100. textStyle: {
  2101. color: '#fff',
  2102. fontSize: 14,
  2103. fontWeight: '600',
  2104. },
  2105. subtext: precent,
  2106. subtextStyle: {
  2107. color: '#fff',
  2108. fontSize: 18,
  2109. fontWeight: '400',
  2110. fontFamily: 'YouSheBiaoTiHei'
  2111. },
  2112. },
  2113. grid: {
  2114. top:'80',
  2115. left: '0',
  2116. right: '0',
  2117. bottom:'0',
  2118. containLabel: true
  2119. },
  2120. tooltip: {
  2121. trigger: "item",
  2122. confine: true,
  2123. textStyle: {
  2124. fontSize: 11 // 字体大小
  2125. },
  2126. },
  2127. legend: {
  2128. show: true,
  2129. // x:'78%',
  2130. y:'92%',
  2131. itemHeight: 10,
  2132. itemWidth: 10,
  2133. textStyle:{
  2134. fontSize: 12,//字体大小
  2135. color: '#37D3F3',//字体颜色
  2136. marginTop:'14px'
  2137. },
  2138. // orient: 'vertical',
  2139. },
  2140. series: [
  2141. {
  2142. type: 'pie',
  2143. center: ['50%', '50%'],
  2144. radius: ['42%', '80%'],
  2145. avoidLabelOverlap: false,
  2146. label: {
  2147. show: false,
  2148. position: 'center',
  2149. },
  2150. itemStyle: {
  2151. normal: {
  2152. color: function (params) {
  2153. return colorList[params.dataIndex];
  2154. },
  2155. },
  2156. },
  2157. labelLine: {
  2158. show: false,
  2159. },
  2160. data: data1,
  2161. },
  2162. ],
  2163. };
  2164. this.myChart3.setOption(option);
  2165. let that =this
  2166. window.addEventListener('resize',function () {//执行
  2167. that.myChart3.resize();
  2168. })
  2169. },
  2170. // 系统任务完成率
  2171. initEchartsTaskPreSystem(alldistributionData,precentData){
  2172. if(this.myChart4 !=null && this.myChart4 != "" && this.myChart4 != undefined){
  2173. this.myChart4.dispose();
  2174. }
  2175. if(document.getElementById('taskPrecentSystem')){
  2176. this.myChart4 = echarts.init(document.getElementById('taskPrecentSystem'));
  2177. }
  2178. var data1 = alldistributionData
  2179. var colorList = ['#296DE0','#47D2F4','#08B389'];
  2180. var option = {
  2181. title: {
  2182. text: '',
  2183. top: '39%',
  2184. textAlign: 'center',
  2185. left: '50%',
  2186. textStyle: {
  2187. color: '#fff',
  2188. fontSize: 14,
  2189. fontWeight: '600',
  2190. },
  2191. subtext: precentData,
  2192. subtextStyle: {
  2193. color: '#fff',
  2194. fontSize: 18,
  2195. fontWeight: '400',
  2196. fontFamily: 'YouSheBiaoTiHei'
  2197. },
  2198. },
  2199. grid: {
  2200. top:'80',
  2201. left: '0',
  2202. right: '0',
  2203. bottom:'0',
  2204. containLabel: true
  2205. },
  2206. tooltip: {
  2207. trigger: "item",
  2208. confine: true,
  2209. textStyle: {
  2210. fontSize: 11 // 字体大小
  2211. },
  2212. },
  2213. legend: {
  2214. show: true,
  2215. y:'92%',
  2216. itemHeight: 10,
  2217. itemWidth: 10,
  2218. textStyle:{
  2219. fontSize: 12,//字体大小
  2220. color: '#37D3F3',//字体颜色
  2221. marginBottom:'12px'
  2222. },
  2223. // orient: 'vertical',
  2224. },
  2225. series: [
  2226. {
  2227. type: 'pie',
  2228. center: ['50%', '50%'],
  2229. radius: ['43%', '80%'],
  2230. avoidLabelOverlap: false,
  2231. label: {
  2232. show: false,
  2233. position: 'center',
  2234. },
  2235. itemStyle: {
  2236. normal: {
  2237. color: function (params) {
  2238. return colorList[params.dataIndex];
  2239. },
  2240. },
  2241. },
  2242. labelLine: {
  2243. show: false,
  2244. },
  2245. data: data1,
  2246. },
  2247. ],
  2248. };
  2249. this.myChart4.setOption(option);
  2250. let that =this
  2251. window.addEventListener('resize',function () {//执行
  2252. that.myChart4.resize();
  2253. })
  2254. },
  2255. // 全部任务分数分布
  2256. initEchartsgradeDistribute(chartData){
  2257. if(this.myChart5 !=null && this.myChart5 != "" && this.myChart5 != undefined){
  2258. this.myChart5.dispose();
  2259. }
  2260. this.myChart5 = echarts.init(document.getElementById('gradeDistribute'));
  2261. var option = {
  2262. xAxis: {
  2263. type: 'category',
  2264. splitLine: {
  2265. show:false
  2266. },
  2267. axisLine: {
  2268. // 改变x轴颜色
  2269. show: true,
  2270. lineStyle: {
  2271. color: "#AEE6FC",
  2272. }
  2273. },
  2274. axisLabel: {
  2275. // 改变x轴字体颜色和大小
  2276. show: true,
  2277. textStyle: {
  2278. color: 'AEE6FC',
  2279. fontSize: 12,
  2280. },
  2281. },
  2282. },
  2283. grid: {
  2284. top:'70',
  2285. left: '5',
  2286. right: '15',
  2287. bottom:'20',
  2288. containLabel: true
  2289. },
  2290. yAxis: {
  2291. type: 'value',
  2292. splitLine: {
  2293. show:false
  2294. },
  2295. axisTick: {
  2296. show: false,
  2297. },
  2298. axisLine: {
  2299. show: true,
  2300. lineStyle: {
  2301. color: "#AEE6FC",
  2302. }
  2303. },
  2304. axisLabel: {
  2305. show: true,
  2306. textStyle: {
  2307. color: "#AEE6FC",
  2308. fontSize:12
  2309. }
  2310. },
  2311. minInterval:1
  2312. },
  2313. series: [
  2314. {
  2315. symbolSize: (params) => {
  2316. let markSize = Math.sqrt(params[1]) * 3;
  2317. markSize = markSize < 12 ? 12 : markSize;
  2318. return markSize;
  2319. },
  2320. symbol: 'circle',
  2321. data: ((data) => {
  2322. var arr = [];
  2323. data.forEach((items) => {
  2324. var itemName = items.name;
  2325. var itemValue = items.value;
  2326. var itemStyle = 15;
  2327. var itemTitle = items.title;
  2328. arr.push([itemName, itemValue, itemStyle, itemTitle]);
  2329. });
  2330. return arr;
  2331. })(chartData),
  2332. type: 'scatter',
  2333. itemStyle: {
  2334. normal: {
  2335. color: '#FFF8A5',
  2336. },
  2337. },
  2338. },
  2339. ]
  2340. };
  2341. this.myChart5.setOption(option);
  2342. let that =this
  2343. window.addEventListener('resize',function () {//执行
  2344. console.log('ckx debug that.myChart5 ', )
  2345. that.myChart5.resize();
  2346. })
  2347. },
  2348. // 获取某个任务下单位参与与课目人员的的成绩分布
  2349. initEchartsSubjectgradeDistribute(chartData){
  2350. if(this.myChart9 !=null && this.myChart9 != "" && this.myChart9 != undefined){
  2351. this.myChart9.dispose();
  2352. }
  2353. this.myChart9 = echarts.init(document.getElementById('subjectGradeDistribute'));
  2354. var option = {
  2355. xAxis: {
  2356. type: 'category',
  2357. splitLine: {
  2358. show:false
  2359. },
  2360. axisLine: {
  2361. // 改变x轴颜色
  2362. show: true,
  2363. lineStyle: {
  2364. color: "#AEE6FC",
  2365. }
  2366. },
  2367. axisLabel: {
  2368. // 改变x轴字体颜色和大小
  2369. show: true,
  2370. textStyle: {
  2371. color: 'AEE6FC',
  2372. fontSize: 12,
  2373. },
  2374. rotate:'25'
  2375. },
  2376. },
  2377. grid: {
  2378. top:'10',
  2379. left: '15',
  2380. right: '15',
  2381. bottom:'55',
  2382. containLabel: true
  2383. },
  2384. yAxis: {
  2385. type: 'value',
  2386. splitLine: {
  2387. show:false
  2388. },
  2389. axisTick: {
  2390. show: false,
  2391. },
  2392. axisLine: {
  2393. show: true,
  2394. lineStyle: {
  2395. color: "#AEE6FC",
  2396. }
  2397. },
  2398. axisLabel: {
  2399. show: true,
  2400. textStyle: {
  2401. color: "#AEE6FC",
  2402. fontSize:12
  2403. }
  2404. },
  2405. minInterval:1
  2406. },
  2407. series: [
  2408. {
  2409. symbolSize: (params) => {
  2410. // let markSize = Math.sqrt(params[1]) * 3;
  2411. // markSize = markSize < 12 ? 12 : markSize;
  2412. let markSize = 12;
  2413. return markSize;
  2414. },
  2415. symbol: 'circle',
  2416. data: ((data) => {
  2417. var arr = [];
  2418. data.forEach((items) => {
  2419. var itemName = items.name;
  2420. var itemValue = items.value;
  2421. var itemStyle = 15;
  2422. var itemTitle = items.title;
  2423. arr.push([itemName, itemValue, itemStyle, itemTitle]);
  2424. });
  2425. return arr;
  2426. })(chartData),
  2427. type: 'scatter',
  2428. label: {
  2429. show: true, // 是否显示标签
  2430. formatter: function(params) { // 标签内容的格式化模板
  2431. return params.value[1]; // 数值显示格式示例
  2432. },
  2433. position: 'right', // 标签位置,可以设置为 'top'、'bottom'、'left'、'right' 或具体的像素值
  2434. fontSize: 10, // 标签字体大小
  2435. color: '#55d2c3', // 标签字体颜色
  2436. // backgroundColor: '#fff', // 标签背景色
  2437. // borderColor: '#999', // 标签边框颜色
  2438. // borderWidth: 1, // 标签边框宽度
  2439. // borderRadius: 4 // 标签边框圆角半径
  2440. },
  2441. itemStyle: {
  2442. normal: {
  2443. color: '#FFF8A5',
  2444. },
  2445. },
  2446. },
  2447. ]
  2448. };
  2449. this.myChart9.setOption(option);
  2450. let that =this
  2451. window.addEventListener('resize',function () {//执行
  2452. console.log('ckx debug that.myChart5 ', )
  2453. that.myChart9.resize();
  2454. })
  2455. },
  2456. // 全部任务分数统计
  2457. initEchartsgradeStatistics(category, value){
  2458. if(this.myChart6 !=null && this.myChart6 != "" && this.myChart6 != undefined){
  2459. this.myChart6.dispose();
  2460. }
  2461. this.myChart6 = echarts.init(document.getElementById('gradeStatistics'));
  2462. var option = {
  2463. tooltip: {
  2464. trigger: 'axis',
  2465. axisPointer: {
  2466. type: 'none',
  2467. crossStyle: {
  2468. color: '#999'
  2469. }
  2470. },
  2471. textStyle: {
  2472. fontSize: 11 // 字体大小
  2473. },
  2474. confine: true
  2475. },
  2476. grid: {
  2477. top:'70',
  2478. left: '5',
  2479. right: '0',
  2480. bottom:'20',
  2481. containLabel: true
  2482. },
  2483. xAxis: {
  2484. type: 'category',
  2485. data: category,
  2486. splitLine:{
  2487. show:false
  2488. },
  2489. axisLabel: {//x轴文字的配置
  2490. show: true,
  2491. textStyle: {
  2492. color: "#AEE6FC",
  2493. fontSize:12
  2494. },
  2495. rotate: "15"
  2496. },
  2497. axisLine: { //x轴线的颜色以及宽度
  2498. show: true,
  2499. lineStyle: {
  2500. color: "#AEE6FC",
  2501. }
  2502. },
  2503. },
  2504. yAxis: {
  2505. type: 'value',
  2506. splitLine:{
  2507. show:false
  2508. },
  2509. axisLabel: {//x轴文字的配置
  2510. show: true,
  2511. textStyle: {
  2512. color: "#AEE6FC",
  2513. fontSize:12
  2514. }
  2515. },
  2516. axisLine: { //x轴线的颜色以及宽度
  2517. show: true,
  2518. lineStyle: {
  2519. color: "#AEE6FC",
  2520. }
  2521. },
  2522. minInterval:1
  2523. },
  2524. series: [
  2525. {
  2526. data: value,
  2527. type: 'bar',
  2528. barWidth: 30,
  2529. itemStyle:{
  2530. color: {
  2531. type: 'linear',
  2532. x: 0,
  2533. y: 0,
  2534. x2: 0,
  2535. y2: 1,
  2536. colorStops: [{
  2537. offset: 0, color: '#47F3E7' // 0% 处的颜色
  2538. }, {
  2539. offset: 1, color: '#22E3CA' // 100% 处的颜色
  2540. }],
  2541. global: false // 缺省为 false
  2542. }
  2543. }
  2544. }
  2545. ]
  2546. };
  2547. this.myChart6.setOption(option);
  2548. let that =this
  2549. window.addEventListener('resize',function () {//执行
  2550. that.myChart6.resize();
  2551. that.myChart5.resize();
  2552. })
  2553. },
  2554. // 获取某个任务下单位参与与课目人员的的成绩统计
  2555. initEchartsSubjectGradeStatistics(category, value){
  2556. if(this.myChart8 !=null && this.myChart8 != "" && this.myChart8 != undefined){
  2557. this.myChart8.dispose();
  2558. }
  2559. this.myChart8 = echarts.init(document.getElementById('subjectGradeStatistics'));
  2560. var option = {
  2561. tooltip: {
  2562. trigger: 'axis',
  2563. axisPointer: {
  2564. type: 'none',
  2565. crossStyle: {
  2566. color: '#999'
  2567. }
  2568. },
  2569. textStyle: {
  2570. fontSize: 11 // 字体大小
  2571. },
  2572. confine: true
  2573. },
  2574. grid: {
  2575. top:'20',
  2576. left: '5',
  2577. right: '15',
  2578. bottom:'53',
  2579. containLabel: true
  2580. },
  2581. xAxis: {
  2582. type: 'category',
  2583. data: category,
  2584. splitLine:{
  2585. show:false
  2586. },
  2587. axisLabel: {//x轴文字的配置
  2588. show: true,
  2589. textStyle: {
  2590. color: "#AEE6FC",
  2591. fontSize:8
  2592. },
  2593. rotate:'25'
  2594. },
  2595. axisLine: { //x轴线的颜色以及宽度
  2596. show: true,
  2597. lineStyle: {
  2598. color: "#AEE6FC",
  2599. }
  2600. }
  2601. },
  2602. yAxis: {
  2603. type: 'value',
  2604. splitLine:{
  2605. show:false
  2606. },
  2607. axisLabel: {//x轴文字的配置
  2608. show: true,
  2609. textStyle: {
  2610. color: "#AEE6FC",
  2611. fontSize:10
  2612. }
  2613. },
  2614. axisLine: { //x轴线的颜色以及宽度
  2615. show: true,
  2616. lineStyle: {
  2617. color: "#AEE6FC",
  2618. }
  2619. },
  2620. minInterval:1
  2621. },
  2622. series: [
  2623. {
  2624. data: value,
  2625. type: 'bar',
  2626. barWidth: 14,
  2627. itemStyle:{
  2628. color: {
  2629. type: 'linear',
  2630. x: 0,
  2631. y: 0,
  2632. x2: 0,
  2633. y2: 1,
  2634. colorStops: [{
  2635. offset: 0, color: '#47F3E7' // 0% 处的颜色
  2636. }, {
  2637. offset: 1, color: '#22E3CA' // 100% 处的颜色
  2638. }],
  2639. global: false // 缺省为 false
  2640. }
  2641. }
  2642. }
  2643. ]
  2644. };
  2645. // console.log("11",value.length)
  2646. // console.log("22",option.series[0].barWidth)//14
  2647. // console.log("33",option.xAxis.axisLabel.textStyle.fontSize)//8
  2648. // 修改柱状图的宽度和字体大小
  2649. if(value.length>15){
  2650. option.series[0].barWidth = 12; // 修改柱状图的宽度为20像素
  2651. option.xAxis.axisLabel.textStyle.fontSize = 6; // 修改x轴标签的字体大小为12像素
  2652. }
  2653. // console.log("44",value.length)
  2654. // console.log("55",option.series[0].barWidth)//14
  2655. // console.log("66",option.xAxis.axisLabel.textStyle.fontSize)//8
  2656. this.myChart8.setOption(option);
  2657. let that =this
  2658. window.addEventListener('resize',function () {//执行
  2659. that.myChart8.resize();
  2660. })
  2661. },
  2662. // 某个任务全部课目状态占比
  2663. initEchartsSubjectStatus(allTaskStatusData){
  2664. if(this.myChart7 !=null && this.myChart7 != "" && this.myChart7 != undefined){
  2665. this.myChart7.dispose();
  2666. }
  2667. var data1 = allTaskStatusData
  2668. var colorList = ['#296DE0','#47D2F4','#08B389'];
  2669. this.myChart7 = echarts.init(document.getElementById('subjectStatus'));
  2670. var option = {
  2671. title: {
  2672. text: '',
  2673. top: '39%',
  2674. textAlign: 'center',
  2675. left: '50%',
  2676. textStyle: {
  2677. color: '#fff',
  2678. fontSize: 14,
  2679. fontWeight: '600',
  2680. },
  2681. subtext: '',
  2682. subtextStyle: {
  2683. color: '#fff',
  2684. fontSize: 18,
  2685. fontWeight: '400',
  2686. fontFamily: 'YouSheBiaoTiHei'
  2687. },
  2688. },
  2689. grid: {
  2690. containLabel: true,
  2691. top:'140',
  2692. left: '0',
  2693. right: '0',
  2694. bottom:'-20',
  2695. },
  2696. tooltip: {
  2697. trigger: "item",
  2698. confine: true,
  2699. textStyle: {
  2700. fontSize: 11 // 字体大小
  2701. },
  2702. },
  2703. legend: {
  2704. show: true,
  2705. y:'91%',
  2706. itemHeight: 8,
  2707. itemWidth: 8,
  2708. textStyle:{
  2709. fontSize: 10,//字体大小
  2710. color: '#37D3F3',//字体颜色
  2711. marginTop:'12px'
  2712. },
  2713. },
  2714. series: [
  2715. {
  2716. type: 'pie',
  2717. center: ['50%', '50%'],
  2718. radius: ['40%', '70%'],
  2719. avoidLabelOverlap: false,
  2720. label: {
  2721. show: false,
  2722. position: 'center',
  2723. },
  2724. itemStyle: {
  2725. normal: {
  2726. color: function (params) {
  2727. return colorList[params.dataIndex];
  2728. },
  2729. },
  2730. },
  2731. labelLine: {
  2732. show: false,
  2733. },
  2734. data: data1,
  2735. },
  2736. ],
  2737. };
  2738. this.myChart7.setOption(option);
  2739. let that =this
  2740. window.addEventListener('resize',function () {//执行
  2741. that.myChart7.resize();
  2742. })
  2743. },
  2744. // 建立websocket 链接 任务
  2745. initWebsoket(){
  2746. this.websocket = new WebSocket(`ws://${this.$store.state.webSocketIp}:${this.$store.state.webSocketPort}/websocket/task`);//这里将http替换成ws
  2747. switch (this.websocket.readyState) {
  2748. case 0:
  2749. console.log("正在连接");
  2750. break;
  2751. case 1:
  2752. console.log("已经链接并且可以通讯");
  2753. break;
  2754. case 2:
  2755. console.log("连接正在关闭");
  2756. break;
  2757. case 3:
  2758. console.log("连接已关闭或者没有链接成功");
  2759. break;
  2760. };
  2761. this.websocket.onopen = this.websocketsend;//websoket连接成功
  2762. this.websocket.onmessage =this. websocketonmessage;//websoket收到信息
  2763. this.websocket.onclose = this.websocketclose;//websoket连接关闭
  2764. },
  2765. websocketsend(){
  2766. console.log('ws 连接成功');
  2767. },
  2768. websocketonmessage(msg){
  2769. // 获取全部单位
  2770. this.getAllUnits()
  2771. // 获取全部系统
  2772. this.getAllSystems()
  2773. console.log('收到任务信息',msg);
  2774. },
  2775. websocketclose(){
  2776. console.log('ws 连接关闭');
  2777. this.initWebsoket();//重新建立连接
  2778. },
  2779. initInstructWebsoket(){
  2780. // 指令的ws
  2781. this.websocketOrder = new WebSocket(`ws://${this.$store.state.webSocketIp}:${this.$store.state.webSocketPort}/websocket/order/${this.wholeOutTaskId}`);//这里将http替换成ws
  2782. switch (this.websocketOrder.readyState) {
  2783. case 0:
  2784. console.log("正在连接");
  2785. break;
  2786. case 1:
  2787. console.log("已经链接并且可以通讯");
  2788. break;
  2789. case 2:
  2790. console.log("连接正在关闭");
  2791. break;
  2792. case 3:
  2793. console.log("连接已关闭或者没有链接成功");
  2794. break;
  2795. };
  2796. this.websocketOrder.onopen = this.orderWebsocketsend;//websoket连接成功
  2797. this.websocketOrder.onmessage =this. orderWebsocketonmessage;//websoket收到信息
  2798. this.websocketOrder.onclose = this.orderWebsocketclose;//websoket连接关闭
  2799. },
  2800. orderWebsocketsend(){
  2801. console.log('ws 连接成功');
  2802. },
  2803. orderWebsocketonmessage(msg){
  2804. // 获取任务的指令信息
  2805. this.getinstructList(this.wholeOutTaskId)
  2806. console.log('收到指令信息',msg);
  2807. },
  2808. orderWebsocketclose(){
  2809. console.log('ws 连接关闭');
  2810. this.initInstructWebsoket();//重新建立连接
  2811. },
  2812. // 查看成绩表格
  2813. viewManData(item){
  2814. this.dialogType=2
  2815. this.dialogVisible=true
  2816. console.log('item',item);
  2817. const { subjectScore } = item
  2818. this.gridData=subjectScore
  2819. this.gridData2.data=subjectScore
  2820. this.gridData2.length=this.gridData2.data.length
  2821. },
  2822. // 全屏事件
  2823. showFull(id){
  2824. // 获取想要展示全屏的元素
  2825. let elem = document.querySelector(`#${id}`);
  2826. this.requestFullScreen(elem);
  2827. },
  2828. // 退出全屏
  2829. exitFull(){
  2830. let exitFullScreen =
  2831. document.exitFullScreen ||
  2832. document.mozCancelFullScreen ||
  2833. document.webkitExitFullscreen ||
  2834. document.msExitFullscreen;
  2835. if (exitFullScreen) {
  2836. exitFullScreen.call(document);
  2837. }
  2838. this.updatekey=new Date().getTime()
  2839. },
  2840. // 展开全屏
  2841. requestFullScreen(elem){
  2842. console.log('ckx debug ', )
  2843. // #兼容不同的浏览器
  2844. var requestMethod =
  2845. elem.requestFullScreen ||
  2846. elem.webkitRequestFullScreen ||
  2847. elem.mozRequestFullScreen ||
  2848. elem.msRequestFullScreen;
  2849. if (requestMethod) {
  2850. requestMethod.call(elem);
  2851. } else if (typeof window.ActiveXObject !== "undefined") {
  2852. // #模拟F11 实现全屏
  2853. var wscript = new ActiveXObject("WScript.Shell");
  2854. if (wscript !== null) {
  2855. wscript.SendKeys("{F11}");
  2856. }
  2857. }
  2858. let that =this
  2859. window.addEventListener('resize',function () {//执行
  2860. let isFull = document.mozFullScreen ||
  2861. document.fullScreen ||
  2862. //谷歌浏览器及Webkit内核浏览器
  2863. document.webkitIsFullScreen ||
  2864. document.webkitRequestFullScreen ||
  2865. document.mozRequestFullScreen ||
  2866. document.msFullscreenEnabled
  2867. if (isFull === undefined) {
  2868. that.exitFull()
  2869. }else {
  2870. }
  2871. })
  2872. },
  2873. checkFull() {
  2874. //判断浏览器是否处于全屏状态 (需要考虑兼容问题)
  2875. //火狐浏览器
  2876. let isFull = document.mozFullScreen ||
  2877. document.fullScreen ||
  2878. //谷歌浏览器及Webkit内核浏览器
  2879. document.webkitIsFullScreen ||
  2880. document.webkitRequestFullScreen ||
  2881. document.mozRequestFullScreen ||
  2882. document.msFullscreenEnabled
  2883. if (isFull === undefined) {
  2884. isFull = false
  2885. }
  2886. return isFull;
  2887. },
  2888. showMoreInfo(type){
  2889. if(type=='more'){
  2890. this.$router.push('/situationScreen')
  2891. }else {
  2892. this.$router.push({
  2893. path:"/historicTaskScreen",
  2894. query:{
  2895. key1:this.wholeOutTaskId,
  2896. }
  2897. });
  2898. }
  2899. },
  2900. // 初始化视频
  2901. initVideo(nowPlayVideoUrl,id) {
  2902. let that =this
  2903. // 这些options属性也可直接设置在video标签上,见 muted
  2904. let options = {
  2905. autoplay: true, // 设置自动播放
  2906. controls: true, // 显示播放的控件
  2907. sources: [
  2908. // 注意,如果是以option方式设置的src,是不能实现 换台的 (即使监听了nowPlayVideoUrl也没实现)
  2909. {
  2910. src: nowPlayVideoUrl,
  2911. type: "application/x-mpegURL" // 告诉videojs,这是一个hls流
  2912. }
  2913. ]
  2914. };
  2915. // videojs的第一个参数表示的是,文档中video的id
  2916. const myPlyer= Videojs(id, options, function onPlayerReady() {
  2917. console.log("onPlayerReady 中的this指的是:", this); // 这里的this是指Player,是由Videojs创建出来的实例
  2918. console.log(myPlyer === this); // 这里返回的是true
  2919. });
  2920. this.playerList.push(myPlyer)
  2921. }
  2922. },
  2923. mounted(){
  2924. let that= this
  2925. // 获取全部单位
  2926. this.getAllUnits()
  2927. // 获取全部系统
  2928. this.getAllSystems()
  2929. // 建立任务的weksocket链接
  2930. this.initWebsoket()
  2931. setTimeout(() => {
  2932. this.getEarth();
  2933. }, 3000);
  2934. },
  2935. beforeDestroy() {
  2936. if(this.playerList.length){
  2937. this.playerList.forEach((item)=>{
  2938. item.dispose()
  2939. })
  2940. }
  2941. },
  2942. }
  2943. </script>