index.vue 71 KB

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