<template>
|
<div class="materialBox">
|
<div class="panel-collapse">
|
<div class="material-panel-body">
|
<el-row style="display: flex; margin-top: 10px">
|
<el-col :span="8">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t('swproject.name.TR') }}
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="8">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t('detailPage.data.TR') }}
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="8">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t('detailPage.unit.TR') }}
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
<div style="display: flex; flex-direction: column">
|
<div style="width: 100%">
|
<el-row
|
style="display: flex; width: 100%"
|
v-for="(
|
detail_info, detail_index
|
) in state.m_currentJieZhiDetails"
|
:key="detail_index"
|
>
|
<el-col :span="8">
|
<div class="table_box">
|
<div class="content2">{{ detail_info.name }}</div>
|
</div>
|
</el-col>
|
<el-col :span="8" style="display: flex">
|
<div class="table_box">
|
<div class="content2 inputandselect_div">
|
<input
|
v-model="detail_info.value"
|
class="input_materia"
|
:disabled="true"
|
style="width: 80%"
|
/>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="8">
|
<div class="table_box">
|
<div class="content2">{{ detail_info.unit }}</div>
|
</div>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script setup name="medium">
|
import { ref, reactive, onMounted } from "vue";
|
import { ElRow, ElCol, ElSelect, ElOption } from "element-plus";
|
import UnitHelper from "@/utils/unit.js";
|
import { useI18n } from "vue-i18n";
|
const { t } = useI18n();
|
let state = reactive({
|
NianDuUnit: 0,
|
NianDuOptionList: UnitHelper.NianDu_Value_List,
|
|
MiDuUnit: 0,
|
MiDuOptionList: UnitHelper.MiDu_Value_List,
|
m_JieZhiParas: {
|
jzName: "",
|
volumeConcentration: 100,
|
jzTemperature: 20,
|
jzDensity: 1000,
|
jzViscosity: 1,
|
},
|
m_currentJieZhiDetails: [],
|
});
|
const initJieZhiParas = (data) => {
|
if (!data) return;
|
|
state.m_currentJieZhiDetails = [
|
{
|
name: `${t("selectPage.mediaName.TR")}`,
|
value: data.Name,
|
unit: "",
|
},
|
{
|
name: `${t("selectPage.volumeConcentration.TR")}`,
|
value: data.V_C,
|
unit: "%",
|
},
|
// {
|
// name: `${t("selectPage.maxTemperature.TR")}`,
|
// value: 20,
|
// unit: "℃",
|
// },
|
{
|
name: `${t("selectPage.maxDensity.TR")}`,
|
value: data.MiDu,
|
unit: "kg/m³",
|
},
|
{
|
name: `${t("selectPage.mediumViscosity.TR")}`,
|
value: data.NianDu,
|
unit: "cSt",
|
},
|
];
|
};
|
defineExpose({
|
initJieZhiParas,
|
});
|
</script>
|
|
<style lang="scss">
|
.materialBox {
|
.cz_select input {
|
background-color: #eee;
|
border-color: #eee;
|
}
|
|
.material-panel-body {
|
display: flex;
|
flex-direction: column;
|
background-color: #fff !important;
|
margin-bottom: 10px;
|
}
|
|
.mater-gup-style {
|
width: 100%;
|
height: 40px;
|
background: #eee;
|
line-height: 40px;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
gap: 10px;
|
|
.cz_select {
|
width: 220px;
|
}
|
}
|
|
.table_box {
|
width: 100%;
|
height: 30px;
|
display: flex;
|
border-left: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
|
.content2 {
|
width: 100%;
|
height: 100%;
|
line-height: 30px;
|
text-align: center;
|
background-color: #fff;
|
border-top: 1px solid #e9e9e9 !important;
|
// border-right: 1px solid #e9e9e9;
|
border-bottom: 1px solid #e9e9e9 !important;
|
color: #000000;
|
font-size: 12px;
|
}
|
|
.inputandselect_div {
|
position: relative;
|
|
input {
|
-webkit-appearance: none;
|
background-color: #fff;
|
background-image: none;
|
border-radius: 4px;
|
border: 1px solid #dcdfe6;
|
box-sizing: border-box;
|
color: #606266;
|
display: inline-block;
|
font-size: inherit;
|
height: 22px;
|
line-height: 40px;
|
outline: none;
|
padding: 0 15px;
|
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
width: 100%;
|
border: unset;
|
}
|
|
select {
|
background-color: #fff;
|
border-radius: 4px;
|
border: unset;
|
box-sizing: border-box;
|
color: #606266;
|
display: inline-block;
|
font-size: inherit;
|
height: 26px;
|
line-height: 40px;
|
outline: none;
|
padding: 0 15px;
|
width: 100%;
|
}
|
|
.input_materia {
|
position: absolute;
|
left: 25px;
|
top: 4px;
|
text-align: center;
|
}
|
}
|
|
.content3 {
|
width: 100%;
|
height: 100%;
|
line-height: 30px;
|
text-align: center;
|
background-color: #fff;
|
border-top: 1px solid #e9e9e9 !important;
|
border-right: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
color: #000000;
|
font-size: 12px;
|
}
|
|
.table_head {
|
border-top: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
}
|
|
.el-input__inner {
|
height: 24px;
|
line-height: 24px;
|
border: 1px solid #fff;
|
padding: unset;
|
text-align: center;
|
}
|
|
.el-input__icon {
|
line-height: 24px;
|
width: 20px;
|
}
|
|
.el-input-number {
|
width: 100%;
|
line-height: unset;
|
}
|
|
.el-input-number__decrease {
|
display: block;
|
}
|
|
.el-input-number__increase {
|
display: block;
|
}
|
|
.install_content {
|
.el-input__inner {
|
text-align: left;
|
padding-left: 30px;
|
}
|
}
|
}
|
}
|
</style>
|
<style lang="scss" scoped>
|
:deep(.cz_select .el-select__wrapper) {
|
text-align: center;
|
}
|
</style>
|