index.vue 79 KB

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