index.vue 63 KB

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