1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891 |
- <template>
- <div class="scene-box">
- <!-- <div class="top-header">智能通风管理系统</div> -->
- <div class="select-node" :class="{ 'node-select-show': !treeShow, 'node-select-hide': treeShow }" @click="showTree('treeShow', true)">
- <SvgIcon class="is-expansion-icon put-away-icon" size="38" name="expansion" />
- <span class="title">{{ treeNodeTitle }}</span>
- </div>
- <div class="device-select" :class="{ 'device-select-show': treeShow, 'device-select-hide': !treeShow }">
- <SvgIcon class="is-expansion-icon expansion-icon" size="28" name="put-away" @click="showTree('treeShow', false)" />
- <div class="device-select-box">
- <a-tree
- :show-line="true"
- :tree-data="treeData"
- v-model:selectedKeys="selectedKeys"
- :autoExpandParent="true"
- v-model:expandedKeys="expandedKeys"
- @select="onSelect"
- >
- </a-tree>
- </div>
- </div>
- <div
- class="location-icon"
- :class="{ 'location-btn-show': !locationSettingShow, 'location-btn-hide': locationSettingShow }"
- @click="showTree('location', true)"
- >
- <SvgIcon size="18" name="put-away" />
- <span class="location-text">定位图标显示</span>
- </div>
- <div class="location-select" :class="{ 'location-select-show': locationSettingShow, 'location-select-hide': !locationSettingShow }">
- <div class="location-select-box">
- <div class="location-top-title" @click="showTree('location', false)">
- <SvgIcon class="is-expansion-icon location-expansion-icon" size="28" name="expansion" />
- <div class="title">定位图标显示</div>
- </div>
- <div class="location-container">
- <template v-for="location in locationList" :key="location.deviceType">
- <div class="location-item">
- <div class="item-title">{{ location.title }} :</div>
- <div>
- <a-radio-group v-model:value="location.Visible" :name="location.deviceType">
- <a-radio :value="1">是</a-radio>
- <a-radio :value="0">否</a-radio>
- </a-radio-group>
- </div>
- </div>
- </template>
- <div class="location-bottom-btn">
- <span @click="setLocation">提交</span>
- </div>
- </div>
- </div>
- </div>
- <div
- class="tabs-box bottom-tabs-box"
- :class="{ 'table-hide': !tableShow, 'table-show': tableShow }"
- style="height: 290px"
- @mousedown="setDivHeight($event, 230, scroll, 0)"
- id="monitorBox"
- >
- <div :style="`padding: 5px; height: ${scroll.y + 100}px`">
- <div class="to-small">
- <div class="to-home" @click="toHome"></div>
- <FullscreenOutlined v-if="!tableShow" class="table-show-icon" @click="toHide" />
- </div>
- <div class="device-button-group" v-if="deviceList.length > 0">
- <!-- 关联设备 -->
- <div
- class="device-button"
- :class="{ 'device-active': deviceActive == device.deviceType }"
- v-for="(device, index) in deviceList"
- :key="index"
- @click="monitorChange(index)"
- >{{ device.deviceName }}
- </div>
- <!-- 场景详情进入 -->
- <div v-if="haveSysDetailArr.find((item) => deviceType.startsWith(item))" class="enter-detail" @click.stop="goDetail()">
- <send-outlined />
- {{ treeNodeTitle }}详情
- </div>
- </div>
- <div v-if="deviceType == 'gaspatrol'">
- <div class="device-button-group">
- <div class="enter-detail" @click="exportXls()">
- <send-outlined />
- 导出
- </div>
- </div>
- </div>
- <div class="table-hide-icon" @click="toHide">
- <FullscreenExitOutlined style="font-size: 18px" />
- </div>
- <!-- 是人员定位表单代码,由于放在tab中,表格对已知刷新,导致表单数据也在刷寻,造成输入一半的中文时会清空输入框的内容,导致的输入不上数据 -->
- <div v-if="deviceType.startsWith('location') && activeKey == '1'" class="location-form" style="position: absolute; z-index: 9999; top: 50px">
- <div class="location-form-item">
- <span class="location-form-label">人员名称:</span>
- <Input style="width: 200px" v-model:value="locationForm.strname" />
- </div>
- <div class="location-form-item">
- <span class="location-form-label">所属部门:</span>
- <MTreeSelect
- style="width: 200px"
- v-model:value="locationForm.department"
- placeholder="请选择所属部门"
- api="/monitor/getDepartmentInfo"
- :virtual="false"
- :isGetPopupContainer="false"
- />
- </div>
- <div class="location-form-item">
- <span class="location-form-label">分站名称:</span>
- <Input style="width: 200px" v-model:value="locationForm.stationname" />
- </div>
- </div>
- <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox">
- <a-tab-pane key="1" tab="实时监测">
- <template v-if="(deviceType.startsWith('fanlocal') || deviceType.startsWith('fanmain')) && activeKey == '1'">
- <GroupMonitorTable
- ref="MonitorDataTable"
- :dataSource="dataSource"
- :columnsType="`${deviceType}_monitor`"
- :scroll="scroll"
- :isAction="true"
- :isShowSelect="false"
- >
- <template #action="{ record }">
- <TableAction
- :actions="
- haveDetailArr.find((item) => deviceType.startsWith(item))
- ? [
- {
- label: '详情',
- onClick: goDetail.bind(null, record),
- },
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]
- : [
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]
- "
- />
- </template>
- </GroupMonitorTable>
- </template>
- <template v-else-if="deviceType == 'majorpath' && activeKey == '1'">
- <a-table :columns="majorColumns" :data-source="dataSource" bordered :scroll="{ y: scroll.y - 30 }" :pagination="false"></a-table>
- </template>
- <template v-else-if="deviceType.startsWith('safetymonitor') && activeKey == '1'">
- <MonitorTable
- ref="monitorTable"
- :columnsType="`${deviceType}_monitor`"
- :deviceType="deviceType"
- :dataSource="dataSource"
- design-scope="device_monitor"
- :isShowActionColumn="true"
- :isShowSelect="false"
- title="设备监测"
- :form-config="formConfig"
- :scroll="{ y: scroll.y - 110 }"
- >
- <template #action="{ record }">
- <TableAction
- :actions="
- haveDetailArr.find((item) => deviceType.startsWith(item))
- ? [
- {
- label: '详情',
- onClick: goDetail.bind(null, record),
- },
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]
- : [
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]
- "
- />
- </template>
- <template #filterCell="{ column, record }">
- <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
- <div v-if="!record.V && column.dataIndex === 'V'">-</div>
- <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
- <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
- <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
- <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
- <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
- record.netStatus == '0' ? '断开' : '连接'
- }}</a-tag>
- </template>
- </MonitorTable>
- </template>
- <template v-else-if="deviceType.startsWith('location') && activeKey == '1'">
- <MonitorTable
- ref="monitorTable"
- :columnsType="`${deviceType}_monitor`"
- :deviceType="deviceType"
- :dataSource="dataSource"
- design-scope="device_monitor"
- :isShowActionColumn="true"
- :isShowSelect="false"
- title="设备监测"
- :scroll="{ y: scroll.y - 110 }"
- style="margin-top: 60px"
- >
- <template #action="{ record }">
- <TableAction
- :actions="[
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]"
- />
- </template>
- </MonitorTable>
- </template>
- <template v-else-if="deviceType.startsWith('vehicle') && activeKey == '1'">
- <MonitorTable
- ref="monitorTable"
- :columnsType="`${deviceType}_monitor`"
- :deviceType="deviceType"
- :dataSource="dataSource"
- design-scope="device_monitor"
- :isShowActionColumn="true"
- :isShowSelect="false"
- title="设备监测"
- :form-config="vehicleFormConfig"
- :scroll="{ y: scroll.y - 110 }"
- >
- <template #action="{ record }">
- <TableAction
- :actions="[
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]"
- />
- </template>
- </MonitorTable>
- </template>
- <template v-else>
- <!-- 工作面echarts图标 -->
- <BarAndLine
- v-if="activeKey == '1' && deviceType == 'surface_history'"
- class="echarts-line"
- xAxisPropType="time"
- :dataSource="surfaceEchartsData"
- height="300px"
- :chartsColumns="surfaceChartsColumns"
- :option="echatsOption"
- />
- <MonitorTable
- v-else-if="activeKey == '1'"
- ref="monitorTable"
- :columnsType="`${deviceType}_monitor`"
- :dataSource="dataSource"
- design-scope="device_monitor"
- :isShowActionColumn="true"
- :isShowSelect="false"
- title="设备监测"
- :scroll="{ y: scroll.y - 30 }"
- >
- <template #action="{ record }">
- <TableAction
- :actions="
- haveDetailArr.find((item) => deviceType.startsWith(item))
- ? [
- {
- label: '详情',
- onClick: goDetail.bind(null, record),
- },
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]
- : [
- {
- label: '定位',
- onClick: goLocation.bind(null, record),
- },
- ]
- "
- />
- </template>
- <template #filterCell="{ column, record }">
- <template v-if="deviceType.startsWith('gate') || deviceType.startsWith('door')">
- <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == '0'" color="red"
- >正在运行</a-tag
- >
- <a-tag
- v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == 1"
- color="default"
- >关闭</a-tag
- >
- <a-tag
- v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '0'"
- color="#46C66F"
- >打开</a-tag
- >
- <a-tag
- v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '1' && record.frontGateClose == '1'"
- color="#FF0000"
- >点位异常</a-tag
- >
- <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '0'" color="red"
- >正在运行</a-tag
- >
- <a-tag
- v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '0' && record.rearGateClose == '1'"
- color="default"
- >关闭</a-tag
- >
- <a-tag
- v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '0'"
- color="#46C66F"
- >打开</a-tag
- >
- <a-tag
- v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == '1' && record.rearGateClose == '1'"
- color="#FF0000"
- >点位异常</a-tag
- >
- <a-tag v-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == '0'" color="red"
- >正在运行</a-tag
- >
- <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '0' && record.midGateClose == 1" color="default"
- >关闭</a-tag
- >
- <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '0'" color="#46C66F"
- >打开</a-tag
- >
- <a-tag v-else-if="column.dataIndex === 'midGateOpen' && record.midGateOpen == '1' && record.midGateClose == '1'" color="#FF0000"
- >点位异常</a-tag
- >
- <template v-if="column.dataIndex === 'doorUse'">
- <span v-if="record.doorUse == 1" color="default">行车风门</span>
- <span v-else-if="record.doorUse == 2">行人风门</span>
- <span v-else-if="record.doorUse == 3">短路风门</span>
- </template>
- </template>
- <template v-else-if="deviceType.startsWith('windrect')">
- <a-tag v-if="column.dataIndex === 'sign'" :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
- {{ record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag
- >
- <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
- <a-tag v-if="record.isRun == -2 || record.isRun == -1" :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
- record.isRun == -2 ? '空闲' : '等待'
- }}</a-tag>
- <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
- <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
- </template>
- </template>
- <template v-else-if="deviceType.startsWith('safetymonitor')">
- <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
- <div v-if="!record.V && column.dataIndex === 'V'">-</div>
- <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
- <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
- <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
- <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
- </template>
- <template v-else-if="deviceType.startsWith('atomizing')">
- <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '1'" color="green">连接</a-tag>
- <a-tag v-if="column.dataIndex === 'stateConn' && record.stateConn == '0'" color="red">断开</a-tag>
- </template>
- <template v-else-if="deviceType.startsWith('gaspatrol')">
- <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('正常')" color="green">{{
- record.deviceConnect_str
- }}</a-tag>
- <a-tag v-if="column.dataIndex === 'deviceConnect_str' && record.deviceConnect_str.endsWith('断开')" color="red">{{
- record.deviceConnect_str
- }}</a-tag>
- </template>
- <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
- {{ record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
- >
- <template v-else-if="column.dataIndex === 'warnLevel'">
- <a-tag v-if="record.warnLevel == '101'" color="green">低风险</a-tag>
- <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">一般风险</a-tag>
- <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">较大风险</a-tag>
- <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">重大风险</a-tag>
- <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
- <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
- <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
- <a-tag v-else color="green">正常</a-tag>
- </template>
- <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
- record.netStatus == '0' ? '断开' : '连接'
- }}</a-tag>
- </template>
- </MonitorTable>
- </template>
- </a-tab-pane>
- <a-tab-pane key="2" tab="历史数据" v-if="!noHistoryArr().find((item) => deviceType.startsWith(item))">
- <div class="tab-item" v-if="activeKey == '2'">
- <template v-if="deviceType.startsWith('firemon_normal')">
- <HistoryBall :dataSource="dataSource"></HistoryBall>
- </template>
- <template v-else>
- <HistoryTable
- ref="historyTable"
- :sysId="systemID"
- :columns-type="`${deviceType}`"
- :device-type="deviceType"
- designScope="device-history"
- :scroll="scroll"
- />
- </template>
- </div>
- </a-tab-pane>
- <a-tab-pane key="3" tab="报警历史" v-if="!noWarningArr.find((item) => deviceType.startsWith(item))">
- <div class="tab-item">
- <AlarmHistoryTable
- ref="alarmHistoryTable"
- v-if="activeKey == '3'"
- :sysId="systemID"
- columns-type="alarm"
- :device-type="deviceType"
- :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID, pageSize: 10000 })"
- :scroll="scroll"
- designScope="alarm-history"
- />
- </div>
- </a-tab-pane>
- <a-tab-pane key="4" tab="操作历史" v-if="haveHandlerArr.find((item) => deviceType.startsWith(item))">
- <div class="tab-item">
- <HandlerHistoryTable
- ref="handlerHistoryTable"
- v-if="activeKey == '4'"
- :sysId="systemID"
- columns-type="operator_history"
- :device-type="deviceType"
- :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
- :scroll="scroll"
- designScope="operator-history"
- />
- </div>
- </a-tab-pane>
- </a-tabs>
- </div>
- </div>
- <mainPath
- v-if="deviceType == 'majorpath'"
- :dataSource="majorPathEchartsData"
- style="width: 300px; height: 300px; position: absolute; left: 250px; top: 40px"
- />
- <component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource" :activeID="activeID" />
- </div>
- </template>
- <script setup lang="ts">
- import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch } from 'vue';
- import { SendOutlined, FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
- import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo, getExportUrl } from './device.api';
- import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
- import HistoryTable from '../../../comment/HistoryTable.vue';
- import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
- import MonitorTable from '../../../comment/MonitorTable.vue';
- import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
- import HistoryBall from './modal/history-ball.vue';
- import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
- import { TableAction } from '/@/components/Table';
- import { SvgIcon } from '/@/components/Icon';
- import { getActions } from '/@/qiankun/state';
- import { useRouter } from 'vue-router';
- import { setDivHeight } from '/@/utils/event';
- import {
- majorColumns,
- haveSysDetailArr,
- haveDetailArr,
- haveHandlerArr,
- noWarningArr,
- surfaceChartsColumns,
- noHistoryArr,
- getMonitorComponent,
- vehicleFormConfig,
- } from './device.data';
- import mainPath from './modal/mainPath.vue';
- import { formConfig } from '../../../safetyMonitor/safety.data';
- import { getDictItemsByCode } from '/@/utils/dict';
- import BarAndLine from '/@/components/chart/BarAndLine.vue';
- import MTreeSelect from '/@/components/Form/src/jeecg/components/MTreeSelect.vue';
- // import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
- import { nextTick } from 'vue';
- import { useMethods } from '/@/hooks/system/useMethods';
- import { useGo } from '/@/hooks/web/usePage';
- import { useGlobSetting } from '/@/hooks/setting';
- const glob = useGlobSetting();
- // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
- const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal } = getMonitorComponent();
- type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
- const props = defineProps({
- pageData: {
- type: Object,
- default: () => {},
- },
- });
- const { handleExportXls } = useMethods();
- const go = useGo();
- const echatsOption = {
- grid: {
- top: '35',
- left: '30',
- right: '45',
- bottom: '25',
- containLabel: true,
- },
- toolbox: {
- feature: {},
- },
- };
- const router = useRouter();
- const actions = getActions();
- // actions.setGlobalState({ pageObj: { pageType: 'home' } });
- const locationForm = reactive({
- strname: '',
- department: '',
- stationname: '',
- });
- const safetymonitorForm = reactive({
- dataTypeName: '',
- strinstallpos: '',
- });
- const monitorTable = ref();
- const historyTable = ref();
- const alarmHistoryTable = ref();
- const handlerHistoryTable = ref();
- // const routerParam = ref('home') // 默认进来时首页
- const isRefresh = ref(true);
- // 模态框
- const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
- const modalVisible = ref<Boolean>(false); // 模态框是否可见
- // const drawerHeight = ref(240) // 监测框最小高度
- const treeShow = ref(true); //是否显示树形菜单
- const tableShow = ref(true); //是否显示树形菜单
- const locationSettingShow = ref(false); //是否显示树形菜单
- const treeNodeTitle = ref(''); // 选中的树形标题
- const locationList = ref([]); //巷道定位图标显示列表
- const deviceList = ref<DeviceType[]>([]); //关联设备列表
- const deviceActive = ref('');
- const activeKey = ref('1'); // tab key
- const dataSource = shallowRef([]); // 实时监测数据
- const majorPathEchartsData = ref({}); // 关键路线echarts数据
- const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
- const activeID = ref(''); // 打开详情modal时监测的设备id
- const deviceType = ref(''); // 监测设备类型
- const systemType = ref('');
- const systemID = ref(''); // 系统监测时,系统id
- const selectedKeys = ref<string[]>([]);
- const expandedKeys = ref<string[]>([]);
- const scroll = reactive({
- y: 180,
- });
- const treeData = ref<TreeProps['treeData']>([]);
- let departmentInfo: Null | Object = null;
- let startMonitorTimer = 0;
- //树形菜单选择事件
- const onSelect: TreeProps['onSelect'] = (keys, e) => {
- deviceType.value = '';
- systemID.value = '';
- deviceList.value = [];
- const title = e.node.title; // 在
- if (e.node.parent && e.node.parent.node.type.toString().startsWith('sys')) {
- systemType.value = e.node.parent.node.type;
- if (deviceType.value != e.node.parent.node.type) deviceType.value = e.node.parent.node.type;
- systemID.value = e.node.type;
- // 传递工作面id信息,用于定位
- go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=${systemID.value}`);
- } else {
- systemType.value = e.node.type;
- if (deviceType.value != e.node.type) deviceType.value = e.node.type;
- go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=`);
- }
- // clearTimeout(timer);
- // timer = undefined;
- // if (startMonitorTimer) {
- // clearTimeout(startMonitorTimer);
- // }
- dataSource.value = [];
- if (!startMonitorTimer) {
- startMonitorTimer = setTimeout(() => {
- expandedKeys.value = keys;
- selectedKeys.value = keys;
- treeNodeTitle.value = e.node.title;
- // if (e.node.children?.length < 1 && timer) {
- // getMonitor(true);
- // }
- }, 1000);
- }
- // activeKey.value = '1';
- };
- function tabChange(activeKeyVal) {
- activeKey.value = activeKeyVal;
- }
- function showTree(flag, value) {
- if (flag == 'treeShow') treeShow.value = value;
- if (flag == 'location') locationSettingShow.value = value;
- }
- async function getDeviceType(sysType?) {
- if (treeData.value?.length > 0) return;
- const result = await getDeviceTypeList({});
- if (result.length > 0) {
- debugger;
- const dataSource = <TreeProps['treeData']>[];
- let key = '0';
- const getData = (resultList, dataSourceList, keyVal) => {
- resultList.forEach((item, index) => {
- if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
- const children = getData(item.children, [], `${keyVal}-${index}`);
- // 判断关键阻力路线
- if (item.itemValue.startsWith(sysType) && children[0]) {
- systemID.value = item.children[0]['itemValue'];
- }
- dataSourceList.push({
- children: children,
- title: item.itemText,
- key: `${keyVal}-${index}`,
- type: item.itemValue,
- parentKey: `${keyVal}`,
- });
- } else {
- dataSourceList.push({
- children: [],
- title: item.itemText,
- key: `${keyVal}-${index}`,
- type: item.itemValue,
- parentKey: `${keyVal}`,
- });
- }
- });
- return dataSourceList;
- };
- treeData.value = getData(result, dataSource, key);
- }
- }
- // https获取监测数据
- let timer: null | NodeJS.Timeout = undefined;
- function getMonitor(flag?) {
- if (deviceType.value) {
- if (timer) timer = null;
- if (Object.prototype.toString.call(timer) === '[object Null]') {
- timer = setTimeout(
- async () => {
- await getDataSource();
- if (timer) {
- getMonitor();
- }
- },
- flag ? 0 : 1000
- );
- }
- }
- }
- async function getDataSource() {
- if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
- const res = await list({ devicetype: 'sys', systemID: systemID.value });
- const result = res.msgTxt;
- const deviceArr = <DeviceType[]>[];
- result.forEach((item) => {
- const data = item['datalist'].filter((data: any) => {
- const readData = data.readData;
- return Object.assign(data, readData);
- });
- if (item.type != 'sys') {
- if (item.type === 'majorpath') {
- deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
- majorPathEchartsData.value = item['datalist'][0];
- } else if (item.type.startsWith('surface_history')) {
- surfaceEchartsData.value = item['datalist'][0];
- deviceArr.unshift({
- deviceType: item.type,
- deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
- datalist: data,
- });
- } else {
- deviceArr.unshift({
- deviceType: item.type,
- deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
- datalist: data,
- });
- }
- }
- });
- deviceList.value = deviceArr;
- if (deviceArr.length > 0) {
- // if (deviceArr[1]) {
- // deviceActive.value = deviceArr[1].deviceType
- // monitorChange(1)
- // } else {
- // deviceActive.value = deviceArr[0].deviceType
- // monitorChange(0)
- // }
- deviceActive.value = deviceArr[0].deviceType;
- monitorChange(0);
- }
- } else {
- let res = null;
- if (systemID.value) {
- res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
- if (res && res.msgTxt) {
- const result = res.msgTxt;
- result.forEach((item) => {
- const data = item['datalist'].filter((data: any) => {
- const readData = data.readData;
- return Object.assign(data, readData);
- });
- if (item.type != 'sys') {
- if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
- dataSource.value = item['datalist'][0]['paths'];
- majorPathEchartsData.value = item['datalist'][0];
- return;
- } else if (item.type == deviceType.value) {
- if (item.type == 'surface_history') {
- // 工作面图标数据
- surfaceEchartsData.value = item['datalist'][0];
- } else {
- dataSource.value = data;
- console.log('关联设备数据--------------->', data);
- }
- return;
- }
- }
- });
- }
- } else {
- let resultData, searchForm;
- if (monitorTable.value) {
- const formData = monitorTable.value.getForm();
- searchForm = formData.getFieldsValue();
- }
- if (monitorTable.value) {
- if (deviceType.value.startsWith('safetymonitor')) {
- resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
- } else if (deviceType.value.startsWith('location')) {
- if (!departmentInfo) {
- departmentInfo = await getDepartmentInfo({});
- }
- let department = null;
- if (departmentInfo && locationForm && locationForm['department']) {
- for (const key in departmentInfo) {
- const item = departmentInfo[key];
- if (item['id'] === locationForm['department']) {
- department = item;
- break;
- }
- }
- }
- resultData = await list({
- devicetype: deviceType.value,
- pagetype: 'normal',
- filterParams: {
- strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
- userName: locationForm['strname'] ? locationForm['strname'] : '',
- userJson: department && department['name'] ? department['name'] : '',
- },
- });
- } else if (deviceType.value.startsWith('vehicle')) {
- resultData = await list({
- devicetype: deviceType.value,
- pagetype: 'normal',
- filterParams: {
- strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
- vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
- },
- });
- } else {
- resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
- }
- } else {
- // 非安全监控
- resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
- }
- if (resultData && resultData.msgTxt) {
- const result = resultData.msgTxt[0];
- if (result) {
- const data = result['datalist'].filter((data: any) => {
- const readData = data.readData;
- return Object.assign(data, readData);
- });
- if (deviceType.value.startsWith('safetymonitor')) {
- const resultData = <any[]>[];
- // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
- const dictCodes = getDictItemsByCode('safetynormal');
- if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
- for (let i = 0; i < dictCodes.length; i++) {
- const dict = dictCodes[i];
- data.forEach((item) => {
- if (dict['value'] == item['dataTypeName']) {
- resultData.push(item);
- }
- });
- }
- dataSource.value = resultData;
- } else {
- dataSource.value = data;
- }
- } else {
- let tableData: any[] = [];
- let noNetData: any[] = [];
- data.filter((el) => {
- if (el.netStatus == 1) {
- tableData.push(el);
- } else {
- noNetData.push(el);
- }
- });
- dataSource.value = [...tableData, ...noNetData];
- }
- } else {
- dataSource.value = [];
- }
- } else {
- dataSource.value = [];
- }
- }
- }
- }
- function goLocation(record) {
- if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
- actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
- } else {
- if (deviceType.value.startsWith('location')) {
- actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });
- } else if (deviceType.value.startsWith('vehicle')) {
- actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'car' });
- } else {
- actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null });
- }
- }
- }
- function goDetail(record?) {
- debugger;
- if (record) {
- activeID.value = record.deviceID;
- if (deviceType.value.startsWith('fiber')) {
- currentModal.value = FiberModal;
- modalVisible.value = true;
- } else if (deviceType.value.startsWith('dusting')) {
- currentModal.value = DustModal;
- modalVisible.value = true;
- } else if (deviceType.value.startsWith('bundletube')) {
- currentModal.value = BundleModal;
- modalVisible.value = true;
- } else if (deviceType.value.startsWith('firemon_normal')) {
- // currentModal.value = BundleModal;
- currentModal.value = WisdomBallModal;
- modalVisible.value = true;
- } else if (deviceType.value.startsWith('ballvalve')) {
- currentModal.value = BallvalveModal;
- modalVisible.value = true;
- } else if (deviceType.value.startsWith('atomizing')) {
- currentModal.value = AtomizingModal;
- modalVisible.value = true;
- } else if (deviceType.value.startsWith('gaspatrol')) {
- currentModal.value = GaspatrolModal;
- modalVisible.value = true;
- } else if (deviceType.value.indexOf('gate') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('window') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('windrect') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('fanmain') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
- const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
- const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('pulping') != -1) {
- const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('pressurefan') != -1) {
- const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('chamber') != -1) {
- const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('safetymonitor') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('pump') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else if (systemType.value.indexOf('nitrogen') != -1) {
- const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('forcFan') != -1) {
- const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('pulping') != -1) {
- const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else {
- message.info('待开发。。。');
- }
- } else {
- if (systemType.value.indexOf('sys_dongshi') != -1) {
- const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (systemType.value.indexOf('sys_obfurage') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
- const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
- const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('forcFan') != -1) {
- const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
- window.open(newPage.href, '_blank');
- } else if (deviceType.value.indexOf('pulping') != -1) {
- const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
- window.open(newPage.href, '_blank');
- } else {
- message.info('待开发。。。');
- }
- }
- }
- function exportXls() {
- handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
- }
- function toHome() {
- deviceList.value = [];
- if (timer) clearTimeout(timer);
- timer = undefined;
- deviceType.value = '';
- go(glob.homePath);
- }
- function toHide() {
- tableShow.value = !tableShow.value;
- document.getElementById('monitorBox').addEventListener('animationend', () => {
- if (!tableShow.value) {
- document.getElementById('monitorBox').style.height = '0px';
- } else {
- document.getElementById('monitorBox').style.height = '290px';
- }
- });
- }
- async function findTreeDataValue(obj) {
- const findDeviceType = (data: any[], obj, flag = true) => {
- return data.find((item: any) => {
- if (item.children.length > 0) {
- findDeviceType(item.children, obj);
- }
- debugger;
- if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
- debugger;
- if (item.type == obj.deviceid) {
- deviceType.value = 'sys';
- systemID.value = obj.deviceid;
- selectedKeys.value = [item.key];
- expandedKeys.value = [item.key];
- treeNodeTitle.value = item.title;
- }
- } else {
- if (!flag) {
- if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
- deviceType.value = item.type;
- selectedKeys.value = [item.key];
- expandedKeys.value = [item.key];
- treeNodeTitle.value = item.title;
- return true;
- }
- return false;
- } else {
- if (obj.deviceType && item.type == obj.deviceType) {
- deviceType.value = item.type;
- selectedKeys.value = [item.key];
- expandedKeys.value = [item.key];
- treeNodeTitle.value = item.title;
- return true;
- }
- return false;
- }
- }
- return false;
- });
- };
- const flag = findDeviceType(treeData.value, obj);
- if (!flag) {
- findDeviceType(treeData.value, obj, false);
- }
- // 无类型时
- if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
- const defaultData = treeData.value[0]['children'][0];
- if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
- selectedKeys.value = [defaultData.key as string];
- expandedKeys.value = [defaultData.key as string];
- treeNodeTitle.value = defaultData.title;
- }
- if (timer === undefined) {
- timer = null;
- await getDataSource();
- getMonitor(true);
- }
- }
- function monitorChange(index) {
- dataSource.value = [];
- deviceActive.value = deviceList.value[index].deviceType;
- if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
- if (activeKey.value == '1' && monitorTable.value) {
- monitorTable.value.setLoading(true);
- dataSource.value = deviceList.value[index].datalist;
- }
- if (activeKey.value == '2' && historyTable.value) {
- historyTable.value.setLoading(true);
- }
- if (activeKey.value == '3' && alarmHistoryTable.value) {
- alarmHistoryTable.value.setLoading(true);
- }
- if (activeKey.value == '4' && handlerHistoryTable.value) {
- handlerHistoryTable.value.setLoading(true);
- }
- }
- /**
- * 设置巷道设备定位图标的显示与隐藏
- */
- function setLocation() {
- let locationStr = '';
- locationList.value.forEach((item: any) => {
- if (item.Visible) {
- locationStr = locationStr ? locationStr + ',' + item.value : item.value;
- }
- });
- actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
- setTimeout(() => {
- message.success('设置成功');
- }, 600);
- }
- // function clearMonitor() {
- // clearTimeout(timer);
- // timer = undefined;
- // if (startMonitorTimer) {
- // clearTimeout(startMonitorTimer);
- // }
- // dataSource.value = [];
- // startMonitorTimer = setTimeout(() => {
- // expandedKeys.value = keys;
- // selectedKeys.value = keys;
- // treeNodeTitle.value = e.node.title;
- // activeKey.value = '1';
- // timer = null;
- // if (e.node.children?.length < 1) {
- // getMonitor(true);
- // }
- // }, 1000);
- // }show
- watch(
- () => props.pageData,
- async (pageObj) => {
- isRefresh.value = false;
- if (!treeData.value || treeData.value?.length < 1) {
- await getDeviceType();
- }
- nextTick(() => {
- isRefresh.value = true;
- debugger;
- // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
- // findTreeDataValue({ deviceid: systemID.value });
- // } else {
- // findTreeDataValue({ deviceType: pageObj.pageType });
- // }
- findTreeDataValue(pageObj);
- });
- },
- { immediate: true }
- );
- onMounted(async () => {
- const pageObj = props.pageData;
- if (!pageObj) return;
- if (pageObj && pageObj.pageType) {
- if (pageObj.pageType.startsWith('sys_')) {
- await getDeviceType(pageObj.pageType);
- findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
- } else {
- await getDeviceType();
- findTreeDataValue({ deviceType: pageObj.pageType });
- }
- } else {
- await getDeviceType();
- findTreeDataValue({ deviceid: pageObj.deviceid });
- }
- // 定位
- const posShowData = pageObj.locationPlane;
- if (posShowData) {
- locationList.value = posShowData;
- } else {
- locationList.value = await devPosition({});
- }
- // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
- });
- onUnmounted(() => {
- if (timer) {
- clearTimeout(timer);
- }
- timer = undefined;
- });
- </script>
- <style lang="less" scoped>
- @import '/@/design/theme.less';
- @import '/@/design/vent/modal.less';
- @ventSpace: zxm;
- @{theme-deepblue} {
- .scene-box {
- // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
- // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
- // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
- // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
- // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
- // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
- // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
- // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
- // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
- // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
- // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
- // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
- // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
- // --tree-node-select: #0963c1;
- // --tree-node-hover: #0f376ccc;
- // --location-bottom-bg: #21324855;
- // --location-bottom-border: #aed1ff4d;
- }
- }
- .scene-box {
- --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
- --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
- --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
- --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
- --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
- --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
- --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
- --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
- --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
- --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
- --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
- --image-tohome: url('/@/assets/images/vent/home/tohome.png');
- --tree-node-select: #00b1c8;
- --tree-node-hover: #00b1c855;
- --location-bottom-bg: #00709955;
- --location-bottom-border: #aef3ff4d;
- }
- .top-header {
- position: fixed;
- width: 100%;
- height: 56px;
- background: var(--image-modal-top);
- text-align: center;
- line-height: 56px;
- font-size: 28px;
- color: #ffffffdd;
- font-weight: 600;
- z-index: 1;
- letter-spacing: 2px;
- font-size: 30px;
- }
- .select-node {
- position: fixed;
- top: 100px;
- left: 10px;
- color: var(--vent-font-color);
- display: flex;
- justify-content: center;
- font-size: 22px;
- .title {
- margin-left: 10px;
- }
- }
- .expansion-icon {
- background: var(--image-tree-icon-bg) no-repeat;
- background-size: contain;
- position: absolute;
- left: 190px;
- top: 25px;
- &:hover {
- background: var(--image-tree-icon-hover-bg) no-repeat;
- background-size: contain;
- }
- }
- .device-select {
- width: 250px;
- height: 500px;
- background: var(--image-tree-bg) no-repeat;
- position: fixed;
- top: 100px;
- left: 10px;
- background-size: contain;
- pointer-events: auto;
- padding: 20px 10px 30px 10px;
- }
- .is-expansion-icon {
- padding: 5px;
- pointer-events: auto;
- z-index: 999;
- }
- .device-select-show {
- left: 10px;
- animation-name: treeShow;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- }
- .device-select-hide {
- left: -250px;
- animation-name: treeHide;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- }
- .node-select-show {
- width: 276px;
- height: 44px;
- background: var(--image-tree-expansion-bg) no-repeat;
- left: 10px;
- animation-name: treeShow;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- display: flex;
- align-items: center;
- margin-left: 0;
- justify-content: flex-start;
- pointer-events: auto;
- &:hover {
- background: var(--image-tree-expansion-hover-bg) no-repeat;
- }
- .put-away-icon {
- position: relative;
- display: inline-block;
- left: 4px;
- }
- }
- .node-select-hide {
- left: -400px;
- animation-name: treeHide;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- }
- .device-select-box {
- width: 208px;
- height: 450px;
- overflow-y: auto;
- color: var(--vent-font-color);
- :deep(.zxm-tree) {
- background: transparent !important;
- color: var(--vent-font-color) !important;
- .zxm-tree-switcher {
- background: transparent !important;
- }
- .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
- background-color: var(--tree-node-select);
- }
- .zxm-tree-node-content-wrapper:hover {
- background-color: var(--tree-node-hover);
- }
- input {
- height: 0px !important;
- }
- }
- &::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
- border-radius: 10px;
- background: #ededed22;
- height: 100px;
- }
- &::-webkit-scrollbar-thumb {
- -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
- background: #4288a444;
- }
- }
- .location-icon {
- width: 46px;
- height: 178px;
- position: absolute;
- top: 100px;
- background: var(--image-location-bg) no-repeat;
- background-size: contain;
- writing-mode: vertical-lr;
- line-height: 46px;
- color: var(--vent-font-color);
- padding-top: 10px;
- pointer-events: auto;
- cursor: pointer;
- &:hover {
- background: var(--image-location-hover-bg) no-repeat;
- }
- .location-text {
- padding-top: 20px;
- letter-spacing: 3px;
- font-size: 16px;
- }
- }
- .location-select {
- position: fixed;
- top: 100px;
- pointer-events: auto;
- .location-select-box {
- width: 100%;
- height: 100%;
- position: relative;
- &::before {
- content: '';
- position: absolute;
- width: 230px;
- height: 500px;
- top: 0;
- left: 0;
- background: var(--image-tree-bg) no-repeat;
- background-size: contain;
- transform: rotateY(180deg);
- z-index: -1;
- }
- .location-top-title {
- color: var(--vent-font-color);
- position: absolute;
- width: 225px;
- height: 68px;
- background: var(--image-turn-location-top-bg) no-repeat;
- background-size: contain;
- top: 5px;
- left: 5px;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: flex-end;
- .title {
- font-size: 18px;
- position: relative;
- top: -14px;
- right: 15px;
- }
- }
- .location-expansion-icon {
- background: var(--image-tree-icon-cover-bg) no-repeat;
- background-size: contain;
- position: relative;
- left: 10px;
- top: -15px;
- padding: 5px;
- &:hover {
- background: var(--image-tree-icon-cover-hover-bg) no-repeat;
- background-size: contain;
- }
- }
- }
- .location-container {
- width: 200px;
- height: 390px;
- position: absolute;
- display: flex;
- flex-direction: column;
- top: 80px;
- left: 18px;
- overflow-y: auto;
- .location-item {
- color: var(--vent-font-color);
- line-height: 30px;
- display: flex;
- justify-content: space-between;
- // background-image: var(--vent-gas-list-item-bg-img);
- background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
- margin: 3px 0;
- .item-title {
- width: 80px;
- text-align: right;
- color: var(--vent-table-action-link);
- }
- }
- .location-bottom-btn {
- width: 100%;
- color: var(--vent-font-color);
- display: flex;
- justify-content: flex-end;
- margin-top: 20px;
- span {
- display: inline-block;
- width: 100%;
- background: var(--location-bottom-bg);
- border-radius: 3px;
- border: 1px solid var(--location-bottom-border);
- text-align: center;
- padding: 2px 0;
- cursor: pointer;
- &:hover {
- background: #00557422;
- }
- }
- }
- }
- }
- .location-select-show {
- right: 240px;
- animation-name: locationShow;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- }
- .location-select-hide {
- right: -2px;
- animation-name: locationHide;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- }
- .location-btn-show {
- right: -0px;
- animation-name: locationBtnShow;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- }
- .location-btn-hide {
- right: -240px;
- animation-name: locationBtnHide;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
- }
- .tabs-box {
- height: 290px;
- }
- .bottom-tabs-box {
- position: relative;
- .tabs-box {
- width: calc(100% - 12px) !important;
- bottom: 3px !important;
- background-color: red;
- }
- .to-small {
- position: absolute;
- top: -65px;
- right: 36px;
- display: flex;
- align-items: center;
- justify-content: center;
- .to-home {
- width: 60px;
- height: 60px;
- background: var(--image-tohome) no-repeat center;
- background-size: auto;
- padding: 8px;
- &:hover {
- background-color: rgba(79, 104, 134, 0.418);
- }
- }
- .table-show-icon {
- width: 30px;
- height: 30px;
- font-size: 30px;
- color: var(--vent-font-color);
- margin-left: 10px;
- }
- }
- .device-button-group {
- position: absolute;
- top: -30px;
- display: flex;
- width: 100%;
- .device-button {
- height: 26px;
- padding: 0 20px;
- background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
- clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
- display: flex;
- justify-content: center;
- align-items: center;
- color: var(--vent-font-color);
- position: relative;
- cursor: pointer;
- &:nth-child(1) {
- left: calc(-6px * 1);
- }
- &:nth-child(2) {
- left: calc(-6px * 2);
- }
- &:nth-child(3) {
- left: calc(-6px * 3);
- }
- &:nth-child(4) {
- left: calc(-6px * 4);
- }
- &:nth-child(5) {
- left: calc(-6px * 5);
- }
- &:nth-child(6) {
- left: calc(-6px * 6);
- }
- &:nth-child(7) {
- left: calc(-6px * 7);
- }
- &:nth-child(8) {
- left: calc(-6px * 8);
- }
- &:nth-child(9) {
- left: calc(-6px * 9);
- }
- &:nth-child(10) {
- left: calc(-6px * 10);
- }
- &:nth-child(11) {
- left: calc(-6px * 11);
- }
- &:nth-child(12) {
- left: calc(-6px * 12);
- }
- &:nth-child(13) {
- left: calc(-6px * 13);
- }
- &:nth-child(14) {
- left: calc(-6px * 14);
- }
- &:nth-child(15) {
- left: calc(-6px * 15);
- }
- &:nth-child(16) {
- left: calc(-6px * 16);
- }
- &:nth-child(17) {
- left: calc(-6px * 17);
- }
- &:nth-child(18) {
- left: calc(-6px * 18);
- }
- &:nth-child(19) {
- left: calc(-6px * 19);
- }
- &:first-child {
- clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
- }
- }
- .device-active {
- background: linear-gradient(45deg, #04e6fb, #0c5cab);
- &::before {
- border-color: #0efcff;
- box-shadow: 1px 1px 3px 1px #0efcff inset;
- }
- }
- }
- .table-hide-icon {
- color: var(--vent-font-color);
- cursor: pointer;
- position: absolute;
- right: 20px;
- top: 10px;
- z-index: 9999;
- }
- .enter-detail {
- color: var(--vent-font-color);
- cursor: pointer;
- position: absolute;
- right: 35px;
- top: 35px;
- padding: 5px;
- border-radius: 5px;
- margin-left: 8px;
- margin-right: 8px;
- width: auto;
- height: 33px !important;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--vent-font-color);
- padding: 5px 15px 5px 15px;
- z-index: 999;
- cursor: pointer;
- &:hover {
- background: var(--vent-device-manager-control-btn-hover);
- }
- &::before {
- width: calc(100% - 6px);
- height: 27px;
- content: '';
- position: absolute;
- top: 3px;
- right: 0;
- left: 3px;
- bottom: 0;
- z-index: -1;
- border-radius: inherit;
- /*important*/
- background: var(--vent-device-manager-control-btn);
- }
- }
- }
- .table-hide {
- height: 0px;
- animation-name: tableHide;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s;
- }
- .table-show {
- height: 290px;
- animation-name: tableShow;
- /* 持续时间 */
- animation-duration: 1s;
- transition: all 1s;
- }
- .location-form {
- display: flex;
- margin: 8px;
- .location-form-item {
- width: 400px;
- .location-form-label {
- width: 100px;
- display: inline-block;
- color: var(--vent-font-color);
- }
- input {
- background: transparent !important;
- color: var(--vent-font-color);
- border: 1px solid var(--vent-form-item-border) !important;
- }
- }
- .zxm-select-selector {
- width: 200px !important;
- }
- }
- @keyframes tableShow {
- 0% {
- height: 0px;
- opacity: 0;
- }
- 100% {
- height: 290px;
- opacity: 1;
- }
- }
- @keyframes tableHide {
- 0% {
- opacity: 1;
- }
- 100% {
- height: 0px;
- opacity: 0;
- }
- }
- @keyframes treeShow {
- 0% {
- left: -400px;
- opacity: 0;
- }
- 100% {
- left: 10px;
- opacity: 1;
- }
- }
- @keyframes treeHide {
- 0% {
- left: 10px;
- opacity: 1;
- }
- 100% {
- left: -400px;
- opacity: 0;
- }
- }
- @keyframes locationShow {
- 0% {
- right: 0px;
- opacity: 0;
- }
- 100% {
- right: 240px;
- opacity: 1;
- }
- }
- @keyframes locationHide {
- 0% {
- right: 240px;
- opacity: 1;
- }
- 100% {
- right: 0;
- opacity: 0;
- }
- }
- @keyframes locationBtnShow {
- 0% {
- right: -240px;
- opacity: 0;
- }
- 100% {
- right: -2px;
- opacity: 1;
- }
- }
- @keyframes locationBtnHide {
- 0% {
- right: -2px;
- opacity: 1;
- }
- 100% {
- right: -240px;
- opacity: 0;
- }
- }
- :deep(.@{ventSpace}-tabs-tabpane-active) {
- // overflow: auto;
- height: 100%;
- }
- :deep(.zxm-select-dropdown) {
- left: 0 !important;
- color: #000000 !important;
- }
- :deep(.zxm-select-selector) {
- height: 34px !important;
- line-height: 34px !important;
- }
- :deep(.zxm-input) {
- height: 32px !important;
- line-height: 32px !important;
- .zxm-select-selection-item {
- line-height: 32px !important;
- }
- }
- // :deep(.@{ventSpace}-pagination){
- // margin-right: 20px !important;
- // margin-top: 5px !important;
- // display: flex;
- // align-items: center;
- // }
- </style>
|