123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604 |
- <template>
- <v-scale-screen width="2200" height="1080">
- <div class="task_screen_cotainer" >
- <div class="task_header">
- 历史态势
- </div>
- <div class="tag" @click="jumpToCurrent">
- 当前态势
- <!-- <el-button @click="jumpToCurrent">当前态势</el-button>-->
- </div>
- <div class="content_cotainer">
- <div class="task_base_info_table">
- <div class="task_outer_cotnainer">
- <div class="task_number_box">
- <div class="task_num_left_style">
- <el-image
- style="width: 45px; height: 45px;margin-right:20px;"
- :src="require('../assets/img/taskNum.png')"
- fit="contain"
- >
- </el-image>
- 任务数
- </div>
- <div class="taskNumber_style">
- {{ taskList.length }}
- </div>
- </div>
- <div class="task_list_container">
- <div class="map_more_box">
- <div class="task_list_header" style="font-size:16px; margin: 0 24px 8px 0; white-space: nowrap;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 全部任务
- </div>
- </div>
- <div class="select_lsit_box">
- <el-date-picker
- v-model="currentYear"
- style="width:100%;"
- type="datetimerange"
- placeholder="请选择"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </div>
- <div class="search_box">
- <div class="select_lsit_box">
- <el-select
- v-model="systemTaskId"
- placeholder="切换系统名称"
- style="width:55%; margin-right:10px;"
- clearable
- filterable
- >
- <el-option
- v-for="item in systemOption"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-select
- v-model="unitTaskValue"
- placeholder="切换单位名称"
- style="width:55%;"
- clearable
- filterable
- >
- <el-option
- v-for="item in unitOption"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <div class="search_button" @click="conditionalSearch()">
- 查询
- </div>
- </div>
- </div>
- <div v-if="taskList.length" class="task_scroll_box">
- <template v-for="(item,index) in taskList">
- <div class="task_item_container" :key="index">
- <div class="task_item_left">
- <div class="left_point"></div>
- <div class="left_line"></div>
- <div v-if="index == taskList.length-1 " class="left_point"></div>
- </div>
- <div class="task_content_right">
- <div class="task_content_header">状态:{{ item.status || '-' }}</div>
- <div class="task_content_description">
- <div class="file_icon">
- <el-image
- style="width: 14px; height: 13px; margin-right:8px; margin-top:4px;"
- :src="require('../assets/img/fileIcon.svg')"
- fit="contain"
- >
- </el-image>
- </div>
- <div class="task_content_box">
- <div class="grade_box">
- <div class="name_task_participantName">
- <div class="task_name">{{ item.taskName || '-' }}</div>
- <div class="task_participantName">
- 组织人员:{{ item.organizers && item.organizers.join(',') || '-' }}
- </div>
- </div>
- <div class="grade_item">
- {{ item.syntheticTaskScore }}
- </div>
- </div>
- <div class="task_date_box">
- <div class="task_data">
- <div class="date_between">
- <span> {{ item.startTime || '-' }} </span>
- 至
- <span> {{ item.endTime || '-' }} </span>
- </div>
- </div>
- <div class="view_more" @click="viewMore(item)">
- 查看详情
- </div>
- <div class="view_more" @click="viewTaskSituation(item)">
- 查看态势
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- </div>
- <div class="noTaskData" v-else>
- 暂无任务
- </div>
- </div>
- </div>
- </div>
- <div class="center_chart_cotainer" id="taskItem">
- <div class="task_detail_cotainer">
- <div class="header_line_style">
- <div class="headerTitle"></div>
- </div>
- <div class="task_name_header">「{{ currentTaskName }}」历史态势</div>
- <!-- 任务屏幕 -->
- <div class="task_item_header">
- <!-- <el-select-->
- <!-- v-model="wholeOutTaskId"-->
- <!-- placeholder="「切换任务」"-->
- <!-- style="width:270px;"-->
- <!-- @change="changeTask"-->
- <!-- filterable-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in taskOPtion"-->
- <!-- :key="item.value"-->
- <!-- :label="item.label"-->
- <!-- :value="item.value"-->
- <!-- >-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- <el-image
- v-if="false"
- @click="showMoreInfo('more')"
- class="showLessStyle"
- style="width: 30px; height: 22px; margin-right:6px; margin-left: 10px;"
- :src="require('../assets/img/small.svg')"
- fit="contain"
- >
- </el-image>
- <el-image
- @click="showMoreInfo('less')"
- :src="require('../assets/img/iconMore.svg')"
- fit="contain"
- class="showLessStyle"
- style="width: 30px; height: 22px; margin-right:6px; margin-left: 10px;"
- >
- </el-image>
- </div>
- <div class="task_header_top">
- <div class="subject_task_item">
- <div class="task_outer_cotnainer_status">
- <div class="map_more_box">
- <div class="task_list_header" style="font-size:16px; margin: 0 24px 8px 0; white-space: nowrap; ">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 课目分布
- </div>
- <!-- <div class="select_lsit_box">-->
- <!-- <el-select-->
- <!-- v-model="systemSubjectId"-->
- <!-- placeholder="切换系统名称"-->
- <!-- style="width:55%; margin-right:5px;"-->
- <!-- @change="changeTaskAndSystem"-->
- <!-- clearable-->
- <!-- filterable-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in systemOption"-->
- <!-- :key="item.value"-->
- <!-- :label="item.label"-->
- <!-- :value="item.value"-->
- <!-- >-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- <!-- <el-select-->
- <!-- v-model="unitSubjectValue"-->
- <!-- placeholder="切换单位名称"-->
- <!-- style="width:55%;"-->
- <!-- clearable-->
- <!-- @change="changeTaskAndUnit"-->
- <!-- filterable-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in unitOption"-->
- <!-- :key="item.value"-->
- <!-- :label="item.label"-->
- <!-- :value="item.value"-->
- <!-- >-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- <!-- </div>-->
- </div>
- <div class="subject_list_container" id="subjectList">
- <template v-for="(item,index) in subjectDatas">
- <div class="subject_list_item" :key="index">
- <div class="subject_list_header">
- <div>
- <div class="subject_list_name">
- {{ item.subjectName ||'-' }}
- </div>
- <div class="orgainzers">
- 参与人员:{{ item.participatingPeople && item.participatingPeople.join(',') || '-' }}
- </div>
- </div>
- <el-image
- style="width: 36px; height: 36px; "
- :src="subjectMap[item.status]"
- fit="contain"
- >
- </el-image>
- </div>
- <div class="system_task_style">
- <div>参加系统:{{ item.participatingSystems && item.participatingSystems.join(',') || '-'}}</div>
- <div
- v-if="item.status=='已完成'"
- class="view_table_style"
- @click="viewManData(item)">
- 表格查看
- </div>
- </div>
- </div>
- </template>
- </div>
- </div>
- </div>
- <div class="unit_map_box">
- <div class="map_more_box" style="align-items: flex-start;">
- <div class="task_list_header" style="font-size:16px; margin-bottom: 10px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 单位维度统计
- </div>
- <el-select
- v-model="unitSubGradeValue"
- placeholder="切换单位名称"
- style="width:43%;"
- @change="changeunitSubGrade"
- filterable
- >
- <el-option
- v-for="item in unitOptionForTask"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </div>
- <div class="num_subject_box_new">
- <div style="margin-bottom:20px;">
- <div style="font-size:12px;">成绩统计</div>
- <div
- id="subjectGradeStatistics"
- style=" left:5px; width:430px; height:180px; "
- :style="{ top: participantScoreFlag ? '-15px' : '2px' }"
- ></div>
- </div>
- <div style="position: relative;">
- <div style="font-size:12px;" class="new_style_grade">成绩分布</div>
- <div id="subjectGradeDistribute" style="height: 160px; width:430px; bottom: 55px; position: relative; left:5px;"></div>
- </div>
- </div>
- </div>
- <div class="commandMonitoring">
- <div class="task_outer_cotnainer_status">
- <div class="map_more_box">
- <div class="task_list_header" style="font-size:16px; margin-bottom:8px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 指令监控
- </div>
- </div>
- <div class="subject_list_container_int" id="moninter">
- <div class="task_other_cotainer_scrool">
- <myscrollBoard
- :key="updatekey"
- :config="scrollTableConfig"
- style="width:100%; height:100%"
- />
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="task_header_footer">
- <div class="subject_task_item">
- <div class="task_outer_cotnainer_status">
- <div class="map_more_box" style="align-items: flex-start; margin-bottom:18px;">
- <div class="task_list_header" style="font-size:16px; margin-bottom: 10px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 任务评估结果
- </div>
- </div>
- <div class="num_subject_box">
- <div class="num_subject_left">
- <div class="subject_number_box" style="margin-bottom:24px;">
- <div class="subject_num_left_style">
- <el-image
- style="width: 45px; height: 45px;margin-right:10px;"
- :src="require('../assets/img/subjectNum.png')"
- fit="contain"
- >
- </el-image>
- 课目数
- </div>
- <div class="SubjectNumber_style">
- {{ subjectNumbers }}
- </div>
- </div>
- <div class="subject_number_box" v-if="currentTaskGrade">
- <div class="subject_num_left_style" >
- <el-image
- style="width: 45px; height: 45px;margin-right:1px;"
- :src="require('../assets/img/taksGrade.png')"
- fit="contain"
- >
- </el-image>
- 任务分数
- </div>
- <div class="SubjectNumber_style" style="color: #F1D73A;">
- {{ currentTaskGrade || '-' }}
- </div>
- </div>
- </div>
- <div class="num_subject_right">
- <div class="subject_status_precent">课目状态占比</div>
- <div id="subjectStatus" style="height: 170px; width:220px; left:18px; right:0px; top:8px; "></div>
- </div>
- </div>
- <div class="num_subject_box" v-if="false">
- <div>
- <div
- id="subjectGradeStatistics"
- style="width:230px; height: 180px;"
- :style="{ bottom: participantScoreFlag ? '15px' : '0' }"
- ></div>
- </div>
- <div>
- <div id="subjectGradeDistribute" style="height: 180px; width:230px; bottom: 0px; position: relative; left:10px;"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="unit_map_box">
- <div class="map_more_box" style="align-items: flex-start;">
- <div class="task_list_header" style="font-size:16px; margin-bottom: 10px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 系统维度统计
- </div>
- <el-select
- v-model="systemSubGradeValue"
- placeholder="切换系统名称"
- style="width:43%;"
- @change="changeSystemSubGrade"
- filterable
- >
- <el-option
- v-for="item in systemOptionForTask"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </div>
- <div class="num_subject_box_new">
- <div style="margin-bottom:20px;">
- <div style="font-size:12px;">成绩统计</div>
- <div
- id="subjectGradeStatistics"
- style=" left:5px; width:430px; height:180px; "
- :style="{ top: participantScoreFlag ? '-15px' : '2px' }"
- ></div>
- </div>
- <div style="position: relative;">
- <div style="font-size:12px;" class="new_style_grade">成绩分布</div>
- <div id="subjectGradeDistribute" style="height: 160px; width:430px; bottom: 55px; position: relative; left:5px;"></div>
- </div>
- </div>
- </div>
- <div class="commandMonitoring">
- <div class="task_outer_cotnainer_status">
- <div class="map_more_box">
- <div class="task_list_header" style="font-size:16px; margin-bottom:8px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 单位分布
- </div>
- <el-image
- @click="showFull('mapData')"
- style="width: 20px; height: 20px; margin-right:6px; margin-top: -10px;"
- :src="require('../assets/img/iconMore.svg')"
- fit="contain"
- class="moreBtn_style"
- >
- </el-image>
- </div>
- <div v-if="!echartMapFlag" id="mapData" style="height:260px; width:100%; top:-20px;"></div>
- <div v-if="echartMapFlag" class="tempalte_no_data" style="height:86%;"> 暂无数据</div>
- <div class="center_no_data" v-if="false">
- <el-image
- style="width: 100px; height: 100px; margin-right:6px;"
- :src="require('../assets/img/build.png')"
- fit="contain"
- >
- </el-image>
- <div>系统正在建设中,敬请期待~</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="task_footer_chart">
- <div class="chart_item_box_foooter" style="margin-right:10px;">
- <div class="inner_info_table_status">
- <div class="task_outer_cotnainer_status">
- <div class="task_list_header" style="font-size:16px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 任务分数统计
- </div>
- </div>
- <div id="gradeStatistics" style="height: 240px; width:100%; margin-top:-60px; "></div>
- </div>
- </div>
- <div class="chart_item_box_foooter">
- <div class="inner_info_table_status">
- <div class="task_outer_cotnainer_status">
- <div class="task_list_header" style="font-size:16px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 任务分数分布
- </div>
- </div>
- <div id="gradeDistribute" style="height: 240px; width:100%; margin-top:-60px;"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="task_chart_cotainer">
- <div class="chart_item_box">
- <div class="inner_info_table_status" v-if="!taskStatusFlag">
- <div class="task_outer_cotnainer_status">
- <div class="task_list_header" style="font-size:16px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- 任务状态占比
- </div>
- </div>
- <div id="taskStatus" style="height:280px; width:314px; top:-50px;"></div>
- </div>
- <div v-if="taskStatusFlag" class="tempalte_no_data">暂无数据</div>
- </div>
- <div class="chart_item_box">
- <div class="inner_info_table_precent" >
- <div class="task_outer_cotnainer_status">
- <div class="task_list_header" style="font-size:16px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- {{this.unitTaskValue == '' ? getName(this.unitOption, this.unitFinshedValue) : getName(this.unitOption, this.unitTaskValue)}} 单位任务完成率
- </div>
- </div>
- <div v-if="!completionRate" id="taskPrecent" style="height:200px; width:310px; margin-top:-5px; right: 0px; "></div>
- <div v-if="completionRate" class="tempalte_no_data" style="height:200px; width:310px; margin-top:-10px; right: 0px; ">
- 暂无数据
- </div>
- <!-- <el-select-->
- <!-- v-model="unitFinshedValue"-->
- <!-- placeholder="「此处为单位名称」"-->
- <!-- style="margin-top:20px; width:270px;"-->
- <!-- filterable-->
- <!-- @change="changeUnit"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in unitOption"-->
- <!-- :key="item.value"-->
- <!-- :label="item.label"-->
- <!-- :value="item.value"-->
- <!-- >-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- </div>
- </div>
- <div class="chart_item_box" style="margin-bottom:0;">
- <div class="inner_info_table_precent" >
- <div class="task_outer_cotnainer_status">
- <div class="task_list_header" style="font-size:16px;">
- <el-image
- style="width: 30px; height: 22px; margin-right:6px;"
- :src="require('../assets/img/rightIcon.svg')"
- fit="contain"
- >
- </el-image>
- {{this.systemTaskId == '' ? getName(this.systemOption, this.systemFinshedValue) : getName(this.systemOption, this.systemTaskId)}} 系统任务完成率
- </div>
- </div>
- <div v-if="!systemcompletionRate" id="taskPrecentSystem" style="height:200px; width:310px; margin-top:-5px; "></div>
- <div v-if="systemcompletionRate" class="tempalte_no_data" style="height:200px; width:310px; margin-top:-10px; ">暂无数据</div>
- <!-- <el-select-->
- <!-- v-model="systemFinshedValue"-->
- <!-- placeholder="「此处为系统名称」"-->
- <!-- style="margin-top:20px; width:270px;"-->
- <!-- filterable-->
- <!-- @change="changeSystem"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="item in systemOption"-->
- <!-- :key="item.value"-->
- <!-- :label="item.label"-->
- <!-- :value="item.value"-->
- <!-- >-->
- <!-- </el-option>-->
- <!-- </el-select>-->
- </div>
- </div>
- </div>
- <!-- 任务详情弹窗 -->
- <el-dialog
- title=""
- :show-close="false"
- :destroy-on-close="true"
- :visible.sync="dialogVisible"
- :width=" dialogType ==1 ? '650px' : '650px'"
- top="300px"
- >
- <div>
- <div class="task_detail_dialog">
- <div class="header_line_style"></div>
- <div class="task_dialog_box" v-if="dialogType==1">
- <div class="grade_box">
- <div class="name_task_participantName" style="margin-bottom:12px;">
- <div class="task_dialog_name">{{ subjectItem.taskName || '-' }}</div>
- <div class="task_dialog_particpater">
- 组织人员:{{ subjectItem.organizers && subjectItem.organizers.length && subjectItem.organizers.join(',') || '-' }}
- </div>
- </div>
- <div class="grade_item" style="margin-top:10px;">
- {{ subjectItem.syntheticTaskScore }}
- </div>
- </div>
- <div class="task_date_status">
- <div class="date_task_dialog">{{ subjectItem.startTime || '-' }} 至 {{ subjectItem.endTime || '-' }} </div>
- <div class="status_task_dialog">任务状态:{{ subjectItem.status }}</div>
- </div>
- <div class="subject_dialog_container">
- <template v-for="(item,index) in subjectItem.subjects">
- <div :key="index" style="margin-bottom: 8px;">
- <div class="subject_item_header" @click="item.moreFlag=!item.moreFlag">
- <div class="subject_name">{{ item.subjectName || '-' }}</div>
- <div class="subject_icon">
- <el-image
- style="width: 12px; height: 12px; margin-left:8px; margin-top:3px;"
- :src="item.moreFlag ? require('../assets/img/more.svg') : require('../assets/img/less.svg') "
- fit="cover"
- >
- </el-image>
- </div>
- </div>
- <div v-if="!item.moreFlag" class="suvject_item_container">
- <div class="subject_child_item" style="padding-left:0; margin-bottom:4px;">· {{ item.subjectName }}</div>
- <div class="subject_child_item"> 课目名称:{{ item.subjectName }}</div>
- <div class="subject_child_item"> 参加人员:{{ item.participatingPeople.join(',') || '-' }}</div>
- <div class="subject_child_item"> 参加系统:{{ item.participatingSystems.join(',') || '-' }}</div>
- <div class="subject_child_item"> 参加单位:{{ item.participatingUnits.join(',') || '-' }}</div>
- <div class="subject_child_item" v-if="false">
- 课目附件:
- <span class="download_file" stlye="color:#6CFCDB;">下载附件</span>
- </div>
- </div>
- </div>
- </template>
- </div>
- </div>
- <div class="task_dialog_box_other" v-if="dialogType==2">
- <el-table
- :data="gridData"
- :header-cell-style="changeHeaderCellStyle"
- :cell-style="changeCellStyle"
- stripe
- :border="true"
- >
- <el-table-column align="center" property="participantName" label="姓名" max-width="350"></el-table-column>
- <el-table-column align="center" property="score" label="成绩" max-width="300"></el-table-column>
- </el-table>
- </div>
- <div class="dialog_footer_box">
- <div class="view_more" @click="dialogVisible=false" style="color:#fff; padding: 3px 30px ;">
- 关闭
- </div>
- </div>
- </div>
- </div>
- </el-dialog>
- </div>
- </div>
- </v-scale-screen>
- </template>
- <script>
- import * as echarts from 'echarts';
- import myFlylineChartEnhanced from '../components/my-flyline-chart-enhanced/index'
- import myscrollBoard from '../components/myscroll-board/src/main'
- import sacleBox from '../components/sacle-box/index'
- import { request } from '../utils/request';
- var uploadedDataURL = require('../../public/json/taiyuan.json')
- import './taskScreen.css'
- import Videojs from "video.js"; // 引入Videojs
- export default {
- components:{
- myFlylineChartEnhanced,
- sacleBox,
- myscrollBoard
- },
- data() {
- return {
- systemTaskId:'',
- unitTaskValue:'',
- systemFinshedValue:'',
- unitFinshedValue:'',
- wholeOutTaskId:'',
- systemSubjectId:'',
- unitSubjectValue:'',
- subjectItem:{},
- moreFlag:true,
- dialogVisible:false,
- taskList:[],
- websocket: null, //建立的连接
- websocketOrder: null, //建立的连接
- updatekey:'1',
- myChart1:'',
- myChart2:'',
- myChart3:'',
- myChart4:'',
- myChart5:'',
- myChart6:'',
- myChart7:'',
- myChart8:'',
- myChart9:'',
- scrollTableConfig:{
- header: ['指令名称', '指令内容', '指令时间'],
- waitTime:1500,
- data: [],
- columnWidth: [80],
- oddRowBGC:'#072347',
- evenRowBGC:'#021736'
- },
- taiYuanMapData:{
- "小店区": [112.564273, 37.817974],
- "迎泽区": [112.558851, 37.855804],
- "杏花岭区": [112.560743, 37.879291],
- "尖草坪区": [112.487122, 37.939893],
- "万柏林区": [112.522258, 37.862653],
- "晋源区": [112.477849, 37.715619],
- "清徐县": [112.357961, 37.60729],
- "阳曲县": [112.673818, 38.058797],
- "娄烦县": [111.793798, 38.066035],
- "古交市": [112.174353, 37.908534],
- },
- taiYuanDatas:[],
- unitValue:'',
- unitOptions:[],
- dialogType:1,
- subjectDatas:[],
- subjectMap:{
- '待执行':require('../assets/img/waite.png'),
- '执行中':require('../assets/img/doing.png'),
- '已完成':require('../assets/img/finshed.png') ,
- },
- instructList:[],
- unitOption:[],
- unitOptionForTask:[],
- systemOption:[],
- systemOptionForTask:[],
- currrentSystem:'',
- currentUnit:'',
- taskOPtion:[],
- currentTaskName:'',
- currentTaskGrade:'',
- subjectNumbers:'',
- unitSubGradeValue:'',
- systemSubGradeValue:'',
- gridData:[],
- dataSrc:'https://cctvwbndbd.a.bdydns.com/cctvwbnd/cctv1_2/index.m3u8?BR=single',
- completionRate:false,
- systemcompletionRate:false,
- taskStatusFlag: false,
- echartMapFlag:false,
- participantScoreFlag:true,
- playerList:[],
- updatekeyOther:'1',
- currentYear:'',
- }
- },
- methods:{
- jumpToCurrent() {
- // window.location.href = "/taskScreen"
- this.$router.push("/taskScreen")
- },
- // 获取单位名称
- getName(list, id) {
- var tmp = list.find(k => k["value"] == id)
- return tmp["label"]
- },
- // 表格样式修改
- changeHeaderCellStyle(row,column, rowIndex, columnIndex){
- if(row.columnIndex === 0){
- return 'background: #004279 ; color:#fff;'; // 修改的样式
- }else {
- return 'background: #004279 ;color:#fff; ';
- }
- },
- changeCellStyle(row,column, rowIndex, columnIndex){
- if(row.columnIndex === 0){
- return 'background: #0A427C ; color:#fff;'; // 修改的样式
- }else {
- return 'background: #0A427C ; color:#fff;';
- }
- },
- viewMore(item){
- this.dialogType=1
- console.log('ckx debug item', item )
- if(!item.subjects){
- return this.$message.warning('暂无课目信息')
- }
- item.subjects.forEach((childItem)=>{
- childItem.moreFlag=true
- })
- this.subjectItem= JSON.parse(JSON.stringify(item))
- this.dialogVisible=true
- },
- // 查看任务态势
- viewTaskSituation(item) {
- this.wholeOutTaskId = item.taskId;
- this.changeTask()
- },
- // 地图
- initechartsMap(){
- if(this.myChart1 !=null && this.myChart1 != "" && this.myChart1 != undefined){
- this.myChart1.dispose();
- }
- this.myChart1 = echarts.init(document.getElementById('mapData'),'dark');
- echarts.registerMap('taiyuan', uploadedDataURL);
- var chinaGeoCoordMap = this.taiYuanMapData
- var chinaDatas = this.taiYuanDatas
- var convertData = function(data) {
- var res = [];
- for (var i = 0; i < data.length; i++) {
- var dataItem = data[i];
- var fromCoord = chinaGeoCoordMap[dataItem[0].name];
- var toCoord = [chinaDatas[0][0].longitude, chinaDatas[0][0].dimension];
- if (fromCoord && toCoord) {
- res.push([{
- coord: fromCoord,
- value: dataItem[0].value,
- }, {
- coord: toCoord,
- }]);
- }
- }
- return res;
- };
- var series = [];
- // console.log('ckx debug chinaDatas ', this.taiYuanDatas, )
- [[chinaDatas[0][0].name, chinaDatas]].forEach(function(item, i) {
- console.log('debug asdfasd',item)
- series.push({
- type: 'lines',
- zlevel: 2,
- effect: {
- show: true,
- period: 4, //箭头指向速度,值越小速度越快
- trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
- symbol: 'arrow', //箭头图标
- symbolSize: 8, //图标大小
- // color:'#f00' // 箭头的颜色
- },
- lineStyle: {
- normal: {
- width: 1, //尾迹线条宽度
- opacity: 1, //尾迹线条透明度
- curveness: .3, //尾迹线条曲直度
- }
- },
- data: convertData(item[1]),
- }, {
- type: 'effectScatter',
- coordinateSystem: 'geo',
- zlevel: 2,
- rippleEffect: { //涟漪特效
- period: 4, //动画时间,值越小速度越快
- brushType: 'stroke', //波纹绘制方式 stroke, fill
- scale: 8, //波纹圆环最大限制,值越大波纹越大,
- // color:'#f00', // 波动的颜色
- },
- label: {
- normal: {
- show: true,
- position: 'right', //显示位置
- offset: [5, 0], //偏移设置
- formatter: function(params) { //圆环显示文字
- // return params.data.name;
- return '';
- },
- fontSize: 13,
- color:'#DC1861',
- },
- emphasis: {
- show: true
- }
- },
- symbol: 'circle',
- symbolSize: function(val) {
- return 5 + val[2] * 5; //圆环大小
- },
- itemStyle: {
- normal: {
- show: false,
- color: '#f00'
- }
- },
- data: item[1].map(function(dataItem) {
- console.log('ckx debug dataItem ', dataItem )
- return {
- name: dataItem[0].name,
- value: chinaGeoCoordMap[dataItem[0].name].concat([dataItem[0].value]),
- participatingSubjects: dataItem[0].participatingSubjects
- };
- }),
- tooltip: {
- trigger: 'item',
- backgroundColor: '#041937',
- textStyle: {
- color: "white" //设置文字颜色
- },
- borderColor: '#FFFFCC',
- showDelay: 0,
- hideDelay: 0,
- enterable: false,
- transitionDuration: 0,
- extraCssText: 'z-index:100',
- formatter: function(params, ticket, callback) {
- console.log('ckx debug params', params,ticket )
- //根据业务自己拓展要显示的内容
- var res = "";
- var name = params.name;
- var value = params.value[params.seriesIndex + 1];
- if(name){
- res = `
- <div style="background:#041937;;">
- <div style='color:#fff;'>单位名称:${name} </div>
- <div style='color:#fff; margin-top:4px;'>参与课目名称: ${params.data.participatingSubjects} </div>
- </div>
- `
- return res;
- }else {
- return ''
- }
- },
- show:true,
- },
- },
- //被攻击点
- {
- type: 'scatter',
- coordinateSystem: 'geo',
- zlevel: 2,
- rippleEffect: {
- period: 4,
- brushType: 'stroke',
- scale: 4
- },
- label: {
- normal: {
- show: false,
- position: 'right',
- color: 'red',
- formatter: '{b}',
- textStyle: {
- color: "red"
- }
- },
- emphasis: {
- show: false,
- color: "#f60"
- }
- },
- showSymbol: false,
- symbol: 'pin',
- symbolSize: 0,
- data: [{
- name: item[0],
- value: chinaGeoCoordMap[item[0]].concat([10]),
- }],
- }
- );
- });
- let option = {
- tooltip: {
- show:false,
- },
- backgroundColor: "transparent",
- visualMap: { //图例值控制
- show: false,
- },
- geo: {
- map: 'taiyuan',
- zoom: 1,
- label: {
- normal: {
- show: true,
- position: 'right',
- textStyle: {
- color: "#fff",
- fontSize: 10
- }
- },
- emphasis: {
- show: true,
- color:'#fff'
- }
- },
- roam: false, //是否允许缩放
- itemStyle: {
- normal: {
- color: '#153295', //地图背景色
- borderColor: '#516a89', //省市边界线00fcff 516a89
- borderWidth: 1
- },
- emphasis: {
- color: '#0068FB' //悬浮背景
- }
- }
- },
- series: series
- };
- this.myChart1.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- console.log('cuowu');
- that.myChart1.resize();
- })
- },
- conditionalSearch() {
- this.getTaskList()
- this.getItemUnits()
- this.getItemSystem()
- },
- // 获取任务列表
- async getTaskList(){
- let params={}
- if (this.currentYear !== null) {
- params["startTime"] = this.currentYear[0];
- params["endTime"] = this.currentYear[1];
- }
- if (this.unitTaskValue !== null) {
- params["unitId"] = this.unitTaskValue;
- }
- if (this.systemTaskId !== null) {
- params["systemId"] = this.systemTaskId;
- }
- const res = await request('/dt_screen/rest/v2/task/listHistoricTask/', 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取任务列表', data);
- this.taskList= data
- this.taskOPtion = data.map((item)=>{
- return {
- label: item.taskName,
- value: item.taskId
- }
- })
- this.wholeOutTaskId=data[0].taskId
- this.currentTaskName= data[0].taskName
- this.currentTaskGrade= data[0].syntheticTaskScore
- // 获取地图的信息
- if(data.length){
- // 获取任务的单位列表
- this.getUnitListByTaskId(data[0].taskId)
- // 获取任务的系统列表
- this.getSystemListByTaskId(data[0].taskId)
- // 获取地图的信息
- this.getMapDetail(data[0].taskId)
- // 获取任务的课目信息
- this.getSubjectList(data[0].taskId)
- // 获取任务的指令信息
- this.getinstructList(data[0].taskId)
- // 获取一个任务的课目数量
- this.getTaskSubjectNum(data[0].taskId)
- // 获取某一个任务的全部课目状态占比
- this.getAllSubjectDetail(data[0].taskId)
- // // 获取某个任务下单位参与与课目人员的的成绩统计
- // this.getUnitSubjectPeopleScore(data[0].taskId,this.unitSubGradeValue)
- // // 获取某个任务下单位参与与课目人员的的成绩分布
- // this.getUnitSubjectPeopleDistribution(data[0].taskId,this.unitSubGradeValue)
- // 获取全部任务成绩统计
- this.getAllTaskScore()
- // 获取全部任务成绩分布
- this.getAllTaskDistribution()
- // 建立指令websocket 链接
- this.initInstructWebsoket()
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取任务单位列表
- async getUnitListByTaskId(taskId) {
- let params={}
- if (taskId !== null) {
- params["taskId"] = taskId
- const res = await request('/dt_screen/rest/v2/task/listUnit/', 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log("sgw debug", data);
- this.unitOptionForTask = data.map((item)=>{
- return {
- label:item.unitName,
- value: item.unitId
- }
- })
- this.unitSubGradeValue = this.unitOptionForTask[0].value
- // 获取某个任务下单位参与与课目人员的的成绩统计
- this.getUnitSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
- // 获取某个任务下单位参与与课目人员的的成绩分布
- this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
- }
- }
- },
- // 获取任务系统列表
- async getSystemListByTaskId(taskId) {
- let params={}
- if (taskId !== null) {
- params["taskId"] = taskId
- const res = await request('/dt_screen/rest/v2/task/listSystem/', 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log("sgw debug", data);
- this.systemOptionForTask = data.map((item)=>{
- return {
- label:item.systemName,
- value: item.systemId
- }
- })
- this.systemSubGradeValue = this.systemOptionForTask[0].value
- }
- }
- },
- // 切换任务
- changeTask(){
- this.systemSubjectId=''
- this.unitSubjectValue=''
- this.currentTaskName = this.taskOPtion.find( item => item.value== this.wholeOutTaskId ).label
- this.currentTaskGrade = this.taskList.find( item=> item.taskId==this.wholeOutTaskId).syntheticTaskScore
- this.getUnitListByTaskId(this.wholeOutTaskId)
- // 获取任务的系统列表
- this.getSystemListByTaskId(this.wholeOutTaskId)
- // 获取地图的信息
- this.getMapDetail(this.wholeOutTaskId)
- // 获取任务的课目信息
- this.getSubjectList(this.wholeOutTaskId)
- // 获取任务的指令信息
- this.getinstructList(this.wholeOutTaskId)
- // 获取一个任务的课目数量
- this.getTaskSubjectNum(this.wholeOutTaskId)
- // 获取某一个任务的全部课目状态占比
- this.getAllSubjectDetail(this.wholeOutTaskId)
- // 获取某个任务下单位参与与课目人员的的成绩统计
- this.getUnitSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
- // 获取某个任务下单位参与与课目人员的的成绩分布
- this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
- // 建立指令websocket 链接
- this.initInstructWebsoket()
- },
- // 获取任务地图的信息
- async getMapDetail(taskId){
- let params={}
- const res = await request(`/dt_screen/rest/v1/participatingUnit/list/${taskId}`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取地图的信息', data);
- if(data.length){
- // this.taiYuanMapData={}
- data.forEach((item)=>{
- item.participatingSubjects= item.participatingSubjects
- this.taiYuanMapData[item.participantUnitName]=[item.longitude,item.dimension]
- this.taiYuanDatas.push([
- {
- value:0,
- name:item.participantUnitName,
- participatingSubjects: item.participatingSubjects,
- dimension: item.dimension,
- longitude: item.longitude
- }
- ])
- })
- this.initechartsMap()
- this.echartMapFlag=false
- }else{
- this.echartMapFlag=true
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取一个任务的课目数量
- async getTaskSubjectNum(taskId){
- let params={}
- const res = await request(`/dt_screen/rest/v1/subject/subjectNum/task/${taskId}/`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取一个任务的课目数量', data);
- this.subjectNumbers=data
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取任务的课目信息
- async getSubjectList(taskId){
- let params={}
- params["taskId"] = taskId;
- if (this.unitTaskValue !== null) {
- params["unitId"] = this.unitTaskValue;
- }
- if (this.systemTaskId !== null) {
- params["systemId"] = this.systemTaskId;
- }
- const res = await request(`/dt_screen/rest/v2/subject/listByCondition`, 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取任务的课目信息', data);
- this.subjectDatas=data
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 切换单位再结合任务id 获取课目课目列表
- async getUnitSubjectList(taskId,unitId){
- let params={}
- const res = await request(`/dt_screen/rest/v1/subject/list/task/${taskId}/unit/${unitId}`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取任务的课目信息', data);
- this.subjectDatas=data
- } else {
- this.$message.error(errorMessage)
- }
- },
- // unitSubjectValue ,unitSubjectValue
- changeTaskAndUnit() {
- this.systemSubjectId=''
- if(this.unitSubjectValue){
- this.getUnitSubjectList(this.wholeOutTaskId, this.unitSubjectValue)
- }else {
- this.getSubjectList(this.wholeOutTaskId)
- }
- },
- changeTaskSystem(){
- console.log('ckx debug this.systemTaskId ', this.systemTaskId )
- this.getTaskList()
- },
- changeTaskUnit(){
- console.log('ckx debug this.unitTaskValue ', this.unitTaskValue )
- this.getTaskList()
- },
- // 切换年度
- changeYear(){
- console.log('ckx debug this.currentYear ', this.currentYear )
- this.getTaskList()
- },
- // 切换系统再结合任务id 获取课目课目列表
- async getSystemSubjectList(taskId,systemId){
- let params={}
- const res = await request(`/dt_screen/rest/v1/subject/list/task/${taskId}/system/${systemId}`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取任务的课目信息', data);
- this.subjectDatas=data
- } else {
- this.$message.error(errorMessage)
- }
- },
- // unitSubjectValue ,unitSubjectValue
- changeTaskAndSystem() {
- this.unitSubjectValue=''
- if(this.systemSubjectId){
- this.getSystemSubjectList(this.wholeOutTaskId, this.systemSubjectId)
- }else {
- this.getSubjectList(this.wholeOutTaskId)
- }
- },
- // 获取任务的指令
- async getinstructList (taskId) {
- let params={}
- const res = await request(`/dt_screen/rest/v1/order/list/${taskId}`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取任务的指令', data);
- this.instructList=data
- let tempData=[]
- data.forEach((item)=>{
- tempData.push([item.subjectName,item.content,item.time])
- })
- this.scrollTableConfig.data=tempData
- this.updatekey=new Date().getTime()
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取全部单位
- async getAllUnits (){
- let params={}
- const res = await request('/dt_screen/rest/v1/screen/listUnit/', 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取全部单位', data);
- // 获取任务数据
- this.getTaskList()
- // 获取全部任务状态占比
- this.getAllTaskDetail()
- // // 获取全部任务成绩统计
- // this.getAllTaskScore()
- // // 获取全部任务成绩分布
- // this.getAllTaskDistribution()
- // this.instructList=data
- // unitId,unitName
- this.unitOption = data.map((item)=>{
- return {
- label:item.unitName,
- value: item.unitId
- }
- })
- this.unitFinshedValue=this.unitOption[0].value
- // this.unitSubGradeValue=this.unitOption[0].value
- this.getItemUnits()
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 切换某一个单位
- changeUnit(){
- console.log('ckx debug this.unitFinshedValue ', this.unitFinshedValue )
- this.getItemUnits()
- },
- // 获取全部系统
- async getAllSystems(){
- let params={}
- const res = await request('/dt_screen/rest/v1/screen/listSystem/', 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取全部系统', data);
- this.systemOption = data.map((item)=>{
- return {
- label:item.systemName,
- value: item.systemId
- }
- })
- this.systemFinshedValue=this.systemOption[0].value
- // this.systemSubGradeValue=this.systemOption[0].value
- this.getItemSystem()
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 切换某一个系统
- changeSystem(){
- console.log('ckx debug this.unitFinshedValue ', this.unitFinshedValue )
- this.getItemSystem()
- },
- // 获取全部任务状态占比
- async getAllTaskDetail(){
- let params={}
- const res = await request('/dt_screen/rest/v1/statistics/taskStatus', 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取全部任务状态占比', data);
- const { category, value } = data
- let allTaskStatusData=[]
- if(category.length){
- category.forEach((item,index)=>{
- allTaskStatusData.push({
- name: item,
- value: value[index]
- })
- })
- this.initEchartsTaskStatus(allTaskStatusData)
- this.taskStatusFlag=false
- }else {
- this.taskStatusFlag=true
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 切换一个单位查看课目的分数
- changeunitSubGrade(){
- // this.unitSubGradeValue
- // 获取某个任务下单位参与与课目人员的的成绩统计
- this.getUnitSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
- // 获取某个任务下单位参与与课目人员的的成绩分布
- this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
- },
- // 切换一个系统查看课目的分数
- changeSystemSubGrade(){
- console.log('ckx debug systemSubGradeValue ', this.systemSubGradeValue )
- // 获取某个任务下单位参与与课目人员的的成绩统计
- this.getSystemSubjectPeopleScore(this.wholeOutTaskId,this.unitSubGradeValue)
- // 获取某个任务下单位参与与课目人员的的成绩分布
- this.getUnitSubjectPeopleDistribution(this.wholeOutTaskId,this.unitSubGradeValue)
- },
- // 获取某一个任务课目状态占比
- async getAllSubjectDetail(taskId){
- let params={}
- const res = await request(`/dt_screen/rest/v1/statistics/${taskId}/subjectStatus`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取全部任务状态占比', data);
- const { category, value } = data
- let allTaskStatusData=[]
- if(category.length){
- category.forEach((item,index)=>{
- allTaskStatusData.push({
- name: item,
- value: value[index]
- })
- })
- this.initEchartsSubjectStatus(allTaskStatusData)
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 全部任务分数统计
- async getAllTaskScore(){
- let params={}
- params["taskIds"] = this.taskOPtion.map(item => item.value)
- console.log("sgw debug:", params);
- const res = await request('/dt_screen/rest/v2/statistics/taskScore', 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('全部任务分数统计', data);
- const { category, value } = data
- value.forEach(item=>Number(item))
- this.initEchartsgradeStatistics(category, value)
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取某个任务下单位参与与课目人员的的成绩统计
- async getUnitSubjectPeopleScore(taskId,unitId){
- let params={}
- const res = await request(`/dt_screen/rest/v1/statistics/${taskId}/unit/${unitId}/participantScore`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('全部任务分数统计', data);
- const { category, value } = data
- value.forEach(item=>Number(item))
- if(category.length){
- this.participantScoreFlag=false
- }else {
- this.participantScoreFlag=true
- }
- this.updatekeyOther=new Date().getTime()
- this.initEchartsSubjectGradeStatistics(category, value)
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取全部任务分布
- async getAllTaskDistribution(){
- let params={}
- params["taskIds"] = this.taskOPtion.map(item => item.value)
- const res = await request('/dt_screen/rest/v2/statistics/taskScore/distribution', 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取全部任务成绩分布', data);
- const { category, value } = data
- let alldistributionData=[]
- if(category.length){
- category.forEach((item,index)=>{
- alldistributionData.push({
- name: item,
- value: value[index]
- })
- })
- this.initEchartsgradeDistribute(alldistributionData)
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取某个任务下单位参与与课目人员的的成绩分布
- async getUnitSubjectPeopleDistribution(taskId,unitId){
- let params={}
- const res = await request(`/dt_screen/rest/v1/statistics/${taskId}/unit/${unitId}/participantScore/distribution`, 'get', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取某个任务下单位参与与课目人员的的成绩分布', data);
- const { category, value } = data
- let alldistributionData=[]
- if(category.length){
- category.forEach((item,index)=>{
- alldistributionData.push({
- name: item,
- value: value[index]
- })
- })
- this.initEchartsSubjectgradeDistribute(alldistributionData)
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取某一个单位的任务完成率
- async getItemUnits(){
- let params={}
- if (this.currentYear !== null) {
- params["startTime"] = this.currentYear[0];
- params["endTime"] = this.currentYear[1];
- }
- if (this.unitTaskValue !== '') {
- console.log("sgw debug conditionUnit", this.unitTaskValue);
- params["unitId"] = this.unitTaskValue;
- } else {
- console.log("sgw debug selectUnit", this.unitFinshedValue);
- params["unitId"] = this.unitFinshedValue
- }
- const res = await request(`/dt_screen/rest/v2/statistics/unit/completionRate`, 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取某一个单位的任务完成率', data);
- const { category, value } = data
- let alldistributionData=[]
- if (category != null) {
- if(category.length){
- category.forEach((item,index)=>{
- alldistributionData.push({
- name: item,
- value: value[index]
- })
- })
- let precentData='无数据'
- let isFinshedIndex = category.findIndex( item => item=='已完成')
- if(isFinshedIndex != -1){
- let isFinshedData = value[isFinshedIndex]
- var totalData = value.reduce(function(a, b) {
- return Number(a) + Number(b);
- });
- if(totalData==0){
- precentData='无数据'
- }else {
- precentData= Number((Number(isFinshedData)/ Number(totalData))*100)
- precentData= precentData % 10 ==0 ? precentData +'%' : Number(precentData).toFixed(1)+'%'
- }
- }
- this.initEchartsTaskPrecent(alldistributionData,precentData)
- this.completionRate=false
- }else {
- this.completionRate=true
- }
- } else {
- this.completionRate = true;
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 获取某一个系统的任务完成率
- async getItemSystem(){
- let params={}
- if (this.currentYear !== null) {
- params["startTime"] = this.currentYear[0];
- params["endTime"] = this.currentYear[1];
- }
- if (this.systemTaskId !== '') {
- params["systemId"] = this.systemTaskId;
- } else {
- params["systemId"] = this.systemFinshedValue
- }
- const res = await request(`/dt_screen/rest/v2/statistics/system/completionRate`, 'post', params, false)
- const { errorCode, errorMessage, success,data } = res.data;
- if (success) {
- console.log('获取某一个系统的任务完成率', data);
- const { category, value } = data
- let alldistributionData=[]
- if(category.length){
- category.forEach((item,index)=>{
- alldistributionData.push({
- name: item,
- value: value[index]
- })
- })
- let precentData='无数据'
- let isFinshedIndex = category.findIndex( item => item=='已完成')
- if(isFinshedIndex != -1){
- let isFinshedData = value[isFinshedIndex]
- var totalData = value.reduce(function(a, b) {
- return Number(a) + Number(b);
- });
- if(totalData==0){
- precentData='无数据'
- }else {
- precentData= Number((Number(isFinshedData)/ Number(totalData))*100)
- precentData= precentData % 10 ==0 ? precentData +'%' : Number(precentData).toFixed(1)+'%'
- }
- }
- this.initEchartsTaskPreSystem(alldistributionData,precentData)
- this.systemcompletionRate=false
- }else {
- this.systemcompletionRate=true
- }
- } else {
- this.$message.error(errorMessage)
- }
- },
- // 全部任务状态占比
- initEchartsTaskStatus(allTaskStatusData){
- if(this.myChart2 !=null && this.myChart2 != "" && this.myChart2 != undefined){
- this.myChart2.dispose();
- }
- this.myChart2 = echarts.init(document.getElementById('taskStatus'));
- var option = {
- tooltip: {
- trigger: "item",
- confine: true,
- textStyle: {
- fontSize: 11 // 字体大小
- },
- },
- legend: {//显示图例
- show: true,
- y:'92%',
- itemHeight: 10,
- itemWidth: 10,
- textStyle:{
- fontSize: 12,//字体大小
- color: '#37D3F3'//字体颜色
- },
- },
- grid: {
- top:'160',
- left: '0',
- right: '0',
- bottom:'-20',
- containLabel: true
- },
- series: [
- {
- name: '任务状态占比',
- type: 'pie',
- radius: [0, 70],
- center: ['50%', '50%'],
- label: {
- normal: {
- fontSize: 14,
- color:'#fff',
- fontFamily:'YouSheBiaoTiHei',
- formatter: (params) => {
- // console.log(params);
- //只有“直接访问”使用大标签,其他都使用小标签
- return params.data.name
- },
- },
- },
- itemStyle: {
- borderRadius: 8,
- normal: {
- color: function (colors) {
- var colorList = [
- '#377FE3',
- '#47D2F4',
- '#0BBC84',
- ];
- return colorList[colors.dataIndex];
- }
- },
- },
- data: allTaskStatusData,
- }
- ]
- };
- this.myChart2.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- that.myChart2.resize();
- })
- },
- // 单位任务完成率
- initEchartsTaskPrecent(alldistributionData,precent){
- if(this.myChart3 !=null && this.myChart3 != "" && this.myChart3 != undefined){
- this.myChart3.dispose();
- }
- this.myChart3 = echarts.init(document.getElementById('taskPrecent'));
- var data1 = alldistributionData
- var colorList = ['#296DE0','#47D2F4','#08B389'];
- var option = {
- title: {
- text: '',
- top: '39%',
- textAlign: 'center',
- left: '50%',
- textStyle: {
- color: '#fff',
- fontSize: 14,
- fontWeight: '600',
- },
- subtext: precent,
- subtextStyle: {
- color: '#fff',
- fontSize: 18,
- fontWeight: '400',
- fontFamily: 'YouSheBiaoTiHei'
- },
- },
- grid: {
- top:'80',
- left: '0',
- right: '0',
- bottom:'0',
- containLabel: true
- },
- tooltip: {
- trigger: "item",
- confine: true,
- textStyle: {
- fontSize: 11 // 字体大小
- },
- },
- legend: {
- show: true,
- // x:'78%',
- y:'92%',
- itemHeight: 10,
- itemWidth: 10,
- textStyle:{
- fontSize: 12,//字体大小
- color: '#37D3F3',//字体颜色
- marginTop:'14px'
- },
- // orient: 'vertical',
- },
- series: [
- {
- type: 'pie',
- center: ['50%', '50%'],
- radius: ['42%', '80%'],
- avoidLabelOverlap: false,
- label: {
- show: false,
- position: 'center',
- },
- itemStyle: {
- normal: {
- color: function (params) {
- return colorList[params.dataIndex];
- },
- },
- },
- labelLine: {
- show: false,
- },
- data: data1,
- },
- ],
- };
- this.myChart3.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- that.myChart3.resize();
- })
- },
- // 系统任务完成率
- initEchartsTaskPreSystem(alldistributionData,precentData){
- if(this.myChart4 !=null && this.myChart4 != "" && this.myChart4 != undefined){
- this.myChart4.dispose();
- }
- this.myChart4 = echarts.init(document.getElementById('taskPrecentSystem'));
- var data1 = alldistributionData
- var colorList = ['#296DE0','#47D2F4','#08B389'];
- var option = {
- title: {
- text: '',
- top: '39%',
- textAlign: 'center',
- left: '50%',
- textStyle: {
- color: '#fff',
- fontSize: 14,
- fontWeight: '600',
- },
- subtext: precentData,
- subtextStyle: {
- color: '#fff',
- fontSize: 18,
- fontWeight: '400',
- fontFamily: 'YouSheBiaoTiHei'
- },
- },
- grid: {
- top:'80',
- left: '0',
- right: '0',
- bottom:'0',
- containLabel: true
- },
- tooltip: {
- trigger: "item",
- confine: true,
- textStyle: {
- fontSize: 11 // 字体大小
- },
- },
- legend: {
- show: true,
- y:'92%',
- itemHeight: 10,
- itemWidth: 10,
- textStyle:{
- fontSize: 12,//字体大小
- color: '#37D3F3',//字体颜色
- marginBottom:'12px'
- },
- // orient: 'vertical',
- },
- series: [
- {
- type: 'pie',
- center: ['50%', '50%'],
- radius: ['43%', '80%'],
- avoidLabelOverlap: false,
- label: {
- show: false,
- position: 'center',
- },
- itemStyle: {
- normal: {
- color: function (params) {
- return colorList[params.dataIndex];
- },
- },
- },
- labelLine: {
- show: false,
- },
- data: data1,
- },
- ],
- };
- this.myChart4.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- that.myChart4.resize();
- })
- },
- // 全部任务分数分布
- initEchartsgradeDistribute(chartData){
- if(this.myChart5 !=null && this.myChart5 != "" && this.myChart5 != undefined){
- this.myChart5.dispose();
- }
- this.myChart5 = echarts.init(document.getElementById('gradeDistribute'));
- var option = {
- xAxis: {
- type: 'category',
- splitLine: {
- show:false
- },
- axisLine: {
- // 改变x轴颜色
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- },
- axisLabel: {
- // 改变x轴字体颜色和大小
- show: true,
- textStyle: {
- color: 'AEE6FC',
- fontSize: 12,
- },
- },
- },
- grid: {
- top:'70',
- left: '5',
- right: '15',
- bottom:'20',
- containLabel: true
- },
- yAxis: {
- type: 'value',
- splitLine: {
- show:false
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- },
- axisLabel: {
- show: true,
- textStyle: {
- color: "#AEE6FC",
- fontSize:12
- }
- },
- minInterval:1
- },
- series: [
- {
- symbolSize: (params) => {
- let markSize = Math.sqrt(params[1]) * 3;
- markSize = markSize < 12 ? 12 : markSize;
- return markSize;
- },
- symbol: 'circle',
- data: ((data) => {
- var arr = [];
- data.forEach((items) => {
- var itemName = items.name;
- var itemValue = items.value;
- var itemStyle = 15;
- var itemTitle = items.title;
- arr.push([itemName, itemValue, itemStyle, itemTitle]);
- });
- return arr;
- })(chartData),
- type: 'scatter',
- itemStyle: {
- normal: {
- color: '#FFF8A5',
- },
- },
- },
- ]
- };
- this.myChart5.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- console.log('ckx debug that.myChart5 ', )
- that.myChart5.resize();
- })
- },
- // 获取某个任务下单位参与与课目人员的的成绩分布
- initEchartsSubjectgradeDistribute(chartData){
- if(this.myChart9 !=null && this.myChart9 != "" && this.myChart9 != undefined){
- this.myChart9.dispose();
- }
- this.myChart9 = echarts.init(document.getElementById('subjectGradeDistribute'));
- var option = {
- xAxis: {
- type: 'category',
- splitLine: {
- show:false
- },
- axisLine: {
- // 改变x轴颜色
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- },
- axisLabel: {
- // 改变x轴字体颜色和大小
- show: true,
- textStyle: {
- color: 'AEE6FC',
- fontSize: 12,
- },
- rotate:'25'
- },
- },
- grid: {
- top:'10',
- left: '15',
- right: '15',
- bottom:'55',
- containLabel: true
- },
- yAxis: {
- type: 'value',
- splitLine: {
- show:false
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- },
- axisLabel: {
- show: true,
- textStyle: {
- color: "#AEE6FC",
- fontSize:12
- }
- },
- minInterval:1
- },
- series: [
- {
- symbolSize: (params) => {
- let markSize = Math.sqrt(params[1]) * 3;
- markSize = markSize < 12 ? 12 : markSize;
- return markSize;
- },
- symbol: 'circle',
- data: ((data) => {
- var arr = [];
- data.forEach((items) => {
- var itemName = items.name;
- var itemValue = items.value;
- var itemStyle = 15;
- var itemTitle = items.title;
- arr.push([itemName, itemValue, itemStyle, itemTitle]);
- });
- return arr;
- })(chartData),
- type: 'scatter',
- itemStyle: {
- normal: {
- color: '#FFF8A5',
- },
- },
- },
- ]
- };
- this.myChart9.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- console.log('ckx debug that.myChart5 ', )
- that.myChart9.resize();
- })
- },
- // 全部任务分数统计
- initEchartsgradeStatistics(category, value){
- if(this.myChart6 !=null && this.myChart6 != "" && this.myChart6 != undefined){
- this.myChart6.dispose();
- }
- this.myChart6 = echarts.init(document.getElementById('gradeStatistics'));
- var option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'none',
- crossStyle: {
- color: '#999'
- }
- },
- textStyle: {
- fontSize: 11 // 字体大小
- },
- confine: true
- },
- grid: {
- top:'70',
- left: '5',
- right: '0',
- bottom:'20',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: category,
- splitLine:{
- show:false
- },
- axisLabel: {//x轴文字的配置
- show: true,
- textStyle: {
- color: "#AEE6FC",
- fontSize:12
- },
- rotate: "15"
- },
- axisLine: { //x轴线的颜色以及宽度
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- },
- },
- yAxis: {
- type: 'value',
- splitLine:{
- show:false
- },
- axisLabel: {//x轴文字的配置
- show: true,
- textStyle: {
- color: "#AEE6FC",
- fontSize:12
- }
- },
- axisLine: { //x轴线的颜色以及宽度
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- },
- minInterval:1
- },
- series: [
- {
- data: value,
- type: 'bar',
- barWidth: 30,
- itemStyle:{
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0, color: '#47F3E7' // 0% 处的颜色
- }, {
- offset: 1, color: '#22E3CA' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- }
- }
- }
- ]
- };
- this.myChart6.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- that.myChart6.resize();
- that.myChart5.resize();
- })
- },
- // 获取某个任务下单位参与与课目人员的的成绩统计
- initEchartsSubjectGradeStatistics(category, value){
- if(this.myChart8 !=null && this.myChart8 != "" && this.myChart8 != undefined){
- this.myChart8.dispose();
- }
- this.myChart8 = echarts.init(document.getElementById('subjectGradeStatistics'));
- var option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'none',
- crossStyle: {
- color: '#999'
- }
- },
- textStyle: {
- fontSize: 11 // 字体大小
- },
- confine: true
- },
- grid: {
- top:'20',
- left: '5',
- right: '15',
- bottom:'53',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: category,
- splitLine:{
- show:false
- },
- axisLabel: {//x轴文字的配置
- show: true,
- textStyle: {
- color: "#AEE6FC",
- fontSize:12
- },
- rotate:'25'
- },
- axisLine: { //x轴线的颜色以及宽度
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- }
- },
- yAxis: {
- type: 'value',
- splitLine:{
- show:false
- },
- axisLabel: {//x轴文字的配置
- show: true,
- textStyle: {
- color: "#AEE6FC",
- fontSize:10
- }
- },
- axisLine: { //x轴线的颜色以及宽度
- show: true,
- lineStyle: {
- color: "#AEE6FC",
- }
- },
- minInterval:1
- },
- series: [
- {
- data: value,
- type: 'bar',
- barWidth: 14,
- itemStyle:{
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0, color: '#47F3E7' // 0% 处的颜色
- }, {
- offset: 1, color: '#22E3CA' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- }
- }
- }
- ]
- };
- this.myChart8.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- that.myChart8.resize();
- })
- },
- // 某个任务全部课目状态占比
- initEchartsSubjectStatus(allTaskStatusData){
- if(this.myChart7 !=null && this.myChart7 != "" && this.myChart7 != undefined){
- this.myChart7.dispose();
- }
- var data1 = allTaskStatusData
- var colorList = ['#296DE0','#47D2F4','#08B389'];
- this.myChart7 = echarts.init(document.getElementById('subjectStatus'));
- var option = {
- title: {
- text: '',
- top: '39%',
- textAlign: 'center',
- left: '50%',
- textStyle: {
- color: '#fff',
- fontSize: 14,
- fontWeight: '600',
- },
- subtext: '',
- subtextStyle: {
- color: '#fff',
- fontSize: 18,
- fontWeight: '400',
- fontFamily: 'YouSheBiaoTiHei'
- },
- },
- grid: {
- containLabel: true,
- top:'140',
- left: '0',
- right: '0',
- bottom:'-20',
- },
- tooltip: {
- trigger: "item",
- confine: true,
- textStyle: {
- fontSize: 11 // 字体大小
- },
- },
- legend: {
- show: true,
- y:'91%',
- itemHeight: 8,
- itemWidth: 8,
- textStyle:{
- fontSize: 10,//字体大小
- color: '#37D3F3',//字体颜色
- marginTop:'12px'
- },
- },
- series: [
- {
- type: 'pie',
- center: ['50%', '50%'],
- radius: ['40%', '70%'],
- avoidLabelOverlap: false,
- label: {
- show: false,
- position: 'center',
- },
- itemStyle: {
- normal: {
- color: function (params) {
- return colorList[params.dataIndex];
- },
- },
- },
- labelLine: {
- show: false,
- },
- data: data1,
- },
- ],
- };
- this.myChart7.setOption(option);
- let that =this
- window.addEventListener('resize',function () {//执行
- that.myChart7.resize();
- })
- },
- // 建立websocket 链接 任务
- initWebsoket(){
- this.websocket = new WebSocket(`ws://${this.$store.state.webSocketIp}:${this.$store.state.webSocketPort}/websocket/task`);//这里将http替换成ws
- switch (this.websocket.readyState) {
- case 0:
- console.log("正在连接");
- break;
- case 1:
- console.log("已经链接并且可以通讯");
- break;
- case 2:
- console.log("连接正在关闭");
- break;
- case 3:
- console.log("连接已关闭或者没有链接成功");
- break;
- };
- this.websocket.onopen = this.websocketsend;//websoket连接成功
- this.websocket.onmessage =this. websocketonmessage;//websoket收到信息
- this.websocket.onclose = this.websocketclose;//websoket连接关闭
- },
- websocketsend(){
- console.log('ws 连接成功');
- },
- websocketonmessage(msg){
- // 获取全部单位
- this.getAllUnits()
- // 获取全部系统
- this.getAllSystems()
- console.log('收到任务信息',msg);
- },
- websocketclose(){
- console.log('ws 连接关闭');
- this.initWebsoket();//重新建立连接
- },
- initInstructWebsoket(){
- // 指令的ws
- this.websocketOrder = new WebSocket(`ws://${this.$store.state.webSocketIp}:${this.$store.state.webSocketPort}/websocket/order/${this.wholeOutTaskId}`);//这里将http替换成ws
- switch (this.websocketOrder.readyState) {
- case 0:
- console.log("正在连接");
- break;
- case 1:
- console.log("已经链接并且可以通讯");
- break;
- case 2:
- console.log("连接正在关闭");
- break;
- case 3:
- console.log("连接已关闭或者没有链接成功");
- break;
- };
- this.websocketOrder.onopen = this.orderWebsocketsend;//websoket连接成功
- this.websocketOrder.onmessage =this. orderWebsocketonmessage;//websoket收到信息
- this.websocketOrder.onclose = this.orderWebsocketclose;//websoket连接关闭
- },
- orderWebsocketsend(){
- console.log('ws 连接成功');
- },
- orderWebsocketonmessage(msg){
- // 获取任务的指令信息
- this.getinstructList(this.wholeOutTaskId)
- console.log('收到指令信息',msg);
- },
- orderWebsocketclose(){
- console.log('ws 连接关闭');
- this.initInstructWebsoket();//重新建立连接
- },
- // 查看成绩表格
- viewManData(item){
- this.dialogType=2
- this.dialogVisible=true
- console.log('item',item);
- const { subjectScore } = item
- this.gridData=subjectScore
- },
- // 全屏事件
- showFull(id){
- // 获取想要展示全屏的元素
- let elem = document.querySelector(`#${id}`);
- this.requestFullScreen(elem);
- },
- // 退出全屏
- exitFull(){
- let exitFullScreen =
- document.exitFullScreen ||
- document.mozCancelFullScreen ||
- document.webkitExitFullscreen ||
- document.msExitFullscreen;
- if (exitFullScreen) {
- exitFullScreen.call(document);
- }
- this.updatekey=new Date().getTime()
- },
- // 展开全屏
- requestFullScreen(elem){
- console.log('ckx debug ', )
- // #兼容不同的浏览器
- var requestMethod =
- elem.requestFullScreen ||
- elem.webkitRequestFullScreen ||
- elem.mozRequestFullScreen ||
- elem.msRequestFullScreen;
- if (requestMethod) {
- requestMethod.call(elem);
- } else if (typeof window.ActiveXObject !== "undefined") {
- // #模拟F11 实现全屏
- var wscript = new ActiveXObject("WScript.Shell");
- if (wscript !== null) {
- wscript.SendKeys("{F11}");
- }
- }
- let that =this
- window.addEventListener('resize',function () {//执行
- let isFull = document.mozFullScreen ||
- document.fullScreen ||
- //谷歌浏览器及Webkit内核浏览器
- document.webkitIsFullScreen ||
- document.webkitRequestFullScreen ||
- document.mozRequestFullScreen ||
- document.msFullscreenEnabled
- if (isFull === undefined) {
- that.exitFull()
- }else {
- }
- })
- },
- checkFull() {
- //判断浏览器是否处于全屏状态 (需要考虑兼容问题)
- //火狐浏览器
- let isFull = document.mozFullScreen ||
- document.fullScreen ||
- //谷歌浏览器及Webkit内核浏览器
- document.webkitIsFullScreen ||
- document.webkitRequestFullScreen ||
- document.mozRequestFullScreen ||
- document.msFullscreenEnabled
- if (isFull === undefined) {
- isFull = false
- }
- return isFull;
- },
- showMoreInfo(type){
- if(type=='more'){
- this.$router.push('/situationScreen')
- }else {
- this.$router.push('/historicTaskScreen')
- }
- },
- // 初始化视频
- initVideo(nowPlayVideoUrl,id) {
- let that =this
- // 这些options属性也可直接设置在video标签上,见 muted
- let options = {
- autoplay: true, // 设置自动播放
- controls: true, // 显示播放的控件
- sources: [
- // 注意,如果是以option方式设置的src,是不能实现 换台的 (即使监听了nowPlayVideoUrl也没实现)
- {
- src: nowPlayVideoUrl,
- type: "application/x-mpegURL" // 告诉videojs,这是一个hls流
- }
- ]
- };
- // videojs的第一个参数表示的是,文档中video的id
- const myPlyer= Videojs(id, options, function onPlayerReady() {
- console.log("onPlayerReady 中的this指的是:", this); // 这里的this是指Player,是由Videojs创建出来的实例
- console.log(myPlyer === this); // 这里返回的是true
- });
- this.playerList.push(myPlyer)
- }
- },
- mounted(){
- let that= this
- // 获取全部单位
- this.getAllUnits()
- // 获取全部系统
- this.getAllSystems()
- // 建立任务的weksocket链接
- this.initWebsoket()
- },
- beforeDestroy() {
- if(this.playerList.length){
- this.playerList.forEach((item)=>{
- item.dispose()
- })
- }
- },
- }
- </script>
|