index.vue 66 KB

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