index.vue 64 KB

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