<template>
<div>
<el-dialog
v-model="visible"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
class="mydialog"
>
<el-tabs v-model="activeFunc" @tab-click="changeActive">
<el-tab-pane :label="$t('func.jobAnalysis.integratedPage_basicInfo')" name="1">
<BlockBasicInfo ref="blockBasicInfo" :map="map" :blockInfo="blockInfo" :dataScreen="true" />
</el-tab-pane>
<el-tab-pane :label="$t('func.jobAnalysis.jobRecords')" name="2">
<BlockWorkInfo :blockInfo="blockInfo" dialogClass="screenSa" :dataScreen="true" v-if="activeFunc == '2'" />
</el-tab-pane>
</el-tabs>
<div @click="handleBack" class="back">{{ $t('commen.button.return') }}</div>
</el-dialog>
</div>
</template>
<script>
import BlockBasicInfo from '@/views/ywIndex/blockInfo/BlockBasicInfo';
import BlockWorkInfo from '@/views/ywIndex/blockInfo/BlockWorkInfo';
import { blockDetail } from '@/api/plot';
export default {
name: 'BlockInfoDialog',
components: {
BlockBasicInfo,
BlockWorkInfo
},
props: {
map: Object
},
data() {
return {
blockId: false,
visible: false,
loading: false,
blockInfo: null,
activeFunc: '1'
};
},
computed: {
width() {
return this.activeFunc == '2' ? 1050 : 500;
}
},
watch: {
blockId() {
this.$refs.blockBasicInfo.clearABline();
this.$refs.blockBasicInfo.clearABText();
this.$refs.blockBasicInfo.functionName = this.$t('func.mapMode.abshow');
this.$refs.blockBasicInfo.abLineFature = null;
}
},
methods: {
open(id) {
this.activeFunc = '1';
this.blockId = id;
this.visible = true;
this.$nextTick(() => {
this.$emit('widthChange', this.width);
});
this.loading = true;
blockDetail({ blockId: this.blockId })
.then((res) => {
this.blockInfo = res.data.data;
})
.catch((res) => {
console.error(res);
})
.finally(() => {
this.loading = false;
});
},
handleBack() {
this.visible = false;
},
close() {
if (this.visible) {
this.visible = false;
this.$emit('widthChange', 0);
}
},
changeActive(item) {
this.$nextTick(() => {
this.$emit('widthChange', this.width);
});
},
openedHandler() {
if (this.$refs.blockWorkInfo?.resize) {
this.$refs.blockWorkInfo.resize();
}
},
closeHandler() {
this.$emit('close');
}
}
};
</script>
<style scoped lang="scss">
:deep(.mydialog ){
width: 98%;
height: 86%;
background-image: var(--theme-dataScreen_dialog_bg_full);
background-size: 100% 100%;
background-repeat: no-repeat;
pointer-events: all;
position: absolute;
bottom: 20rem;
left: 1%;
overflow: hidden;
padding: 20rem;
.el-dialog__header {
display: none;
}
.el-tabs__active-bar {
background: #646f9eff;
}
.el-dialog__body {
height: 100%;
background: transparent;
overflow: hidden;
position: relative;
.back {
width: 100px;
height: 42px;
line-height: 42px;
text-align: center;
color: #d0d7ec;
position: absolute;
top: 0;
right: 10px;
background: var(--theme-screen_plot_checkbox_bg_color);
border-radius: 4px;
border: var(--theme-dataScreen_back_border);
}
.el-button--primary {
background: rgba(134, 164, 255, 0.3);
border-radius: 4px;
border: 1rem solid #bbccff;
color: #d0d7ec;
}
.el-tabs {
height: 100%;
}
.el-tabs__content {
height: calc(100% - 70rem);
}
.el-tab-pane {
height: 100%;
}
.el-tabs__nav-wrap {
margin-top: 8rem;
}
.el-descriptions__body,
.page-singleStatistics,
.el-table,
.singleMachineInfo,
.page-singleStatistics .data-box .charts-box .date-box,
.page-singleStatistics .data-box .charts-box .table-box .card,
.page-singleStatistics .data-box .data-label .label-item,
.timeRule,
.page-singleStatistics .data-box .data-label .label-item .img,
.timeRule .timeRuleContainer .ruleSymbol .symbol,
.el-tabs__item,
.el-cascader__dropdown,
.el-calendar,
.page-singleStatistics .data-box .data-label .label-item .text .label-item-num,
.el-radio-button__inner {
background: transparent;
color: white;
}
.el-cascader-menu {
background: #151c29ff;
}
.main .bottom .rightMainMap .topLeft,
.el-checkbox {
color: #9ba1b2ff;
}
}
.el-checkbox__input.is-checked + .el-checkbox__label,
.main .bottom .rightMainMap .topLeft .lockContainer {
color: white;
}
.year-box .monthContainer .month.active {
border-top-color: #646f9eff;
}
.el-cascader .el-input.is-focus .el-input__inner,
.el-input__inner:hover {
border-color: #9ba1b2ff;
}
.el-checkbox__input.is-checked .el-checkbox__inner,
.page-singleStatistics
.data-box
.charts-box
.date-box[data-v-c5fe9bfa]
.el-radio-button__orig-radio:checked
+ .el-radio-button__inner,
[data-v-1ab050e6] .el-dialog .el-table .el-table__empty-text,
[data-v-1ab050e6] .el-dialog .el-table thead,
[data-v-1ab050e6] .el-dialog .el-table tr {
background: var(--theme-dataScreen_input_inner);
color: #d0d7ec;
}
.el-cascader__search-input {
background: #272f40ff;
}
.el-table {
margin-top: 10rem;
height: calc(100% - 128rem);
background: var(--theme-dataScreen_elTabs_header);
color: #d0d7ec;
overflow-y: auto;
& tr,
& thead,
.el-table__empty-text {
background: var(--theme-dataScreen_elTabs_header);
color: #d0d7ec;
}
.el-table__row.statistics-warning-row {
background: #272f40;
}
.el-table__row.default-row td.el-table__cell {
background: #2a3243;
}
.el-table tbody tr:hover > td {
background-color: #c0c4cc !important;
color: #ffffff;
}
::-webkit-scrollbar-thumb {
border-radius: 10rem;
-webkit-box-shadow: inset 0 0 10rem rgba(53, 116, 55, 0.2);
background-color: var(--theme-dataScreen_chartandTable_active);
}
}
.el-pagination {
color: #d0d7ec;
}
.el-input__inner {
background: var(--theme-dataScreen_input_bg_color)!important;
color: #d8e5f7;
outline: 1rem solid rgba(255, 255, 255, 0.4);
}
:deep(.el-pagination span:not([class*='suffix']) ){
color: rgba(208, 215, 236, 1);
}
:deep(.el-pagination__editor.el-input .el-input__inner ){
background: var(--theme-dataScreen_input_bg_color) !important;
color: rgba(208, 215, 236, 1);
border: 1rem solid var(--theme-dataScreen_input_border_color);
}
.el-input__inner,
.el-pagination__jump,
.el-range-input {
background: var(--theme-dataScreen_input_bg_color) !important;
color: #d0d7ec;
}
}
:deep(.el-tabs__active-bar){
background: var(--theme-dataScreen_elTabs_active)!important;
}
:deep(.el-tabs__item.is-active){
color: var(--theme-dataScreen_elTabs_active_color)!important;
}
:deep(.el-table thead){
background: var(--theme-dataScreen_elTabs_header)!important;
}
</style>
<style lang="scss">
.mapMode.screenSa {
.cardHeader::before {
background: var(--theme-dataScreen_cardHeader);
}
.leftFuncContainer .content {
background: rgba(45, 59, 81, 0.2) !important;
}
.recordList {
&::-webkit-scrollbar-thumb {
background-color: var(--theme-dataScreen_chartandTable_active);
}
}
.card {
&.active {
background: var(--theme-dataScreen_cardHeader_car_active);
}
.cardHeader .cardTitle {
span:nth-of-type(1) {
color: #d8e5f7 !important;
}
span:last-of-type {
color: #8e94a5 !important;
}
}
.cardContent .agType {
span:first-of-type {
color: #8e94a5 !important;
}
span:last-of-type {
color: #d8e5f7 !important;
}
}
}
.legend {
background: rgba(30, 45, 66, 1) !important;
.legendTitle,
.legendText {
color: rgba(216, 229, 247, 1) !important;
}
.legendBorder {
border-bottom-color: rgba(216, 229, 247, 0.2) !important;
}
.legendEdit .editContainer .legendContiner > div {
.el-input-number {
.el-input-number__decrease,
.el-input-number__increase {
color: var(--color_info) !important;
}
}
& > .opButton {
color: var(--color_info) !important;
}
}
.legendEdit .editContainer .configContiner .el-form {
.el-form-item__label {
color: var(--color_info) !important;
}
.el-input-number {
.el-input-number__decrease,
.el-input-number__increase {
color: var(--color_info) !important;
}
}
.el-radio {
color: var(--color_info) !important;
}
}
}
.machineSingleInfo {
background: var(--theme-dataScreen_machineSingleInfo) !important;
.machineSingleSelect .el-select__caret {
color: var(--color_info) !important;
}
}
:deep(.el-checkbox){
color:white!important;
}
:deep(.el-dialog .el-checkbox__input.is-checked .el-checkbox__inner){
background:green!important;
}
}
:deep(.el-tabs__header){
position:absolute!important;
top:20rem!important;
left:20rem!important;
}
</style>
这段代码帮我修改成elementplus+vue2的写法,目前存在el-tabs__header is-top在el-tabs__content下方
最新发布