index.vue 78 KB

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