|
@@ -3,7 +3,11 @@
|
|
<div class="inquire">
|
|
<div class="inquire">
|
|
<div class="condition">
|
|
<div class="condition">
|
|
<p>部件名称:</p>
|
|
<p>部件名称:</p>
|
|
- <el-input v-model="nameOfparts" size="small" class="search-input"></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="nameOfparts"
|
|
|
|
+ size="small"
|
|
|
|
+ class="search-input"
|
|
|
|
+ ></el-input>
|
|
<el-button type="primary" @click="GETquery" size="small"
|
|
<el-button type="primary" @click="GETquery" size="small"
|
|
>查询</el-button
|
|
>查询</el-button
|
|
>
|
|
>
|
|
@@ -24,11 +28,11 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="contentsType" align="center" label="部件编码">
|
|
<el-table-column prop="contentsType" align="center" label="部件编码">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="createTime" align="center" label="创建时间" >
|
|
|
|
|
|
+ <el-table-column prop="createTime" align="center" label="创建时间">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="updateTime" align="center" label="维护时间" >
|
|
|
|
|
|
+ <el-table-column prop="updateTime" align="center" label="维护时间">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column fixed="right" align="center" label="操作" >
|
|
|
|
|
|
+ <el-table-column fixed="right" align="center" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<!-- <el-button @click="handleClick(scope.row)" type="text" size="small"
|
|
<!-- <el-button @click="handleClick(scope.row)" type="text" size="small"
|
|
>编辑</el-button
|
|
>编辑</el-button
|
|
@@ -180,19 +184,66 @@
|
|
<el-dialog
|
|
<el-dialog
|
|
title="新增部件"
|
|
title="新增部件"
|
|
:visible.sync="relevanceVisible"
|
|
:visible.sync="relevanceVisible"
|
|
- width="20%"
|
|
|
|
|
|
+ width="400px"
|
|
:before-close="handleClose"
|
|
:before-close="handleClose"
|
|
>
|
|
>
|
|
<p class="maintain">
|
|
<p class="maintain">
|
|
- 品牌:<span class="one"
|
|
|
|
|
|
+ <span class="two"> 品牌:</span>
|
|
|
|
+ <span class="one"
|
|
><el-input v-model="brand" size="small"></el-input
|
|
><el-input v-model="brand" size="small"></el-input
|
|
></span>
|
|
></span>
|
|
</p>
|
|
</p>
|
|
<p class="maintain">
|
|
<p class="maintain">
|
|
- 型号:<span class="one"
|
|
|
|
|
|
+ <span class="two"> 型号:</span
|
|
|
|
+ ><span class="one"
|
|
><el-input v-model="guige" size="small"></el-input
|
|
><el-input v-model="guige" size="small"></el-input
|
|
></span>
|
|
></span>
|
|
</p>
|
|
</p>
|
|
|
|
+ <h3 style="font-weight: 600; margin-bottom: 10px;">轴承参数信息</h3>
|
|
|
|
+ <p class="maintain">
|
|
|
|
+ <span class="two"> 滚动体数量:</span>
|
|
|
|
+ <span class="one">
|
|
|
|
+ <el-input
|
|
|
|
+ :disabled="zcShow != 1"
|
|
|
|
+ v-model="quantity"
|
|
|
|
+ size="small"
|
|
|
|
+ @input="validateDecimal('quantity')"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="maintain">
|
|
|
|
+ <span class="two"> 滚动体直径/mm:</span>
|
|
|
|
+ <span class="one">
|
|
|
|
+ <el-input
|
|
|
|
+ :disabled="zcShow != 1"
|
|
|
|
+ v-model="diameter"
|
|
|
|
+ size="small"
|
|
|
|
+ @input="validateDecimal('diameter')"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="maintain">
|
|
|
|
+ <span class="two">节圆直径/mm:</span>
|
|
|
|
+ <span class="one">
|
|
|
|
+ <el-input
|
|
|
|
+ :disabled="zcShow != 1"
|
|
|
|
+ v-model="section"
|
|
|
|
+ size="small"
|
|
|
|
+ @input="validateDecimal('section')"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="maintain">
|
|
|
|
+ <span class="two"> 接触角°:</span>
|
|
|
|
+ <span class="one">
|
|
|
|
+ <el-input
|
|
|
|
+ :disabled="zcShow != 1"
|
|
|
|
+ v-model="contact"
|
|
|
|
+ size="small"
|
|
|
|
+ @input="validateDecimal('contact')"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
|
|
<div class="button-container">
|
|
<div class="button-container">
|
|
<el-button class="but" size="small" type="primary" @click="Glsubmit">
|
|
<el-button class="but" size="small" type="primary" @click="Glsubmit">
|
|
@@ -250,8 +301,8 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
- <script>
|
|
|
|
|
|
+
|
|
|
|
+<script>
|
|
import {
|
|
import {
|
|
getDictList,
|
|
getDictList,
|
|
createUnitDict,
|
|
createUnitDict,
|
|
@@ -302,6 +353,12 @@ export default {
|
|
brandvalue: "",
|
|
brandvalue: "",
|
|
modelvalue: "",
|
|
modelvalue: "",
|
|
pprow: {},
|
|
pprow: {},
|
|
|
|
+
|
|
|
|
+ quantity: "",
|
|
|
|
+ diameter: "",
|
|
|
|
+ section: "",
|
|
|
|
+ contact: "",
|
|
|
|
+ zcShow: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -309,6 +366,13 @@ export default {
|
|
this.GETmokuai();
|
|
this.GETmokuai();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ validateDecimal(field) {
|
|
|
|
+ this[field] = this[field]
|
|
|
|
+ .replace(/[^0-9.]/g, "") // 只允许输入数字和小数点
|
|
|
|
+ .replace(/^(\d*\.?\d*).*$/, "$1") // 只保留第一个小数点后面的数字
|
|
|
|
+ .replace(/(\..*)\./g, "$1"); // 只能有一个小数点
|
|
|
|
+ },
|
|
|
|
+
|
|
load() {
|
|
load() {
|
|
this.$message.success("加载下一页");
|
|
this.$message.success("加载下一页");
|
|
this.tableData = this.tableData.concat(exampleData);
|
|
this.tableData = this.tableData.concat(exampleData);
|
|
@@ -511,15 +575,14 @@ export default {
|
|
},
|
|
},
|
|
// 品牌
|
|
// 品牌
|
|
|
|
|
|
-
|
|
|
|
drawerhandleSizeChange(newSize) {
|
|
drawerhandleSizeChange(newSize) {
|
|
this.pageSize = newSize;
|
|
this.pageSize = newSize;
|
|
- this.fetchData();
|
|
|
|
|
|
+ this.fetchData();
|
|
},
|
|
},
|
|
|
|
|
|
drawerhandleCurrentChange(newPage) {
|
|
drawerhandleCurrentChange(newPage) {
|
|
this.pageNum = newPage;
|
|
this.pageNum = newPage;
|
|
- this.fetchData();
|
|
|
|
|
|
+ this.fetchData();
|
|
},
|
|
},
|
|
|
|
|
|
fetchData() {
|
|
fetchData() {
|
|
@@ -538,6 +601,9 @@ export default {
|
|
|
|
|
|
ONbrand(row) {
|
|
ONbrand(row) {
|
|
this.drawer = true;
|
|
this.drawer = true;
|
|
|
|
+ this.zcShow = row.contentsDictKey;
|
|
|
|
+ console.log(row, 1111);
|
|
|
|
+
|
|
this.drawerList = row;
|
|
this.drawerList = row;
|
|
console.log(row);
|
|
console.log(row);
|
|
this.fetchData();
|
|
this.fetchData();
|
|
@@ -549,8 +615,14 @@ export default {
|
|
manufacture: this.brand,
|
|
manufacture: this.brand,
|
|
modelNumber: this.guige,
|
|
modelNumber: this.guige,
|
|
unitType: this.drawerList ? this.drawerList.contentsDictKey : "", // 确保 this.drawerList 存在
|
|
unitType: this.drawerList ? this.drawerList.contentsDictKey : "", // 确保 this.drawerList 存在
|
|
|
|
+ rollsNumbe: this.quantity,
|
|
|
|
+ rollsDiameter: this.diameter,
|
|
|
|
+ circleDiameter: this.section,
|
|
|
|
+ thetaDeg: this.contact,
|
|
};
|
|
};
|
|
|
|
+ console.log(params, "params");
|
|
|
|
|
|
|
|
+ return;
|
|
if (!params.manufacture || !params.modelNumber || !params.unitType) {
|
|
if (!params.manufacture || !params.modelNumber || !params.unitType) {
|
|
this.$message({
|
|
this.$message({
|
|
message: "请确保所有字段都已填写!",
|
|
message: "请确保所有字段都已填写!",
|
|
@@ -566,6 +638,10 @@ export default {
|
|
manufacture: params.manufacture,
|
|
manufacture: params.manufacture,
|
|
modelNumber: params.modelNumber,
|
|
modelNumber: params.modelNumber,
|
|
unitType: params.unitType,
|
|
unitType: params.unitType,
|
|
|
|
+ rollsNumbe: params.rollsNumbe,
|
|
|
|
+ rollsDiameter: params.rollsDiameter,
|
|
|
|
+ circleDiameter: params.circleDiameter,
|
|
|
|
+ thetaDeg: params.thetaDeg,
|
|
};
|
|
};
|
|
updateUnitDictBrandModel(updateParams).then((res) => {
|
|
updateUnitDictBrandModel(updateParams).then((res) => {
|
|
if (res.status === true) {
|
|
if (res.status === true) {
|
|
@@ -665,6 +741,12 @@ export default {
|
|
this.maintainVisible = false;
|
|
this.maintainVisible = false;
|
|
this.relevanceVisible = false;
|
|
this.relevanceVisible = false;
|
|
this.drawer = false;
|
|
this.drawer = false;
|
|
|
|
+
|
|
|
|
+ this.quantity = "";
|
|
|
|
+ this.diameter = "";
|
|
|
|
+ this.section = "";
|
|
|
|
+ this.contact = "";
|
|
|
|
+ this.zcShow = "";
|
|
},
|
|
},
|
|
|
|
|
|
newtype(type) {
|
|
newtype(type) {
|
|
@@ -674,20 +756,27 @@ export default {
|
|
this.maintainVisible = true;
|
|
this.maintainVisible = true;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ onlyNumberFilter(value) {
|
|
|
|
+ const newValue = value.replace(/[^\d]/g, ""); // 过滤非数字字符
|
|
|
|
+ return newValue;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
-
|
|
|
|
- <style lang="scss" scoped>
|
|
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
.inquire {
|
|
.inquire {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
|
+
|
|
.condition {
|
|
.condition {
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+
|
|
p {
|
|
p {
|
|
width: 80px;
|
|
width: 80px;
|
|
line-height: 32px;
|
|
line-height: 32px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.el-input {
|
|
.el-input {
|
|
width: 150px;
|
|
width: 150px;
|
|
margin-right: 20px;
|
|
margin-right: 20px;
|
|
@@ -698,37 +787,49 @@ export default {
|
|
.assemblyList {
|
|
.assemblyList {
|
|
margin: 20px 0;
|
|
margin: 20px 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
.fenye {
|
|
.fenye {
|
|
margin: 20px auto;
|
|
margin: 20px auto;
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
+
|
|
.button-container {
|
|
.button-container {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
|
|
+
|
|
.but {
|
|
.but {
|
|
width: 100px;
|
|
width: 100px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.drawers {
|
|
.drawers {
|
|
.drawersDIV {
|
|
.drawersDIV {
|
|
padding: 0 20px;
|
|
padding: 0 20px;
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.el-input {
|
|
.el-input {
|
|
width: 100px;
|
|
width: 100px;
|
|
// margin-right: 20px;
|
|
// margin-right: 20px;
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.maintain {
|
|
.maintain {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
|
|
+
|
|
|
|
+ .two {
|
|
|
|
+ width: 120px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ text-align: right;
|
|
|
|
+ }
|
|
.el-input {
|
|
.el-input {
|
|
width: 220px;
|
|
width: 220px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.Sptwo {
|
|
.Sptwo {
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
</style>
|
|
</style>
|