123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597 |
- <template>
- <div class="dialogModal" id="detailModal">
- <div class="modal-top">
- <i>
- <SvgIcon class="icon" size="14" name="inner-kd" />
- </i>
- <span class="modal-title"> {{ modalTitle }}</span>
- <span class="close" @click="getClose">✕</span>
- </div>
- <div class="modal-card">
- <div class="card-box" v-for="(item, index) in modalCard" :key="index">
- <div class="card-pic">
- <img :src="item.imgSrc" alt="" />
- </div>
- <div class="card-content">
- <div class="content-label">{{ item.label }}</div>
- <div class="content-value">{{ item.value }}</div>
- </div>
- </div>
- </div>
- <div class="modal-card1">
- <div class="left-modal">
- <div class="value-m">{{ valueM }}</div>
- <div class="label-m">{{ labelM }}</div>
- </div>
- <div class="right-modal">
- <div class="modal-zl" v-for="(item, index) in zlList" :key="index">
- <div class="left-zl">
- <div class="label-left">
- <span class="pic"></span>
- <span>{{ item.label }}</span>
- </div>
- <div class="value-left">
- <span class="text">{{ item.value }}</span>
- <span>Pa</span>
- </div>
- </div>
- <div class="right-zl">
- <span class="text"> {{ item.percent }}</span>
- <span>%</span>
- </div>
- </div>
- </div>
- </div>
- <div class="modal-card2">
- <div class="modal-wind" v-for="(item, index) in windLfList" :key="index">
- <span class="text">{{ item.label }}</span>
- <span class="num">{{ item.value }}</span>
- <span class="dw">%</span>
- </div>
- </div>
- <div class="modal-card3">
- <div class="warn-left">
- <div class="vent-l">
- <span class="warn-label">{{ vent.value }}</span>
- <span class="warn-value">{{ vent.label }}</span>
- </div>
- <div class="gas-l">
- <span class="warn-label">{{ gas.value }}</span>
- <span class="warn-value">{{ gas.label }}</span>
- </div>
- </div>
- <div class="warn-c">
- <div class="warn-icon"></div>
- </div>
- <div class="warn-right">
- <div class="fire-r">
- <span class="warn-value">{{ fire.label }}</span>
- <span class="warn-label">{{ fire.value }}</span>
- </div>
- <!-- <div class="dust-r">
- <span class="warn-value">{{ dust.label }}</span>
- <span class="warn-label">{{ dust.value }}</span>
- </div> -->
- </div>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- import { ref, reactive, defineProps, watch } from 'vue';
- import { SvgIcon } from '/@/components/Icon';
- import { getAssetURL } from '/@/utils/ui';
- let props = defineProps({
- centerDetail: {
- type: Object,
- default: () => {
- return {};
- },
- },
- });
- // let modalTitle = ref('榆家梁矿');
- let modalTitle = ref('yjl');
- let modalCard = reactive([
- { imgSrc: getAssetURL('company/home/hang.png'), label: '巷道长度', value: 0 },
- { imgSrc: getAssetURL('company/home/people.png'), label: '人员总数', value: 0 },
- { imgSrc: getAssetURL('company/home/car.png'), label: '车辆总数', value: 0 },
- ]);
- let valueM = ref(0);
- let labelM = ref('');
- let zlList = reactive([
- { label: '关键阻力——进风', value: 0, percent: 0 },
- { label: '关键阻力——用风', value: 0, percent: 0 },
- { label: '关键阻力——回风', value: 0, percent: 0 },
- ]);
- let windLfList = reactive([
- { label: '有效风量率', value: 0 },
- { label: '矿井漏风率', value: 0 },
- ]);
- // let vent = reactive({
- // label: '通风风险性',
- // value: '低风险',
- // });
- // let gas = reactive({
- // label: '瓦斯风险性',
- // value: '低风险',
- // });
- // let fire = reactive({
- // label: '火灾风险性',
- // value: '低风险',
- // });
- // let dust = reactive({
- // label: '粉尘风险性',
- // value: '低风险',
- // });
- let vent = reactive({
- label: '总进风',
- value: 0,
- });
- let gas = reactive({
- label: '总风量',
- value: 0,
- });
- let fire = reactive({
- label: '等积孔',
- value: 0,
- });
- // let dust = reactive({
- // label: '粉尘风险性',
- // value: '低风险',
- // });
- const emit = defineEmits(['closeDialog']);
- function getClose() {
- emit('closeDialog', false);
- }
- watch(
- () => props.centerDetail,
- (newC, oldC) => {
- console.log(newC, '地图区域详情数据-------');
- if (JSON.stringify(newC) != '{}') {
- modalCard[0]['value'] = newC.sys_data.totallength;
- modalCard[1]['value'] = 0;
- modalCard[2]['value'] = 0;
- labelM.value = newC.majorpath_data[0].deviceName;
- valueM.value = newC.majorpath_data[0].majorpath.drag_total;
- zlList[0]['value'] = newC.majorpath_data[0].majorpath.drag_1;
- zlList[1]['value'] = newC.majorpath_data[0].majorpath.drag_2;
- zlList[2]['value'] = newC.majorpath_data[0].majorpath.drag_3;
- zlList[0]['percent'] = ((zlList[0]['value'] / valueM.value) * 100).toFixed(2);
- zlList[1]['percent'] = ((zlList[1]['value'] / valueM.value) * 100).toFixed(2);
- zlList[2]['percent'] = ((zlList[2]['value'] / valueM.value) * 100).toFixed(2);
- windLfList[0].value = ((newC.sys_data.xufengliang / parseFloat(newC.sys_data.zongfengliang)) * 100).toFixed(2);
- windLfList[1].value = (
- ((parseFloat(newC.sys_data.zongfengliang) - parseFloat(newC.sys_data.zonghuifeng)) / parseFloat(newC.sys_data.zonghuifeng)) *
- 100
- ).toFixed(2);
- vent.value = newC.majorpath_data[0].majorpath.drag_total;
- gas.value = newC.majorpath_data[0].majorpath.m3_total;
- fire.value = Math.round(((1.19 * gas.value) / 60 / Math.sqrt(vent.value)) * 100) / 100;
- }
- },
- {
- immediate: true,
- deep: true,
- }
- );
- </script>
- <style lang="less" scoped>
- @font-face {
- font-family: 'douyuFont';
- src: url('/@/assets/font/douyuFont.otf');
- }
- .dialogModal {
- position: relative;
- width: 568px;
- height: 437px;
- background: url('/@/assets/images/company/area-card2.png') no-repeat;
- background-size: 100% 100%;
- pointer-events: none;
- z-index: 999999;
- .modal-top {
- position: absolute;
- left: 32px;
- top: 15px;
- height: 30px;
- line-height: 30px;
- width: 90%;
- .modal-title {
- font-size: 14px;
- font-family: 'douyuFont';
- color: #fff;
- margin-left: 10px;
- }
- .close {
- position: absolute;
- right: 12px;
- color: #2cb6ff;
- cursor: pointer;
- pointer-events: auto;
- }
- }
- .modal-card {
- position: absolute;
- top: 45px;
- left: 50%;
- transform: translate(-50%, 0);
- height: 46px;
- width: 90%;
- margin-top: 15px;
- display: flex;
- justify-content: space-between;
- background: url('../../../../../assets/images/company/modal-card.png') no-repeat center;
- background-size: 100% 100%;
- .card-box {
- display: flex;
- flex: 1;
- height: 100%;
- justify-content: center;
- align-items: center;
- &:first-child {
- margin-left: 15px;
- }
- &:last-child {
- margin-right: 10px;
- }
- .card-pic {
- margin-right: 10px;
- }
- .card-content {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .content-label {
- font-size: 10px;
- color: #ccd6df;
- }
- .content-value {
- font-family: 'douyuFont';
- font-size: 14px;
- color: #fff;
- }
- }
- }
- }
- .modal-card1 {
- position: absolute;
- top: 121px;
- left: 50%;
- transform: translate(-50%, 0);
- height: 110px;
- width: 90%;
- padding: 0px 10px;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: url('../../../../../assets/images/company/area3.png') no-repeat center;
- background-size: 100% 100%;
- .left-modal {
- position: relative;
- width: 95px;
- height: 95px;
- background: url('../../../../../assets/images/company/zfx.png') no-repeat center;
- background-size: 100% 100%;
- .value-m {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-family: 'douyuFont';
- font-size: 14px;
- color: #3df6ff;
- }
- .label-m {
- position: absolute;
- bottom: 2px;
- width: 100%;
- font-size: 10px;
- text-align: center;
- color: #fff;
- }
- }
- .right-modal {
- width: calc(100% - 105px);
- height: 95px;
- margin-left: 10px;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- .modal-zl {
- height: 24px;
- display: flex;
- justify-content: space-between;
- .left-zl {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: calc(80% - 10px);
- padding: 0px 10px;
- margin-right: 10px;
- box-sizing: border-box;
- background-color: rgba(6, 57, 97, 0.3);
- .label-left {
- .pic {
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 50%;
- margin-right: 5px;
- }
- span {
- color: #ccd6df;
- font-size: 14px;
- }
- }
- .value-left {
- .text {
- font-family: 'douyuFont';
- font-size: 14px;
- margin-right: 5px;
- }
- span {
- font-size: 12px;
- color: #ccd6df;
- }
- }
- }
- &:nth-child(1) .left-zl .pic {
- background-color: #51cfff;
- }
- &:nth-child(2) .left-zl .pic {
- background-color: #ffb85b;
- }
- &:nth-child(3) .left-zl .pic {
- background-color: #a091ff;
- }
- &:nth-child(1) .left-zl .text {
- color: #51cfff;
- }
- &:nth-child(2) .left-zl .text {
- color: #ffb85b;
- }
- &:nth-child(3) .left-zl .text {
- color: #a091ff;
- }
- .right-zl {
- width: 20%;
- display: flex;
- justify-content: center;
- align-items: center;
- background-color: rgba(6, 57, 97, 0.3);
- .text {
- font-family: 'douyuFont';
- font-size: 14px;
- }
- span {
- margin-left: 5px;
- }
- }
- &:nth-child(1) .right-zl {
- color: #51cfff;
- }
- &:nth-child(2) .right-zl {
- color: #ffb85b;
- }
- &:nth-child(3) .right-zl {
- color: #a091ff;
- }
- }
- }
- }
- .modal-card2 {
- position: absolute;
- top: 231px;
- left: 50%;
- transform: translate(-50%, 0);
- height: 50px;
- width: 90%;
- margin: 10px 0px;
- padding: 0px 10px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-sizing: border-box;
- background: url('../../../../../assets/images/company/area3.png') no-repeat center;
- background-size: 100% 100%;
- .modal-wind {
- position: relative;
- width: 50%;
- height: 34px;
- .text {
- position: absolute;
- top: 50%;
- left: 40px;
- transform: translate(0, -50%);
- color: #fff;
- font-size: 14px;
- }
- .num {
- position: absolute;
- top: 50%;
- right: 45px;
- transform: translate(0, -50%);
- color: #fff;
- font-family: 'douyuFont';
- font-size: 14px;
- }
- .dw {
- position: absolute;
- top: 50%;
- right: 12px;
- transform: translate(0, -50%);
- color: #fff;
- }
- &:nth-child(1) {
- background: url('../../../../../assets/images/company/green.png') no-repeat center;
- background-size: 100% 100%;
- }
- &:nth-child(2) {
- background: url('../../../../../assets/images/company/purple.png') no-repeat center;
- background-size: 100% 100%;
- }
- &:nth-child(1) .num {
- color: #31fbcc;
- }
- &:nth-child(2) .num {
- color: #97a3fa;
- }
- }
- }
- .modal-card3 {
- position: absolute;
- top: 302px;
- left: 50%;
- transform: translate(-50%, 0);
- height: 110px;
- width: 90%;
- padding: 0px 10px;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: url('../../../../../assets/images/company/area3.png') no-repeat center;
- background-size: 100% 100%;
- .warn-left {
- position: relative;
- width: 206px;
- height: 85px;
- background: url('../../../../../assets/images/company/warn-left.png') no-repeat center;
- .vent-l {
- position: absolute;
- top: 10px;
- left: 0;
- width: 80%;
- display: flex;
- justify-content: space-around;
- }
- .gas-l {
- position: absolute;
- top: 52px;
- left: 0;
- width: 80%;
- display: flex;
- justify-content: space-around;
- }
- }
- .warn-c {
- position: relative;
- width: 90px;
- height: 92px;
- background: url('../../../../../assets/images/company/warn-center.png') no-repeat center;
- .warn-icon {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -85%);
- width: 50px;
- height: 50px;
- background: url('../../../../../assets/images/company/icon1.png') no-repeat center;
- }
- }
- .warn-right {
- position: relative;
- width: 206px;
- height: 85px;
- background: url('../../../../../assets/images/company/warn-right.png') no-repeat center;
- .fire-r {
- position: absolute;
- top: 10px;
- right: 0;
- width: 80%;
- display: flex;
- justify-content: space-around;
- }
- .dust-r {
- position: absolute;
- top: 52px;
- right: 0;
- width: 80%;
- display: flex;
- justify-content: space-around;
- }
- }
- .warn-label {
- font-family: 'douyuFont';
- font-size: 14px;
- color: #31fbcc;
- line-height: 27px;
- }
- .warn-value {
- color: #fff;
- font-size: 14px;
- }
- }
- }
- </style>
|