index.vue 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833
  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"></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, } 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. function goDetail(record?) {
  782. debugger;
  783. if (record) {
  784. activeID.value = record.deviceID;
  785. if (deviceType.value.startsWith('fiber')) {
  786. currentModal.value = FiberModal;
  787. modalVisible.value = true;
  788. } else if (deviceType.value.startsWith('dusting')) {
  789. currentModal.value = DustModal;
  790. modalVisible.value = true;
  791. } else if (deviceType.value.startsWith('bundletube')) {
  792. currentModal.value = BundleModal;
  793. modalVisible.value = true;
  794. } else if (deviceType.value.startsWith('firemon_normal')) {
  795. // currentModal.value = BundleModal;
  796. currentModal.value = WisdomBallModal;
  797. modalVisible.value = true;
  798. } else if (deviceType.value.startsWith('ballvalve')) {
  799. currentModal.value = BallvalveModal;
  800. modalVisible.value = true;
  801. } else if (deviceType.value.startsWith('atomizing')) {
  802. currentModal.value = AtomizingModal;
  803. modalVisible.value = true;
  804. } else if (deviceType.value.startsWith('gaspatrol')) {
  805. currentModal.value = GaspatrolModal;
  806. modalVisible.value = true;
  807. } else if (deviceType.value.indexOf('gate') != -1) {
  808. const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
  809. window.open(newPage.href, '_blank');
  810. } else if (deviceType.value.indexOf('window') != -1) {
  811. const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
  812. window.open(newPage.href, '_blank');
  813. } else if (deviceType.value.indexOf('windrect') != -1) {
  814. const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
  815. window.open(newPage.href, '_blank');
  816. } else if (deviceType.value.indexOf('fanmain') != -1) {
  817. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
  818. window.open(newPage.href, '_blank');
  819. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
  820. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
  821. window.open(newPage.href, '_blank');
  822. } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
  823. const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
  824. window.open(newPage.href, '_blank');
  825. } else if (deviceType.value.indexOf('pulping') != -1) {
  826. const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  827. window.open(newPage.href, '_blank');
  828. } else if (deviceType.value.indexOf('pressurefan') != -1) {
  829. const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
  830. window.open(newPage.href, '_blank');
  831. } else if (deviceType.value.indexOf('chamber') != -1) {
  832. const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
  833. window.open(newPage.href, '_blank');
  834. } else if (deviceType.value.indexOf('safetymonitor') != -1) {
  835. const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
  836. window.open(newPage.href, '_blank');
  837. } else if (deviceType.value.indexOf('pump') != -1) {
  838. const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
  839. window.open(newPage.href, '_blank');
  840. } else if (systemType.value.indexOf('nitrogen') != -1) {
  841. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  842. window.open(newPage.href, '_blank');
  843. } else if (deviceType.value.indexOf('forcFan') != -1) {
  844. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  845. window.open(newPage.href, '_blank');
  846. } else if (deviceType.value.indexOf('pulping') != -1) {
  847. const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
  848. window.open(newPage.href, '_blank');
  849. } else {
  850. message.info('待开发。。。');
  851. }
  852. } else {
  853. if (systemType.value.indexOf('sys_dongshi') != -1) {
  854. const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
  855. window.open(newPage.href, '_blank');
  856. } else if (systemType.value.indexOf('sys_obfurage') != -1) {
  857. const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
  858. window.open(newPage.href, '_blank');
  859. } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
  860. const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
  861. window.open(newPage.href, '_blank');
  862. } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
  863. const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
  864. window.open(newPage.href, '_blank');
  865. } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
  866. const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
  867. window.open(newPage.href, '_blank');
  868. } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
  869. const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
  870. window.open(newPage.href, '_blank');
  871. } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
  872. const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
  873. window.open(newPage.href, '_blank');
  874. } else if (deviceType.value.indexOf('forcFan') != -1) {
  875. const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
  876. window.open(newPage.href, '_blank');
  877. } else if (deviceType.value.indexOf('pulping') != -1) {
  878. const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
  879. window.open(newPage.href, '_blank');
  880. } else {
  881. message.info('待开发。。。');
  882. }
  883. }
  884. }
  885. function exportXls() {
  886. handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
  887. }
  888. function toHome() {
  889. deviceList.value = [];
  890. if (timer) clearTimeout(timer);
  891. timer = undefined;
  892. deviceType.value = '';
  893. go(glob.homePath);
  894. }
  895. function toHide() {
  896. tableShow.value = !tableShow.value;
  897. document.getElementById('monitorBox').addEventListener('animationend', () => {
  898. if (!tableShow.value) {
  899. document.getElementById('monitorBox').style.height = '0px';
  900. } else {
  901. document.getElementById('monitorBox').style.height = '290px';
  902. }
  903. });
  904. }
  905. async function findTreeDataValue(obj) {
  906. const findDeviceType = (data: any[], obj, flag = true) => {
  907. return data.find((item: any) => {
  908. if (item.children.length > 0) {
  909. findDeviceType(item.children, obj);
  910. }
  911. debugger;
  912. if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
  913. debugger;
  914. if (item.type == obj.deviceid) {
  915. deviceType.value = 'sys';
  916. systemID.value = obj.deviceid;
  917. selectedKeys.value = [item.key];
  918. expandedKeys.value = [item.key];
  919. treeNodeTitle.value = item.title;
  920. }
  921. } else {
  922. if (!flag) {
  923. if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
  924. deviceType.value = item.type;
  925. selectedKeys.value = [item.key];
  926. expandedKeys.value = [item.key];
  927. treeNodeTitle.value = item.title;
  928. return true;
  929. }
  930. return false;
  931. } else {
  932. if (obj.deviceType && item.type == obj.deviceType) {
  933. deviceType.value = item.type;
  934. selectedKeys.value = [item.key];
  935. expandedKeys.value = [item.key];
  936. treeNodeTitle.value = item.title;
  937. return true;
  938. }
  939. return false;
  940. }
  941. }
  942. return false;
  943. });
  944. };
  945. const flag = findDeviceType(treeData.value, obj);
  946. if (!flag) {
  947. findDeviceType(treeData.value, obj, false);
  948. }
  949. // 无类型时
  950. if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
  951. const defaultData = treeData.value[0]['children'][0];
  952. if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
  953. selectedKeys.value = [defaultData.key as string];
  954. expandedKeys.value = [defaultData.key as string];
  955. treeNodeTitle.value = defaultData.title;
  956. }
  957. if (timer === undefined) {
  958. timer = null;
  959. await getDataSource();
  960. getMonitor(true);
  961. }
  962. }
  963. function monitorChange(index) {
  964. dataSource.value = [];
  965. deviceActive.value = deviceList.value[index].deviceType;
  966. if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
  967. if (activeKey.value == '1' && monitorTable.value) {
  968. monitorTable.value.setLoading(true);
  969. dataSource.value = deviceList.value[index].datalist;
  970. }
  971. if (activeKey.value == '2' && historyTable.value) {
  972. historyTable.value.setLoading(true);
  973. }
  974. if (activeKey.value == '3' && alarmHistoryTable.value) {
  975. alarmHistoryTable.value.setLoading(true);
  976. }
  977. if (activeKey.value == '4' && handlerHistoryTable.value) {
  978. handlerHistoryTable.value.setLoading(true);
  979. }
  980. }
  981. /**
  982. * 设置巷道设备定位图标的显示与隐藏
  983. */
  984. function setLocation() {
  985. let locationStr = '';
  986. locationList.value.forEach((item: any) => {
  987. if (item.Visible) {
  988. locationStr = locationStr ? locationStr + ',' + item.value : item.value;
  989. }
  990. });
  991. actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
  992. setTimeout(() => {
  993. message.success('设置成功');
  994. }, 600);
  995. }
  996. // function clearMonitor() {
  997. // clearTimeout(timer);
  998. // timer = undefined;
  999. // if (startMonitorTimer) {
  1000. // clearTimeout(startMonitorTimer);
  1001. // }
  1002. // dataSource.value = [];
  1003. // startMonitorTimer = setTimeout(() => {
  1004. // expandedKeys.value = keys;
  1005. // selectedKeys.value = keys;
  1006. // treeNodeTitle.value = e.node.title;
  1007. // activeKey.value = '1';
  1008. // timer = null;
  1009. // if (e.node.children?.length < 1) {
  1010. // getMonitor(true);
  1011. // }
  1012. // }, 1000);
  1013. // }show
  1014. watch(
  1015. () => props.pageData,
  1016. async (pageObj) => {
  1017. isRefresh.value = false;
  1018. if (!treeData.value || treeData.value?.length < 1) {
  1019. await getDeviceType();
  1020. }
  1021. nextTick(() => {
  1022. isRefresh.value = true;
  1023. debugger;
  1024. // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
  1025. // findTreeDataValue({ deviceid: systemID.value });
  1026. // } else {
  1027. // findTreeDataValue({ deviceType: pageObj.pageType });
  1028. // }
  1029. findTreeDataValue(pageObj);
  1030. });
  1031. },
  1032. { immediate: true }
  1033. );
  1034. onMounted(async () => {
  1035. const pageObj = props.pageData;
  1036. if (!pageObj) return;
  1037. if (pageObj && pageObj.pageType) {
  1038. if (pageObj.pageType.startsWith('sys_')) {
  1039. await getDeviceType(pageObj.pageType);
  1040. findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
  1041. } else {
  1042. await getDeviceType();
  1043. findTreeDataValue({ deviceType: pageObj.pageType });
  1044. }
  1045. } else {
  1046. await getDeviceType();
  1047. findTreeDataValue({ deviceid: pageObj.deviceid });
  1048. }
  1049. // 定位
  1050. const posShowData = pageObj.locationPlane;
  1051. if (posShowData) {
  1052. locationList.value = posShowData;
  1053. } else {
  1054. locationList.value = await devPosition({});
  1055. }
  1056. // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
  1057. });
  1058. onUnmounted(() => {
  1059. if (timer) {
  1060. clearTimeout(timer);
  1061. }
  1062. timer = undefined;
  1063. });
  1064. </script>
  1065. <style lang="less" scoped>
  1066. @import '/@/design/theme.less';
  1067. @import '/@/design/vent/modal.less';
  1068. @ventSpace: zxm;
  1069. @{theme-deepblue} {
  1070. .scene-box {
  1071. // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
  1072. // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
  1073. // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
  1074. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1075. // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
  1076. // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
  1077. // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
  1078. // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
  1079. // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
  1080. // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
  1081. // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
  1082. // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
  1083. // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
  1084. // --tree-node-select: #0963c1;
  1085. // --tree-node-hover: #0f376ccc;
  1086. // --location-bottom-bg: #21324855;
  1087. // --location-bottom-border: #aed1ff4d;
  1088. }
  1089. }
  1090. .scene-box {
  1091. --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
  1092. --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
  1093. --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
  1094. --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
  1095. --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
  1096. --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
  1097. --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
  1098. --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
  1099. --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
  1100. --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
  1101. --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
  1102. --image-tohome: url('/@/assets/images/vent/home/tohome.png');
  1103. --tree-node-select: #00b1c8;
  1104. --tree-node-hover: #00b1c855;
  1105. --location-bottom-bg: #00709955;
  1106. --location-bottom-border: #aef3ff4d;
  1107. }
  1108. .top-header {
  1109. position: fixed;
  1110. width: 100%;
  1111. height: 56px;
  1112. background: var(--image-modal-top);
  1113. text-align: center;
  1114. line-height: 56px;
  1115. font-size: 28px;
  1116. color: #ffffffdd;
  1117. font-weight: 600;
  1118. z-index: 1;
  1119. letter-spacing: 2px;
  1120. font-size: 30px;
  1121. }
  1122. .select-node {
  1123. position: fixed;
  1124. top: 100px;
  1125. left: 10px;
  1126. color: var(--vent-font-color);
  1127. display: flex;
  1128. justify-content: center;
  1129. font-size: 22px;
  1130. .title {
  1131. margin-left: 10px;
  1132. }
  1133. }
  1134. .expansion-icon {
  1135. background: var(--image-tree-icon-bg) no-repeat;
  1136. background-size: contain;
  1137. position: absolute;
  1138. left: 190px;
  1139. top: 25px;
  1140. &:hover {
  1141. background: var(--image-tree-icon-hover-bg) no-repeat;
  1142. background-size: contain;
  1143. }
  1144. }
  1145. .device-select {
  1146. width: 250px;
  1147. height: 500px;
  1148. background: var(--image-tree-bg) no-repeat;
  1149. position: fixed;
  1150. top: 100px;
  1151. left: 10px;
  1152. background-size: contain;
  1153. pointer-events: auto;
  1154. padding: 20px 10px 30px 10px;
  1155. }
  1156. .is-expansion-icon {
  1157. padding: 5px;
  1158. pointer-events: auto;
  1159. z-index: 999;
  1160. }
  1161. .device-select-show {
  1162. left: 10px;
  1163. animation-name: treeShow;
  1164. /* 持续时间 */
  1165. animation-duration: 1s;
  1166. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1167. }
  1168. .device-select-hide {
  1169. left: -250px;
  1170. animation-name: treeHide;
  1171. /* 持续时间 */
  1172. animation-duration: 1s;
  1173. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1174. }
  1175. .node-select-show {
  1176. width: 276px;
  1177. height: 44px;
  1178. background: var(--image-tree-expansion-bg) no-repeat;
  1179. left: 10px;
  1180. animation-name: treeShow;
  1181. /* 持续时间 */
  1182. animation-duration: 1s;
  1183. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1184. display: flex;
  1185. align-items: center;
  1186. margin-left: 0;
  1187. justify-content: flex-start;
  1188. pointer-events: auto;
  1189. &:hover {
  1190. background: var(--image-tree-expansion-hover-bg) no-repeat;
  1191. }
  1192. .put-away-icon {
  1193. position: relative;
  1194. display: inline-block;
  1195. left: 4px;
  1196. }
  1197. }
  1198. .node-select-hide {
  1199. left: -400px;
  1200. animation-name: treeHide;
  1201. /* 持续时间 */
  1202. animation-duration: 1s;
  1203. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1204. }
  1205. .device-select-box {
  1206. width: 208px;
  1207. height: 450px;
  1208. overflow-y: auto;
  1209. color: var(--vent-font-color);
  1210. :deep(.zxm-tree) {
  1211. background: transparent !important;
  1212. color: var(--vent-font-color) !important;
  1213. .zxm-tree-switcher {
  1214. background: transparent !important;
  1215. }
  1216. .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
  1217. background-color: var(--tree-node-select);
  1218. }
  1219. .zxm-tree-node-content-wrapper:hover {
  1220. background-color: var(--tree-node-hover);
  1221. }
  1222. input {
  1223. height: 0px !important;
  1224. }
  1225. }
  1226. &::-webkit-scrollbar-track {
  1227. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1228. border-radius: 10px;
  1229. background: #ededed22;
  1230. height: 100px;
  1231. }
  1232. &::-webkit-scrollbar-thumb {
  1233. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  1234. background: #4288a444;
  1235. }
  1236. }
  1237. .location-icon {
  1238. width: 46px;
  1239. height: 178px;
  1240. position: absolute;
  1241. top: 100px;
  1242. background: var(--image-location-bg) no-repeat;
  1243. background-size: contain;
  1244. writing-mode: vertical-lr;
  1245. line-height: 46px;
  1246. color: var(--vent-font-color);
  1247. padding-top: 10px;
  1248. pointer-events: auto;
  1249. cursor: pointer;
  1250. &:hover {
  1251. background: var(--image-location-hover-bg) no-repeat;
  1252. }
  1253. .location-text {
  1254. padding-top: 20px;
  1255. letter-spacing: 3px;
  1256. font-size: 16px;
  1257. }
  1258. }
  1259. .location-select {
  1260. position: fixed;
  1261. top: 100px;
  1262. pointer-events: auto;
  1263. .location-select-box {
  1264. width: 100%;
  1265. height: 100%;
  1266. position: relative;
  1267. &::before {
  1268. content: '';
  1269. position: absolute;
  1270. width: 230px;
  1271. height: 500px;
  1272. top: 0;
  1273. left: 0;
  1274. background: var(--image-tree-bg) no-repeat;
  1275. background-size: contain;
  1276. transform: rotateY(180deg);
  1277. z-index: -1;
  1278. }
  1279. .location-top-title {
  1280. color: var(--vent-font-color);
  1281. position: absolute;
  1282. width: 225px;
  1283. height: 68px;
  1284. background: var(--image-turn-location-top-bg) no-repeat;
  1285. background-size: contain;
  1286. top: 5px;
  1287. left: 5px;
  1288. display: flex;
  1289. flex-direction: row;
  1290. justify-content: space-between;
  1291. align-items: flex-end;
  1292. .title {
  1293. font-size: 18px;
  1294. position: relative;
  1295. top: -14px;
  1296. right: 15px;
  1297. }
  1298. }
  1299. .location-expansion-icon {
  1300. background: var(--image-tree-icon-cover-bg) no-repeat;
  1301. background-size: contain;
  1302. position: relative;
  1303. left: 10px;
  1304. top: -15px;
  1305. padding: 5px;
  1306. &:hover {
  1307. background: var(--image-tree-icon-cover-hover-bg) no-repeat;
  1308. background-size: contain;
  1309. }
  1310. }
  1311. }
  1312. .location-container {
  1313. width: 200px;
  1314. height: 390px;
  1315. position: absolute;
  1316. display: flex;
  1317. flex-direction: column;
  1318. top: 80px;
  1319. left: 18px;
  1320. overflow-y: auto;
  1321. .location-item {
  1322. color: var(--vent-font-color);
  1323. line-height: 30px;
  1324. display: flex;
  1325. justify-content: space-between;
  1326. // background-image: var(--vent-gas-list-item-bg-img);
  1327. background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
  1328. margin: 3px 0;
  1329. .item-title {
  1330. width: 80px;
  1331. text-align: right;
  1332. color: var(--vent-table-action-link);
  1333. }
  1334. }
  1335. .location-bottom-btn {
  1336. width: 100%;
  1337. color: var(--vent-font-color);
  1338. display: flex;
  1339. justify-content: flex-end;
  1340. margin-top: 20px;
  1341. span {
  1342. display: inline-block;
  1343. width: 100%;
  1344. background: var(--location-bottom-bg);
  1345. border-radius: 3px;
  1346. border: 1px solid var(--location-bottom-border);
  1347. text-align: center;
  1348. padding: 2px 0;
  1349. cursor: pointer;
  1350. &:hover {
  1351. background: #00557422;
  1352. }
  1353. }
  1354. }
  1355. }
  1356. }
  1357. .location-select-show {
  1358. right: 240px;
  1359. animation-name: locationShow;
  1360. /* 持续时间 */
  1361. animation-duration: 1s;
  1362. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1363. }
  1364. .location-select-hide {
  1365. right: -2px;
  1366. animation-name: locationHide;
  1367. /* 持续时间 */
  1368. animation-duration: 1s;
  1369. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1370. }
  1371. .location-btn-show {
  1372. right: -0px;
  1373. animation-name: locationBtnShow;
  1374. /* 持续时间 */
  1375. animation-duration: 1s;
  1376. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1377. }
  1378. .location-btn-hide {
  1379. right: -240px;
  1380. animation-name: locationBtnHide;
  1381. /* 持续时间 */
  1382. animation-duration: 1s;
  1383. transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
  1384. }
  1385. .tabs-box {
  1386. height: 290px;
  1387. }
  1388. .bottom-tabs-box {
  1389. position: relative;
  1390. .tabs-box {
  1391. width: calc(100% - 12px) !important;
  1392. bottom: 3px !important;
  1393. background-color: red;
  1394. }
  1395. .to-small {
  1396. position: absolute;
  1397. top: -65px;
  1398. right: 36px;
  1399. display: flex;
  1400. align-items: center;
  1401. justify-content: center;
  1402. .to-home {
  1403. width: 60px;
  1404. height: 60px;
  1405. background: var(--image-tohome) no-repeat center;
  1406. background-size: auto;
  1407. padding: 8px;
  1408. &:hover {
  1409. background-color: rgba(79, 104, 134, 0.418);
  1410. }
  1411. }
  1412. .table-show-icon {
  1413. width: 30px;
  1414. height: 30px;
  1415. font-size: 30px;
  1416. color: var(--vent-font-color);
  1417. margin-left: 10px;
  1418. }
  1419. }
  1420. .device-button-group {
  1421. position: absolute;
  1422. top: -30px;
  1423. display: flex;
  1424. width: 100%;
  1425. .device-button {
  1426. height: 26px;
  1427. padding: 0 20px;
  1428. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  1429. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1430. display: flex;
  1431. justify-content: center;
  1432. align-items: center;
  1433. color: var(--vent-font-color);
  1434. position: relative;
  1435. cursor: pointer;
  1436. &:nth-child(1) {
  1437. left: calc(-6px * 1);
  1438. }
  1439. &:nth-child(2) {
  1440. left: calc(-6px * 2);
  1441. }
  1442. &:nth-child(3) {
  1443. left: calc(-6px * 3);
  1444. }
  1445. &:nth-child(4) {
  1446. left: calc(-6px * 4);
  1447. }
  1448. &:nth-child(5) {
  1449. left: calc(-6px * 5);
  1450. }
  1451. &:nth-child(6) {
  1452. left: calc(-6px * 6);
  1453. }
  1454. &:nth-child(7) {
  1455. left: calc(-6px * 7);
  1456. }
  1457. &:nth-child(8) {
  1458. left: calc(-6px * 8);
  1459. }
  1460. &:nth-child(9) {
  1461. left: calc(-6px * 9);
  1462. }
  1463. &:nth-child(10) {
  1464. left: calc(-6px * 10);
  1465. }
  1466. &:nth-child(11) {
  1467. left: calc(-6px * 11);
  1468. }
  1469. &:nth-child(12) {
  1470. left: calc(-6px * 12);
  1471. }
  1472. &:nth-child(13) {
  1473. left: calc(-6px * 13);
  1474. }
  1475. &:nth-child(14) {
  1476. left: calc(-6px * 14);
  1477. }
  1478. &:nth-child(15) {
  1479. left: calc(-6px * 15);
  1480. }
  1481. &:nth-child(16) {
  1482. left: calc(-6px * 16);
  1483. }
  1484. &:nth-child(17) {
  1485. left: calc(-6px * 17);
  1486. }
  1487. &:nth-child(18) {
  1488. left: calc(-6px * 18);
  1489. }
  1490. &:nth-child(19) {
  1491. left: calc(-6px * 19);
  1492. }
  1493. &:first-child {
  1494. clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  1495. }
  1496. }
  1497. .device-active {
  1498. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  1499. &::before {
  1500. border-color: #0efcff;
  1501. box-shadow: 1px 1px 3px 1px #0efcff inset;
  1502. }
  1503. }
  1504. }
  1505. .table-hide-icon {
  1506. color: var(--vent-font-color);
  1507. cursor: pointer;
  1508. position: absolute;
  1509. right: 20px;
  1510. top: 10px;
  1511. z-index: 9999;
  1512. }
  1513. .enter-detail {
  1514. color: var(--vent-font-color);
  1515. cursor: pointer;
  1516. position: absolute;
  1517. right: 35px;
  1518. top: 35px;
  1519. padding: 5px;
  1520. border-radius: 5px;
  1521. margin-left: 8px;
  1522. margin-right: 8px;
  1523. width: auto;
  1524. height: 33px !important;
  1525. display: flex;
  1526. align-items: center;
  1527. justify-content: center;
  1528. color: var(--vent-font-color);
  1529. padding: 5px 15px 5px 15px;
  1530. z-index: 999;
  1531. cursor: pointer;
  1532. &:hover {
  1533. background: var(--vent-device-manager-control-btn-hover);
  1534. }
  1535. &::before {
  1536. width: calc(100% - 6px);
  1537. height: 27px;
  1538. content: '';
  1539. position: absolute;
  1540. top: 3px;
  1541. right: 0;
  1542. left: 3px;
  1543. bottom: 0;
  1544. z-index: -1;
  1545. border-radius: inherit;
  1546. /*important*/
  1547. background: var(--vent-device-manager-control-btn);
  1548. }
  1549. }
  1550. }
  1551. .table-hide {
  1552. height: 0px;
  1553. animation-name: tableHide;
  1554. /* 持续时间 */
  1555. animation-duration: 1s;
  1556. transition: all 1s;
  1557. }
  1558. .table-show {
  1559. height: 290px;
  1560. animation-name: tableShow;
  1561. /* 持续时间 */
  1562. animation-duration: 1s;
  1563. transition: all 1s;
  1564. }
  1565. .location-form {
  1566. display: flex;
  1567. margin: 8px;
  1568. .location-form-item {
  1569. width: 400px;
  1570. .location-form-label {
  1571. width: 100px;
  1572. display: inline-block;
  1573. color: var(--vent-font-color);
  1574. }
  1575. input {
  1576. background: transparent !important;
  1577. color: var(--vent-font-color);
  1578. border: 1px solid var(--vent-form-item-border) !important;
  1579. }
  1580. }
  1581. .zxm-select-selector {
  1582. width: 200px !important;
  1583. }
  1584. }
  1585. @keyframes tableShow {
  1586. 0% {
  1587. height: 0px;
  1588. opacity: 0;
  1589. }
  1590. 100% {
  1591. height: 290px;
  1592. opacity: 1;
  1593. }
  1594. }
  1595. @keyframes tableHide {
  1596. 0% {
  1597. opacity: 1;
  1598. }
  1599. 100% {
  1600. height: 0px;
  1601. opacity: 0;
  1602. }
  1603. }
  1604. @keyframes treeShow {
  1605. 0% {
  1606. left: -400px;
  1607. opacity: 0;
  1608. }
  1609. 100% {
  1610. left: 10px;
  1611. opacity: 1;
  1612. }
  1613. }
  1614. @keyframes treeHide {
  1615. 0% {
  1616. left: 10px;
  1617. opacity: 1;
  1618. }
  1619. 100% {
  1620. left: -400px;
  1621. opacity: 0;
  1622. }
  1623. }
  1624. @keyframes locationShow {
  1625. 0% {
  1626. right: 0px;
  1627. opacity: 0;
  1628. }
  1629. 100% {
  1630. right: 240px;
  1631. opacity: 1;
  1632. }
  1633. }
  1634. @keyframes locationHide {
  1635. 0% {
  1636. right: 240px;
  1637. opacity: 1;
  1638. }
  1639. 100% {
  1640. right: 0;
  1641. opacity: 0;
  1642. }
  1643. }
  1644. @keyframes locationBtnShow {
  1645. 0% {
  1646. right: -240px;
  1647. opacity: 0;
  1648. }
  1649. 100% {
  1650. right: -2px;
  1651. opacity: 1;
  1652. }
  1653. }
  1654. @keyframes locationBtnHide {
  1655. 0% {
  1656. right: -2px;
  1657. opacity: 1;
  1658. }
  1659. 100% {
  1660. right: -240px;
  1661. opacity: 0;
  1662. }
  1663. }
  1664. :deep(.@{ventSpace}-tabs-tabpane-active) {
  1665. // overflow: auto;
  1666. height: 100%;
  1667. }
  1668. :deep(.zxm-select-dropdown) {
  1669. left: 0 !important;
  1670. color: #000000 !important;
  1671. }
  1672. :deep(.zxm-select-selector) {
  1673. height: 34px !important;
  1674. line-height: 34px !important;
  1675. }
  1676. :deep(.zxm-input) {
  1677. height: 32px !important;
  1678. line-height: 32px !important;
  1679. .zxm-select-selection-item {
  1680. line-height: 32px !important;
  1681. }
  1682. }
  1683. // :deep(.@{ventSpace}-pagination){
  1684. // margin-right: 20px !important;
  1685. // margin-top: 5px !important;
  1686. // display: flex;
  1687. // align-items: center;
  1688. // }</style>