index.vue 72 KB

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