|
|
@@ -1,986 +1,1437 @@
|
|
|
<template>
|
|
|
<div style="display: flex">
|
|
|
<div class="select-info">
|
|
|
- <div class="info-title">{{$t('配置概要')}}</div>
|
|
|
- <div class="scroll">
|
|
|
- <div class="product-wrapper">
|
|
|
- <div class="product">
|
|
|
- <div class="product-header">
|
|
|
- <div class="title">{{$t('光头')}}</div>
|
|
|
- <span @click="active=1;resultArr=[];fujianArr=[];items.splice(2,1);isEdit=true" v-if="!!resultArr[0]">
|
|
|
- <img src="@/assets/reSelect.svg" alt="">
|
|
|
- {{$t('重选')}}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="product-name">{{ resultArr[0] ? resultArr[0].itemname : $t('暂无') }}</div>
|
|
|
- <div class="attrite" v-if="resultArr[0] && resultArr[0].torque">
|
|
|
- <div class="attrite-title">{{$t('扭矩')}}:</div>
|
|
|
- <div class="attrite-value">{{ resultArr[0].torque }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[0] && resultArr[0].flh">
|
|
|
- <div class="attrite-title">{{$t('法兰号')}}:</div>
|
|
|
- <div class="attrite-value">{{ typeof resultArr[0].flh == 'string'?resultArr[0].flh:resultArr[0].flh[0] }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[0] && resultArr[0].caliber">
|
|
|
- <div class="attrite-title">{{$t('公称通径')}}:</div>
|
|
|
- <div class="attrite-value">{{ resultArr[0].caliber }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[0] && resultArr[0].nominalpressure">
|
|
|
- <div class="attrite-title">{{$t('公称压力')}}:</div>
|
|
|
- <div class="attrite-value">{{ resultArr[0].nominalpressure.join(',') }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[0] && resultArr[0].stemmaterial">
|
|
|
- <div class="attrite-title">{{$t('阀杆材质')}}:</div>
|
|
|
- <div class="attrite-value">{{ resultArr[0].stemmaterial }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[0] && resultArr[0].bodymaterial">
|
|
|
- <div class="attrite-title">{{$t('阀体材质')}}:</div>
|
|
|
- <div class="attrite-value">{{ resultArr[0].bodymaterial }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="product">
|
|
|
- <div class="product-header">
|
|
|
- <div class="title">{{$t('执行器')}}</div>
|
|
|
- <span @click="active=2;resultArr.splice(1);fujianArr=[];isEdit=true" v-if="!!resultArr[1]">
|
|
|
- <img src="@/assets/reSelect.svg" alt="">
|
|
|
- {{$t('重选')}}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="product-name">{{ resultArr[1] ? resultArr[1].actuatorname : $t('暂无') }}</div>
|
|
|
- <div class="attrite" v-if="guangtouParam.content.where.drivetype=='电动'">
|
|
|
- {{ resultArr[1] ? `${resultArr[1].itemname}+${resultArr[1].gearboxname}`:$t('暂无') }}
|
|
|
- </div>
|
|
|
- <div class="attrite" v-else>
|
|
|
- {{ resultArr[1] ? `${resultArr[1].itemname}`:$t('暂无') }}
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[1] && resultArr[1].torque">
|
|
|
- <div class="attrite-title">{{$t('输出扭矩')}}:</div>
|
|
|
- <div class="attrite-value">{{resultArr[1].torque }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[1] && resultArr[1].maxruntime">
|
|
|
- <div class="attrite-title">{{$t('开关时间')}}:</div>
|
|
|
- <div class="attrite-value">{{resultArr[1].maxruntime }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[1] && resultArr[1].speed">
|
|
|
- <div class="attrite-title">{{$t('转速')}}:</div>
|
|
|
- <div class="attrite-value">{{resultArr[1].speed }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[1] && resultArr[1].ratio">
|
|
|
- <div class="attrite-title">{{$t('减速比')}}:</div>
|
|
|
- <div class="attrite-value">{{resultArr[1].ratio }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[1] && resultArr[1].supplyvoltage">
|
|
|
- <div class="attrite-title">{{$t('电压')}}:</div>
|
|
|
- <div class="attrite-value">{{resultArr[1].supplyvoltage }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[1] && resultArr[1].ratedcurrent">
|
|
|
- <div class="attrite-title">{{$t('电流')}}:</div>
|
|
|
- <div class="attrite-value">{{resultArr[1].ratedcurrent }}</div>
|
|
|
- </div>
|
|
|
- <div class="attrite" v-if="resultArr[1] && resultArr[1].ratedpower">
|
|
|
- <div class="attrite-title">{{$t('功率')}}:</div>
|
|
|
- <div class="attrite-value">{{resultArr[1].ratedpower }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="product">
|
|
|
- <div class="product-header">
|
|
|
- <div class="title">{{$t('辅件')}}</div>
|
|
|
- <span @click="fujianArr=[];fujianParam.content.othertypes = ['电磁阀','限位开关','过滤减压阀'];$refs.fujianRef.listData();isEdit=true" v-if="resultArr.length >= 3">
|
|
|
- <img src="@/assets/reSelect.svg" alt="">
|
|
|
- {{$t('重选')}}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="attrite2" v-for="item in fujianArr" :key="item.othertype">
|
|
|
- <div class="attrite-title">{{ $t(item.othertype) }}:</div>
|
|
|
- <div class="attrite-value">{{ $t(item.model ) }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="info-title">{{ $t("配置概要") }}</div>
|
|
|
+ <div class="scroll">
|
|
|
+ <div class="product-wrapper">
|
|
|
+ <div class="product">
|
|
|
+ <div class="product-header">
|
|
|
+ <div class="title">{{ $t("光头") }}</div>
|
|
|
+ <span
|
|
|
+ @click="
|
|
|
+ active = 1;
|
|
|
+ resultArr = [];
|
|
|
+ fujianArr = [];
|
|
|
+ items.splice(2, 1);
|
|
|
+ isEdit = true;
|
|
|
+ "
|
|
|
+ v-if="!!resultArr[0]"
|
|
|
+ >
|
|
|
+ <img src="@/assets/reSelect.svg" alt="" />
|
|
|
+ {{ $t("重选") }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="drawer__panel">
|
|
|
- <div class="my-steps">
|
|
|
- <a-steps :current="active-1" style="margin-bottom: 10px;" @change="stepsChange">
|
|
|
- <a-step :title="item.title" v-for="(item,index) in items" :key="index">
|
|
|
- <i slot="icon" class="iconfont" style="font-size: 32px;color: #3874F6 !important" v-if="active > index+1"></i>
|
|
|
- </a-step>
|
|
|
- </a-steps>
|
|
|
- </div>
|
|
|
- <!--选光头-->
|
|
|
- <div class="dialog-content" v-show="active == 1">
|
|
|
- <div class="option-line">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('驱动方式')}}:</div>
|
|
|
- <MySelect :isClear="false" @click="$event => {guangtouChange($event);Search('guangtouParam','drivetype')}" :options="drivetype" v-model="guangtouParam.content.where.drivetype"></MySelect>
|
|
|
- </div>
|
|
|
+ <div class="product-name">
|
|
|
+ {{ resultArr[0] ? resultArr[0].itemname : $t("暂无") }}
|
|
|
</div>
|
|
|
- <div class="option-line">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('公称通径')}}:</div>
|
|
|
- <el-select filterable v-model="guangtouParam.content.where.caliber" :placeholder="$t(`请选择公称通径`)" size="small" style="width:100%" clearable @change="Search('guangtouParam','caliber')">
|
|
|
- <el-option v-for="item in caliber" :key="item.value" :value="item.value" :label="$t(item.value)"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('公称压力')}}:</div>
|
|
|
- <el-select filterable @change="Search('guangtouParam','nominalpressure')" :disabled="!guangtouParam.content.where.caliber" v-model="guangtouParam.content.where.nominalpressure" :placeholder="$t(`请选择公称压力`)" size="small" style="width:100%" clearable>
|
|
|
- <el-option v-for="item in nominalpressure" :key="item.value" :value="item.value" :label="item.remarks"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
+ <div class="attrite" v-if="resultArr[0] && resultArr[0].torque">
|
|
|
+ <div class="attrite-title">{{ $t("扭矩") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[0].torque }}</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="option-line">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('连接方式')}}:</div>
|
|
|
- <MySelect @click="Search('guangtouParam','connection')" :disabled="!guangtouParam.content.where.nominalpressure" :options="connection" v-model="guangtouParam.content.where.connection"></MySelect>
|
|
|
- </div>
|
|
|
+ <div class="attrite" v-if="resultArr[0] && resultArr[0].flh">
|
|
|
+ <div class="attrite-title">{{ $t("法兰号") }}:</div>
|
|
|
+ <div class="attrite-value">
|
|
|
+ {{
|
|
|
+ typeof resultArr[0].flh == "string"
|
|
|
+ ? resultArr[0].flh
|
|
|
+ : resultArr[0].flh[0]
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="option-line">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('阀体材质')}}:</div>
|
|
|
- <el-select filterable @change="Search('guangtouParam','bodymaterial')" :disabled="!guangtouParam.content.where.connection" v-model="guangtouParam.content.where.bodymaterial" :placeholder="$t(`请选择阀体材质`)" size="small" style="width:100%" clearable>
|
|
|
- <el-option v-for="item in bodymaterial" :key="item.value" :value="item.value" :label="item.remarks"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('阀杆材质')}}:</div>
|
|
|
- <el-select filterable @change="Search('guangtouParam','stemmaterial')" :disabled="!guangtouParam.content.where.bodymaterial" v-model="guangtouParam.content.where.stemmaterial" :placeholder="$t(`请选择阀杆材质`)" size="small" style="width:100%" clearable>
|
|
|
- <el-option v-for="item in stemmaterial" :key="item.value" :value="item.value" :label="item.remarks"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('阀座材质')}}:</div>
|
|
|
- <el-select filterable @change="Search('guangtouParam','plinthmaterial')" :disabled="!guangtouParam.content.where.stemmaterial" v-model="guangtouParam.content.where.plinthmaterial" :placeholder="$t(`请选择阀座材质`)" size="small" style="width:100%" clearable>
|
|
|
- <el-option v-for="item in plinthmaterial" :key="item.value" :value="item.value" :label="item.remarks"></el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
+ <div class="attrite" v-if="resultArr[0] && resultArr[0].caliber">
|
|
|
+ <div class="attrite-title">{{ $t("公称通径") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[0].caliber }}</div>
|
|
|
</div>
|
|
|
- <!--光头-->
|
|
|
- <MyTable :noQuery="true" fixedName="operation" :height="tableHeight" ref="guangtouRef" :layout="tool.tabelCol($route.name)['guangtouTable'].tablecols" :param="guangtouParam" :opwidth="200" :custom="true" style="margin-top: 14px">
|
|
|
- <template v-slot:customcol="scope">
|
|
|
- <span v-if="scope.column.columnname != 'operation'">{{$t(scope.column.data[scope.column.columnname])}}</span>
|
|
|
- </template>
|
|
|
- <template v-slot:opreation="scope">
|
|
|
- <el-button type="text" size="mini" @click="selectTarget(scope.data,'主阀')" :disabled="!guangtouParam.content.where.drivetype">{{$t('选择')}}</el-button>
|
|
|
- </template>
|
|
|
- </MyTable>
|
|
|
- </div>
|
|
|
- <!--选执行器-->
|
|
|
- <div class="dialog-content" v-show="active == 2">
|
|
|
- <div class="option-line">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('执行器')}}:</div>
|
|
|
- <el-input
|
|
|
- :placeholder="$t(`型号/料号`)"
|
|
|
- v-model="excelParam.content.where.condition1"
|
|
|
- clearable
|
|
|
- @clear="Search('excelParam')"
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="Search('excelParam')">
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="item" v-if="guangtouParam.content.where.drivetype!='气动'">
|
|
|
- <div class="label">{{$t('减速箱')}}:</div>
|
|
|
- <el-input
|
|
|
- :placeholder="$t(`型号/料号`)"
|
|
|
- v-model="excelParam.content.where.condition2"
|
|
|
- clearable
|
|
|
- @clear="Search('excelParam')"
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="Search('excelParam')">
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
+ <div
|
|
|
+ class="attrite"
|
|
|
+ v-if="resultArr[0] && resultArr[0].nominalpressure"
|
|
|
+ >
|
|
|
+ <div class="attrite-title">{{ $t("公称压力") }}:</div>
|
|
|
+ <div class="attrite-value">
|
|
|
+ {{ resultArr[0].nominalpressure.join(",") }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ class="attrite"
|
|
|
+ v-if="resultArr[0] && resultArr[0].stemmaterial"
|
|
|
+ >
|
|
|
+ <div class="attrite-title">{{ $t("阀杆材质") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[0].stemmaterial }}</div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="attrite"
|
|
|
+ v-if="resultArr[0] && resultArr[0].bodymaterial"
|
|
|
+ >
|
|
|
+ <div class="attrite-title">{{ $t("阀体材质") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[0].bodymaterial }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="option-line" v-if="guangtouParam.content.where.drivetype=='气动'">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('驱动方式')}}:</div>
|
|
|
- <MySelect :isClear="false" :options="[{remarks:'气动调节',value:'气动调节'},{remarks:'气动开关',value:'气动开关'}]" v-model="excelParam.content.where.drivetype"></MySelect>
|
|
|
- </div>
|
|
|
+ <div class="product">
|
|
|
+ <div class="product-header">
|
|
|
+ <div class="title">{{ $t("执行器") }}</div>
|
|
|
+ <span
|
|
|
+ @click="
|
|
|
+ active = 2;
|
|
|
+ resultArr.splice(1);
|
|
|
+ fujianArr = [];
|
|
|
+ isEdit = true;
|
|
|
+ "
|
|
|
+ v-if="!!resultArr[1]"
|
|
|
+ >
|
|
|
+ <img src="@/assets/reSelect.svg" alt="" />
|
|
|
+ {{ $t("重选") }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="product-name">
|
|
|
+ {{ resultArr[1] ? resultArr[1].actuatorname : $t("暂无") }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="attrite"
|
|
|
+ v-if="guangtouParam.content.where.drivetype == '电动'"
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ resultArr[1]
|
|
|
+ ? `${resultArr[1].itemname}+${resultArr[1].gearboxname}`
|
|
|
+ : $t("暂无")
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div class="attrite" v-else>
|
|
|
+ {{ resultArr[1] ? `${resultArr[1].itemname}` : $t("暂无") }}
|
|
|
</div>
|
|
|
- <div class="option-line" v-if="guangtouParam.content.where.drivetype=='电动'">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('驱动方式')}}:</div>
|
|
|
- <MySelect @click="Search('excelParam','actuatordrivetype');calcTableHieght('excelRef')" :options="[{remarks:'电动开关',value:'电动开关'},{remarks:'电动调节',value:'电动调节'}]" v-model="excelParam.content.where.actuatordrivetype"></MySelect>
|
|
|
- </div>
|
|
|
+ <div class="attrite" v-if="resultArr[1] && resultArr[1].torque">
|
|
|
+ <div class="attrite-title">{{ $t("输出扭矩") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[1].torque }}</div>
|
|
|
</div>
|
|
|
- <div class="option-line" v-if="guangtouParam.content.where.drivetype=='电动'">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('品牌')}}:</div>
|
|
|
- <MySelect @click="Search('excelParam','actuatorbrand');calcTableHieght('excelRef')" :disabled="!excelParam.content.where.actuatordrivetype" :options="actuatorbrand" v-model="excelParam.content.where.actuatorbrand"></MySelect>
|
|
|
- </div>
|
|
|
+ <div class="attrite" v-if="resultArr[1] && resultArr[1].maxruntime">
|
|
|
+ <div class="attrite-title">{{ $t("开关时间") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[1].maxruntime }}</div>
|
|
|
</div>
|
|
|
- <div class="option-line" v-else>
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('品牌')}}:</div>
|
|
|
- <MySelect @click="Search('excelParam','actuatorbrand')" :options="actuatorbrand" v-model="excelParam.content.where.actuatorbrand"></MySelect>
|
|
|
- </div>
|
|
|
+ <div class="attrite" v-if="resultArr[1] && resultArr[1].speed">
|
|
|
+ <div class="attrite-title">{{ $t("转速") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[1].speed }}</div>
|
|
|
</div>
|
|
|
- <div v-if="guangtouParam.content.where.drivetype == '电动' && excelParam.content.where.actuatorbrand && actuatorname.length">
|
|
|
- <div class="option-line">
|
|
|
- <div class="item">
|
|
|
- <div class="label" style="width: 80px;">{{$t('执行器类型')}}:</div>
|
|
|
- <span style="font-size: 14px;font-weight: bold;color:#3874F6">{{ $t(excelParam.content.where.actuatorname) || '--' }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <SelectBar style="margin: 20px 0" v-model="excelParam.content.where.actuatorname" :options="actuatorname.map(v => {return {url:v.url,remarks:v.remarks.split('-').pop(),value:v.remarks}})" @change="Search('excelParam','actuatorname')"></SelectBar>
|
|
|
+ <div class="attrite" v-if="resultArr[1] && resultArr[1].ratio">
|
|
|
+ <div class="attrite-title">{{ $t("减速比") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[1].ratio }}</div>
|
|
|
</div>
|
|
|
- <div class="option-line" v-if="guangtouParam.content.where.drivetype=='电动'">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('电源电压')}}:</div>
|
|
|
- <MySelect @click="Search('excelParam','supplyvoltage')" :disabled="!excelParam.content.where.actuatorname" :options="supplyvoltage" v-model="excelParam.content.where.supplyvoltage"></MySelect>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('信号类型')}}:</div>
|
|
|
- <MySelect @click="Search('excelParam','actuatorsignal')" :disabled="!excelParam.content.where.supplyvoltage" :options="actuatorsignal" v-model="excelParam.content.where.actuatorsignal"></MySelect>
|
|
|
- </div>
|
|
|
+ <div
|
|
|
+ class="attrite"
|
|
|
+ v-if="resultArr[1] && resultArr[1].supplyvoltage"
|
|
|
+ >
|
|
|
+ <div class="attrite-title">{{ $t("电压") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[1].supplyvoltage }}</div>
|
|
|
</div>
|
|
|
- <div class="option-line" v-show="guangtouParam.content.where.drivetype=='气动'">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('功能')}}:</div>
|
|
|
- <MySelect :disabled="!excelParam.content.where.actuatorname" @click="Search('excelParam','func')" :options="func" v-model="excelParam.content.where.func"></MySelect>
|
|
|
- </div>
|
|
|
+ <div
|
|
|
+ class="attrite"
|
|
|
+ v-if="resultArr[1] && resultArr[1].ratedcurrent"
|
|
|
+ >
|
|
|
+ <div class="attrite-title">{{ $t("电流") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[1].ratedcurrent }}</div>
|
|
|
</div>
|
|
|
+ <div class="attrite" v-if="resultArr[1] && resultArr[1].ratedpower">
|
|
|
+ <div class="attrite-title">{{ $t("功率") }}:</div>
|
|
|
+ <div class="attrite-value">{{ resultArr[1].ratedpower }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="option-line" v-show="guangtouParam.content.where.drivetype=='气动'">
|
|
|
- <div class="item">
|
|
|
- <div class="label">{{$t('结构')}}:</div>
|
|
|
- <MySelect :disabled="!excelParam.content.where.func" @click="Search('excelParam','bodystructure')" :options="bodystructure" v-model="excelParam.content.where.bodystructure"></MySelect>
|
|
|
- </div>
|
|
|
+ <div class="product">
|
|
|
+ <div class="product-header">
|
|
|
+ <div class="title">{{ $t("辅件") }}</div>
|
|
|
+ <span
|
|
|
+ @click="
|
|
|
+ fujianArr = [];
|
|
|
+ fujianParam.content.othertypes = [
|
|
|
+ '电磁阀',
|
|
|
+ '限位开关',
|
|
|
+ '过滤减压阀',
|
|
|
+ ];
|
|
|
+ $refs.fujianRef.listData();
|
|
|
+ isEdit = true;
|
|
|
+ "
|
|
|
+ v-if="resultArr.length >= 3"
|
|
|
+ >
|
|
|
+ <img src="@/assets/reSelect.svg" alt="" />
|
|
|
+ {{ $t("重选") }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="attrite2"
|
|
|
+ v-for="item in fujianArr"
|
|
|
+ :key="item.othertype"
|
|
|
+ >
|
|
|
+ <div class="attrite-title">{{ $t(item.othertype) }}:</div>
|
|
|
+ <div class="attrite-value">{{ $t(item.model) }}</div>
|
|
|
</div>
|
|
|
- <div class="tips" v-if="guangtouParam.content.where.drivetype=='电动'" style="color:#3874F6;margin-top: 10px;"><i class="el-icon-warning" style="margin-right: 5px;"></i>{{$t('建议开关阀时间')}}{{ caliber.filter(v=>v.value==guangtouParam.content.where.caliber).length ? caliber.filter(v=>v.value==guangtouParam.content.where.caliber)[0].remarks:'-' }}{{$t('秒')}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="drawer__panel">
|
|
|
+ <div class="my-steps">
|
|
|
+ <a-steps
|
|
|
+ :current="active - 1"
|
|
|
+ style="margin-bottom: 10px"
|
|
|
+ @change="stepsChange"
|
|
|
+ >
|
|
|
+ <a-step
|
|
|
+ :title="item.title"
|
|
|
+ v-for="(item, index) in items"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ slot="icon"
|
|
|
+ class="iconfont"
|
|
|
+ style="font-size: 32px; color: #3874f6 !important"
|
|
|
+ v-if="active > index + 1"
|
|
|
+ ></i
|
|
|
+ >
|
|
|
+ </a-step>
|
|
|
+ </a-steps>
|
|
|
+ </div>
|
|
|
+ <!--选光头-->
|
|
|
+ <div class="dialog-content" v-show="active == 1">
|
|
|
+ <div class="option-line">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("驱动方式") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ :isClear="false"
|
|
|
+ @click="
|
|
|
+ ($event) => {
|
|
|
+ guangtouChange($event);
|
|
|
+ Search('guangtouParam', 'drivetype');
|
|
|
+ }
|
|
|
+ "
|
|
|
+ :options="drivetype"
|
|
|
+ v-model="guangtouParam.content.where.drivetype"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="option-line">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("公称通径") }}:</div>
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ v-model="guangtouParam.content.where.caliber"
|
|
|
+ :placeholder="$t(`请选择公称通径`)"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ @change="Search('guangtouParam', 'caliber')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in caliber"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="$t(item.value)"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("公称压力") }}:</div>
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ @change="Search('guangtouParam', 'nominalpressure')"
|
|
|
+ :disabled="!guangtouParam.content.where.caliber"
|
|
|
+ v-model="guangtouParam.content.where.nominalpressure"
|
|
|
+ :placeholder="$t(`请选择公称压力`)"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in nominalpressure"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.remarks"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="option-line">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("连接方式") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ @click="Search('guangtouParam', 'connection')"
|
|
|
+ :disabled="!guangtouParam.content.where.nominalpressure"
|
|
|
+ :options="connection"
|
|
|
+ v-model="guangtouParam.content.where.connection"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <!--执行器-->
|
|
|
- <div v-if="guangtouParam.content.where.drivetype=='电动'">
|
|
|
- <MyTable fixedName="operation" :height="tableHeight" :noQuery="true" ref="excelRef" :layout="tool.tabelCol($route.name)['excelTable1'].tablecols" :param="excelParam" :custom="true" style="margin-top: 14px">
|
|
|
- <template v-slot:customcol="scope">
|
|
|
- <span v-if="scope.column.columnname == 'matchratio'" style="color:red">{{$t(scope.column.data[scope.column.columnname])}}</span>
|
|
|
- <span v-else-if="scope.column.columnname == 'maxsquarewidth'">{{scope.column.data[scope.column.columnname].join(',')}}</span>
|
|
|
- <span v-else-if="scope.column.columnname != 'operation'">{{$t(scope.column.data[scope.column.columnname])}}</span>
|
|
|
- </template>
|
|
|
- <template v-slot:opreation="scope">
|
|
|
- <el-button type="text" size="mini" @click="selectTarget(scope.data,'执行器')" :disabled="(loading) || (guangtouParam.content.where.drivetype=='电动' && resultArr.length == 2)">{{$t('选择')}}</el-button>
|
|
|
- </template>
|
|
|
- </MyTable>
|
|
|
+ <div class="option-line">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("阀体材质") }}:</div>
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ @change="Search('guangtouParam', 'bodymaterial')"
|
|
|
+ :disabled="!guangtouParam.content.where.connection"
|
|
|
+ v-model="guangtouParam.content.where.bodymaterial"
|
|
|
+ :placeholder="$t(`请选择阀体材质`)"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in bodymaterial"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.remarks"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("阀杆材质") }}:</div>
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ @change="Search('guangtouParam', 'stemmaterial')"
|
|
|
+ :disabled="!guangtouParam.content.where.bodymaterial"
|
|
|
+ v-model="guangtouParam.content.where.stemmaterial"
|
|
|
+ :placeholder="$t(`请选择阀杆材质`)"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in stemmaterial"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.remarks"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("阀座材质") }}:</div>
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ @change="Search('guangtouParam', 'plinthmaterial')"
|
|
|
+ :disabled="!guangtouParam.content.where.stemmaterial"
|
|
|
+ v-model="guangtouParam.content.where.plinthmaterial"
|
|
|
+ :placeholder="$t(`请选择阀座材质`)"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in plinthmaterial"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.remarks"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--光头-->
|
|
|
+ <MyTable
|
|
|
+ :noQuery="true"
|
|
|
+ fixedName="operation"
|
|
|
+ :height="tableHeight"
|
|
|
+ ref="guangtouRef"
|
|
|
+ :layout="tool.tabelCol($route.name)['guangtouTable'].tablecols"
|
|
|
+ :param="guangtouParam"
|
|
|
+ :opwidth="200"
|
|
|
+ :custom="true"
|
|
|
+ style="margin-top: 14px"
|
|
|
+ >
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <span v-if="scope.column.columnname != 'operation'">{{
|
|
|
+ $t(scope.column.data[scope.column.columnname])
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ @click="selectTarget(scope.data, '主阀')"
|
|
|
+ :disabled="!guangtouParam.content.where.drivetype"
|
|
|
+ >{{ $t("选择") }}</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </MyTable>
|
|
|
+ </div>
|
|
|
+ <!--选执行器-->
|
|
|
+ <div class="dialog-content" v-show="active == 2">
|
|
|
+ <div class="option-line">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("执行器") }}:</div>
|
|
|
+ <el-input
|
|
|
+ :placeholder="$t(`型号/料号`)"
|
|
|
+ v-model="excelParam.content.where.condition1"
|
|
|
+ clearable
|
|
|
+ @clear="Search('excelParam')"
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="Search('excelParam')"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="item"
|
|
|
+ v-if="guangtouParam.content.where.drivetype != '气动'"
|
|
|
+ >
|
|
|
+ <div class="label">{{ $t("减速箱") }}:</div>
|
|
|
+ <el-input
|
|
|
+ :placeholder="$t(`型号/料号`)"
|
|
|
+ v-model="excelParam.content.where.condition2"
|
|
|
+ clearable
|
|
|
+ @clear="Search('excelParam')"
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="Search('excelParam')"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="option-line"
|
|
|
+ v-if="guangtouParam.content.where.drivetype == '气动'"
|
|
|
+ >
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("驱动方式") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ :isClear="false"
|
|
|
+ :options="[
|
|
|
+ { remarks: '气动调节', value: '气动调节' },
|
|
|
+ { remarks: '气动开关', value: '气动开关' },
|
|
|
+ ]"
|
|
|
+ v-model="excelParam.content.where.drivetype"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="option-line"
|
|
|
+ v-if="guangtouParam.content.where.drivetype == '电动'"
|
|
|
+ >
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("驱动方式") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ @click="
|
|
|
+ Search('excelParam', 'actuatordrivetype');
|
|
|
+ calcTableHieght('excelRef');
|
|
|
+ "
|
|
|
+ :options="[
|
|
|
+ { remarks: '电动开关', value: '电动开关' },
|
|
|
+ { remarks: '电动调节', value: '电动调节' },
|
|
|
+ ]"
|
|
|
+ v-model="excelParam.content.where.actuatordrivetype"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="option-line"
|
|
|
+ v-if="guangtouParam.content.where.drivetype == '电动'"
|
|
|
+ >
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("品牌") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ @click="
|
|
|
+ Search('excelParam', 'actuatorbrand');
|
|
|
+ calcTableHieght('excelRef');
|
|
|
+ "
|
|
|
+ :disabled="!excelParam.content.where.actuatordrivetype"
|
|
|
+ :options="actuatorbrand"
|
|
|
+ v-model="excelParam.content.where.actuatorbrand"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="option-line" v-else>
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("品牌") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ @click="Search('excelParam', 'actuatorbrand')"
|
|
|
+ :options="actuatorbrand"
|
|
|
+ v-model="excelParam.content.where.actuatorbrand"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ guangtouParam.content.where.drivetype == '电动' &&
|
|
|
+ excelParam.content.where.actuatorbrand &&
|
|
|
+ actuatorname.length
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="option-line">
|
|
|
+ <div class="item">
|
|
|
+ <div class="label" style="width: 80px">
|
|
|
+ {{ $t("执行器类型") }}:
|
|
|
+ </div>
|
|
|
+ <span
|
|
|
+ style="font-size: 14px; font-weight: bold; color: #3874f6"
|
|
|
+ >{{ $t(excelParam.content.where.actuatorname) || "--" }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
- <MyTable v-else :height="tableHeight" fixedName="operation" :noQuery="true" ref="excelRef" :layout="tool.tabelCol($route.name)['excelTable2'].tablecols" :param="excelParam" :custom="true" style="margin-top: 14px">
|
|
|
- <template v-slot:customcol="scope">
|
|
|
- <span v-if="scope.column.columnname == 'matchratio'" style="color:red">{{$t(scope.column.data[scope.column.columnname])}}</span>
|
|
|
- <span v-else-if="scope.column.columnname == 'maxsquarewidth'">{{scope.column.data[scope.column.columnname].join(',')}}</span>
|
|
|
- <span v-else-if="scope.column.columnname != 'operation'">{{$t(scope.column.data[scope.column.columnname])}}</span>
|
|
|
- </template>
|
|
|
- <template v-slot:opreation="scope">
|
|
|
- <el-button type="text" size="mini" @click="selectTarget(scope.data,'执行器')" :disabled="(loading) || (guangtouParam.content.where.drivetype=='电动' && resultArr.length == 2)">{{$t('选择')}}</el-button>
|
|
|
- </template>
|
|
|
- </MyTable>
|
|
|
+ </div>
|
|
|
+ <SelectBar
|
|
|
+ style="margin: 20px 0"
|
|
|
+ v-model="excelParam.content.where.actuatorname"
|
|
|
+ @change="Search('excelParam', 'actuatorname')"
|
|
|
+ :options="computedActuatorNameOptions"
|
|
|
+ ></SelectBar>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="option-line"
|
|
|
+ v-if="guangtouParam.content.where.drivetype == '电动'"
|
|
|
+ >
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("电源电压") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ @click="Search('excelParam', 'supplyvoltage')"
|
|
|
+ :disabled="!excelParam.content.where.actuatorname"
|
|
|
+ :options="supplyvoltage"
|
|
|
+ v-model="excelParam.content.where.supplyvoltage"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("信号类型") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ @click="Search('excelParam', 'actuatorsignal')"
|
|
|
+ :disabled="!excelParam.content.where.supplyvoltage"
|
|
|
+ :options="actuatorsignal"
|
|
|
+ v-model="excelParam.content.where.actuatorsignal"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="option-line"
|
|
|
+ v-show="guangtouParam.content.where.drivetype == '气动'"
|
|
|
+ >
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("功能") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ :disabled="!excelParam.content.where.actuatorname"
|
|
|
+ @click="Search('excelParam', 'func')"
|
|
|
+ :options="func"
|
|
|
+ v-model="excelParam.content.where.func"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <!--选辅件-->
|
|
|
- <div class="dialog-content" v-show="active == 3">
|
|
|
- <MyTable :noQuery="true" ref="fujianRef" fixedName="operation" :height="tableHeight" :layout="tool.tabelCol($route.name)['itemList'].tablecols" :param="fujianParam" :opwidth="200" :custom="true" style="margin-top: 14px">
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="option-line"
|
|
|
+ v-show="guangtouParam.content.where.drivetype == '气动'"
|
|
|
+ >
|
|
|
+ <div class="item">
|
|
|
+ <div class="label">{{ $t("结构") }}:</div>
|
|
|
+ <MySelect
|
|
|
+ :disabled="!excelParam.content.where.func"
|
|
|
+ @click="Search('excelParam', 'bodystructure')"
|
|
|
+ :options="bodystructure"
|
|
|
+ v-model="excelParam.content.where.bodystructure"
|
|
|
+ ></MySelect>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="tips"
|
|
|
+ v-if="guangtouParam.content.where.drivetype == '电动' && resultArr[0]"
|
|
|
+ style="color: #3874f6; margin-top: 10px"
|
|
|
+ >
|
|
|
+ <i class="el-icon-warning" style="margin-right: 5px"></i
|
|
|
+ >{{ $t("建议开关阀时间")
|
|
|
+ }}{{
|
|
|
+ caliber.filter((v) => v.value == resultArr[0].caliber).length
|
|
|
+ ? caliber
|
|
|
+ .filter((v) => v.value == resultArr[0].caliber)[0]
|
|
|
+ .remarks.split(";")[0]
|
|
|
+ : "-"
|
|
|
+ }}{{ $t("秒") }}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!--执行器-->
|
|
|
+ <div v-if="guangtouParam.content.where.drivetype == '电动'">
|
|
|
+ <MyTable
|
|
|
+ fixedName="operation"
|
|
|
+ :height="tableHeight"
|
|
|
+ :noQuery="true"
|
|
|
+ ref="excelRef"
|
|
|
+ :layout="tool.tabelCol($route.name)['excelTable1'].tablecols"
|
|
|
+ :param="excelParam"
|
|
|
+ :custom="true"
|
|
|
+ style="margin-top: 14px"
|
|
|
+ >
|
|
|
<template v-slot:customcol="scope">
|
|
|
- <span v-if="scope.column.columnname != 'operation'">{{$t(scope.column.data[scope.column.columnname])}}</span>
|
|
|
+ <span
|
|
|
+ v-if="scope.column.columnname == 'matchratio'"
|
|
|
+ style="color: red"
|
|
|
+ >{{ $t(scope.column.data[scope.column.columnname]) }}</span
|
|
|
+ >
|
|
|
+ <span v-else-if="scope.column.columnname == 'maxsquarewidth'">{{
|
|
|
+ scope.column.data[scope.column.columnname].join(",")
|
|
|
+ }}</span>
|
|
|
+ <span v-else-if="scope.column.columnname != 'operation'">{{
|
|
|
+ $t(scope.column.data[scope.column.columnname])
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <el-button type="text" size="mini" @click="selectTarget(scope.data,'辅件')" :disabled="loading">{{$t('选择')}}</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ @click="selectTarget(scope.data, '执行器')"
|
|
|
+ :disabled="
|
|
|
+ (guangtouParam.content.where.drivetype == '电动' &&
|
|
|
+ resultArr.length == 2)
|
|
|
+ "
|
|
|
+ >{{ $t("选择") }}</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
- </MyTable>
|
|
|
- </div>
|
|
|
- <div class="fixed__btn__panel">
|
|
|
- <el-button size="small" @click="close()" class="normal-btn-width">{{$t(`取 消`)}}</el-button>
|
|
|
- <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width" v-if="active == 3" :disabled="$refs.fujianRef.list.length!= 0">{{$t('确认')}}</el-button>
|
|
|
+ </MyTable>
|
|
|
</div>
|
|
|
+ <MyTable
|
|
|
+ v-else
|
|
|
+ :height="tableHeight"
|
|
|
+ fixedName="operation"
|
|
|
+ :noQuery="true"
|
|
|
+ ref="excelRef"
|
|
|
+ :layout="tool.tabelCol($route.name)['excelTable2'].tablecols"
|
|
|
+ :param="excelParam"
|
|
|
+ :custom="true"
|
|
|
+ style="margin-top: 14px"
|
|
|
+ >
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <span
|
|
|
+ v-if="scope.column.columnname == 'matchratio'"
|
|
|
+ style="color: red"
|
|
|
+ >{{ $t(scope.column.data[scope.column.columnname]) }}</span
|
|
|
+ >
|
|
|
+ <span v-else-if="scope.column.columnname == 'maxsquarewidth'">{{
|
|
|
+ scope.column.data[scope.column.columnname].join(",")
|
|
|
+ }}</span>
|
|
|
+ <span v-else-if="scope.column.columnname != 'operation'">{{
|
|
|
+ $t(scope.column.data[scope.column.columnname])
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ @click="selectTarget(scope.data, '执行器')"
|
|
|
+ :disabled="
|
|
|
+ (guangtouParam.content.where.drivetype == '电动' &&
|
|
|
+ resultArr.length == 2)
|
|
|
+ "
|
|
|
+ >{{ $t("选择") }}</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </MyTable>
|
|
|
+ </div>
|
|
|
+ <!--选辅件-->
|
|
|
+ <div class="dialog-content" v-show="active == 3">
|
|
|
+ <MyTable
|
|
|
+ :noQuery="true"
|
|
|
+ ref="fujianRef"
|
|
|
+ fixedName="operation"
|
|
|
+ :height="tableHeight"
|
|
|
+ :layout="tool.tabelCol($route.name)['itemList'].tablecols"
|
|
|
+ :param="fujianParam"
|
|
|
+ :opwidth="200"
|
|
|
+ :custom="true"
|
|
|
+ style="margin-top: 14px"
|
|
|
+ >
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <span v-if="scope.column.columnname != 'operation'">{{
|
|
|
+ $t(scope.column.data[scope.column.columnname])
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ @click="selectTarget(scope.data, '辅件')"
|
|
|
+ :disabled="loading"
|
|
|
+ >{{ $t("选择") }}</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </MyTable>
|
|
|
+ </div>
|
|
|
+ <div class="fixed__btn__panel">
|
|
|
+ <el-button size="small" @click="close()" class="normal-btn-width">{{
|
|
|
+ $t(`取 消`)
|
|
|
+ }}</el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="onSubmit"
|
|
|
+ class="normal-btn-width"
|
|
|
+ v-if="active == 3"
|
|
|
+ :disabled="$refs.fujianRef.list.length != 0"
|
|
|
+ >{{ $t("确认") }}</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import '@/optionSystem/valveOption/index.css'
|
|
|
-import MySelect from '@/optionSystem/FProductManage/modules/select.vue'
|
|
|
-import MyTable from '@/optionSystem/FProductManage/modules/table.vue'
|
|
|
-import SelectBar from '@/optionSystem/FProductManage/modules/selectBar.vue'
|
|
|
+import "@/optionSystem/valveOption/index.css";
|
|
|
+import MySelect from "@/optionSystem/FProductManage/modules/select.vue";
|
|
|
+import MyTable from "@/optionSystem/FProductManage/modules/table.vue";
|
|
|
+import SelectBar from "@/optionSystem/FProductManage/modules/selectBar.vue";
|
|
|
export default {
|
|
|
- components:{MySelect,MyTable,SelectBar},
|
|
|
- props:['data'],
|
|
|
- inject:['valvetype','resultArrs'],
|
|
|
- data () {
|
|
|
+ components: { MySelect, MyTable, SelectBar },
|
|
|
+ props: ["data"],
|
|
|
+ inject: ["valvetype", "resultArrs"],
|
|
|
+ computed: {
|
|
|
+ //执行器类型选项
|
|
|
+ computedActuatorNameOptions() {
|
|
|
+ return this.actuatorname.map((v) => {
|
|
|
return {
|
|
|
- items: [
|
|
|
- {title:'选光头',value:'光头'},
|
|
|
- {title:'选执行器',value:'执行器'},
|
|
|
- ],
|
|
|
- active:1,
|
|
|
- tableHeight:'400px',
|
|
|
- isEdit:false,
|
|
|
- excel:'',
|
|
|
- gangtou:'',
|
|
|
- resultArr:[],
|
|
|
- caliber:[],
|
|
|
- nominalpressure:[],
|
|
|
- connection:[],
|
|
|
- bodymaterial:[],
|
|
|
- stemmaterial:[],
|
|
|
- plinthmaterial:[],
|
|
|
- actuatorbrand:[],
|
|
|
- actuatorname:[],
|
|
|
- actuatorsignal:[],
|
|
|
- supplyvoltage:[],
|
|
|
- actuatordrivetype:[],
|
|
|
- drivetype:[],
|
|
|
- bodystructure:[],
|
|
|
- func:[],
|
|
|
- guangtouList:[],
|
|
|
- form: {
|
|
|
- "itemid": 0,
|
|
|
- "plm_itemextendid": 0,
|
|
|
- "valvetype": "蝶阀", //阀门类型(固定)
|
|
|
- "itemno": "", //产品编码(必填,唯一)
|
|
|
- "itemname": "", //产品名称(必填)
|
|
|
- "erpitemno": "", //erp品号(必填)
|
|
|
- "erpitemname": "", //erp品名(必填)
|
|
|
- "spec": "", //规格尺寸(必填)
|
|
|
- "model": "", //型号(必填)
|
|
|
- "material": "", //材质(必填,选项)
|
|
|
- "marketprice": '',
|
|
|
- "caliber": "", //公称通径
|
|
|
- "nominalpressure": [
|
|
|
-
|
|
|
- ], //公称压力
|
|
|
- "connection": "",
|
|
|
- "drivetype": [
|
|
|
-
|
|
|
- ], //驱动方式
|
|
|
- "valveplatematerial": "",
|
|
|
- "bodymaterial": "",
|
|
|
- "stemmaterial": "",
|
|
|
- "plinthmaterial": "",
|
|
|
- "torque": "", //
|
|
|
- "maxruntime": "", //90°最大运行时间
|
|
|
- "actuatorbrand":"",//执行器品牌
|
|
|
- "actuatordrivetype":"",//执行器类型
|
|
|
- "part_itemids": [
|
|
|
-
|
|
|
- ]
|
|
|
- },
|
|
|
- guangtouParam: {
|
|
|
- "id": 20240718162102,
|
|
|
- "content": {
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 30,
|
|
|
- "sa_lectotypecfgid":this.$route.query.id,
|
|
|
- "where": {
|
|
|
- "condition": "",
|
|
|
- "caliber": "", //公称通径
|
|
|
- "nominalpressure": "", //公称压力
|
|
|
- "connection": "", //连接方式
|
|
|
- "bodymaterial": "", //阀体材质
|
|
|
- "stemmaterial": "", //阀杆材质
|
|
|
- "plinthmaterial": "", //阀座材质
|
|
|
- "drivetype": "电动" //驱动方式
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- excelList:[],
|
|
|
- excelParam: {
|
|
|
- "id": 20240718162202,
|
|
|
- "content": {
|
|
|
- "itemid": "",//光头id
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 30,
|
|
|
- "sa_lectotypecfgid":this.$route.query.id,
|
|
|
- "where": {
|
|
|
- "actuatordrivetype": "电动开关", //驱动方式
|
|
|
- "condition1": "",
|
|
|
- "condition2": "",
|
|
|
- "torque": "", //阀门扭矩
|
|
|
- "flh": "", //法兰号
|
|
|
- "actuatorbrand": "", //品牌
|
|
|
- "actuatorname":'',
|
|
|
- "supplyvoltage":'',
|
|
|
- "actuatorsignal":'',
|
|
|
- "maxsquarewidth": "", //方阀杆最大宽度
|
|
|
- "maxrounddiameter": "" //圆阀杆最大直径
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- fujianList:[],
|
|
|
- fujianArr:[],
|
|
|
- loading:false,
|
|
|
- fujianParam: {
|
|
|
- "id": 20240718162402,
|
|
|
- "content": {
|
|
|
- "othertypes": [
|
|
|
- ],
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 300,
|
|
|
- "where": {
|
|
|
- "actuatorbrand": "" //品牌
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- timer:null,
|
|
|
- product:{}
|
|
|
- }
|
|
|
+ url: v.url,
|
|
|
+ remarks: v.remarks.split("-").pop(),
|
|
|
+ value: v.remarks,
|
|
|
+ };
|
|
|
+ });
|
|
|
},
|
|
|
- watch: {
|
|
|
- active (val) {
|
|
|
- switch (val) {
|
|
|
- case 1:
|
|
|
- this.calcTableHieght('guangtouRef')
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- this.calcTableHieght('excelRef')
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- this.calcTableHieght('fujianRef')
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- stepsChange () {
|
|
|
-
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ items: [
|
|
|
+ { title: "选光头", value: "光头" },
|
|
|
+ { title: "选执行器", value: "执行器" },
|
|
|
+ ],
|
|
|
+ active: 1,
|
|
|
+ tableHeight: "400px",
|
|
|
+ isEdit: false,
|
|
|
+ excel: "",
|
|
|
+ gangtou: "",
|
|
|
+ resultArr: [],
|
|
|
+ caliber: [],
|
|
|
+ nominalpressure: [],
|
|
|
+ connection: [],
|
|
|
+ bodymaterial: [],
|
|
|
+ stemmaterial: [],
|
|
|
+ plinthmaterial: [],
|
|
|
+ actuatorbrand: [],
|
|
|
+ actuatorname: [],
|
|
|
+ actuatorsignal: [],
|
|
|
+ supplyvoltage: [],
|
|
|
+ actuatordrivetype: [],
|
|
|
+ drivetype: [],
|
|
|
+ bodystructure: [],
|
|
|
+ func: [],
|
|
|
+ guangtouList: [],
|
|
|
+ form: {
|
|
|
+ itemid: 0,
|
|
|
+ plm_itemextendid: 0,
|
|
|
+ valvetype: "蝶阀", //阀门类型(固定)
|
|
|
+ itemno: "", //产品编码(必填,唯一)
|
|
|
+ itemname: "", //产品名称(必填)
|
|
|
+ erpitemno: "", //erp品号(必填)
|
|
|
+ erpitemname: "", //erp品名(必填)
|
|
|
+ spec: "", //规格尺寸(必填)
|
|
|
+ model: "", //型号(必填)
|
|
|
+ material: "", //材质(必填,选项)
|
|
|
+ marketprice: "",
|
|
|
+ caliber: "", //公称通径
|
|
|
+ nominalpressure: [], //公称压力
|
|
|
+ connection: "",
|
|
|
+ drivetype: [], //驱动方式
|
|
|
+ valveplatematerial: "",
|
|
|
+ bodymaterial: "",
|
|
|
+ stemmaterial: "",
|
|
|
+ plinthmaterial: "",
|
|
|
+ torque: "", //
|
|
|
+ maxruntime: "", //90°最大运行时间
|
|
|
+ actuatorbrand: "", //执行器品牌
|
|
|
+ actuatordrivetype: "", //执行器类型
|
|
|
+ part_itemids: [],
|
|
|
+ },
|
|
|
+ guangtouParam: {
|
|
|
+ id: 20240718162102,
|
|
|
+ content: {
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 30,
|
|
|
+ sa_lectotypecfgid: this.$route.query.id,
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+ caliber: "", //公称通径
|
|
|
+ nominalpressure: "", //公称压力
|
|
|
+ connection: "", //连接方式
|
|
|
+ bodymaterial: "", //阀体材质
|
|
|
+ stemmaterial: "", //阀杆材质
|
|
|
+ plinthmaterial: "", //阀座材质
|
|
|
+ drivetype: "电动", //驱动方式
|
|
|
+ },
|
|
|
},
|
|
|
- init () {
|
|
|
- this.guangtouChange(this.data.filter.mainvalve.drivetype)
|
|
|
+ },
|
|
|
+ excelList: [],
|
|
|
+ excelParam: {
|
|
|
+ id: 20240718162202,
|
|
|
+ content: {
|
|
|
+ itemid: "", //光头id
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 30,
|
|
|
+ sa_lectotypecfgid: this.$route.query.id,
|
|
|
+ where: {
|
|
|
+ actuatordrivetype: "电动开关", //驱动方式
|
|
|
+ condition1: "",
|
|
|
+ condition2: "",
|
|
|
+ torque: "", //阀门扭矩
|
|
|
+ flh: "", //法兰号
|
|
|
+ actuatorbrand: "", //品牌
|
|
|
+ actuatorname: "",
|
|
|
+ supplyvoltage: "",
|
|
|
+ actuatorsignal: "",
|
|
|
+ maxsquarewidth: "", //方阀杆最大宽度
|
|
|
+ maxrounddiameter: "", //圆阀杆最大直径
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ fujianList: [],
|
|
|
+ fujianArr: [],
|
|
|
+ loading: false,
|
|
|
+ fujianParam: {
|
|
|
+ id: 20240718162402,
|
|
|
+ content: {
|
|
|
+ othertypes: [],
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 300,
|
|
|
+ where: {
|
|
|
+ actuatorbrand: "", //品牌
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ timer: null,
|
|
|
+ product: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ active(val) {
|
|
|
+ switch (val) {
|
|
|
+ case 1:
|
|
|
+ this.calcTableHieght("guangtouRef");
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ this.calcTableHieght("excelRef");
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ this.calcTableHieght("fujianRef");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ stepsChange() {},
|
|
|
+ init() {
|
|
|
+ this.guangtouChange(this.data.filter.mainvalve.drivetype);
|
|
|
|
|
|
- Object.keys(this.data.filter.mainvalve).forEach(v => {
|
|
|
- this.guangtouParam.content.where[v] = this.data.filter.mainvalve[v]
|
|
|
- })
|
|
|
- Object.keys(this.data.filter.actuator).forEach(v => {
|
|
|
- this.excelParam.content.where[v] = this.data.filter.actuator[v]
|
|
|
- })
|
|
|
- if (this.guangtouParam.content.where.drivetype == '气动') {
|
|
|
- this.items.push({title:'选辅件',value:'辅件'})
|
|
|
- this.fujianArr = this.data.filter.other.fujianArr
|
|
|
- }
|
|
|
- this.$refs.guangtouRef.listData(() => {
|
|
|
- if (!this.$refs.guangtouRef.list.length) return
|
|
|
- console.log(this.$refs.guangtouRef.list[0]);
|
|
|
+ Object.keys(this.data.filter.mainvalve).forEach((v) => {
|
|
|
+ this.guangtouParam.content.where[v] = this.data.filter.mainvalve[v];
|
|
|
+ });
|
|
|
+ Object.keys(this.data.filter.actuator).forEach((v) => {
|
|
|
+ this.excelParam.content.where[v] = this.data.filter.actuator[v];
|
|
|
+ });
|
|
|
+ if (this.guangtouParam.content.where.drivetype == "气动") {
|
|
|
+ this.items.push({ title: "选辅件", value: "辅件" });
|
|
|
+ this.fujianArr = this.data.filter.other.fujianArr;
|
|
|
+ }
|
|
|
+ this.$refs.guangtouRef.listData(() => {
|
|
|
+ if (!this.$refs.guangtouRef.list.length) return;
|
|
|
+ console.log(this.$refs.guangtouRef.list[0]);
|
|
|
|
|
|
- this.nominalpressure = this.$refs.guangtouRef.list[0].option.nominalpressure
|
|
|
- this.connection = this.$refs.guangtouRef.list[0].option.connection
|
|
|
- this.bodymaterial = this.$refs.guangtouRef.list[0].option.bodymaterial
|
|
|
- this.stemmaterial = this.$refs.guangtouRef.list[0].option.stemmaterial
|
|
|
- this.plinthmaterial = this.$refs.guangtouRef.list[0].option.plinthmaterial
|
|
|
- })
|
|
|
- this.resultArr = JSON.parse(JSON.stringify(this.resultArrs()))
|
|
|
- console.log(this.resultArr);
|
|
|
+ this.nominalpressure =
|
|
|
+ this.$refs.guangtouRef.list[0].option.nominalpressure;
|
|
|
+ this.connection = this.$refs.guangtouRef.list[0].option.connection;
|
|
|
+ this.bodymaterial = this.$refs.guangtouRef.list[0].option.bodymaterial;
|
|
|
+ this.stemmaterial = this.$refs.guangtouRef.list[0].option.stemmaterial;
|
|
|
+ this.plinthmaterial =
|
|
|
+ this.$refs.guangtouRef.list[0].option.plinthmaterial;
|
|
|
+ });
|
|
|
+ this.resultArr = JSON.parse(JSON.stringify(this.resultArrs()));
|
|
|
+ console.log(this.resultArr);
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- this.$refs.excelRef.listData(() => {
|
|
|
- if (!this.$refs.excelRef.list.length) return
|
|
|
- this.actuatorbrand = this.$refs.excelRef.list[0].option.actuatorbrand
|
|
|
- this.bodystructure = this.$refs.excelRef.list[0].option.bodystructure
|
|
|
- this.actuatorname = this.$refs.excelRef.list[0].option.actuatorname
|
|
|
- this.func = this.$refs.excelRef.list[0].option.func
|
|
|
- })
|
|
|
- this.$refs.fujianRef.listData()
|
|
|
- }, 1000);
|
|
|
- },
|
|
|
- calcTableHieght (id) {
|
|
|
- this.$nextTick(() => {
|
|
|
- if (!this.$refs[id]) return
|
|
|
- let target = this.$refs[id].$el.getBoundingClientRect()
|
|
|
- let clientHeight = document.body.clientHeight
|
|
|
- this.tableHeight = clientHeight - target.top - 85 + 'px'
|
|
|
- this.$refs[id].$refs.table.doLayout()
|
|
|
- })
|
|
|
- },
|
|
|
- close () {
|
|
|
- this.active = 1
|
|
|
- this.guangtouParam.content.where.drivetype = '电动'
|
|
|
- this.resultArr = []
|
|
|
- this.fujianArr = []
|
|
|
- this.items = [
|
|
|
- {title:'选光头',value:'光头'},
|
|
|
- {title:'选执行器',value:'执行器'},
|
|
|
- ]
|
|
|
- this.isEdit = false
|
|
|
- this.$emit('close')
|
|
|
- },
|
|
|
- //搜索
|
|
|
- Search (type,position,init) {
|
|
|
- if (!init) this.isEdit = true
|
|
|
- let index = 0
|
|
|
- let whereKeys = Object.keys(this[type].content.where)
|
|
|
- if (position) {
|
|
|
- index = whereKeys.indexOf(position) + 1
|
|
|
- }
|
|
|
- if (type != 'excelParam') {
|
|
|
- for (let i = index; i < whereKeys.length - 1; i++) {
|
|
|
- if (!position && whereKeys[i].indexOf('condition') != -1) continue
|
|
|
- this[type].content.where[whereKeys[i]] = ''
|
|
|
- }
|
|
|
- } else if (type == 'excelParam') {
|
|
|
- for (let i = index; i < whereKeys.length; i++) {
|
|
|
- if (whereKeys[i].indexOf('condition') != -1 || whereKeys[i].indexOf('flh') != -1 || whereKeys[i].indexOf('maxrounddiameter') != -1 || whereKeys[i].indexOf('maxsquarewidth') != -1 || whereKeys[i].indexOf('torque') != -1 || whereKeys[i].indexOf('drivetype') != -1) continue
|
|
|
- this[type].content.where[whereKeys[i]] = ''
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.excelRef.listData(() => {
|
|
|
+ if (!this.$refs.excelRef.list.length) return;
|
|
|
+ this.actuatorbrand = this.$refs.excelRef.list[0].option.actuatorbrand;
|
|
|
+ this.bodystructure = this.$refs.excelRef.list[0].option.bodystructure;
|
|
|
+ this.actuatorname = this.$refs.excelRef.list[0].option.actuatorname;
|
|
|
+ this.func = this.$refs.excelRef.list[0].option.func;
|
|
|
+ });
|
|
|
+ this.$refs.fujianRef.listData();
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
+ calcTableHieght(id) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (!this.$refs[id]) return;
|
|
|
+ let target = this.$refs[id].$el.getBoundingClientRect();
|
|
|
+ let clientHeight = document.body.clientHeight;
|
|
|
+ this.tableHeight = clientHeight - target.top - 85 + "px";
|
|
|
+ this.$refs[id].$refs.table.doLayout();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ close() {
|
|
|
+ this.active = 1;
|
|
|
+ this.guangtouParam.content.where.drivetype = "电动";
|
|
|
+ this.resultArr = [];
|
|
|
+ this.fujianArr = [];
|
|
|
+ this.items = [
|
|
|
+ { title: "选光头", value: "光头" },
|
|
|
+ { title: "选执行器", value: "执行器" },
|
|
|
+ ];
|
|
|
+ this.isEdit = false;
|
|
|
+ this.$emit("close");
|
|
|
+ },
|
|
|
+ //搜索
|
|
|
+ Search(type, position, init) {
|
|
|
+ if (!init) this.isEdit = true;
|
|
|
+ let index = 0;
|
|
|
+ let whereKeys = Object.keys(this[type].content.where);
|
|
|
+ if (position) {
|
|
|
+ index = whereKeys.indexOf(position) + 1;
|
|
|
+ }
|
|
|
+ if (type != "excelParam") {
|
|
|
+ for (let i = index; i < whereKeys.length - 1; i++) {
|
|
|
+ if (!position && whereKeys[i].indexOf("condition") != -1) continue;
|
|
|
+ this[type].content.where[whereKeys[i]] = "";
|
|
|
+ }
|
|
|
+ } else if (type == "excelParam") {
|
|
|
+ for (let i = index; i < whereKeys.length; i++) {
|
|
|
+ if (
|
|
|
+ whereKeys[i].indexOf("condition") != -1 ||
|
|
|
+ whereKeys[i].indexOf("flh") != -1 ||
|
|
|
+ whereKeys[i].indexOf("maxrounddiameter") != -1 ||
|
|
|
+ whereKeys[i].indexOf("maxsquarewidth") != -1 ||
|
|
|
+ whereKeys[i].indexOf("torque") != -1 ||
|
|
|
+ whereKeys[i].indexOf("drivetype") != -1
|
|
|
+ )
|
|
|
+ continue;
|
|
|
+ this[type].content.where[whereKeys[i]] = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ switch (type) {
|
|
|
+ case "guangtouParam":
|
|
|
+ if (this.loading) return;
|
|
|
+ this.loading = true;
|
|
|
+ whereKeys = whereKeys.filter((item) => item != "caliber");
|
|
|
+ this.$refs.guangtouRef &&
|
|
|
+ this.$refs.guangtouRef.listData(_changeOption);
|
|
|
+ break;
|
|
|
+ case "excelParam":
|
|
|
+ if (this.loading) return;
|
|
|
+ this.loading = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.excelRef && this.$refs.excelRef.listData(_changeOption2);
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ //更新选项列表
|
|
|
+ let that = this;
|
|
|
+ function _changeOption() {
|
|
|
+ that.loading = false;
|
|
|
+ let isbreak = false;
|
|
|
+ for (let i = 0; i < whereKeys.length; i++) {
|
|
|
+ if (isbreak) break;
|
|
|
+ if (whereKeys[i].indexOf("condition") == -1) {
|
|
|
+ if (that.$refs.guangtouRef.list.length) {
|
|
|
+ if (i >= index - 1 && whereKeys[i] != "drivetype") {
|
|
|
+ that[whereKeys[i]] =
|
|
|
+ that.$refs.guangtouRef.list[0].option[whereKeys[i]];
|
|
|
+ if (that[whereKeys[i]].length == 1) {
|
|
|
+ if (that.guangtouParam.content.where[position])
|
|
|
+ that.guangtouParam.content.where[whereKeys[i]] =
|
|
|
+ that[whereKeys[i]][0].value;
|
|
|
+ if (that.timer) clearTimeout(that.timer);
|
|
|
+ that.timer = setTimeout(() => {
|
|
|
+ that.$refs.guangtouRef && that.$refs.guangtouRef.listData();
|
|
|
+ });
|
|
|
+ } else if (that[whereKeys[i]].length > 1) {
|
|
|
+ that.guangtouParam.content.where[whereKeys[i]] = "";
|
|
|
}
|
|
|
- }
|
|
|
- switch (type) {
|
|
|
- case 'guangtouParam':
|
|
|
- if (this.loading) return
|
|
|
- this.loading = true
|
|
|
- whereKeys = whereKeys.filter(item => item != 'caliber')
|
|
|
- this.$refs.guangtouRef&&this.$refs.guangtouRef.listData(_changeOption)
|
|
|
- break;
|
|
|
- case 'excelParam':
|
|
|
- if (this.loading) return
|
|
|
- this.loading = true
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.excelRef&&this.$refs.excelRef.listData(_changeOption2)
|
|
|
- })
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- //更新选项列表
|
|
|
- let that = this
|
|
|
- function _changeOption () {
|
|
|
- that.loading = false
|
|
|
- let isbreak=false
|
|
|
- for (let i = 0; i < whereKeys.length; i++) {
|
|
|
- if (isbreak) break;
|
|
|
- if (whereKeys[i].indexOf('condition') == -1) {
|
|
|
- if (that.$refs.guangtouRef.list.length) {
|
|
|
- if (i >= index-1 && whereKeys[i]!='drivetype') {
|
|
|
- that[whereKeys[i]] = that.$refs.guangtouRef.list[0].option[whereKeys[i]]
|
|
|
- if (that[whereKeys[i]].length == 1) {
|
|
|
- if (that.guangtouParam.content.where[position]) that.guangtouParam.content.where[whereKeys[i]] = that[whereKeys[i]][0].value
|
|
|
- if (that.timer) clearTimeout(that.timer)
|
|
|
- that.timer = setTimeout(() => {
|
|
|
- that.$refs.guangtouRef&&that.$refs.guangtouRef.listData()
|
|
|
- })
|
|
|
- } else if (that[whereKeys[i]].length > 1) {
|
|
|
- that.guangtouParam.content.where[whereKeys[i]] = ''
|
|
|
- }
|
|
|
|
|
|
- if (that.$refs.guangtouRef.list[0].option[whereKeys[i]].length>1) {
|
|
|
- isbreak = true
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (i >= index && whereKeys[i] != 'drivetype') that[whereKeys[i]] = []
|
|
|
- }
|
|
|
- }
|
|
|
+ if (
|
|
|
+ that.$refs.guangtouRef.list[0].option[whereKeys[i]].length > 1
|
|
|
+ ) {
|
|
|
+ isbreak = true;
|
|
|
}
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (i >= index && whereKeys[i] != "drivetype")
|
|
|
+ that[whereKeys[i]] = [];
|
|
|
}
|
|
|
- function _changeOption2 () {
|
|
|
- that.loading = false
|
|
|
- let isbreak=false
|
|
|
- for (let i = 5; i < whereKeys.length; i++) {
|
|
|
- if (isbreak) break;
|
|
|
- if (whereKeys[i].indexOf('condition') == -1) {
|
|
|
- if (that.$refs.excelRef.list.length) {
|
|
|
- if (i >= index) {
|
|
|
- if (whereKeys[i] != 'drivetype') that[whereKeys[i]] = that.$refs.excelRef.list[0].option[whereKeys[i]]
|
|
|
- if (that[whereKeys[i]].length == 1) {
|
|
|
- if (that.excelParam.content.where[position]) that.excelParam.content.where[whereKeys[i]] = that[whereKeys[i]][0].value
|
|
|
- if (that.timer) clearTimeout(that.timer)
|
|
|
- that.timer = setTimeout(() => {
|
|
|
- that.$refs.excelRef&&that.$refs.excelRef.listData()
|
|
|
- })
|
|
|
- } else if (that[whereKeys[i]].length > 1 && whereKeys[i] != 'drivetype') {
|
|
|
- that.excelParam.content.where[whereKeys[i]] = ''
|
|
|
- }
|
|
|
- if (that.$refs.excelRef.list[0].option[whereKeys[i]].length>1) {
|
|
|
- isbreak = true
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (i >= index && whereKeys[i] != 'drivetype') that[whereKeys[i]] = []
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function _changeOption2() {
|
|
|
+ that.loading = false;
|
|
|
+ let isbreak = false;
|
|
|
+ for (let i = 5; i < whereKeys.length; i++) {
|
|
|
+ if (isbreak) break;
|
|
|
+ if (whereKeys[i].indexOf("condition") == -1) {
|
|
|
+ if (that.$refs.excelRef.list.length) {
|
|
|
+ if (i >= index) {
|
|
|
+ if (whereKeys[i] != "drivetype")
|
|
|
+ that[whereKeys[i]] =
|
|
|
+ that.$refs.excelRef.list[0].option[whereKeys[i]];
|
|
|
+ if (that[whereKeys[i]].length == 1) {
|
|
|
+ if (that.excelParam.content.where[position])
|
|
|
+ that.excelParam.content.where[whereKeys[i]] =
|
|
|
+ that[whereKeys[i]][0].value;
|
|
|
+ if (that.timer) clearTimeout(that.timer);
|
|
|
+ that.timer = setTimeout(() => {
|
|
|
+ that.$refs.excelRef && that.$refs.excelRef.listData();
|
|
|
+ });
|
|
|
+ } else if (
|
|
|
+ that[whereKeys[i]].length > 1 &&
|
|
|
+ whereKeys[i] != "drivetype"
|
|
|
+ ) {
|
|
|
+ that.excelParam.content.where[whereKeys[i]] = "";
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- guangtouChange (val) {
|
|
|
- switch (val) {
|
|
|
- case '电动':
|
|
|
- this.excelParam = {
|
|
|
- "id": 20240718162202,
|
|
|
- "content": {
|
|
|
- "itemid": 0,//光头id
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 30,
|
|
|
- "where": {
|
|
|
- "actuatordrivetype": "电动开关", //驱动方式
|
|
|
- "condition1": "",
|
|
|
- "condition2": "",
|
|
|
- "torque": "", //阀门扭矩
|
|
|
- "flh": "", //法兰号
|
|
|
- "actuatorbrand": "", //品牌
|
|
|
- "actuatorname":'',
|
|
|
- "supplyvoltage":'',
|
|
|
- "actuatorsignal":'',
|
|
|
- "maxsquarewidth": "", //方阀杆最大宽度
|
|
|
- "maxrounddiameter": "" //圆阀杆最大直径
|
|
|
- }
|
|
|
- },
|
|
|
- }
|
|
|
- break;
|
|
|
- case '气动':
|
|
|
-
|
|
|
- this.excelParam = {
|
|
|
- "id": 20240718162302,
|
|
|
- "content": {
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 30,
|
|
|
- "where": {
|
|
|
- "condition1": "",
|
|
|
- "torque": "", //阀门扭矩
|
|
|
- "flh": "", //法兰号
|
|
|
- "maxsquarewidth": "", //方阀杆最大宽度
|
|
|
- "maxrounddiameter": "", //圆阀杆最大直径
|
|
|
- "actuatorbrand": "", //品牌
|
|
|
- "actuatorname":'',
|
|
|
- "func": "", //功能
|
|
|
- "bodystructure": "", //结构
|
|
|
- "drivetype":'气动调节',
|
|
|
- }
|
|
|
- },
|
|
|
+ if (
|
|
|
+ that.$refs.excelRef.list[0].option[whereKeys[i]].length > 1
|
|
|
+ ) {
|
|
|
+ isbreak = true;
|
|
|
}
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (i >= index && whereKeys[i] != "drivetype")
|
|
|
+ that[whereKeys[i]] = [];
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ guangtouChange(val) {
|
|
|
+ switch (val) {
|
|
|
+ case "电动":
|
|
|
+ this.excelParam = {
|
|
|
+ id: 20240718162202,
|
|
|
+ content: {
|
|
|
+ itemid: 0, //光头id
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 30,
|
|
|
+ where: {
|
|
|
+ actuatordrivetype: "电动开关", //驱动方式
|
|
|
+ condition1: "",
|
|
|
+ condition2: "",
|
|
|
+ torque: "", //阀门扭矩
|
|
|
+ flh: "", //法兰号
|
|
|
+ actuatorbrand: "", //品牌
|
|
|
+ actuatorname: "",
|
|
|
+ supplyvoltage: "",
|
|
|
+ actuatorsignal: "",
|
|
|
+ maxsquarewidth: "", //方阀杆最大宽度
|
|
|
+ maxrounddiameter: "", //圆阀杆最大直径
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
+ break;
|
|
|
+ case "气动":
|
|
|
+ this.excelParam = {
|
|
|
+ id: 20240718162302,
|
|
|
+ content: {
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 30,
|
|
|
+ where: {
|
|
|
+ condition1: "",
|
|
|
+ torque: "", //阀门扭矩
|
|
|
+ flh: "", //法兰号
|
|
|
+ maxsquarewidth: "", //方阀杆最大宽度
|
|
|
+ maxrounddiameter: "", //圆阀杆最大直径
|
|
|
+ actuatorbrand: "", //品牌
|
|
|
+ actuatorname: "",
|
|
|
+ func: "", //功能
|
|
|
+ bodystructure: "", //结构
|
|
|
+ drivetype: "气动调节",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onSubmit() {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ content: {
|
|
|
+ sa_lectotypecfgid: this.$route.query.id,
|
|
|
},
|
|
|
- async onSubmit () {
|
|
|
- let res = await this.$api.requested({
|
|
|
- "content": {
|
|
|
- "sa_lectotypecfgid": this.$route.query.id
|
|
|
+ id: 2024072414593102,
|
|
|
+ });
|
|
|
+ this.$confirm(res.data ? res.data : "确认提交数据吗?", this.$t("提示"), {
|
|
|
+ confirmButtonText: this.$t("确定"),
|
|
|
+ cancelButtonText: this.$t("取消"),
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ let mainvalve = Object.keys(this.guangtouParam.content.where)
|
|
|
+ .filter((v) => v.indexOf("condition") == -1)
|
|
|
+ .reduce((result, item) => {
|
|
|
+ result[item] = this.guangtouParam.content.where[item];
|
|
|
+ return result;
|
|
|
+ }, {});
|
|
|
+ let actuator = Object.keys(this.excelParam.content.where)
|
|
|
+ .filter((v) => v.indexOf("condition") == -1)
|
|
|
+ .reduce((result, item) => {
|
|
|
+ result[item] = this.excelParam.content.where[item];
|
|
|
+ return result;
|
|
|
+ }, {});
|
|
|
+ let param = {
|
|
|
+ id: 2024071809123402,
|
|
|
+ content: {
|
|
|
+ sa_lectotypecfgid: this.$route.query.id,
|
|
|
+ projectname: this.data.projectname,
|
|
|
+ enterprisename: this.data.enterprisename,
|
|
|
+ source: this.data.source,
|
|
|
+ sourceid: this.$route.query.id,
|
|
|
+ sourcetable: this.data.sourcetable,
|
|
|
+ valvetype: this.valvetype(),
|
|
|
+ filter: {
|
|
|
+ mainvalve: mainvalve,
|
|
|
+ actuator: actuator,
|
|
|
+ other: {
|
|
|
+ fujianArr: this.fujianArr,
|
|
|
},
|
|
|
- "id": 2024072414593102,
|
|
|
- })
|
|
|
- this.$confirm(res.data ? res.data : '确认提交数据吗?', this.$t('提示'), {
|
|
|
- confirmButtonText: this.$t('确定'),
|
|
|
- cancelButtonText: this.$t('取消'),
|
|
|
- type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- let mainvalve = Object.keys(this.guangtouParam.content.where).filter(v => v.indexOf('condition') == -1).reduce((result,item) => {
|
|
|
- result[item] = this.guangtouParam.content.where[item]
|
|
|
- return result
|
|
|
- },{})
|
|
|
- let actuator = Object.keys(this.excelParam.content.where).filter(v => v.indexOf('condition') == -1).reduce((result,item) => {
|
|
|
- result[item] = this.excelParam.content.where[item]
|
|
|
- return result
|
|
|
- },{})
|
|
|
- let param = {
|
|
|
- "id": 2024071809123402,
|
|
|
- "content": {
|
|
|
- "sa_lectotypecfgid": this.$route.query.id,
|
|
|
- "projectname": this.data.projectname,
|
|
|
- "enterprisename": this.data.enterprisename,
|
|
|
- "source": this.data.source,
|
|
|
- "sourceid": this.$route.query.id,
|
|
|
- "sourcetable": this.data.sourcetable,
|
|
|
- "valvetype":this.valvetype(),
|
|
|
- "filter": {
|
|
|
- "mainvalve": mainvalve,
|
|
|
- "actuator": actuator,
|
|
|
- "other": {
|
|
|
- fujianArr:this.fujianArr
|
|
|
- }
|
|
|
- },
|
|
|
- "part_itemids": this.resultArr
|
|
|
- },
|
|
|
- }
|
|
|
- this.$emit('handleParam',param)
|
|
|
- let res = await this.$api.requested(param)
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
- this.close()
|
|
|
- this.$emit('onEditSuccess')
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- //选择目标
|
|
|
- selectTarget (data,type) {
|
|
|
- this.isEdit = true
|
|
|
- data.parttype = type
|
|
|
- if (type == '主阀') {
|
|
|
- this.resultArr[0] = data
|
|
|
-
|
|
|
- if (this.guangtouParam.content.where.drivetype == '气动' && this.items.length == 2) {
|
|
|
- this.items.push({title:'选辅件',value:'辅件'})
|
|
|
- } else if (this.guangtouParam.content.where.drivetype == '电动' && this.items.length == 3) {
|
|
|
- this.items.splice(2,1)
|
|
|
- }
|
|
|
- this.guangtouChange(this.guangtouParam.content.where.drivetype)
|
|
|
- this.excelParam.content.itemid = data.itemid
|
|
|
- this.excelParam.content.where.torque = data.torque
|
|
|
- this.excelParam.content.where.flh = data.flh
|
|
|
- this.excelParam.content.where.maxsquarewidth = data.maxsquarewidth
|
|
|
- this.excelParam.content.where.maxrounddiameter = data.maxrounddiameter
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.excelRef.listData(() => {
|
|
|
- if (!this.$refs.excelRef.list.length) return
|
|
|
- this.actuatorbrand = this.$refs.excelRef.list[0].option.actuatorbrand
|
|
|
- this.bodystructure = this.$refs.excelRef.list[0].option.bodystructure
|
|
|
- this.func = this.$refs.excelRef.list[0].option.func
|
|
|
- })
|
|
|
- })
|
|
|
- this.active = 2
|
|
|
- } else if (type == '执行器') {
|
|
|
- this.resultArr[1] = data
|
|
|
- this.resultArr[1].itenname = this.resultArr[1].actuatormodel
|
|
|
-
|
|
|
- if (this.guangtouParam.content.where.drivetype == '电动') {
|
|
|
- if (this.resultArr.length == 3) {
|
|
|
- this.resultArr[2] = {parttype:'减速箱',itemid:this.resultArr[1].gearboxid}
|
|
|
- } else {
|
|
|
- this.resultArr.push({parttype:'减速箱',itemid:this.resultArr[1].gearboxid})
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (this.excelParam.content.where.drivetype == '气动调节') {
|
|
|
- this.fujianParam.content.othertypes = ['定位器','过滤减压阀']
|
|
|
- } else {
|
|
|
- this.fujianParam.content.othertypes = ['电磁阀','限位开关','过滤减压阀']
|
|
|
- }
|
|
|
-
|
|
|
- this.fujianArr = []
|
|
|
- if (this.guangtouParam.content.where.drivetype == '电动') {
|
|
|
- this.resultArr.splice(3,this.resultArr.length - 1)
|
|
|
- } else {
|
|
|
- this.resultArr.splice(2,this.resultArr.length - 1)
|
|
|
- }
|
|
|
+ },
|
|
|
+ part_itemids: this.resultArr,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ this.$emit("handleParam", param);
|
|
|
+ let res = await this.$api.requested(param);
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
+ this.close();
|
|
|
+ this.$emit("onEditSuccess");
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ //选择目标
|
|
|
+ selectTarget(data, type) {
|
|
|
+ this.isEdit = true;
|
|
|
+ data.parttype = type;
|
|
|
+ if (type == "主阀") {
|
|
|
+ this.resultArr[0] = data;
|
|
|
|
|
|
- data.itemid = data.actuatorid
|
|
|
- data.itemname = data.actuatormodel
|
|
|
- if (this.items.length >= 3) {
|
|
|
- this.active = 3
|
|
|
- this.$refs.fujianRef.listData()
|
|
|
- } else {
|
|
|
- this.onSubmit()
|
|
|
- }
|
|
|
+ if (
|
|
|
+ this.guangtouParam.content.where.drivetype == "气动" &&
|
|
|
+ this.items.length == 2
|
|
|
+ ) {
|
|
|
+ this.items.push({ title: "选辅件", value: "辅件" });
|
|
|
+ } else if (
|
|
|
+ this.guangtouParam.content.where.drivetype == "电动" &&
|
|
|
+ this.items.length == 3
|
|
|
+ ) {
|
|
|
+ this.items.splice(2, 1);
|
|
|
+ }
|
|
|
+ this.guangtouChange(this.guangtouParam.content.where.drivetype);
|
|
|
+ this.excelParam.content.itemid = data.itemid;
|
|
|
+ this.excelParam.content.where.torque = data.torque;
|
|
|
+ this.excelParam.content.where.flh = data.flh;
|
|
|
+ this.excelParam.content.where.maxsquarewidth = data.maxsquarewidth;
|
|
|
+ this.excelParam.content.where.maxrounddiameter = data.maxrounddiameter;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.excelRef.listData(() => {
|
|
|
+ if (!this.$refs.excelRef.list.length) return;
|
|
|
+ this.actuatorbrand =
|
|
|
+ this.$refs.excelRef.list[0].option.actuatorbrand;
|
|
|
+ this.bodystructure =
|
|
|
+ this.$refs.excelRef.list[0].option.bodystructure;
|
|
|
+ this.func = this.$refs.excelRef.list[0].option.func;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.active = 2;
|
|
|
+ } else if (type == "执行器") {
|
|
|
+ if (this.guangtouParam.content.where.drivetype === "电动") {
|
|
|
+ const times = this.caliber
|
|
|
+ .find(
|
|
|
+ (v) =>
|
|
|
+ v.value === this.guangtouParam.content.where.caliber
|
|
|
+ )
|
|
|
+ .remarks.split(";")[0]
|
|
|
+ .split("-")
|
|
|
+ .map(Number);
|
|
|
+ const maxRuntime = parseInt(data.maxruntime, 10);
|
|
|
+ if (maxRuntime > times[1] || maxRuntime < times[0]) {
|
|
|
+ this.$confirm(
|
|
|
+ `${this.$t("当前选择执行器开关时间为")}${
|
|
|
+ data.maxruntime
|
|
|
+ }${this.$t("秒,超出建议值")}${times.join("-")},${this.$t(
|
|
|
+ "是否确认"
|
|
|
+ )}?`,
|
|
|
+ this.$t("提示"),
|
|
|
+ {
|
|
|
+ confirmButtonText: this.$t("确定"),
|
|
|
+ cancelButtonText: this.$t("取消"),
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ handle.call(this);
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ handle.call(this);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ handle.call(this);
|
|
|
+ }
|
|
|
+ function handle() {
|
|
|
+ this.resultArr[1] = data;
|
|
|
+ this.resultArr[1].itemname = this.resultArr[1].actuatormodel;
|
|
|
+ if (this.guangtouParam.content.where.drivetype === "电动") {
|
|
|
+ const gearbox = {
|
|
|
+ parttype: "减速箱",
|
|
|
+ itemid: this.resultArr[1].gearboxid,
|
|
|
+ };
|
|
|
+ if (this.resultArr.length === 3) {
|
|
|
+ this.resultArr[2] = gearbox;
|
|
|
} else {
|
|
|
- this.resultArr.push(data)
|
|
|
- if (this.fujianArr.filter(item=>item.itemid==data.itemid).length) return
|
|
|
- this.fujianParam.content.othertypes.splice(this.fujianParam.content.othertypes.indexOf(data.itemname),1)
|
|
|
- this.loading = true
|
|
|
- this.$refs.fujianRef.listData(()=> {
|
|
|
- this.fujianArr.push(data)
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
-
|
|
|
+ this.resultArr.push(gearbox);
|
|
|
}
|
|
|
- },
|
|
|
- handleClose (tag) {
|
|
|
- this.fujianArr = this.fujianArr.filter(item => {
|
|
|
- if (item.itemid != tag.itemid) {
|
|
|
- return item
|
|
|
- } else {
|
|
|
- this.fujianParam.content.othertypes.push(item.itemname)
|
|
|
- }
|
|
|
- })
|
|
|
- this.resultArr = this.resultArr.filter(item => {
|
|
|
- if (item.itemid != tag.itemid) {
|
|
|
- return item
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- this.$refs.fujianRef.listData()
|
|
|
- },
|
|
|
- stepsChange (val) {
|
|
|
- if (this.isEdit) return this.$message.warning('已操作过选型单,请按步骤进行!!')
|
|
|
- this.active = val+1
|
|
|
- },
|
|
|
- //选项
|
|
|
- optionsList () {
|
|
|
- this.$store.dispatch("optiontypeselect", "caliber").then((res) => {
|
|
|
- this.caliber = res.data;
|
|
|
- });
|
|
|
- this.drivetype = [{remarks:'电动',value:'电动'},{remarks:'气动',value:'气动'}];
|
|
|
+ }
|
|
|
+ this.fujianParam.content.othertypes =
|
|
|
+ this.excelParam.content.where.drivetype === "气动调节"
|
|
|
+ ? ["定位器", "过滤减压阀"]
|
|
|
+ : ["电磁阀", "限位开关", "过滤减压阀"];
|
|
|
+ this.fujianArr = [];
|
|
|
+ const spliceIndex =
|
|
|
+ this.guangtouParam.content.where.drivetype === "电动" ? 3 : 2;
|
|
|
+ this.resultArr.splice(
|
|
|
+ spliceIndex,
|
|
|
+ this.resultArr.length - spliceIndex
|
|
|
+ );
|
|
|
+ data.itemid = data.actuatorid;
|
|
|
+ data.itemname = data.actuatormodel;
|
|
|
+ if (this.items.length >= 3) {
|
|
|
+ this.active = 3;
|
|
|
+ this.$refs.fujianRef.listData();
|
|
|
+ } else {
|
|
|
+ this.onSubmit();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.resultArr.push(data);
|
|
|
+ if (this.fujianArr.filter((item) => item.itemid == data.itemid).length)
|
|
|
+ return;
|
|
|
+ this.fujianParam.content.othertypes.splice(
|
|
|
+ this.fujianParam.content.othertypes.indexOf(data.itemname),
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ this.loading = true;
|
|
|
+ this.$refs.fujianRef.listData(() => {
|
|
|
+ this.fujianArr.push(data);
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClose(tag) {
|
|
|
+ this.fujianArr = this.fujianArr.filter((item) => {
|
|
|
+ if (item.itemid != tag.itemid) {
|
|
|
+ return item;
|
|
|
+ } else {
|
|
|
+ this.fujianParam.content.othertypes.push(item.itemname);
|
|
|
}
|
|
|
+ });
|
|
|
+ this.resultArr = this.resultArr.filter((item) => {
|
|
|
+ if (item.itemid != tag.itemid) {
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$refs.fujianRef.listData();
|
|
|
},
|
|
|
- created () {
|
|
|
- this.optionsList()
|
|
|
+ stepsChange(val) {
|
|
|
+ if (this.isEdit)
|
|
|
+ return this.$message.warning("已操作过选型单,请按步骤进行!!");
|
|
|
+ this.active = val + 1;
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.init()
|
|
|
- this.calcTableHieght('guangtouRef')
|
|
|
- }
|
|
|
-}
|
|
|
+ //选项
|
|
|
+ optionsList() {
|
|
|
+ this.$store.dispatch("optiontypeselect", "caliber").then((res) => {
|
|
|
+ this.caliber = res.data;
|
|
|
+ });
|
|
|
+ this.drivetype = [
|
|
|
+ { remarks: "电动", value: "电动" },
|
|
|
+ { remarks: "气动", value: "气动" },
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.optionsList();
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ this.calcTableHieght("guangtouRef");
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- /deep/.ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after {
|
|
|
- background: #3874F6 !important;
|
|
|
- }
|
|
|
- /deep/.ant-steps-item-finish .ant-steps-item-icon {
|
|
|
- background: none !important;
|
|
|
- }
|
|
|
- /deep/.ant-steps-item-icon {
|
|
|
- background: #3874F6;
|
|
|
- height: 32px !important;
|
|
|
- }
|
|
|
- /deep/.ant-steps-item-wait .ant-steps-item-icon {
|
|
|
- background: none !important;
|
|
|
- }
|
|
|
- /deep/.ant-steps-item-active .ant-steps-item-title {
|
|
|
- color:#3874F6 !important;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- /deep/.fixed__btn__panel {
|
|
|
- padding-left: 240px !important;
|
|
|
- }
|
|
|
- .scroll {
|
|
|
- height: calc(100vh - 60px);
|
|
|
- overflow-y: scroll;
|
|
|
- }
|
|
|
- ::-webkit-scrollbar {
|
|
|
- display: none;
|
|
|
- }
|
|
|
- .select-info {
|
|
|
- background: #F5F6FA;
|
|
|
- font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
- width: 240px;
|
|
|
- border-right: 1px #999999 solid;
|
|
|
- z-index: 99999991;
|
|
|
- flex-shrink: 0;
|
|
|
- word-wrap: break-word;
|
|
|
- }
|
|
|
- .select-info .info-title {
|
|
|
- font-weight: bold;
|
|
|
- font-size: 20px;
|
|
|
- color: #333333;
|
|
|
- padding: 10px 20px;
|
|
|
- border-bottom: 1px solid #D9D9D9;
|
|
|
- }
|
|
|
- .select-info .product-wrapper {
|
|
|
- padding: 0 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .select-info .product-wrapper .product {
|
|
|
- padding-bottom:20px;
|
|
|
- border-bottom: #D9D9D9 1px solid;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product:last-child {
|
|
|
- border-bottom: none !important;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .product-header {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- align-content: center;
|
|
|
- padding: 10px 0;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .product-header span:last-child {
|
|
|
- color: #3874F6;
|
|
|
- margin-left: 18px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .product-header .title {
|
|
|
- font-weight: bold;
|
|
|
- font-size: 14px;
|
|
|
- color: #333333;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .product-header img {
|
|
|
- width: 12px;
|
|
|
- height: 12px;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .product-name {
|
|
|
- font-weight: 400;
|
|
|
- font-size: 14px;
|
|
|
- color: #555555;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .attrite {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 12px;
|
|
|
- color: #999999;
|
|
|
- padding-top: 10px;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .attrite .attrite-title {
|
|
|
- color: #555555;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .attrite .attrite-value {
|
|
|
- }
|
|
|
-
|
|
|
- .select-info .product-wrapper .product .attrite2 {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 12px;
|
|
|
- color: #999999;
|
|
|
- padding-top: 10px;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .attrite2 .attrite-title {
|
|
|
- color: #555555;
|
|
|
- margin-bottom: 5px;
|
|
|
- }
|
|
|
- .select-info .product-wrapper .product .attrite2 .attrite-value {
|
|
|
- }
|
|
|
+/deep/.ant-steps-item-finish
|
|
|
+ > .ant-steps-item-container
|
|
|
+ > .ant-steps-item-content
|
|
|
+ > .ant-steps-item-title::after {
|
|
|
+ background: #3874f6 !important;
|
|
|
+}
|
|
|
+/deep/.ant-steps-item-finish .ant-steps-item-icon {
|
|
|
+ background: none !important;
|
|
|
+}
|
|
|
+/deep/.ant-steps-item-icon {
|
|
|
+ background: #3874f6;
|
|
|
+ height: 32px !important;
|
|
|
+}
|
|
|
+/deep/.ant-steps-item-wait .ant-steps-item-icon {
|
|
|
+ background: none !important;
|
|
|
+}
|
|
|
+/deep/.ant-steps-item-active .ant-steps-item-title {
|
|
|
+ color: #3874f6 !important;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+/deep/.fixed__btn__panel {
|
|
|
+ padding-left: 240px !important;
|
|
|
+}
|
|
|
+.scroll {
|
|
|
+ height: calc(100vh - 60px);
|
|
|
+ overflow-y: scroll;
|
|
|
+}
|
|
|
+::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+.select-info {
|
|
|
+ background: #f5f6fa;
|
|
|
+ font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
+ width: 240px;
|
|
|
+ border-right: 1px #999999 solid;
|
|
|
+ z-index: 99999991;
|
|
|
+ flex-shrink: 0;
|
|
|
+ word-wrap: break-word;
|
|
|
+}
|
|
|
+.select-info .info-title {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #333333;
|
|
|
+ padding: 10px 20px;
|
|
|
+ border-bottom: 1px solid #d9d9d9;
|
|
|
+}
|
|
|
+.select-info .product-wrapper {
|
|
|
+ padding: 0 20px;
|
|
|
+}
|
|
|
|
|
|
- .select-info .product-wrapper .product {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- }
|
|
|
+.select-info .product-wrapper .product {
|
|
|
+ padding-bottom: 20px;
|
|
|
+ border-bottom: #d9d9d9 1px solid;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product:last-child {
|
|
|
+ border-bottom: none !important;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .product-header {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ align-content: center;
|
|
|
+ padding: 10px 0;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .product-header span:last-child {
|
|
|
+ color: #3874f6;
|
|
|
+ margin-left: 18px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .product-header .title {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .product-header img {
|
|
|
+ width: 12px;
|
|
|
+ height: 12px;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .product-name {
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #555555;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .attrite {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #999999;
|
|
|
+ padding-top: 10px;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .attrite .attrite-title {
|
|
|
+ color: #555555;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .attrite .attrite-value {
|
|
|
+}
|
|
|
|
|
|
+.select-info .product-wrapper .product .attrite2 {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #999999;
|
|
|
+ padding-top: 10px;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .attrite2 .attrite-title {
|
|
|
+ color: #555555;
|
|
|
+ margin-bottom: 5px;
|
|
|
+}
|
|
|
+.select-info .product-wrapper .product .attrite2 .attrite-value {
|
|
|
+}
|
|
|
|
|
|
- .drawer__panel {
|
|
|
- font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
- padding: 10px 40px !important;
|
|
|
- flex: 1;
|
|
|
- overflow: hidden;
|
|
|
- }
|
|
|
- .my-steps {
|
|
|
- padding: 0px 68px;
|
|
|
- }
|
|
|
- .drawer__panel {
|
|
|
- font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
- }
|
|
|
- .product-content .block {
|
|
|
- margin-top: 30px;
|
|
|
- padding-left: 20px;
|
|
|
- }
|
|
|
- .product-content .block .header {
|
|
|
- display: flex;
|
|
|
- align-content: center;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
- .product-content .block .header .title {
|
|
|
- font-size: 16px;
|
|
|
- font-weight: bold;
|
|
|
- margin-right: 20px;
|
|
|
- }
|
|
|
- .product-content .block .header .handle {
|
|
|
- display: flex;
|
|
|
- }
|
|
|
+.select-info .product-wrapper .product {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
|
|
|
- .dialog-content {
|
|
|
+.drawer__panel {
|
|
|
+ font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
+ padding: 10px 40px !important;
|
|
|
+ flex: 1;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.my-steps {
|
|
|
+ padding: 0px 68px;
|
|
|
+}
|
|
|
+.drawer__panel {
|
|
|
+ font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
+}
|
|
|
+.product-content .block {
|
|
|
+ margin-top: 30px;
|
|
|
+ padding-left: 20px;
|
|
|
+}
|
|
|
+.product-content .block .header {
|
|
|
+ display: flex;
|
|
|
+ align-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+.product-content .block .header .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
+.product-content .block .header .handle {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
|
|
|
- }
|
|
|
- .dialog-content .option-line {
|
|
|
- display: flex;
|
|
|
- margin-top: 10px;
|
|
|
- }
|
|
|
- .dialog-content .option-line .item {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- font-size: 14px;
|
|
|
- font-weight: 500px;
|
|
|
- margin-right: 20px;
|
|
|
- }
|
|
|
- .dialog-content .option-line .item .label {
|
|
|
- width: 70px;
|
|
|
- flex-shrink: 0;
|
|
|
- text-align-last: justify;
|
|
|
- margin-right: 15px;
|
|
|
- color: #000000 !important;
|
|
|
- }
|
|
|
- .descript {
|
|
|
- font-size:12px;
|
|
|
- color:red;
|
|
|
- }
|
|
|
+.dialog-content {
|
|
|
+}
|
|
|
+.dialog-content .option-line {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+.dialog-content .option-line .item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500px;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
+.dialog-content .option-line .item .label {
|
|
|
+ width: 70px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ text-align-last: justify;
|
|
|
+ margin-right: 15px;
|
|
|
+ color: #000000 !important;
|
|
|
+}
|
|
|
+.descript {
|
|
|
+ font-size: 12px;
|
|
|
+ color: red;
|
|
|
+}
|
|
|
</style>
|