situationScreen.vue 87 KB

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