historicTaskScreen.vue 88 KB

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