index.vue 66 KB

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