index.vue 71 KB

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