<template>
|
<div class="pumpList_box">
|
<!-- 头部导航栏 -->
|
<van-nav-bar style="background-color: #528abe">
|
<template #left>
|
<div @click="pageBack" style="display: flex; align-items: center">
|
<van-icon name="arrow-left" size="18" />
|
<span>{{$t('selectPage.previous.TR')}}</span>
|
</div>
|
</template>
|
<template #title>
|
<label>{{$t('selectPage.productSeries.TR')}}</label>
|
</template>
|
<template #right>
|
<div @click="goHome" style="display: flex; align-items: center">
|
<span style="margin-right: 5px">{{$t('selectPage.index.TR')}}</span>
|
<van-icon name="home-o" size="18" />
|
</div>
|
</template>
|
</van-nav-bar>
|
<div class="pumpList_main">
|
<div
|
class="pump_cell"
|
@click="toDetail(item)"
|
v-for="(item, index) in listData"
|
:key="item.PumpID"
|
:style="index % 2 == 0 ? 'background: #fafafa;' : 'background: #fffff;'"
|
>
|
<div class="pump_content">
|
<div class="pump_name">
|
<div>{{ item.PumpName }} </div> <div class="corpName"> <van-tag round type="primary" color="#528abe">{{item.CorpName}}</van-tag></div>
|
</div>
|
<div class="pump_detail">
|
<div class="prop_item" style="margin-right: 10px; width: 30%">
|
<span>{{$t('selectPage.efficiency.TR')}}:</span>
|
<span>{{ item.WorkPtE }}%</span>
|
</div>
|
<div class="prop_item">
|
<span>{{$t('selectPage.speed.TR')}}:</span>
|
<span>{{ item.WorkSpeed }}</span>
|
</div>
|
</div>
|
</div>
|
<div style="width: 80px; height: 65px">
|
<img :src="item.SpectrumPict" style="width: 100%; height: 100%" />
|
</div>
|
</div>
|
</div>
|
<transition name="van-slide-left">
|
<div class="poptips" v-show="showPopover">{{$t('selectPage.seriesTips.TR')}}</div>
|
</transition>
|
</div>
|
</template>
|
|
<script>
|
import UnitHelper from "@/utils/unit";
|
import ConstParas from "@/utils/constParas";
|
import languageMixin from "@/mixin/language.js";
|
|
export default {
|
mixins: [languageMixin],
|
data() {
|
return {
|
|
detailPageQueryModel: {}, //用于传送给下一个页面的类
|
|
SelDesignPtQUnit: 0,
|
SelDesignPtQUnitName: "m³/h",
|
|
SelDesignPtHUnit: 1,
|
SelDesignPtHUnitName: "m",
|
|
SelDesignPtPUnit: 1,
|
SelDesignPtPUnitName: "kW",
|
|
listData: [],
|
showPopover: false,//是否弹出提示框
|
};
|
},
|
mounted() {
|
let _this = this;
|
//弹出提示框
|
_this.showPopover = true;
|
setTimeout(function() {
|
_this.showPopover = false;
|
}, 2500);
|
|
|
document.title = "泵管家";
|
|
let prvePathDataObj = this.$store.state.instante.select.ByParas.filterData;
|
//console.log(prvePathDataObj,75)
|
if (prvePathDataObj == null) return;
|
if (prvePathDataObj.DesignInfo == null) return;
|
|
var selDesignPtQ = prvePathDataObj.DesignInfo.DpQ;
|
var selDesignPtQUnit = prvePathDataObj.DesignInfo.UnitQ;
|
var selDesignPtH = prvePathDataObj.DesignInfo.DpH;
|
var selDesignPtHUnit = prvePathDataObj.DesignInfo.UnitH;
|
|
this.SelDesignPtQUnit = selDesignPtQUnit;
|
this.SelDesignPtQUnitName = UnitHelper.GetUnitNameQ(selDesignPtQUnit);
|
this.SelDesignPtQ_StdUnit = UnitHelper.ConvertQ_toM3H(
|
selDesignPtQUnit,
|
selDesignPtQ
|
);
|
|
this.SelDesignPtHUnit = selDesignPtHUnit;
|
this.SelDesignPtHUnitName = UnitHelper.GetUnitNameH(selDesignPtHUnit);
|
this.SelDesignPtH_StdUnit = UnitHelper.ConvertH_toM(
|
selDesignPtHUnit,
|
selDesignPtH
|
);
|
|
this.initData(prvePathDataObj);
|
//console.log(prvePathDataObj);
|
},
|
methods: {
|
initData(prvePathDataObj) {
|
let that = this;
|
let Toast = that.$toast; //提示框实例
|
Toast.loading({
|
duration: 0, //为0时 不关闭toast框
|
message: "Loading...",
|
forbidClick: true
|
});
|
//console.log(prvePathDataObj, 401);
|
let postRequestData = {
|
//介质
|
JieZhi: {
|
ID: prvePathDataObj.JieZhi.ID, //介质id
|
Name: prvePathDataObj.JieZhi.Name, //介质名称
|
CalcDensity: prvePathDataObj.JieZhi.CalcDensity, //密度
|
CalcViscosity: prvePathDataObj.JieZhi.CalcViscosity //粘度
|
},
|
//筛选信息
|
FilterInfo: {
|
DriveType: prvePathDataObj.FilterInfo.DriveType, //设备类型 0电机 3柴油机
|
KeyWord: prvePathDataObj.FilterInfo.KeyWord, //关键字 暂时默认空
|
FirePumpType: prvePathDataObj.FilterInfo.FirePumpType, // 消防泵类型
|
MotorPoleNum: prvePathDataObj.FilterInfo.MotorPoleNum, //电机效率等级 暂时为空
|
DieselSpeed: prvePathDataObj.FilterInfo.DieselSpeed, //柴油机转速 暂时默认
|
MotorStandard: prvePathDataObj.FilterInfo.MotorStandard,
|
MotorFrequence: prvePathDataObj.FilterInfo.MotorFrequence //电机赫兹
|
},
|
//设计点参数
|
DesignInfo: {
|
UnitQ: prvePathDataObj.DesignInfo.UnitQ, //流量单位
|
UnitH: prvePathDataObj.DesignInfo.UnitH, //扬程单位
|
DpQ: prvePathDataObj.DesignInfo.DpQ, //输入的流量的值
|
DpH: prvePathDataObj.DesignInfo.DpH, //输入的扬程的值
|
PointTolerance: prvePathDataObj.DesignInfo.PointTolerance, // 点容差范围 默认空
|
IsVisCorrect: prvePathDataObj.DesignInfo.IsVisCorrect //是否修正粘度 默认false
|
},
|
SeriesID: prvePathDataObj.FilterInfo.SeriesID, //泵系列ID
|
CatalogID: prvePathDataObj.FilterInfo.CatalogID, //泵类型id
|
UID: that.$store.state.instante.account.UserID,
|
UType: that.$store.state.instante.account.UserType,
|
Lang: that.getCurrentLanguageType(),
|
SoftType: that.$globalConfig.SoftType,
|
SystemInfo: "",
|
TargetCorpID:0
|
};
|
// console.log(postRequestData,140)
|
//console.log(this.requireData,2738)
|
|
this.detailPageQueryModel = {
|
//用于点击表格详情传出的参数
|
SID: "",
|
PID: "",
|
from: ConstParas.DetailPageFrom.ByParas,
|
pur: ConstParas.DetailPagePurpose.ByParas, //XPumpByParas = 1,
|
SubID: 0,
|
DpQ: postRequestData.DesignInfo.DpQ,
|
DpH: postRequestData.DesignInfo.DpH,
|
DpQu: postRequestData.DesignInfo.UnitQ,
|
DpHu: postRequestData.DesignInfo.UnitH,
|
jzid: postRequestData.JieZhi.ID,
|
jzmd: postRequestData.JieZhi.CalcDensity,
|
jznd: postRequestData.JieZhi.CalcViscosity,
|
jzmz: postRequestData.JieZhi.Name,
|
isndc: prvePathDataObj.DesignInfo.IsVisCorrect,
|
fpt: prvePathDataObj.FilterInfo.FirePumpType,
|
TGrade: postRequestData.DesignInfo.PointTolerance.ToleranceGrade,
|
TRatioMinQ: postRequestData.DesignInfo.PointTolerance.RatioMinQ,
|
TRatioMaxQ: postRequestData.DesignInfo.PointTolerance.RatioMaxQ,
|
TRatioMinH: postRequestData.DesignInfo.PointTolerance.RatioMinH,
|
TRatioMaxH: postRequestData.DesignInfo.PointTolerance.RatioMaxH,
|
|
};
|
var selDesignPtQUnit = that.SelDesignPtQUnit;
|
var selDesignPtHUnit = that.SelDesignPtHUnit;
|
var selDesignPtPUnit = that.SelDesignPtPUnit;
|
// console.log(postRequestData,194)
|
that
|
.$axios({
|
method: "post",
|
url:
|
that.$globalConfig.WebApiUrl.MainUrl +
|
"v1/Mobile/SelectByParas/GetPageList",
|
data: postRequestData
|
})
|
.then(res => {
|
Toast.clear(); //关闭toast加载提示
|
console.log(res, 134);
|
// console.log(postRequestData,207)
|
let result = res.data;
|
if (result.Code != 0) {
|
if (result.Code == -3) {
|
Toast.fail({
|
duration: 4000, //为0时 不关闭toast框
|
message: "未查找到相关型号,请修改相关选型参数",
|
forbidClick: true
|
});
|
setTimeout(() => {
|
that.$router.go(-1); //请求不到数据返回上一页
|
}, 5000);
|
|
return;
|
} else {
|
Toast.fail({
|
duration: 3000, //为0时 不关闭toast框
|
message: "未查找到相关型号,将在三秒后返回上一页",
|
forbidClick: true
|
});
|
setTimeout(() => {
|
that.$router.go(-1); //请求不到数据返回上一页
|
}, 3000);
|
}
|
|
return;
|
}
|
let itemList = result.Data.ItemList;
|
var listData = [];
|
for (let i = 0; i < itemList.length; i++) {
|
|
let tableItem = {
|
CorpName:itemList[i].CorpName,
|
CatalogID: itemList[i].CatalogID, //类型id
|
ChartType: itemList[i].ChartType,
|
SeriesID: itemList[i].SeriesID, //系列id
|
PumpID: itemList[i].PumpID, //泵id
|
ThumbnailImage:
|
that.$globalConfig.WebApiUrl.FileUrl +
|
itemList[i].ThumbnailImage, //实物图路径
|
SereisName: itemList[i].SereisName, //系列
|
PumpName: itemList[i].PumpName, //泵型号
|
|
WorkSpeed: itemList[i].WorkSpeed, //转速
|
WorkD2: itemList[i].WorkD2, //叶轮直径
|
Note: itemList[i].Note, //备注
|
PlaceAngle: itemList[i].PlaceAngle, //安放角
|
QPerQBep: itemList[i].QPerQBep, //选型点和高效点的百分比
|
Ratedn: itemList[i].Ratedn, //原始额定转速(默认不显示)
|
OrginD2: itemList[i].OrginD2, //原始叶轮直径(默认不显示)
|
|
CutRatio: itemList[i].CutRatio, //切割率(默认不显示)
|
StageNumber: itemList[i].StageNumber, //泵级数(默认不显示)
|
ShutoffHead: itemList[i].ShutoffHead, //关死点扬程(默认不显示)
|
SalePrice: itemList[i].SalePrice, //销售价(折扣后)
|
OriginSalePrice: itemList[i].OriginSalePrice, //指导价(原始)
|
ChartObjects: itemList[i].ChartObjects, //工作曲线
|
SpectrumPict: "data:image/png;base64," + itemList[i].SpectrumPict //曲线图
|
};
|
if (itemList[i].WorkPtNPSH)
|
tableItem.WorkPtNPSH = itemList[i].WorkPtNPSH.toFixed(1);
|
if (itemList[i].CutRatio)
|
tableItem.CutRatio = parseFloat(itemList[i].CutRatio).toFixed(1);
|
if (itemList[i].WorkPtQ)
|
tableItem.WorkPtQ = UnitHelper.getDispValueQ(
|
UnitHelper.ConvertQ_fromM3H(
|
selDesignPtQUnit,
|
itemList[i].WorkPtQ
|
)
|
);
|
|
if (itemList[i].WorkPtH)
|
tableItem.WorkPtH = UnitHelper.getDispValueH(
|
UnitHelper.ConvertH_fromM(selDesignPtHUnit, itemList[i].WorkPtH)
|
);
|
if (itemList[i].WorkPtE) tableItem.WorkPtE = itemList[i].WorkPtE;
|
if (itemList[i].WorkPtP)
|
tableItem.WorkPtP = UnitHelper.getDispValueP(
|
UnitHelper.ConvertP_fromKW(
|
selDesignPtPUnit,
|
itemList[i].WorkPtH
|
)
|
);
|
|
listData.push(tableItem);
|
}
|
that.listData = listData;
|
//console.log(resultImg,262);
|
})
|
.catch(err => {
|
console.log(err);
|
});
|
},
|
//跳转到详情界面
|
toDetail(item) {
|
// console.log(item, 262);
|
this.detailPageQueryModel.SID = item.SeriesID;
|
this.detailPageQueryModel.PID = item.PumpID;
|
let query = this.detailPageQueryModel;
|
this.gotoPage("/byParas/Index", query, null);
|
},
|
//返回上一页
|
pageBack() {
|
this.$router.go(-1);
|
},
|
goHome() {
|
this.gotoPage("/Index", "", null);
|
}
|
}
|
};
|
</script>
|
|
<style lang="scss">
|
.corpName{
|
font-size:12px;
|
color:gray;
|
padding-left:12px;
|
position: absolute;
|
right: 15px;
|
}
|
.pumpList_box {
|
width: 100vw;
|
height: 100vh;
|
overflow: auto;
|
.pumpList_main {
|
width: 100%;
|
height: calc(100% - 46px);
|
overflow: auto;
|
.pump_cell {
|
display: flex;
|
position: relative;
|
width: 100%;
|
box-sizing: border-box;
|
height: 65px;
|
.pump_content {
|
width: calc(100% - 90px);
|
height: 100%;
|
display: flex;
|
flex-direction: column;
|
padding-left: 16px;
|
.pump_name {
|
width: 100%;
|
height: 50%;
|
/* text-align: center; */
|
display: flex;
|
justify-content: flex-start;
|
align-items: center;
|
font-size: 16px;
|
font-weight: 600;
|
position: relative;
|
}
|
.pump_detail {
|
width: 100%;
|
display: flex;
|
height: 50%;
|
align-items: center;
|
.prop_item {
|
width: 25%;
|
display: flex;
|
align-items: center;
|
justify-content: flex-start;
|
span {
|
font-size: 12px;
|
line-height: 1.5;
|
color: #808080;
|
}
|
}
|
}
|
}
|
}
|
.pump_cell::after {
|
position: absolute;
|
box-sizing: border-box;
|
content: " ";
|
pointer-events: none;
|
right: 0px;
|
bottom: 0;
|
left: 0px;
|
border-bottom: 1px solid #ebedf0;
|
-webkit-transform: scaleY(0.5);
|
transform: scaleY(0.5);
|
}
|
}
|
.poptips {
|
height: 18px;
|
position: fixed;
|
top: 32px;
|
left: 10px;
|
background-color: #000;
|
color: #ffffff;
|
z-index: 1;
|
font-size: 12px;
|
text-align: center;
|
border-radius: 3px;
|
}
|
}
|
</style>
|