index.vue 78 KB

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