|
@@ -124,7 +124,7 @@
|
|
|
<el-drawer
|
|
|
title="新增"
|
|
|
:visible.sync="drawer"
|
|
|
- size="23%"
|
|
|
+ size="30%"
|
|
|
:with-header="true"
|
|
|
@close="handleClose"
|
|
|
class="drawers"
|
|
@@ -152,7 +152,7 @@
|
|
|
<el-table :data="relevanceData" border style="width: 100%">
|
|
|
<el-table-column prop="manufacture" label="品牌"> </el-table-column>
|
|
|
<el-table-column prop="modelNumber" label="型号"> </el-table-column>
|
|
|
- <el-table-column fixed="right" label="操作" width="100">
|
|
|
+ <el-table-column fixed="right" label="操作" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
@click="handleClick(scope.row)"
|
|
@@ -160,6 +160,12 @@
|
|
|
size="small"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="ONparameter(scope.row)"
|
|
|
+ size="small"
|
|
|
+ >参数配置</el-button
|
|
|
+ >
|
|
|
<el-button type="text" @click="DELpingpai(scope.row)" size="small"
|
|
|
>删除</el-button
|
|
|
>
|
|
@@ -184,66 +190,21 @@
|
|
|
<el-dialog
|
|
|
title="新增部件"
|
|
|
:visible.sync="relevanceVisible"
|
|
|
- width="400px"
|
|
|
+ width="310px"
|
|
|
:before-close="handleClose"
|
|
|
>
|
|
|
<p class="maintain">
|
|
|
- <span class="two"> 品牌:</span>
|
|
|
+ <span> 品牌:</span>
|
|
|
<span class="one"
|
|
|
><el-input v-model="brand" size="small"></el-input
|
|
|
></span>
|
|
|
</p>
|
|
|
<p class="maintain">
|
|
|
- <span class="two"> 型号:</span
|
|
|
+ <span> 型号:</span
|
|
|
><span class="one"
|
|
|
><el-input v-model="guige" size="small"></el-input
|
|
|
></span>
|
|
|
</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">
|
|
|
<el-button class="but" size="small" type="primary" @click="Glsubmit">
|
|
@@ -299,6 +260,67 @@
|
|
|
>
|
|
|
</p>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="部件参数配置"
|
|
|
+ :visible.sync="parameterVisible"
|
|
|
+ width="400px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <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 style="text-align: center">
|
|
|
+ <el-button
|
|
|
+ :disabled="zcShow != 1"
|
|
|
+ type="primary"
|
|
|
+ @click="submitParameter"
|
|
|
+ >确定</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -316,6 +338,7 @@ import {
|
|
|
getUnitDictBrandModelPage,
|
|
|
delUnitDictBrandModel,
|
|
|
updateUnitDictBrandModel,
|
|
|
+ updateUnitDictBrandModelParameter,
|
|
|
} from "@/api/maintain.js";
|
|
|
|
|
|
export default {
|
|
@@ -359,6 +382,8 @@ export default {
|
|
|
section: "",
|
|
|
contact: "",
|
|
|
zcShow: "",
|
|
|
+ parameterVisible: false,
|
|
|
+ chanshu: "",
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -609,20 +634,44 @@ export default {
|
|
|
this.fetchData();
|
|
|
},
|
|
|
|
|
|
+ submitParameter() {
|
|
|
+ const params = {
|
|
|
+ rollsNumbe: this.quantity,
|
|
|
+ rollsDiameter: this.diameter,
|
|
|
+ circleDiameter: this.section,
|
|
|
+ thetaDeg: this.contact,
|
|
|
+ id: this.chanshu.id,
|
|
|
+ unitType: "1",
|
|
|
+ };
|
|
|
+ updateUnitDictBrandModelParameter(params)
|
|
|
+ .then((res) => {
|
|
|
+ this.parameterVisible = false;
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ showClose: true,
|
|
|
+ message: '提交成功'
|
|
|
+ });
|
|
|
+ this.fetchData();
|
|
|
+ this.drawer=true
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error("提交失败");
|
|
|
+ this.parameterVisible = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 提交品牌
|
|
|
Glsubmit() {
|
|
|
const params = {
|
|
|
manufacture: this.brand,
|
|
|
modelNumber: this.guige,
|
|
|
unitType: this.drawerList ? this.drawerList.contentsDictKey : "", // 确保 this.drawerList 存在
|
|
|
- rollsNumbe: this.quantity,
|
|
|
- rollsDiameter: this.diameter,
|
|
|
- circleDiameter: this.section,
|
|
|
- thetaDeg: this.contact,
|
|
|
+ // rollsNumbe: this.quantity,
|
|
|
+ // rollsDiameter: this.diameter,
|
|
|
+ // circleDiameter: this.section,
|
|
|
+ // thetaDeg: this.contact,
|
|
|
};
|
|
|
console.log(params, "params");
|
|
|
|
|
|
- return;
|
|
|
if (!params.manufacture || !params.modelNumber || !params.unitType) {
|
|
|
this.$message({
|
|
|
message: "请确保所有字段都已填写!",
|
|
@@ -638,10 +687,10 @@ export default {
|
|
|
manufacture: params.manufacture,
|
|
|
modelNumber: params.modelNumber,
|
|
|
unitType: params.unitType,
|
|
|
- rollsNumbe: params.rollsNumbe,
|
|
|
- rollsDiameter: params.rollsDiameter,
|
|
|
- circleDiameter: params.circleDiameter,
|
|
|
- thetaDeg: params.thetaDeg,
|
|
|
+ // rollsNumbe: params.rollsNumbe,
|
|
|
+ // rollsDiameter: params.rollsDiameter,
|
|
|
+ // circleDiameter: params.circleDiameter,
|
|
|
+ // thetaDeg: params.thetaDeg,
|
|
|
};
|
|
|
updateUnitDictBrandModel(updateParams).then((res) => {
|
|
|
if (res.status === true) {
|
|
@@ -718,7 +767,15 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ //参数配置
|
|
|
+ ONparameter(row) {
|
|
|
+ this.parameterVisible = true;
|
|
|
+ this.chanshu = row;
|
|
|
+ this.quantity = row.rollsNumber;
|
|
|
+ this.diameter = row.rollsDiameter;
|
|
|
+ this.section = row.circleDiameter;
|
|
|
+ this.contact = row.thetaDeg;
|
|
|
+ },
|
|
|
handleClick(row) {
|
|
|
this.pprow = row;
|
|
|
this.relevanceVisible = true;
|
|
@@ -741,7 +798,7 @@ export default {
|
|
|
this.maintainVisible = false;
|
|
|
this.relevanceVisible = false;
|
|
|
this.drawer = false;
|
|
|
-
|
|
|
+ this.parameterVisible = false;
|
|
|
this.quantity = "";
|
|
|
this.diameter = "";
|
|
|
this.section = "";
|