index.vue 72 KB

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