1
0

index.vue 84 KB

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