|
@@ -2,29 +2,31 @@
|
|
<div>
|
|
<div>
|
|
<div class="message">
|
|
<div class="message">
|
|
<div class="message-DIV">
|
|
<div class="message-DIV">
|
|
- <p>润滑油品牌:</p>
|
|
|
|
- <el-select clearable v-model="brandvalue" placeholder="请选择">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in brandoptions"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- >
|
|
|
|
- </el-option
|
|
|
|
- ></el-select>
|
|
|
|
- </div>
|
|
|
|
- <div class="message-DIV">
|
|
|
|
- <p>润滑油型号:</p>
|
|
|
|
- <el-select clearable v-model="modelvalue" placeholder="请选择">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in modeloptions"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- >
|
|
|
|
- </el-option
|
|
|
|
- ></el-select>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <p>润滑油品牌:</p>
|
|
|
|
+ <el-select clearable v-model="brandvalue" placeholder="请选择" @change="handleBrandChange">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in brandoptions"
|
|
|
|
+ :key="item"
|
|
|
|
+ :label="item"
|
|
|
|
+ :value="item"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="message-DIV">
|
|
|
|
+ <p>润滑油型号:</p>
|
|
|
|
+ <el-select clearable v-model="modelvalue" placeholder="请选择" :disabled="!brandvalue">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in modeloptions"
|
|
|
|
+ :key="item"
|
|
|
|
+ :label="item"
|
|
|
|
+ :value="item"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<!-- LLS -->
|
|
<!-- LLS -->
|
|
<p class="locationP">
|
|
<p class="locationP">
|
|
@@ -75,7 +77,7 @@
|
|
<div class="message-BOX">
|
|
<div class="message-BOX">
|
|
<div class="message-DIV">
|
|
<div class="message-DIV">
|
|
<p>行星轮轴承品牌:</p>
|
|
<p>行星轮轴承品牌:</p>
|
|
- <el-select clearable v-model="xxlPPvalue" placeholder="请选择">
|
|
|
|
|
|
+ <el-select clearable v-model="item.xxlPPvalue" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in lssPPoptions"
|
|
v-for="item in lssPPoptions"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -87,7 +89,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="message-DIV">
|
|
<div class="message-DIV">
|
|
<p>行星轮轴承型号:</p>
|
|
<p>行星轮轴承型号:</p>
|
|
- <el-select clearable v-model="xxlxhvalue" placeholder="请选择">
|
|
|
|
|
|
+ <el-select clearable v-model="item.xxlxhvalue" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in xxlxhoptions"
|
|
v-for="item in xxlxhoptions"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -132,7 +134,7 @@
|
|
<div class="message-BOX">
|
|
<div class="message-BOX">
|
|
<div class="message-DIV">
|
|
<div class="message-DIV">
|
|
<p>太阳轮轴承品牌:</p>
|
|
<p>太阳轮轴承品牌:</p>
|
|
- <el-select clearable v-model="tyPPvalue" placeholder="请选择">
|
|
|
|
|
|
+ <el-select clearable v-model="item.tyPPvalue" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in tyPPoptions"
|
|
v-for="item in tyPPoptions"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -144,7 +146,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="message-DIV">
|
|
<div class="message-DIV">
|
|
<p>太阳轮轴承型号:</p>
|
|
<p>太阳轮轴承型号:</p>
|
|
- <el-select clearable v-model="tyxhvalue" placeholder="请选择">
|
|
|
|
|
|
+ <el-select clearable v-model="item.tyxhvalue" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in tyxhoptions"
|
|
v-for="item in tyxhoptions"
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -156,6 +158,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<!-- 平行轮 -->
|
|
<!-- 平行轮 -->
|
|
<p class="locationP">
|
|
<p class="locationP">
|
|
<i @click="addparallel" class="el-icon-plus"></i>
|
|
<i @click="addparallel" class="el-icon-plus"></i>
|
|
@@ -188,26 +191,17 @@
|
|
></el-input>
|
|
></el-input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<!-- 低速中间轴 -->
|
|
<!-- 低速中间轴 -->
|
|
<p class="locationP">
|
|
<p class="locationP">
|
|
<i @click="addslowly" class="el-icon-plus"></i>
|
|
<i @click="addslowly" class="el-icon-plus"></i>
|
|
- <i
|
|
|
|
- v-if="slowly.length > 1"
|
|
|
|
- @click="delslowly"
|
|
|
|
- class="el-icon-minus"
|
|
|
|
- ></i>
|
|
|
|
|
|
+ <i v-if="slowly.length > 1" @click="delslowly" class="el-icon-minus"></i>
|
|
</p>
|
|
</p>
|
|
<div class="message">
|
|
<div class="message">
|
|
<p class="caption">
|
|
<p class="caption">
|
|
<span class="capSpan1">低速中间轴</span>
|
|
<span class="capSpan1">低速中间轴</span>
|
|
</p>
|
|
</p>
|
|
- <div class="message-DIV">
|
|
|
|
- <p>齿圈齿数:</p>
|
|
|
|
- <el-input
|
|
|
|
- v-model="gearring"
|
|
|
|
- @input="validateInput($event, 'gearring')"
|
|
|
|
- ></el-input>
|
|
|
|
- </div>
|
|
|
|
|
|
+
|
|
<div v-for="(item, index) in slowly" :key="index" class="message-BOX">
|
|
<div v-for="(item, index) in slowly" :key="index" class="message-BOX">
|
|
<div class="message-DIV">
|
|
<div class="message-DIV">
|
|
<p>轴承-RS品牌:</p>
|
|
<p>轴承-RS品牌:</p>
|
|
@@ -257,29 +251,27 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="message-DIV">
|
|
|
|
+ <p>齿圈齿数:</p>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="item.gearring"
|
|
|
|
+ @input="(event) => validateInput(event, index, 'gearring')"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- 高速轴 -->
|
|
|
|
- <p class="locationP">
|
|
|
|
- <i @click="addhigh " class="el-icon-plus"></i>
|
|
|
|
- <i
|
|
|
|
- v-if="high.length > 1"
|
|
|
|
- @click="delhigh "
|
|
|
|
- class="el-icon-minus"
|
|
|
|
- ></i>
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 高速轴 -->
|
|
|
|
+ <p class="locationP">
|
|
|
|
+ <i @click="addhigh" class="el-icon-plus"></i>
|
|
|
|
+ <i v-if="high.length > 1" @click="delhigh" class="el-icon-minus"></i>
|
|
</p>
|
|
</p>
|
|
<div class="message">
|
|
<div class="message">
|
|
<p class="caption">
|
|
<p class="caption">
|
|
<span class="capSpan1">高速轴</span>
|
|
<span class="capSpan1">高速轴</span>
|
|
</p>
|
|
</p>
|
|
- <div class="message-DIV">
|
|
|
|
- <p>齿圈齿数:</p>
|
|
|
|
- <el-input
|
|
|
|
- v-model="gearring"
|
|
|
|
- @input="validateInput($event, 'gearring')"
|
|
|
|
- ></el-input>
|
|
|
|
- </div>
|
|
|
|
- <div v-for="(item, index) in high " :key="index" class="message-BOX">
|
|
|
|
|
|
+
|
|
|
|
+ <div v-for="(item, index) in high" :key="index" class="message-BOX">
|
|
<div class="message-DIV">
|
|
<div class="message-DIV">
|
|
<p>轴承-RS品牌:</p>
|
|
<p>轴承-RS品牌:</p>
|
|
<el-select clearable v-model="item.rsBrand" placeholder="请选择">
|
|
<el-select clearable v-model="item.rsBrand" placeholder="请选择">
|
|
@@ -328,7 +320,16 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="message-DIV">
|
|
|
|
+ <p>齿圈齿数:</p>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="item.gearring"
|
|
|
|
+ @input="(event) => validateInput(event, index, 'gearring')"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -338,13 +339,13 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
brandvalue: "",
|
|
brandvalue: "",
|
|
- brandoptions: [],
|
|
|
|
modelvalue: "",
|
|
modelvalue: "",
|
|
|
|
+ brandoptions: [],
|
|
modeloptions: [],
|
|
modeloptions: [],
|
|
- lssList: [
|
|
|
|
- { lssPPvalue: "", lssXXvalue: "" },
|
|
|
|
- { lssPPvalue: "", lssXXvalue: "" },
|
|
|
|
- ],
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ lssList: [{ lssPPvalue: "", lssXXvalue: "" }],
|
|
lssPPoptions: [],
|
|
lssPPoptions: [],
|
|
lssXXoptions: [],
|
|
lssXXoptions: [],
|
|
|
|
|
|
@@ -359,19 +360,40 @@ export default {
|
|
tyxhoptions: [],
|
|
tyxhoptions: [],
|
|
|
|
|
|
planets: [
|
|
planets: [
|
|
- { planetnumber: "", planetooth: "", suntooth: "", gearring: "" },
|
|
|
|
|
|
+ {
|
|
|
|
+ planetnumber: "",
|
|
|
|
+ planetooth: "",
|
|
|
|
+ suntooth: "",
|
|
|
|
+ gearring: "",
|
|
|
|
+ xxlPPvalue: "",
|
|
|
|
+ xxlxhvalue: "",
|
|
|
|
+ tyPPvalue: "",
|
|
|
|
+ tyxhvalue: "",
|
|
|
|
+ },
|
|
],
|
|
],
|
|
levelNames: ["一级", "二级", "三级"],
|
|
levelNames: ["一级", "二级", "三级"],
|
|
parallel: [{ big: "", little: "" }],
|
|
parallel: [{ big: "", little: "" }],
|
|
sunbearing: "",
|
|
sunbearing: "",
|
|
planetbearing: "",
|
|
planetbearing: "",
|
|
|
|
|
|
- slowly: [{ rsBrand: null, rsModel: null, gsBrand: null, gsModel: null }],
|
|
|
|
- gearring: "",
|
|
|
|
- high :[{ rsBrand: null, rsModel: null, gsBrand: null, gsModel: null }],
|
|
|
|
|
|
+ slowly: [
|
|
|
|
+ {
|
|
|
|
+ gearring: "",
|
|
|
|
+ rsBrand: null,
|
|
|
|
+ rsModel: null,
|
|
|
|
+ gsBrand: null,
|
|
|
|
+ gsModel: null,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+
|
|
|
|
+ high: [{ gearring:"", rsBrand: null, rsModel: null, gsBrand: null, gsModel: null }],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleBrandChange() {
|
|
|
|
+ this.modeloptions = this.modelData[this.brandvalue] || [];
|
|
|
|
+ this.modelvalue = ''; // 重置型号选择
|
|
|
|
+ },
|
|
addPlanet() {
|
|
addPlanet() {
|
|
if (this.planets.length < 3) {
|
|
if (this.planets.length < 3) {
|
|
this.planets.push({
|
|
this.planets.push({
|
|
@@ -389,7 +411,18 @@ export default {
|
|
},
|
|
},
|
|
validateInput(value, index, field) {
|
|
validateInput(value, index, field) {
|
|
const validValue = value.replace(/[^0-9]/g, "");
|
|
const validValue = value.replace(/[^0-9]/g, "");
|
|
- this.planets[index][field] = validValue;
|
|
|
|
|
|
+ if (this.planets[index]) {
|
|
|
|
+ this.planets[index][field] = validValue;
|
|
|
|
+ }
|
|
|
|
+ if (this.parallel[index]) {
|
|
|
|
+ this.parallel[index][field] = validValue;
|
|
|
|
+ }
|
|
|
|
+ if (this.slowly[index]) {
|
|
|
|
+ this.slowly[index][field] = validValue;
|
|
|
|
+ }
|
|
|
|
+ if (this.high[index]) {
|
|
|
|
+ this.high[index][field] = validValue;
|
|
|
|
+ }
|
|
if (validValue !== value) {
|
|
if (validValue !== value) {
|
|
this.$message({
|
|
this.$message({
|
|
message: "只能输入数字",
|
|
message: "只能输入数字",
|
|
@@ -398,16 +431,16 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- delparallel() {
|
|
|
|
- if (this.parallel.length > 1) {
|
|
|
|
- this.parallel.pop();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
addparallel() {
|
|
addparallel() {
|
|
if (this.parallel.length < 3) {
|
|
if (this.parallel.length < 3) {
|
|
this.parallel.push({ big: "", little: "" });
|
|
this.parallel.push({ big: "", little: "" });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ delparallel() {
|
|
|
|
+ if (this.parallel.length > 1) {
|
|
|
|
+ this.parallel.pop();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
addLSS() {
|
|
addLSS() {
|
|
if (this.lssList.length < 2) {
|
|
if (this.lssList.length < 2) {
|
|
@@ -422,10 +455,11 @@ export default {
|
|
addslowly() {
|
|
addslowly() {
|
|
if (this.slowly.length < 2) {
|
|
if (this.slowly.length < 2) {
|
|
this.slowly.push({
|
|
this.slowly.push({
|
|
- rsBrand: null,
|
|
|
|
- rsModel: null,
|
|
|
|
- gsBrand: null,
|
|
|
|
- gsModel: null,
|
|
|
|
|
|
+ gearring: "",
|
|
|
|
+ rsBrand: "",
|
|
|
|
+ rsModel: "",
|
|
|
|
+ gsBrand: "",
|
|
|
|
+ gsModel: "",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -433,12 +467,12 @@ export default {
|
|
if (this.slowly.length > 1) {
|
|
if (this.slowly.length > 1) {
|
|
this.slowly.pop();
|
|
this.slowly.pop();
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
|
|
-
|
|
|
|
- addhigh() {
|
|
|
|
|
|
+ addhigh() {
|
|
if (this.high.length < 2) {
|
|
if (this.high.length < 2) {
|
|
this.high.push({
|
|
this.high.push({
|
|
|
|
+ gearring: "",
|
|
rsBrand: null,
|
|
rsBrand: null,
|
|
rsModel: null,
|
|
rsModel: null,
|
|
gsBrand: null,
|
|
gsBrand: null,
|
|
@@ -450,11 +484,11 @@ export default {
|
|
if (this.high.length > 1) {
|
|
if (this.high.length > 1) {
|
|
this.high.pop();
|
|
this.high.pop();
|
|
}
|
|
}
|
|
- },
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
|
|
submitForm() {
|
|
submitForm() {
|
|
- console.log(this.planets);
|
|
|
|
|
|
+ console.log(this.brandvalue
|
|
|
|
+ ,this.modelvalue);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
@@ -467,10 +501,11 @@ export default {
|
|
.message-BOX {
|
|
.message-BOX {
|
|
width: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
-
|
|
|
|
|
|
+ flex-wrap: wrap;
|
|
.message-DIV {
|
|
.message-DIV {
|
|
width: 25%;
|
|
width: 25%;
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
p {
|
|
p {
|