index.vue 74 KB

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