index.vue 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177
  1. <template>
  2. <div class="scene-box">
  3. <!-- <div class="top-header">智能通风管理系统</div> -->
  4. <div class="select-node" :class="{ 'node-select-show': !treeShow, 'node-select-hide': treeShow }" @click="showTree('treeShow', true)">
  5. <SvgIcon class="is-expansion-icon put-away-icon" size="38" name="expansion" />
  6. <span class="title">{{ treeNodeTitle }}</span>
  7. </div>
  8. <div class="device-select" :class="{ 'device-select-show': treeShow, 'device-select-hide': !treeShow }">
  9. <SvgIcon class="is-expansion-icon expansion-icon" size="28" name="put-away" @click="showTree('treeShow', false)" />
  10. <div class="device-select-box">
  11. <a-tree
  12. :show-line="true"
  13. :tree-data="treeData"
  14. v-model:selectedKeys="selectedKeys"
  15. :autoExpandParent="true"
  16. v-model:expandedKeys="expandedKeys"
  17. @select="onSelect"
  18. >
  19. </a-tree>
  20. </div>
  21. </div>
  22. <!-- 瓦斯巡检弹窗信息 -->
  23. <div v-if="deviceType.startsWith('gasDay_normal') && activeKey == '1'" class="inspect-info-xj">
  24. <div class="info-xj-title">
  25. <span>当前巡检进度</span>
  26. <span style="margin-left: 10px">{{ inspectJd || '' }}</span>
  27. </div>
  28. <div class="info-xj-content">
  29. <div class="xj-content-item" v-for="(item, index) in inspectList" :key="index">
  30. <div class="content-item-title">{{ item.label }}</div>
  31. <div class="content-item-val">{{ item.val }}</div>
  32. </div>
  33. </div>
  34. </div>
  35. <div
  36. class="location-icon"
  37. :class="{ 'location-btn-show': !locationSettingShow, 'location-btn-hide': locationSettingShow }"
  38. @click="showTree('location', true)"
  39. >
  40. <SvgIcon size="18" name="put-away" />
  41. <span class="location-text">定位图标显示</span>
  42. </div>
  43. <div class="location-select" :class="{ 'location-select-show': locationSettingShow, 'location-select-hide': !locationSettingShow }">
  44. <div class="location-select-box">
  45. <div class="location-top-title" @click="showTree('location', false)">
  46. <SvgIcon class="is-expansion-icon location-expansion-icon" size="28" name="expansion" />
  47. <div class="title">定位图标显示</div>
  48. </div>
  49. <div class="location-container">
  50. <template v-for="location in locationList" :key="location.deviceType">
  51. <div class="location-item">
  52. <div class="item-title">{{ location.title }}&nbsp;:</div>
  53. <div>
  54. <a-radio-group v-model:value="location.Visible" :name="location.deviceType">
  55. <a-radio :value="1">是</a-radio>
  56. <a-radio :value="0">否</a-radio>
  57. </a-radio-group>
  58. </div>
  59. </div>
  60. </template>
  61. <div class="location-bottom-btn">
  62. <span @click="setLocation">提交</span>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <div
  68. class="tabs-box bottom-tabs-box"
  69. :class="{ 'table-hide': !tableShow, 'table-show': tableShow }"
  70. style="height: 290px"
  71. @mousedown="setDivHeight($event, 230, scroll, 0)"
  72. id="monitorBox"
  73. >
  74. <div :style="`padding: 5px; height: ${scroll.y + 100}px`">
  75. <div class="to-small">
  76. <div class="to-home" @click="toHome"></div>
  77. <FullscreenOutlined v-if="!tableShow" class="table-show-icon" @click="toHide" />
  78. </div>
  79. <div class="device-button-group" v-if="deviceList.length > 0">
  80. <!-- 关联设备 -->
  81. <div
  82. class="device-button"
  83. :class="{ 'device-active': deviceActive == device.deviceType }"
  84. v-for="(device, index) in deviceList"
  85. :key="index"
  86. @click="monitorChange(index)"
  87. >{{ device.deviceName }}
  88. </div>
  89. <!-- 场景详情进入 -->
  90. <div v-if="haveSysDetailArr.find((item) => deviceType.startsWith(item))" class="enter-detail" @click.stop="goDetail()">
  91. <send-outlined />
  92. {{ treeNodeTitle }}详情
  93. </div>
  94. </div>
  95. <!-- 进入瓦斯人工巡检历史详情 -->
  96. <div v-if="deviceType == 'gasDay_normal'">
  97. <div class="device-button-group">
  98. <div v-if="deviceType.startsWith('gasDay_normal')" class="enter-detail" @click.stop="goGasDayReport()">
  99. <send-outlined />
  100. 瓦斯人工巡检历史详情
  101. </div>
  102. </div>
  103. </div>
  104. <!-- 进入瓦斯日报历史详情 -->
  105. <div v-if="deviceType == 'gasDayReport'">
  106. <div class="device-button-group">
  107. <div v-if="deviceType.startsWith('gasDayReport')" class="enter-detail" @click.stop="gogasDayReportHis()">
  108. <send-outlined />
  109. 瓦斯日报历史详情
  110. </div>
  111. </div>
  112. </div>
  113. <!-- 进入粉尘报表分析详情 -->
  114. <div v-if="deviceType == 'dustDayReport'">
  115. <div class="device-button-group">
  116. <div v-if="deviceType.startsWith('dustDayReport')" class="enter-detail" @click.stop="goDustDayReport()">
  117. <send-outlined />
  118. 粉尘报表分析
  119. </div>
  120. </div>
  121. </div>
  122. <div v-if="deviceType == 'bundleDayReport'">
  123. <div class="device-button-group">
  124. <div v-if="deviceType.startsWith('bundleDayReport')" class="enter-detail" @click.stop="goBundleDayReport()">
  125. <send-outlined />
  126. 束管日报分析
  127. </div>
  128. </div>
  129. </div>
  130. <div v-if="deviceType == 'bundleSpyDayReport'">
  131. <div class="device-button-group">
  132. <div v-if="deviceType.startsWith('bundleSpyDayReport')" class="enter-detail" @click.stop="goBundleSpyDayReport()">
  133. <send-outlined />
  134. 色谱仪报表分析
  135. </div>
  136. </div>
  137. </div>
  138. <div v-if="deviceType == 'gaspatrol'">
  139. <div class="device-button-group">
  140. <div class="enter-detail" @click="exportXls()">
  141. <send-outlined />
  142. 导出
  143. </div>
  144. </div>
  145. </div>
  146. <div class="table-hide-icon" @click="toHide">
  147. <FullscreenExitOutlined style="font-size: 18px" />
  148. </div>
  149. <!-- 是人员定位表单代码,由于放在tab中,表格对已知刷新,导致表单数据也在刷寻,造成输入一半的中文时会清空输入框的内容,导致的输入不上数据 -->
  150. <div v-if="deviceType.startsWith('location') && activeKey == '1'" class="location-form" style="position: absolute; z-index: 9999; top: 50px">
  151. <div class="location-form-item">
  152. <span class="location-form-label">人员名称:</span>
  153. <Input style="width: 200px" v-model:value="locationForm.strname" />
  154. </div>
  155. <div class="location-form-item">
  156. <span class="location-form-label">所属部门:</span>
  157. <MTreeSelect
  158. style="width: 200px"
  159. v-model:value="locationForm.department"
  160. placeholder="请选择所属部门"
  161. api="/monitor/getDepartmentInfo"
  162. :virtual="false"
  163. :isGetPopupContainer="false"
  164. />
  165. </div>
  166. <div class="location-form-item">
  167. <span class="location-form-label">分站名称:</span>
  168. <Input style="width: 200px" v-model:value="locationForm.stationname" />
  169. </div>
  170. </div>
  171. <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox">
  172. <a-tab-pane
  173. key="1"
  174. :tab="
  175. deviceType.startsWith('gasDay_normal')
  176. ? '当日巡检监测'
  177. : deviceType.startsWith('dustDayReport') ||
  178. deviceType.startsWith('dustDayReport') ||
  179. deviceType.startsWith('bundleDayReport') ||
  180. deviceType.startsWith('bundleSpyDayReport')
  181. ? '最新监测报表'
  182. : '实时监测'
  183. "
  184. >
  185. <template v-if="(deviceType.startsWith('fanlocal') || deviceType.startsWith('fanmain')) && activeKey == '1'">
  186. <GroupMonitorTable
  187. ref="MonitorDataTable"
  188. :dataSource="dataSource"
  189. :columnsType="`${deviceType}_monitor`"
  190. :scroll="scroll"
  191. :isAction="true"
  192. :isShowSelect="false"
  193. >
  194. <template #action="{ record }">
  195. <TableAction
  196. :actions="
  197. haveDetailArr.find((item) => deviceType.startsWith(item))
  198. ? [
  199. {
  200. label: '详情',
  201. onClick: goDetail.bind(null, record),
  202. },
  203. {
  204. label: '定位',
  205. onClick: goLocation.bind(null, record),
  206. },
  207. ]
  208. : [
  209. {
  210. label: '定位',
  211. onClick: goLocation.bind(null, record),
  212. },
  213. ]
  214. "
  215. />
  216. </template>
  217. </GroupMonitorTable>
  218. </template>
  219. <template v-else-if="deviceType == 'majorpath' && activeKey == '1'">
  220. <a-table :columns="majorColumns" :data-source="dataSource" bordered :scroll="{ y: scroll.y - 30 }" :pagination="false"></a-table>
  221. </template>
  222. <template v-else-if="deviceType.startsWith('safetymonitor') && activeKey == '1'">
  223. <MonitorTable
  224. ref="monitorTable"
  225. :columnsType="`${deviceType}_monitor`"
  226. :deviceType="deviceType"
  227. :dataSource="dataSource"
  228. design-scope="device_monitor"
  229. :isShowActionColumn="true"
  230. :isShowSelect="false"
  231. title="设备监测"
  232. :form-config="formConfig"
  233. :scroll="{ y: scroll.y - 110 }"
  234. >
  235. <template #action="{ record }">
  236. <TableAction
  237. :actions="
  238. haveDetailArr.find((item) => deviceType.startsWith(item))
  239. ? [
  240. {
  241. label: '详情',
  242. onClick: goDetail.bind(null, record),
  243. },
  244. {
  245. label: '定位',
  246. onClick: goLocation.bind(null, record),
  247. },
  248. ]
  249. : [
  250. {
  251. label: '定位',
  252. onClick: goLocation.bind(null, record),
  253. },
  254. ]
  255. "
  256. />
  257. </template>
  258. <template #filterCell="{ column, record }">
  259. <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
  260. <div v-if="!record.V && column.dataIndex === 'V'">-</div>
  261. <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
  262. <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
  263. <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
  264. <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
  265. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
  266. record.netStatus == '0' ? '断开' : '连接'
  267. }}</a-tag>
  268. </template>
  269. </MonitorTable>
  270. </template>
  271. <template v-else-if="deviceType.startsWith('location') && activeKey == '1'">
  272. <MonitorTable
  273. ref="monitorTable"
  274. :columnsType="`${deviceType}_monitor`"
  275. :deviceType="deviceType"
  276. :dataSource="dataSource"
  277. design-scope="device_monitor"
  278. :isShowActionColumn="true"
  279. :isShowSelect="false"
  280. title="设备监测"
  281. :scroll="{ y: scroll.y - 110 }"
  282. style="margin-top: 60px"
  283. >
  284. <template #action="{ record }">
  285. <TableAction
  286. :actions="[
  287. {
  288. label: '定位',
  289. onClick: goLocation.bind(null, record),
  290. },
  291. ]"
  292. />
  293. </template>
  294. </MonitorTable>
  295. </template>
  296. <template v-else-if="deviceType.startsWith('vehicle') && activeKey == '1'">
  297. <MonitorTable
  298. ref="monitorTable"
  299. :columnsType="`${deviceType}_monitor`"
  300. :deviceType="deviceType"
  301. :dataSource="dataSource"
  302. design-scope="device_monitor"
  303. :isShowActionColumn="true"
  304. :isShowSelect="false"
  305. title="设备监测"
  306. :form-config="vehicleFormConfig"
  307. :scroll="{ y: scroll.y - 110 }"
  308. >
  309. <template #action="{ record }">
  310. <TableAction
  311. :actions="[
  312. {
  313. label: '定位',
  314. onClick: goLocation.bind(null, record),
  315. },
  316. ]"
  317. />
  318. </template>
  319. </MonitorTable>
  320. </template>
  321. <!-- 瓦斯人工巡检 -->
  322. <template v-else-if="deviceType.startsWith('gasDay_normal') && activeKey == '1'">
  323. <gaspatrolTable :tableData="gaspatrolData" @getSearch="getSearch" @locate="goLocation"></gaspatrolTable>
  324. </template>
  325. <!-- 瓦斯日报 -->
  326. <template v-else-if="deviceType.startsWith('gasDayReport') && activeKey == '1' && glob.sysOrgCode != 'sdmtjtbetmk'">
  327. <gasReport :tableData="reportTableData" @getSearchReport="getSearchReport" @locate="goLocation"> </gasReport>
  328. </template>
  329. <template v-else-if="deviceType.startsWith('gasDayReport') && activeKey == '1' && glob.sysOrgCode == 'sdmtjtbetmk'">
  330. <gasReportCount :tableData="reportTableData" @getSearchReport="getSearchReport" @locate="goLocation"> </gasReportCount>
  331. </template>
  332. <!-- 粉尘监测报表-->
  333. <template v-else-if="deviceType.startsWith('dustDayReport') && activeKey == '1'">
  334. <dustMonitorTable @locate="goLocation" :isShowAction="true"></dustMonitorTable>
  335. </template>
  336. <template v-else-if="deviceType.startsWith('bundleDayReport') && activeKey == '1'">
  337. <bundleMonitorTable @locate="goLocation" :isShowAction="true"></bundleMonitorTable>
  338. </template>
  339. <template v-else-if="deviceType.startsWith('bundleSpyDayReport') && activeKey == '1'">
  340. <bundleSpyMonitorTable @locate="goLocation" :isShowAction="true"></bundleSpyMonitorTable>
  341. </template>
  342. <template v-else-if="deviceType.startsWith('dusting') && activeKey == '1'">
  343. <DustingTable :dataSource="dataSource" :deviceType="deviceType" :scroll="scroll" @locate="goLocation" />
  344. </template>
  345. <!-- 设备分站 -->
  346. <template v-else-if="deviceType.startsWith('substation_normal') && activeKey == '1'">
  347. <stationTable :tableData="stationData" @locate="goLocation" @stationDetail="stationDetail"></stationTable>
  348. </template>
  349. <template v-else>
  350. <!-- 工作面echarts图标 -->
  351. <BarAndLine
  352. v-if="activeKey == '1' && deviceType == 'surface_history'"
  353. class="echarts-line"
  354. xAxisPropType="time"
  355. :dataSource="surfaceEchartsData"
  356. height="300px"
  357. :chartsColumns="surfaceChartsColumns"
  358. :option="echatsOption"
  359. />
  360. <MonitorTable
  361. v-else-if="activeKey == '1'"
  362. ref="monitorTable"
  363. :columnsType="`${deviceType}_monitor`"
  364. :dataSource="dataSource"
  365. design-scope="device_monitor"
  366. :isShowActionColumn="true"
  367. :isShowSelect="false"
  368. title="设备监测"
  369. :scroll="{ y: scroll.y - 30 }"
  370. >
  371. <template #action="{ record }">
  372. <TableAction
  373. :actions="
  374. haveDetailArr.find((item) => deviceType.startsWith(item))
  375. ? [
  376. {
  377. label: '详情',
  378. onClick: goDetail.bind(null, record),
  379. },
  380. {
  381. label: '定位',
  382. onClick: goLocation.bind(null, record),
  383. },
  384. ]
  385. : [
  386. {
  387. label: '定位',
  388. onClick: goLocation.bind(null, record),
  389. },
  390. ]
  391. "
  392. />
  393. </template>
  394. <template #filterCell="{ column, record }">
  395. <template v-if="deviceType.startsWith('gate') || deviceType.startsWith('door')">
  396. <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == '0'" color="red"
  397. >正在运行</a-tag
  398. >
  399. <a-tag
  400. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == 1"
  401. color="default"
  402. >关闭</a-tag
  403. >
  404. <a-tag
  405. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '0'"
  406. color="#46C66F"
  407. >打开</a-tag
  408. >
  409. <a-tag
  410. v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'"
  411. color="#FF0000"
  412. >点位异常</a-tag
  413. >
  414. <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '0'" color="red"
  415. >正在运行</a-tag
  416. >
  417. <a-tag
  418. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '1'"
  419. color="default"
  420. >关闭</a-tag
  421. >
  422. <a-tag
  423. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '0'"
  424. color="#46C66F"
  425. >打开</a-tag
  426. >
  427. <a-tag
  428. v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'"
  429. color="#FF0000"
  430. >点位异常</a-tag
  431. >
  432. <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
  433. >正在运行</a-tag
  434. >
  435. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
  436. >关闭</a-tag
  437. >
  438. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
  439. >打开</a-tag
  440. >
  441. <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
  442. >点位异常</a-tag
  443. >
  444. <template v-if="column.dataIndex === 'ndoortype'">
  445. <span>{{ render.renderDictText(record.ndoortype, 'ndoortype') }}</span>
  446. </template>
  447. <template v-if="column.dataIndex === 'doorUse'">
  448. <span>{{ render.renderDictText(record.doorUse, 'doorUse') }}</span>
  449. </template>
  450. </template>
  451. <template v-else-if="deviceType.startsWith('windrect')">
  452. <a-tag v-if="column.dataIndex === 'sign'" :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
  453. {{ record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag
  454. >
  455. <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
  456. <a-tag v-if="record.isRun == -2 || record.isRun == -1" :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
  457. record.isRun == -2 ? '空闲' : '等待'
  458. }}</a-tag>
  459. <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
  460. <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
  461. </template>
  462. </template>
  463. <template v-else-if="deviceType.startsWith('safetymonitor')">
  464. <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
  465. <div v-if="!record.V && column.dataIndex === 'V'">-</div>
  466. <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
  467. <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
  468. <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
  469. <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
  470. </template>
  471. <template v-else-if="deviceType.startsWith('atomizing')">
  472. <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '1'" color="green">连接</a-tag>
  473. <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '0'" color="red">断开</a-tag>
  474. </template>
  475. <template v-else-if="deviceType.startsWith('gaspatrol')">
  476. <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('正常')" color="green">{{
  477. record.deviceConnect_str
  478. }}</a-tag>
  479. <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('断开')" color="red">{{
  480. record.deviceConnect_str
  481. }}</a-tag>
  482. </template>
  483. <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
  484. {{ record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
  485. >
  486. <template v-else-if="column.dataIndex === 'warnLevel'">
  487. <a-tag v-if="record.warnLevel == '101'" color="green">低风险</a-tag>
  488. <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">一般风险</a-tag>
  489. <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">较大风险</a-tag>
  490. <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">重大风险</a-tag>
  491. <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
  492. <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
  493. <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
  494. <a-tag v-else color="green">正常</a-tag>
  495. </template>
  496. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
  497. record.netStatus == '0' ? '断开' : '连接'
  498. }}</a-tag>
  499. </template>
  500. </MonitorTable>
  501. </template>
  502. </a-tab-pane>
  503. <a-tab-pane key="2" tab="历史数据" v-if="!noHistoryArr().find((item) => deviceType.startsWith(item))">
  504. <div class="tab-item" v-if="activeKey == '2'">
  505. <template v-if="deviceType.startsWith('firemon_normal')">
  506. <HistoryBall :dataSource="dataSource"></HistoryBall>
  507. </template>
  508. <template v-else>
  509. <HistoryTable
  510. ref="historyTable"
  511. :sysId="systemID"
  512. :columns-type="`${deviceType}`"
  513. :device-type="deviceType"
  514. designScope="device-history"
  515. :scroll="scroll"
  516. />
  517. </template>
  518. </div>
  519. </a-tab-pane>
  520. <a-tab-pane key="3" tab="报警历史" v-if="!noWarningArr.find((item) => deviceType.startsWith(item))">
  521. <div class="tab-item">
  522. <AlarmHistoryTable
  523. ref="alarmHistoryTable"
  524. v-if="activeKey == '3'"
  525. :sysId="systemID"
  526. columns-type="alarm"
  527. :device-type="deviceType"
  528. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID, pageSize: 10000 })"
  529. :scroll="scroll"
  530. designScope="alarm-history"
  531. />
  532. </div>
  533. </a-tab-pane>
  534. <a-tab-pane key="4" tab="操作历史" v-if="haveHandlerArr.find((item) => deviceType.startsWith(item))">
  535. <div class="tab-item">
  536. <HandlerHistoryTable
  537. ref="handlerHistoryTable"
  538. v-if="activeKey == '4'"
  539. :sysId="systemID"
  540. columns-type="operator_history"
  541. :device-type="deviceType"
  542. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
  543. :scroll="scroll"
  544. designScope="operator-history"
  545. />
  546. </div>
  547. </a-tab-pane>
  548. </a-tabs>
  549. </div>
  550. </div>
  551. <mainPath
  552. v-if="deviceType == 'majorpath'"
  553. :dataSource="majorPathEchartsData"
  554. style="width: 300px; height: 300px; position: absolute; left: 250px; top: 40px"
  555. />
  556. <component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource" :activeID="activeID" />
  557. </div>
  558. </template>
  559. <script setup lang="ts">
  560. import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch } from 'vue';
  561. import { SendOutlined, FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
  562. import {
  563. list,
  564. getDeviceList,
  565. getDeviceTypeList,
  566. devPosition,
  567. getDepartmentInfo,
  568. getExportUrl,
  569. queryNowGasInsInfo,
  570. queryNowGasSta,
  571. queryReportData,
  572. getListAll,
  573. } from './device.api';
  574. import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
  575. import HistoryTable from '../../../comment/HistoryTable.vue';
  576. import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
  577. import MonitorTable from '../../../comment/MonitorTable.vue';
  578. import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
  579. import stationTable from '../../../comment/stationTable.vue';
  580. import gaspatrolTable from '../../../comment/gaspatrolTable.vue';
  581. import gasReport from '../../../comment/gasReport.vue';
  582. import gasReportCount from '../../../comment/gasReportCount.vue';
  583. import dustMonitorTable from '../../../comment/dustMonitorTable.vue';
  584. import bundleMonitorTable from '../../../comment/bundleMonitorTable.vue';
  585. import DustingTable from '../../../comment/DustingTable.vue';
  586. import bundleSpyMonitorTable from '../../../comment/bundleSpyMonitorTable.vue';
  587. import HistoryBall from './modal/history-ball.vue';
  588. import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
  589. import { TableAction } from '/@/components/Table';
  590. import { SvgIcon } from '/@/components/Icon';
  591. import { getActions } from '/@/qiankun/state';
  592. import { useRouter } from 'vue-router';
  593. import { setDivHeight } from '/@/utils/event';
  594. import { render } from '/@/utils/common/renderUtils';
  595. import {
  596. majorColumns,
  597. haveSysDetailArr,
  598. haveDetailArr,
  599. haveHandlerArr,
  600. noWarningArr,
  601. surfaceChartsColumns,
  602. noHistoryArr,
  603. getMonitorComponent,
  604. vehicleFormConfig,
  605. } from './device.data';
  606. import mainPath from './modal/mainPath.vue';
  607. import { formConfig } from '../../../safetyMonitor/safety.data';
  608. import { getDictItemsByCode } from '/@/utils/dict';
  609. import BarAndLine from '/@/components/chart/BarAndLine.vue';
  610. import MTreeSelect from '/@/components/Form/src/jeecg/components/MTreeSelect.vue';
  611. // import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
  612. import { nextTick } from 'vue';
  613. import { useMethods } from '/@/hooks/system/useMethods';
  614. import { useGo } from '/@/hooks/web/usePage';
  615. import { useGlobSetting } from '/@/hooks/setting';
  616. //瓦斯巡检查询参数
  617. const addressData = ref(''); //巡检地点
  618. const personData = ref(''); //巡检员
  619. const instypeData = ref('2'); //巡检类型
  620. const classData = ref('night'); //巡检班次
  621. const gaspatrolData = ref<any[]>([]);
  622. const inspectJd = ref<any>('');
  623. const inspectList = reactive<any[]>([
  624. { label: '第一次巡检已检数', val: 0 },
  625. { label: '第一次巡检未检数', val: 0 },
  626. { label: '第二次巡检已检数', val: 0 },
  627. { label: '第二次巡检未检数', val: 0 },
  628. ]);
  629. const stationData = ref<any[]>([]);
  630. const glob = useGlobSetting();
  631. // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  632. const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal } = getMonitorComponent();
  633. type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
  634. const props = defineProps({
  635. pageData: {
  636. type: Object,
  637. default: () => {},
  638. },
  639. });
  640. const { handleExportXls } = useMethods();
  641. const go = useGo();
  642. const echatsOption = {
  643. grid: {
  644. top: '35',
  645. left: '30',
  646. right: '45',
  647. bottom: '25',
  648. containLabel: true,
  649. },
  650. toolbox: {
  651. feature: {},
  652. },
  653. };
  654. const router = useRouter();
  655. const actions = getActions();
  656. // actions.setGlobalState({ pageObj: { pageType: 'home' } });
  657. const locationForm = reactive({
  658. strname: '',
  659. department: '',
  660. stationname: '',
  661. });
  662. const safetymonitorForm = reactive({
  663. dataTypeName: '',
  664. strinstallpos: '',
  665. });
  666. const monitorTable = ref();
  667. const historyTable = ref();
  668. const alarmHistoryTable = ref();
  669. const handlerHistoryTable = ref();
  670. // const routerParam = ref('home') // 默认进来时首页
  671. const isRefresh = ref(true);
  672. // 模态框
  673. const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
  674. const modalVisible = ref<Boolean>(false); // 模态框是否可见
  675. // const drawerHeight = ref(240) // 监测框最小高度
  676. const treeShow = ref(true); //是否显示树形菜单
  677. const tableShow = ref(true); //是否显示树形菜单
  678. const locationSettingShow = ref(false); //是否显示树形菜单
  679. const treeNodeTitle = ref(''); // 选中的树形标题
  680. const locationList = ref([]); //巷道定位图标显示列表
  681. const deviceList = ref<DeviceType[]>([]); //关联设备列表
  682. const deviceActive = ref('');
  683. const activeKey = ref('1'); // tab key
  684. const dataSource = shallowRef([]); // 实时监测数据
  685. const majorPathEchartsData = ref({}); // 关键路线echarts数据
  686. const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
  687. const activeID = ref(''); // 打开详情modal时监测的设备id
  688. const deviceType = ref(''); // 监测设备类型
  689. const systemType = ref('');
  690. const systemID = ref(''); // 系统监测时,系统id
  691. const selectedKeys = ref<string[]>([]);
  692. const expandedKeys = ref<string[]>([]);
  693. const scroll = reactive({
  694. y: 180,
  695. });
  696. const treeData = ref<TreeProps['treeData']>([]);
  697. let departmentInfo: Null | Object = null;
  698. let startMonitorTimer = 0;
  699. let searchReportParam = ref('gasDayNight'); //瓦斯日报查询条件-非布尔台
  700. let searchReportParam1 = ref('gasDay1'); //瓦斯日报查询条件-布尔台
  701. let reportTableData = ref<any[]>([]); //瓦斯日报列表数据
  702. //树形菜单选择事件
  703. const onSelect: TreeProps['onSelect'] = (keys, e) => {
  704. deviceType.value = '';
  705. systemID.value = '';
  706. deviceList.value = [];
  707. const title = e.node.title; // 在
  708. if (e.node.parent && e.node.parent.node.type.toString().startsWith('sys')) {
  709. systemType.value = e.node.parent.node.type;
  710. if (deviceType.value != e.node.parent.node.type) deviceType.value = e.node.parent.node.type;
  711. systemID.value = e.node.type;
  712. // 传递工作面id信息,用于定位
  713. go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=${systemID.value}`);
  714. } else {
  715. systemType.value = e.node.type;
  716. if (deviceType.value != e.node.type) deviceType.value = e.node.type;
  717. go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=`);
  718. }
  719. clearTimeout(timer);
  720. timer = undefined;
  721. if (startMonitorTimer) {
  722. clearTimeout(startMonitorTimer);
  723. }
  724. dataSource.value = [];
  725. monitorTable.value.resetPagination();
  726. if (!startMonitorTimer) {
  727. startMonitorTimer = setTimeout(() => {
  728. expandedKeys.value = keys;
  729. selectedKeys.value = keys;
  730. treeNodeTitle.value = e.node.title;
  731. if (e.node.children?.length < 1 && timer) {
  732. getMonitor(true);
  733. }
  734. }, 1000);
  735. }
  736. // activeKey.value = '1';
  737. };
  738. function tabChange(activeKeyVal) {
  739. activeKey.value = activeKeyVal;
  740. }
  741. function showTree(flag, value) {
  742. if (flag == 'treeShow') treeShow.value = value;
  743. if (flag == 'location') locationSettingShow.value = value;
  744. }
  745. async function getDeviceType(sysType?) {
  746. if (treeData.value?.length > 0) return;
  747. const result = await getDeviceTypeList({});
  748. if (result.length > 0) {
  749. const dataSource = <TreeProps['treeData']>[];
  750. let key = '0';
  751. const getData = (resultList, dataSourceList, keyVal) => {
  752. resultList.forEach((item, index) => {
  753. if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
  754. const children = getData(item.children, [], `${keyVal}-${index}`);
  755. // 判断关键阻力路线
  756. if (item.itemValue.startsWith(sysType) && children[0]) {
  757. systemID.value = item.children[0]['itemValue'];
  758. }
  759. dataSourceList.push({
  760. children: children,
  761. title: item.itemText,
  762. key: `${keyVal}-${index}`,
  763. type: item.itemValue,
  764. parentKey: `${keyVal}`,
  765. });
  766. } else {
  767. dataSourceList.push({
  768. children: [],
  769. title: item.itemText,
  770. key: `${keyVal}-${index}`,
  771. type: item.itemValue,
  772. parentKey: `${keyVal}`,
  773. });
  774. }
  775. });
  776. return dataSourceList;
  777. };
  778. treeData.value = getData(result, dataSource, key);
  779. }
  780. }
  781. // https获取监测数据
  782. let timer: null | NodeJS.Timeout = undefined;
  783. function getMonitor(flag?) {
  784. if (deviceType.value) {
  785. if (timer) timer = null;
  786. if (Object.prototype.toString.call(timer) === '[object Null]') {
  787. timer = setTimeout(
  788. async () => {
  789. if (deviceType.value.startsWith('gasDay_normal')) {
  790. await queryNowGasInsInfoList(); //人工瓦斯巡检
  791. } else if (deviceType.value.startsWith('gasDayReport')) {
  792. let searchParams = glob.sysOrgCode == 'sdmtjtbetmk' ? searchReportParam1.value : searchReportParam.value;
  793. await getSearchReport(searchParams); //瓦斯日报
  794. } else if (deviceType.value.startsWith('substation')) {
  795. //分站
  796. await getStationList();
  797. } else {
  798. await getDataSource();
  799. }
  800. if (timer) {
  801. getMonitor();
  802. }
  803. },
  804. flag ? 0 : 1000
  805. );
  806. }
  807. }
  808. }
  809. async function getDataSource() {
  810. if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
  811. const res = await list({ devicetype: 'sys', systemID: systemID.value });
  812. const result = res.msgTxt;
  813. const deviceArr = <DeviceType[]>[];
  814. result.forEach((item) => {
  815. const data = item['datalist'].filter((data: any) => {
  816. const readData = data.readData;
  817. return Object.assign(data, readData);
  818. });
  819. if (item.type != 'sys') {
  820. if (item.type === 'majorpath') {
  821. deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
  822. majorPathEchartsData.value = item['datalist'][0];
  823. } else if (item.type.startsWith('surface_history')) {
  824. surfaceEchartsData.value = item['datalist'][0];
  825. deviceArr.unshift({
  826. deviceType: item.type,
  827. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  828. datalist: data,
  829. });
  830. } else {
  831. deviceArr.unshift({
  832. deviceType: item.type,
  833. deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
  834. datalist: data,
  835. });
  836. }
  837. }
  838. });
  839. deviceList.value = deviceArr;
  840. if (deviceArr.length > 0) {
  841. // if (deviceArr[1]) {
  842. // deviceActive.value = deviceArr[1].deviceType
  843. // monitorChange(1)
  844. // } else {
  845. // deviceActive.value = deviceArr[0].deviceType
  846. // monitorChange(0)
  847. // }
  848. deviceActive.value = deviceArr[0].deviceType;
  849. monitorChange(0);
  850. }
  851. } else {
  852. let res = null;
  853. if (systemID.value) {
  854. res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
  855. if (res && res.msgTxt) {
  856. const result = res.msgTxt;
  857. result.forEach((item) => {
  858. const data = item['datalist'].filter((data: any) => {
  859. const readData = data.readData;
  860. return Object.assign(data, readData);
  861. });
  862. if (item.type != 'sys') {
  863. if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
  864. dataSource.value = item['datalist'][0]['paths'];
  865. majorPathEchartsData.value = item['datalist'][0];
  866. return;
  867. } else if (item.type == deviceType.value) {
  868. if (item.type == 'surface_history') {
  869. // 工作面图标数据
  870. surfaceEchartsData.value = item['datalist'][0];
  871. } else {
  872. dataSource.value = data;
  873. console.log('关联设备数据--------------->', data);
  874. }
  875. return;
  876. }
  877. }
  878. });
  879. }
  880. } else {
  881. let resultData, searchForm;
  882. if (monitorTable.value) {
  883. const formData = monitorTable.value.getForm();
  884. searchForm = formData.getFieldsValue();
  885. }
  886. if (monitorTable.value) {
  887. if (deviceType.value.startsWith('safetymonitor')) {
  888. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
  889. } else if (deviceType.value.startsWith('location')) {
  890. if (!departmentInfo) {
  891. departmentInfo = await getDepartmentInfo({});
  892. }
  893. let department = null;
  894. if (departmentInfo && locationForm && locationForm['department']) {
  895. for (const key in departmentInfo) {
  896. const item = departmentInfo[key];
  897. if (item['id'] === locationForm['department']) {
  898. department = item;
  899. break;
  900. }
  901. }
  902. }
  903. resultData = await list({
  904. devicetype: deviceType.value,
  905. pagetype: 'normal',
  906. filterParams: {
  907. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  908. userName: locationForm['strname'] ? locationForm['strname'] : '',
  909. userJson: department && department['name'] ? department['name'] : '',
  910. },
  911. });
  912. } else if (deviceType.value.startsWith('vehicle')) {
  913. resultData = await list({
  914. devicetype: deviceType.value,
  915. pagetype: 'normal',
  916. filterParams: {
  917. strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
  918. vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
  919. },
  920. });
  921. } else {
  922. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  923. }
  924. } else {
  925. // 非安全监控
  926. resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
  927. }
  928. if (resultData && resultData.msgTxt) {
  929. const result = resultData.msgTxt[0];
  930. if (result) {
  931. const data = result['datalist'].filter((data: any) => {
  932. const readData = data.readData;
  933. return Object.assign(data, readData);
  934. });
  935. if (deviceType.value.startsWith('safetymonitor')) {
  936. const resultData = <any[]>[];
  937. // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
  938. const dictCodes = getDictItemsByCode('safetynormal');
  939. if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
  940. for (let i = 0; i < dictCodes.length; i++) {
  941. const dict = dictCodes[i];
  942. data.forEach((item) => {
  943. if (dict['value'] == item['dataTypeName']) {
  944. resultData.push(item);
  945. }
  946. });
  947. }
  948. dataSource.value = resultData;
  949. } else {
  950. dataSource.value = data;
  951. }
  952. } else {
  953. let tableData: any[] = [];
  954. let noNetData: any[] = [];
  955. data.filter((el) => {
  956. if (el.netStatus == 1) {
  957. tableData.push(el);
  958. } else {
  959. noNetData.push(el);
  960. }
  961. });
  962. dataSource.value = [...tableData, ...noNetData];
  963. }
  964. } else {
  965. dataSource.value = [];
  966. }
  967. } else {
  968. dataSource.value = [];
  969. }
  970. }
  971. }
  972. }
  973. //设备分站详情跳转
  974. function stationDetail() {
  975. const newPage = router.resolve({ path: '/safety/list/detail/home' });
  976. window.open(newPage.href, '_blank');
  977. }
  978. function goLocation(record) {
  979. // debugger;
  980. if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
  981. actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
  982. } else if (deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
  983. actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
  984. } else if (deviceType.value.startsWith('gasDay')) {
  985. actions.setGlobalState({ locationName: record.strInstallPos, locationObj: null, pageObj: null, type: record['deviceType'] });
  986. } else if (deviceType.value == 'gasDayReport') {
  987. actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
  988. } else if (deviceType.value.startsWith('substation')) {
  989. actions.setGlobalState({ locationId: record.id, locationObj: null, pageObj: null, type: record['deviceType'] });
  990. } else {
  991. if (deviceType.value.startsWith('location')) {
  992. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });
  993. } else if (deviceType.value.startsWith('vehicle')) {
  994. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'car' });
  995. } else {
  996. actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null });
  997. }
  998. }
  999. }
  1000. //查询分站列表
  1001. async function getStationList() {
  1002. let res = await getListAll();
  1003. res.forEach((el) => {
  1004. el.key = el.id;
  1005. el.linkstatusC = el.linkstatus ? '连接' : '断开';
  1006. el.gdmsC = el.gdms == '1' ? '直流供电' : el.gdms == '0' ? '交流供电' : '';
  1007. });
  1008. stationData.value = res;
  1009. }
  1010. //查询当前各班瓦斯巡检信息
  1011. async function queryNowGasInsInfoList() {
  1012. let res = await queryNowGasInsInfo({
  1013. address: addressData.value,
  1014. userName: personData.value,
  1015. insType: instypeData.value,
  1016. class: classData.value,
  1017. });
  1018. console.log(res, '查询当前各班瓦斯巡检信息');
  1019. if (res.length) {
  1020. gaspatrolData.value = res;
  1021. } else {
  1022. gaspatrolData.value = [];
  1023. }
  1024. }
  1025. //查询巡检弹窗信息
  1026. async function getSearch(param) {
  1027. addressData.value = param.address;
  1028. personData.value = param.userName;
  1029. instypeData.value = param.insType;
  1030. classData.value = param.class;
  1031. if (!param.insType) {
  1032. message.warning('请选择巡检类型!');
  1033. } else if (!param.class) {
  1034. message.warning('请选择巡检班次!');
  1035. } else {
  1036. await queryNowGasInsInfoList();
  1037. let res = await queryNowGasSta({ insType: param.insType, class: param.class });
  1038. console.log(res, '巡检弹窗信息');
  1039. if (res) {
  1040. inspectJd.value = res.comRate || 0;
  1041. inspectList[0].val = res.finishNum1 || 0;
  1042. inspectList[1].val = res.missNum1 || 0;
  1043. inspectList[2].val = res.finishNum2 || 0;
  1044. inspectList[3].val = res.missNum2 || 0;
  1045. }
  1046. }
  1047. }
  1048. //查询瓦斯日报列表数据
  1049. async function getSearchReport(param) {
  1050. if (glob.sysOrgCode == 'sdmtjtbetmk') {
  1051. searchReportParam1.value = param;
  1052. } else {
  1053. searchReportParam.value = param;
  1054. }
  1055. let res = await queryReportData({ type: param });
  1056. console.log(res, '瓦斯日报列表');
  1057. reportTableData.value = JSON.parse(res.content) || [];
  1058. }
  1059. function goDetail(record?) {
  1060. if (record) {
  1061. activeID.value = record.deviceID;
  1062. if (deviceType.value.startsWith('fiber')) {
  1063. currentModal.value = FiberModal;
  1064. modalVisible.value = true;
  1065. } else if (deviceType.value.startsWith('dusting')) {
  1066. currentModal.value = DustModal;
  1067. modalVisible.value = true;
  1068. } else if (deviceType.value.startsWith('bundletube')) {
  1069. currentModal.value = BundleModal;
  1070. modalVisible.value = true;
  1071. } else if (deviceType.value.startsWith('firemon_normal')) {
  1072. // currentModal.value = BundleModal;
  1073. currentModal.value = WisdomBallModal;
  1074. modalVisible.value = true;
  1075. } else if (deviceType.value.startsWith('ballvalve')) {
  1076. currentModal.value = BallvalveModal;
  1077. modalVisible.value = true;
  1078. } else if (deviceType.value.startsWith('atomizing')) {
  1079. currentModal.value = AtomizingModal;
  1080. modalVisible.value = true;
  1081. } else if (deviceType.value.startsWith('gaspatrol')) {
  1082. currentModal.value = GaspatrolModal;
  1083. modalVisible.value = true;
  1084. } else if (deviceType.value.indexOf('gate') != -1) {
  1085. const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
  1086. window.open(newPage.href, '_blank');
  1087. } else if (deviceType.value.indexOf('window') != -1) {
  1088. const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
  1089. window.open(newPage.href, '_blank');
  1090. } else if (deviceType.value.indexOf('windrect') != -1) {
  1091. const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
  1092. window.open(newPage.href, '_blank');
  1093. } else if (deviceType.value.indexOf('fanmain') != -1) {
  1094. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
  1095. window.open(newPage.href, '_blank');
  1096. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
  1097. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
  1098. window.open(newPage.href, '_blank');
  1099. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
  1100. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
  1101. window.open(newPage.href, '_blank');
  1102. } else if (deviceType.value.indexOf('pulping') != -1) {
  1103. const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  1104. window.open(newPage.href, '_blank');
  1105. } else if (deviceType.value.indexOf('pressurefan') != -1) {
  1106. const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
  1107. window.open(newPage.href, '_blank');
  1108. } else if (deviceType.value.indexOf('chamber') != -1) {
  1109. const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
  1110. window.open(newPage.href, '_blank');
  1111. } else if (deviceType.value.indexOf('safetymonitor') != -1) {
  1112. const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
  1113. window.open(newPage.href, '_blank');
  1114. } else if (deviceType.value.indexOf('pump') != -1) {
  1115. const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
  1116. window.open(newPage.href, '_blank');
  1117. } else if (systemType.value.indexOf('nitrogen') != -1) {
  1118. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1119. window.open(newPage.href, '_blank');
  1120. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1121. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1122. window.open(newPage.href, '_blank');
  1123. } else if (deviceType.value.indexOf('pulping') != -1) {
  1124. const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  1125. window.open(newPage.href, '_blank');
  1126. } else {
  1127. message.info('待开发。。。');
  1128. }
  1129. } else {
  1130. if (systemType.value.indexOf('sys_dongshi') != -1) {
  1131. const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
  1132. window.open(newPage.href, '_blank');
  1133. } else if (systemType.value.indexOf('sys_obfurage') != -1) {
  1134. const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
  1135. window.open(newPage.href, '_blank');
  1136. } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
  1137. const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
  1138. window.open(newPage.href, '_blank');
  1139. } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
  1140. const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
  1141. window.open(newPage.href, '_blank');
  1142. } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
  1143. const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
  1144. window.open(newPage.href, '_blank');
  1145. } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
  1146. const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
  1147. window.open(newPage.href, '_blank');
  1148. } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
  1149. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  1150. window.open(newPage.href, '_blank');
  1151. } else if (deviceType.value.indexOf('forcFan') != -1) {
  1152. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  1153. window.open(newPage.href, '_blank');
  1154. } else if (deviceType.value.indexOf('pulping') != -1) {
  1155. const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
  1156. window.open(newPage.href, '_blank');
  1157. } else {
  1158. message.info('待开发。。。');
  1159. }
  1160. }
  1161. }
  1162. function goGasDayReport() {
  1163. const newPage = router.resolve({ path: '/gas/gas-report-inspect/home' });
  1164. window.open(newPage.href, '_blank');
  1165. }
  1166. function gogasDayReportHis() {
  1167. const newPage = router.resolve({ path: '/gas/gasDayReport/home' });
  1168. window.open(newPage.href, '_blank');
  1169. }
  1170. function goDustDayReport() {
  1171. const newPage = router.resolve({ path: '/dustDayReport/home' });
  1172. window.open(newPage.href, '_blank');
  1173. }
  1174. function goBundleDayReport() {
  1175. const newPage = router.resolve({ path: '/bundleDayReport/home' });
  1176. window.open(newPage.href, '_blank');
  1177. }
  1178. function goBundleSpyDayReport() {
  1179. const newPage = router.resolve({ path: '/bundleSpyDayReport/home' });
  1180. window.open(newPage.href, '_blank');
  1181. }
  1182. function exportXls() {
  1183. handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
  1184. }
  1185. function toHome() {
  1186. deviceList.value = [];
  1187. if (timer) clearTimeout(timer);
  1188. timer = undefined;
  1189. deviceType.value = '';
  1190. go(glob.homePath);
  1191. }
  1192. function toHide() {
  1193. tableShow.value = !tableShow.value;
  1194. document.getElementById('monitorBox').addEventListener('animationend', () => {
  1195. if (!tableShow.value) {
  1196. document.getElementById('monitorBox').style.height = '0px';
  1197. } else {
  1198. document.getElementById('monitorBox').style.height = '290';
  1199. }
  1200. });
  1201. }
  1202. async function findTreeDataValue(obj) {
  1203. const findDeviceType = (data: any[], obj, flag = true) => {
  1204. return data.find((item: any) => {
  1205. if (item.children.length > 0) {
  1206. findDeviceType(item.children, obj);
  1207. }
  1208. // debugger;
  1209. if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
  1210. // debugger;
  1211. if (item.type == obj.deviceid) {
  1212. deviceType.value = 'sys';
  1213. systemID.value = obj.deviceid;
  1214. selectedKeys.value = [item.key];
  1215. expandedKeys.value = [item.key];
  1216. treeNodeTitle.value = item.title;
  1217. }
  1218. } else {
  1219. if (!flag) {
  1220. if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
  1221. deviceType.value = item.type;
  1222. selectedKeys.value = [item.key];
  1223. expandedKeys.value = [item.key];
  1224. treeNodeTitle.value = item.title;
  1225. return true;
  1226. }
  1227. return false;
  1228. } else {
  1229. if (obj.deviceType && item.type == obj.deviceType) {
  1230. deviceType.value = item.type;
  1231. selectedKeys.value = [item.key];
  1232. expandedKeys.value = [item.key];
  1233. treeNodeTitle.value = item.title;
  1234. return true;
  1235. }
  1236. return false;
  1237. }
  1238. }
  1239. return false;
  1240. });
  1241. };
  1242. const flag = findDeviceType(treeData.value, obj);
  1243. if (!flag) {
  1244. findDeviceType(treeData.value, obj, false);
  1245. }
  1246. // 无类型时
  1247. if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
  1248. const defaultData = treeData.value[0]['children'][0];
  1249. if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
  1250. selectedKeys.value = [defaultData.key as string];
  1251. expandedKeys.value = [defaultData.key as string];
  1252. treeNodeTitle.value = defaultData.title;
  1253. }
  1254. if (timer === undefined) {
  1255. timer = null;
  1256. await getDataSource();
  1257. getMonitor(true);
  1258. }
  1259. }
  1260. function monitorChange(index) {
  1261. dataSource.value = [];
  1262. deviceActive.value = deviceList.value[index].deviceType;
  1263. if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
  1264. if (activeKey.value == '1' && monitorTable.value) {
  1265. monitorTable.value.setLoading(true);
  1266. dataSource.value = deviceList.value[index].datalist;
  1267. }
  1268. if (activeKey.value == '2' && historyTable.value) {
  1269. historyTable.value.setLoading(true);
  1270. }
  1271. if (activeKey.value == '3' && alarmHistoryTable.value) {
  1272. alarmHistoryTable.value.setLoading(true);
  1273. }
  1274. if (activeKey.value == '4' && handlerHistoryTable.value) {
  1275. handlerHistoryTable.value.setLoading(true);
  1276. }
  1277. }
  1278. /**
  1279. * 设置巷道设备定位图标的显示与隐藏
  1280. */
  1281. function setLocation() {
  1282. let locationStr = '';
  1283. locationList.value.forEach((item: any) => {
  1284. if (item.Visible) {
  1285. locationStr = locationStr ? locationStr + ',' + item.value : item.value;
  1286. }
  1287. });
  1288. actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
  1289. setTimeout(() => {
  1290. message.success('设置成功');
  1291. }, 600);
  1292. }
  1293. // function clearMonitor() {
  1294. // clearTimeout(timer);
  1295. // timer = undefined;
  1296. // if (startMonitorTimer) {
  1297. // clearTimeout(startMonitorTimer);
  1298. // }
  1299. // dataSource.value = [];
  1300. // startMonitorTimer = setTimeout(() => {
  1301. // expandedKeys.value = keys;
  1302. // selectedKeys.value = keys;
  1303. // treeNodeTitle.value = e.node.title;
  1304. // activeKey.value = '1';
  1305. // timer = null;
  1306. // if (e.node.children?.length < 1) {
  1307. // getMonitor(true);
  1308. // }
  1309. // }, 1000);
  1310. // }show
  1311. watch(
  1312. () => props.pageData,
  1313. async (pageObj) => {
  1314. isRefresh.value = false;
  1315. if (!treeData.value || treeData.value?.length < 1) {
  1316. await getDeviceType();
  1317. }
  1318. nextTick(() => {
  1319. isRefresh.value = true;
  1320. // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
  1321. // findTreeDataValue({ deviceid: systemID.value });
  1322. // } else {
  1323. // findTreeDataValue({ deviceType: pageObj.pageType });
  1324. // }
  1325. findTreeDataValue(pageObj);
  1326. });
  1327. },
  1328. { immediate: true }
  1329. );
  1330. onMounted(async () => {
  1331. const pageObj = props.pageData;
  1332. if (!pageObj) return;
  1333. if (pageObj && pageObj.pageType) {
  1334. if (pageObj.pageType.startsWith('sys_')) {
  1335. await getDeviceType(pageObj.pageType);
  1336. findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
  1337. } else {
  1338. await getDeviceType();
  1339. findTreeDataValue({ deviceType: pageObj.pageType });
  1340. }
  1341. } else {
  1342. await getDeviceType();
  1343. findTreeDataValue({ deviceid: pageObj.deviceid });
  1344. }
  1345. // 定位
  1346. const posShowData = pageObj.locationPlane;
  1347. if (posShowData) {
  1348. locationList.value = posShowData;
  1349. } else {
  1350. locationList.value = await devPosition({});
  1351. }
  1352. // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
  1353. });
  1354. onUnmounted(() => {
  1355. if (timer) {
  1356. clearTimeout(timer);
  1357. }
  1358. timer = undefined;
  1359. });
  1360. </script>
  1361. <style lang="less" scoped>
  1362. @import '/@/design/theme.less';
  1363. @import '/@/design/vent/modal.less';
  1364. @ventSpace: zxm;
  1365. @{theme-deepblue} {
  1366. .scene-box {
  1367. // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
  1368. // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
  1369. // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
  1370. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1371. // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
  1372. // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
  1373. // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
  1374. // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
  1375. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1376. // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
  1377. // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
  1378. // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
  1379. // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
  1380. // --tree-node-select: #0963c1;
  1381. // --tree-node-hover: #0f376ccc;
  1382. // --location-bottom-bg: #21324855;
  1383. // --location-bottom-border: #aed1ff4d;
  1384. }
  1385. }
  1386. .scene-box {
  1387. --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
  1388. --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
  1389. --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
  1390. --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
  1391. --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
  1392. --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
  1393. --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
  1394. --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
  1395. --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
  1396. --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
  1397. --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
  1398. --image-tohome: url('/@/assets/images/vent/home/tohome.png');
  1399. --tree-node-select: #00b1c8;
  1400. --tree-node-hover: #00b1c855;
  1401. --location-bottom-bg: #00709955;
  1402. --location-bottom-border: #aef3ff4d;
  1403. }
  1404. .top-header {
  1405. position: fixed;
  1406. width: 100%;
  1407. height: 56px;
  1408. background: var(--image-modal-top);
  1409. text-align: center;
  1410. line-height: 56px;
  1411. font-size: 28px;
  1412. color: #ffffffdd;
  1413. font-weight: 600;
  1414. z-index: 1;
  1415. letter-spacing: 2px;
  1416. font-size: 30px;
  1417. }
  1418. .select-node {
  1419. position: fixed;
  1420. top: 100px;
  1421. left: 10px;
  1422. color: var(--vent-font-color);
  1423. display: flex;
  1424. justify-content: center;
  1425. font-size: 22px;
  1426. .title {
  1427. margin-left: 10px;
  1428. }
  1429. }
  1430. .expansion-icon {
  1431. background: var(--image-tree-icon-bg) no-repeat;
  1432. background-size: contain;
  1433. position: absolute;
  1434. left: 190px;
  1435. top: 25px;
  1436. &:hover {
  1437. background: var(--image-tree-icon-hover-bg) no-repeat;
  1438. background-size: contain;
  1439. }
  1440. }
  1441. .device-select {
  1442. width: 250px;
  1443. height: 500px;
  1444. background: var(--image-tree-bg) no-repeat;
  1445. position: fixed;
  1446. top: 100px;
  1447. left: 10px;
  1448. background-size: contain;
  1449. pointer-events: auto;
  1450. padding: 20px 10px 30px 10px;
  1451. }
  1452. .inspect-info-xj {
  1453. position: fixed;
  1454. top: 100px;
  1455. left: 250px;
  1456. width: 320px;
  1457. height: 272px;
  1458. padding: 20px;
  1459. background: url('@/assets/images/inspect-bg.png') no-repeat center;
  1460. background-size: 100% 100%;
  1461. box-sizing: border-box;
  1462. .info-xj-title {
  1463. width: 230px;
  1464. height: 36px;
  1465. line-height: 36px;
  1466. padding-left: 50px;
  1467. margin: 10px 0px;
  1468. color: #fff;
  1469. background: url('@/assets/images/inspect-title.png') no-repeat center;
  1470. background-size: 100% 100%;
  1471. }
  1472. .info-xj-content {
  1473. display: flex;
  1474. flex-wrap: wrap;
  1475. height: calc(100% - 56px);
  1476. padding: 10px 0px;
  1477. box-sizing: border-box;
  1478. .xj-content-item {
  1479. display: flex;
  1480. flex-direction: column;
  1481. justify-content: space-around;
  1482. align-items: center;
  1483. width: 126px;
  1484. height: 67px;
  1485. margin: 7px;
  1486. color: #fff;
  1487. padding-bottom: 5px;
  1488. background: url('@/assets/images/inspect-item.png') no-repeat center;
  1489. .content-item-val {
  1490. font-family: 'douyuFont';
  1491. color: #74e9fe;
  1492. }
  1493. }
  1494. }
  1495. }
  1496. .is-expansion-icon {
  1497. padding: 5px;
  1498. pointer-events: auto;
  1499. z-index: 999;
  1500. }
  1501. .device-select-show {
  1502. left: 10px;
  1503. animation-name: treeShow;
  1504. /* 持续时间 */
  1505. animation-duration: 1s;
  1506. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1507. }
  1508. .device-select-hide {
  1509. left: -250px;
  1510. animation-name: treeHide;
  1511. /* 持续时间 */
  1512. animation-duration: 1s;
  1513. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1514. }
  1515. .node-select-show {
  1516. width: 276px;
  1517. height: 44px;
  1518. background: var(--image-tree-expansion-bg) no-repeat;
  1519. left: 10px;
  1520. animation-name: treeShow;
  1521. /* 持续时间 */
  1522. animation-duration: 1s;
  1523. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1524. display: flex;
  1525. align-items: center;
  1526. margin-left: 0;
  1527. justify-content: flex-start;
  1528. pointer-events: auto;
  1529. &:hover {
  1530. background: var(--image-tree-expansion-hover-bg) no-repeat;
  1531. }
  1532. .put-away-icon {
  1533. position: relative;
  1534. display: inline-block;
  1535. left: 4px;
  1536. }
  1537. }
  1538. .node-select-hide {
  1539. left: -400px;
  1540. animation-name: treeHide;
  1541. /* 持续时间 */
  1542. animation-duration: 1s;
  1543. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1544. }
  1545. .device-select-box {
  1546. width: 208px;
  1547. height: 450px;
  1548. overflow-y: auto;
  1549. color: var(--vent-font-color);
  1550. :deep(.zxm-tree) {
  1551. background: transparent !important;
  1552. color: var(--vent-font-color) !important;
  1553. .zxm-tree-switcher {
  1554. background: transparent !important;
  1555. }
  1556. .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
  1557. background-color: var(--tree-node-select);
  1558. }
  1559. .zxm-tree-node-content-wrapper:hover {
  1560. background-color: var(--tree-node-hover);
  1561. }
  1562. input {
  1563. height: 0px !important;
  1564. }
  1565. }
  1566. &::-webkit-scrollbar-track {
  1567. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1568. border-radius: 10px;
  1569. background: #ededed22;
  1570. height: 100px;
  1571. }
  1572. &::-webkit-scrollbar-thumb {
  1573. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1574. background: #4288a444;
  1575. }
  1576. }
  1577. .location-icon {
  1578. width: 46px;
  1579. height: 178px;
  1580. position: absolute;
  1581. top: 100px;
  1582. background: var(--image-location-bg) no-repeat;
  1583. background-size: contain;
  1584. writing-mode: vertical-lr;
  1585. line-height: 46px;
  1586. color: var(--vent-font-color);
  1587. padding-top: 10px;
  1588. pointer-events: auto;
  1589. cursor: pointer;
  1590. &:hover {
  1591. background: var(--image-location-hover-bg) no-repeat;
  1592. }
  1593. .location-text {
  1594. padding-top: 20px;
  1595. letter-spacing: 3px;
  1596. font-size: 16px;
  1597. }
  1598. }
  1599. .location-select {
  1600. position: fixed;
  1601. top: 100px;
  1602. pointer-events: auto;
  1603. .location-select-box {
  1604. width: 100%;
  1605. height: 100%;
  1606. position: relative;
  1607. &::before {
  1608. content: '';
  1609. position: absolute;
  1610. width: 230px;
  1611. height: 500px;
  1612. top: 0;
  1613. left: 0;
  1614. background: var(--image-tree-bg) no-repeat;
  1615. background-size: contain;
  1616. transform: rotateY(180deg);
  1617. z-index: -1;
  1618. }
  1619. .location-top-title {
  1620. color: var(--vent-font-color);
  1621. position: absolute;
  1622. width: 225px;
  1623. height: 68px;
  1624. background: var(--image-turn-location-top-bg) no-repeat;
  1625. background-size: contain;
  1626. top: 5px;
  1627. left: 5px;
  1628. display: flex;
  1629. flex-direction: row;
  1630. justify-content: space-between;
  1631. align-items: flex-end;
  1632. .title {
  1633. font-size: 18px;
  1634. position: relative;
  1635. top: -14px;
  1636. right: 15px;
  1637. }
  1638. }
  1639. .location-expansion-icon {
  1640. background: var(--image-tree-icon-cover-bg) no-repeat;
  1641. background-size: contain;
  1642. position: relative;
  1643. left: 10px;
  1644. top: -15px;
  1645. padding: 5px;
  1646. &:hover {
  1647. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  1648. background-size: contain;
  1649. }
  1650. }
  1651. }
  1652. .location-container {
  1653. width: 200px;
  1654. height: 390px;
  1655. position: absolute;
  1656. display: flex;
  1657. flex-direction: column;
  1658. top: 80px;
  1659. left: 18px;
  1660. overflow-y: auto;
  1661. .location-item {
  1662. color: var(--vent-font-color);
  1663. line-height: 30px;
  1664. display: flex;
  1665. justify-content: space-between;
  1666. // background-image: var(--vent-gas-list-item-bg-img);
  1667. background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
  1668. margin: 3px 0;
  1669. .item-title {
  1670. width: 80px;
  1671. text-align: right;
  1672. color: var(--vent-table-action-link);
  1673. }
  1674. }
  1675. .location-bottom-btn {
  1676. width: 100%;
  1677. color: var(--vent-font-color);
  1678. display: flex;
  1679. justify-content: flex-end;
  1680. margin-top: 20px;
  1681. span {
  1682. display: inline-block;
  1683. width: 100%;
  1684. background: var(--location-bottom-bg);
  1685. border-radius: 3px;
  1686. border: 1px solid var(--location-bottom-border);
  1687. text-align: center;
  1688. padding: 2px 0;
  1689. cursor: pointer;
  1690. &:hover {
  1691. background: #00557422;
  1692. }
  1693. }
  1694. }
  1695. }
  1696. }
  1697. .location-select-show {
  1698. right: 240px;
  1699. animation-name: locationShow;
  1700. /* 持续时间 */
  1701. animation-duration: 1s;
  1702. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1703. }
  1704. .location-select-hide {
  1705. right: -2px;
  1706. animation-name: locationHide;
  1707. /* 持续时间 */
  1708. animation-duration: 1s;
  1709. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1710. }
  1711. .location-btn-show {
  1712. right: -0px;
  1713. animation-name: locationBtnShow;
  1714. /* 持续时间 */
  1715. animation-duration: 1s;
  1716. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1717. }
  1718. .location-btn-hide {
  1719. right: -240px;
  1720. animation-name: locationBtnHide;
  1721. /* 持续时间 */
  1722. animation-duration: 1s;
  1723. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1724. }
  1725. .tabs-box {
  1726. height: 290px;
  1727. }
  1728. .bottom-tabs-box {
  1729. position: relative;
  1730. .tabs-box {
  1731. width: calc(100% - 12px) !important;
  1732. bottom: 3px !important;
  1733. background-color: red;
  1734. }
  1735. .to-small {
  1736. position: absolute;
  1737. top: -65px;
  1738. right: 36px;
  1739. display: flex;
  1740. align-items: center;
  1741. justify-content: center;
  1742. .to-home {
  1743. width: 60px;
  1744. height: 60px;
  1745. background: var(--image-tohome) no-repeat center;
  1746. background-size: auto;
  1747. padding: 8px;
  1748. &:hover {
  1749. background-color: rgba(79, 104, 134, 0.418);
  1750. }
  1751. }
  1752. .table-show-icon {
  1753. width: 30px;
  1754. height: 30px;
  1755. font-size: 30px;
  1756. color: var(--vent-font-color);
  1757. margin-left: 10px;
  1758. }
  1759. }
  1760. .device-button-group {
  1761. position: absolute;
  1762. top: -30px;
  1763. display: flex;
  1764. width: 100%;
  1765. .device-active {
  1766. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  1767. &::before {
  1768. border-color: #0efcff;
  1769. box-shadow: 1px 1px 3px 1px #0efcff inset;
  1770. }
  1771. }
  1772. }
  1773. .table-hide-icon {
  1774. color: var(--vent-font-color);
  1775. cursor: pointer;
  1776. position: absolute;
  1777. right: 20px;
  1778. top: 10px;
  1779. z-index: 9999;
  1780. }
  1781. .enter-detail {
  1782. color: var(--vent-font-color);
  1783. cursor: pointer;
  1784. position: absolute;
  1785. right: 35px;
  1786. top: 35px;
  1787. padding: 5px;
  1788. border-radius: 5px;
  1789. margin-left: 8px;
  1790. margin-right: 8px;
  1791. width: auto;
  1792. height: 33px !important;
  1793. display: flex;
  1794. align-items: center;
  1795. justify-content: center;
  1796. color: var(--vent-font-color);
  1797. padding: 5px 15px 5px 15px;
  1798. z-index: 999;
  1799. cursor: pointer;
  1800. &:hover {
  1801. background: var(--vent-device-manager-control-btn-hover);
  1802. }
  1803. &::before {
  1804. width: calc(100% - 6px);
  1805. height: 27px;
  1806. content: '';
  1807. position: absolute;
  1808. top: 3px;
  1809. right: 0;
  1810. left: 3px;
  1811. bottom: 0;
  1812. z-index: -1;
  1813. border-radius: inherit;
  1814. /*important*/
  1815. background: var(--vent-device-manager-control-btn);
  1816. }
  1817. }
  1818. }
  1819. .table-hide {
  1820. height: 0px;
  1821. animation-name: tableHide;
  1822. /* 持续时间 */
  1823. animation-duration: 1s;
  1824. transition: all 1s;
  1825. }
  1826. .table-show {
  1827. height: 290px;
  1828. animation-name: tableShow;
  1829. /* 持续时间 */
  1830. animation-duration: 1s;
  1831. transition: all 1s;
  1832. }
  1833. .location-form {
  1834. display: flex;
  1835. margin: 8px;
  1836. .location-form-item {
  1837. width: 400px;
  1838. .location-form-label {
  1839. width: 100px;
  1840. display: inline-block;
  1841. color: var(--vent-font-color);
  1842. }
  1843. input {
  1844. background: transparent !important;
  1845. color: var(--vent-font-color);
  1846. border: 1px solid var(--vent-form-item-border) !important;
  1847. }
  1848. }
  1849. .zxm-select-selector {
  1850. width: 200px !important;
  1851. }
  1852. }
  1853. @keyframes tableShow {
  1854. 0% {
  1855. height: 0px;
  1856. opacity: 0;
  1857. }
  1858. 100% {
  1859. height: 290px;
  1860. opacity: 1;
  1861. }
  1862. }
  1863. @keyframes tableHide {
  1864. 0% {
  1865. opacity: 1;
  1866. }
  1867. 100% {
  1868. height: 0px;
  1869. opacity: 0;
  1870. }
  1871. }
  1872. @keyframes treeShow {
  1873. 0% {
  1874. left: -400px;
  1875. opacity: 0;
  1876. }
  1877. 100% {
  1878. left: 10px;
  1879. opacity: 1;
  1880. }
  1881. }
  1882. @keyframes treeHide {
  1883. 0% {
  1884. left: 10px;
  1885. opacity: 1;
  1886. }
  1887. 100% {
  1888. left: -400px;
  1889. opacity: 0;
  1890. }
  1891. }
  1892. @keyframes locationShow {
  1893. 0% {
  1894. right: 0px;
  1895. opacity: 0;
  1896. }
  1897. 100% {
  1898. right: 240px;
  1899. opacity: 1;
  1900. }
  1901. }
  1902. @keyframes locationHide {
  1903. 0% {
  1904. right: 240px;
  1905. opacity: 1;
  1906. }
  1907. 100% {
  1908. right: 0;
  1909. opacity: 0;
  1910. }
  1911. }
  1912. @keyframes locationBtnShow {
  1913. 0% {
  1914. right: -240px;
  1915. opacity: 0;
  1916. }
  1917. 100% {
  1918. right: -2px;
  1919. opacity: 1;
  1920. }
  1921. }
  1922. @keyframes locationBtnHide {
  1923. 0% {
  1924. right: -2px;
  1925. opacity: 1;
  1926. }
  1927. 100% {
  1928. right: -240px;
  1929. opacity: 0;
  1930. }
  1931. }
  1932. :deep(.@{ventSpace}-picker-datetime-panel) {
  1933. height: 200px !important;
  1934. overflow-y: auto !important;
  1935. }
  1936. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1937. // overflow: auto;
  1938. height: 100%;
  1939. }
  1940. :deep(.zxm-select-dropdown) {
  1941. left: 0 !important;
  1942. color: #000000 !important;
  1943. }
  1944. :deep(.zxm-select-selector) {
  1945. height: 34px !important;
  1946. line-height: 34px !important;
  1947. }
  1948. :deep(.zxm-input) {
  1949. height: 32px !important;
  1950. line-height: 32px !important;
  1951. .zxm-select-selection-item {
  1952. line-height: 32px !important;
  1953. }
  1954. }
  1955. .device-button {
  1956. height: 26px;
  1957. display: flex;
  1958. justify-content: center;
  1959. align-items: center;
  1960. color: var(--vent-font-color);
  1961. position: relative;
  1962. cursor: pointer;
  1963. padding: 0 20px;
  1964. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  1965. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1966. &:nth-child(1) {
  1967. left: calc(-6px * 1);
  1968. }
  1969. &:nth-child(2) {
  1970. left: calc(-6px * 2);
  1971. }
  1972. &:nth-child(3) {
  1973. left: calc(-6px * 3);
  1974. }
  1975. &:nth-child(4) {
  1976. left: calc(-6px * 4);
  1977. }
  1978. &:nth-child(5) {
  1979. left: calc(-6px * 5);
  1980. }
  1981. &:nth-child(6) {
  1982. left: calc(-6px * 6);
  1983. }
  1984. &:nth-child(7) {
  1985. left: calc(-6px * 7);
  1986. }
  1987. &:nth-child(8) {
  1988. left: calc(-6px * 8);
  1989. }
  1990. &:nth-child(9) {
  1991. left: calc(-6px * 9);
  1992. }
  1993. &:nth-child(10) {
  1994. left: calc(-6px * 10);
  1995. }
  1996. &:nth-child(11) {
  1997. left: calc(-6px * 11);
  1998. }
  1999. &:nth-child(12) {
  2000. left: calc(-6px * 12);
  2001. }
  2002. &:nth-child(13) {
  2003. left: calc(-6px * 13);
  2004. }
  2005. &:nth-child(14) {
  2006. left: calc(-6px * 14);
  2007. }
  2008. &:nth-child(15) {
  2009. left: calc(-6px * 15);
  2010. }
  2011. &:nth-child(16) {
  2012. left: calc(-6px * 16);
  2013. }
  2014. &:nth-child(17) {
  2015. left: calc(-6px * 17);
  2016. }
  2017. &:nth-child(18) {
  2018. left: calc(-6px * 18);
  2019. }
  2020. &:nth-child(19) {
  2021. left: calc(-6px * 19);
  2022. }
  2023. // &:first-child {
  2024. // clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  2025. // }
  2026. }
  2027. // :deep(.@{ventSpace}-pagination){
  2028. // margin-right: 20px !important;
  2029. // margin-top: 5px !important;
  2030. // display: flex;
  2031. // align-items: center;
  2032. // }
  2033. </style>