codeMan 1 год назад
Родитель
Сommit
d530825dfa

+ 47 - 0
src/optionSystem/executeManage/detail/index.vue

@@ -57,6 +57,26 @@ export default {
       mainData: {},
       mainAreaData: {},
       detailInfo: [],
+      bodystructure: [],
+      actuatordrivetype:[],
+      actuatortype:[],
+      func: [],
+    };
+  },
+  provide() {
+    return {
+      bodystructure: () => {
+        return this.bodystructure;
+      },
+      actuatordrivetype: () => {
+        return this.actuatordrivetype;
+      },
+      actuatortype: () => {
+        return this.actuatortype;
+      },
+      func: () => {
+        return this.func;
+      },
     };
   },
   methods: {
@@ -129,6 +149,14 @@ export default {
               label: "名称",
               value: this.mainData.itemname,
             },
+            {
+              label: "执行器类型",
+              value: this.mainData.actuatortype,
+            },
+            {
+              label: "执行器驱动类型",
+              value: this.mainData.actuatordrivetype,
+            },
             {
               label: "电源电压",
               value: this.mainData.supplyvoltage,
@@ -235,6 +263,24 @@ export default {
       ];
       console.log(this.mainAreaData);
     },
+    optionList() {
+      this.$store.dispatch("optiontypeselect", "bodystructure").then((res) => {
+        this.bodystructure = res.data;
+        console.log(this.bodystructure, "结构");
+      });
+      this.$store.dispatch("optiontypeselect", "func").then((res) => {
+        this.func = res.data;
+        console.log(this.func, "功能");
+      });
+      this.$store.dispatch("optiontypeselect", "actuatortype").then((res) => {
+        this.actuatortype = res.data;
+        console.log(this.actuatortype, "执行器类型");
+      });
+      this.$store.dispatch("optiontypeselect", "actuatordrivetype").then((res) => {
+        this.actuatordrivetype = res.data;
+        console.log(this.actuatordrivetype, "执行器驱动类型");
+      });
+    },
     // 监听切换数据,上一页,下一页
     pageChange(id, rowindex, tabIndex) {
       this.flag = false;
@@ -252,6 +298,7 @@ export default {
     },
   },
   created() {
+    this.optionList()
     this.queryMainData(this.$route.query.id)
   },
 };

+ 16 - 0
src/optionSystem/executeManage/index.vue

@@ -88,6 +88,8 @@ export default {
       },
       dateSelect: "",
       bodystructure: [],
+      actuatordrivetype:[],
+      actuatortype:[],
       func: [],
       errorUrl: null,
     };
@@ -97,6 +99,12 @@ export default {
       bodystructure: () => {
         return this.bodystructure;
       },
+      actuatordrivetype: () => {
+        return this.actuatordrivetype;
+      },
+      actuatortype: () => {
+        return this.actuatortype;
+      },
       func: () => {
         return this.func;
       },
@@ -144,6 +152,14 @@ export default {
         this.func = res.data;
         console.log(this.func, "功能");
       });
+      this.$store.dispatch("optiontypeselect", "actuatortype").then((res) => {
+        this.actuatortype = res.data;
+        console.log(this.actuatortype, "执行器类型");
+      });
+      this.$store.dispatch("optiontypeselect", "actuatordrivetype").then((res) => {
+        this.actuatordrivetype = res.data;
+        console.log(this.actuatordrivetype, "执行器驱动类型");
+      });
     },
   },
   created() {

+ 31 - 1
src/optionSystem/executeManage/modules/add.vue

@@ -21,6 +21,30 @@
                 <el-input  v-model="form.itemname" autocomplete="off" placeholder="请输入名称"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="执行器类型" label-width="130px" prop="actuatortype">
+                <el-select v-model="form.actuatortype" style="width:100%" placeholder="请选择执行器类型">
+                  <el-option
+                    v-for="item in actuatortype()"
+                    :label="item.remarks"
+                    :value="item.value"
+                    :key="item.index"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="执行器驱动类型" label-width="130px" prop="actuatordrivetype">
+                <el-select v-model="form.actuatordrivetype" style="width:100%" placeholder="请选择执行器驱动类型">
+                  <el-option
+                    v-for="item in actuatordrivetype()"
+                    :label="item.remarks"
+                    :value="item.value"
+                    :key="item.index"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="品牌" label-width="130px" prop="actuatorbrand">
                 <el-input  v-model="form.actuatorbrand" autocomplete="off" placeholder="请输入品牌"></el-input>
@@ -136,7 +160,7 @@
 <script>
 import {mapGetters} from "vuex";
 export default {
-  inject:['func','bodystructure'],
+  inject:['func','bodystructure','actuatordrivetype','actuatortype'],
   data () {
     return {
       drawer:false,
@@ -155,6 +179,12 @@ export default {
         weight: [
           { pattern:/^([1-9][0-9]*)+(\.[0-9]{1,2})?$/,message:'请输入数值(最多两位小数)',trigger:'blur'}
         ],
+        actuatordrivetype: [
+          { required: true, message: '请选择执行器驱动类型', trigger: 'change' },
+        ],
+        actuatortype: [
+          { required: true, message: '请选择执行器类型', trigger: 'change' },
+        ],
         itemname: [
           { required: true, message: '请输入名称', trigger: 'blur' }
         ],

+ 32 - 2
src/optionSystem/executeManage/modules/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="onShow">编 辑</el-button>
+    <el-button size="mini" type="primary" @click="onShow" :disabled="data.status != '新建'">编 辑</el-button>
     <el-drawer
       title="编辑执行器"
       :visible.sync="drawer"
@@ -21,6 +21,30 @@
                 <el-input  v-model="form.itemname" autocomplete="off" placeholder="请输入名称"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="执行器类型" label-width="130px" prop="actuatortype">
+                <el-select v-model="form.actuatortype" style="width:100%" placeholder="请选择执行器类型">
+                  <el-option
+                    v-for="item in actuatortype()"
+                    :label="item.remarks"
+                    :value="item.value"
+                    :key="item.index"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="执行器驱动类型" label-width="130px" prop="actuatordrivetype">
+                <el-select v-model="form.actuatordrivetype" style="width:100%" placeholder="请选择执行器驱动类型">
+                  <el-option
+                    v-for="item in actuatordrivetype()"
+                    :label="item.remarks"
+                    :value="item.value"
+                    :key="item.index"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="品牌" label-width="130px" prop="actuatorbrand">
                 <el-input  v-model="form.actuatorbrand" autocomplete="off" placeholder="请输入品牌"></el-input>
@@ -137,7 +161,7 @@
 import {mapGetters} from "vuex";
 export default {
   props:['data'],
-  inject:['func','bodystructure'],
+  inject:['func','bodystructure','actuatordrivetype','actuatortype'],
   data () {
     return {
       drawer:false,
@@ -156,6 +180,12 @@ export default {
         weight: [
           { pattern:/^([1-9][0-9]*)+(\.[0-9]{1,2})?$/,message:'请输入数值(最多两位小数)',trigger:'blur'}
         ],
+        actuatordrivetype: [
+          { required: true, message: '请选择执行器驱动类型', trigger: 'change' },
+        ],
+        actuatortype: [
+          { required: true, message: '请选择执行器类型', trigger: 'change' },
+        ],
         itemname: [
           { required: true, message: '请输入名称', trigger: 'blur' }
         ],

+ 1 - 0
src/optionSystem/itemManage/detail/index.vue

@@ -153,6 +153,7 @@ export default {
             },
             { label: "连接方式", value: this.mainData.connection },
             { label: "阀体材质", value: this.mainData.bodymaterial },
+            { label: "主体材质", value: this.mainData.mainmaterial },
             { label: "蝶板材质", value: this.mainData.valveplatematerial },
             { label: "阀杆材质", value: this.mainData.stemmaterial },
             { label: "阀座材质", value: this.mainData.plinthmaterial },

+ 19 - 0
src/optionSystem/speedBoxManage/detail/index.vue

@@ -57,6 +57,14 @@ export default {
       mainData: {},
       mainAreaData: {},
       detailInfo: [],
+      gearboxlevel:[]
+    };
+  },
+  provide() {
+    return {
+      gearboxlevel: () => {
+        return this.gearboxlevel;
+      },
     };
   },
   methods: {
@@ -145,6 +153,10 @@ export default {
               label: "力矩增益",
               value: this.mainData.torquegain,
             },
+            {
+              label: "减速箱效率",
+              value: this.mainData.gearboxlevel,
+            },
             {
               label: "重量(kg",
               value: this.mainData.weight,
@@ -207,6 +219,12 @@ export default {
       ];
       console.log(this.mainAreaData);
     },
+    optionList() {
+      this.$store.dispatch("optiontypeselect", "gearboxlevel").then((res) => {
+        this.gearboxlevel = res.data;
+        console.log(this.gearboxlevel, "效率");
+      });
+    },
     // 监听切换数据,上一页,下一页
     pageChange(id, rowindex, tabIndex) {
       this.flag = false;
@@ -224,6 +242,7 @@ export default {
     },
   },
   created() {
+    this.optionList()
     this.queryMainData(this.$route.query.id)
   },
 };

+ 6 - 14
src/optionSystem/speedBoxManage/index.vue

@@ -87,18 +87,14 @@ export default {
         status: "",
       },
       dateSelect: "",
-      bodystructure: [],
-      func: [],
+      gearboxlevel: [],
       errorUrl: null,
     };
   },
   provide() {
     return {
-      bodystructure: () => {
-        return this.bodystructure;
-      },
-      func: () => {
-        return this.func;
+      gearboxlevel: () => {
+        return this.gearboxlevel;
       },
     };
   },
@@ -136,13 +132,9 @@ export default {
       this.$refs.basicLayout.listData();
     },
     optionList() {
-      this.$store.dispatch("optiontypeselect", "bodystructure").then((res) => {
-        this.bodystructure = res.data;
-        console.log(this.bodystructure, "结构");
-      });
-      this.$store.dispatch("optiontypeselect", "func").then((res) => {
-        this.func = res.data;
-        console.log(this.func, "功能");
+      this.$store.dispatch("optiontypeselect", "gearboxlevel").then((res) => {
+        this.gearboxlevel = res.data;
+        console.log(this.gearboxlevel, "效率");
       });
     },
   },

+ 13 - 2
src/optionSystem/speedBoxManage/modules/add.vue

@@ -51,7 +51,18 @@
                 <el-input  v-model="form.torquegain" autocomplete="off" placeholder="请输入力矩增益"></el-input>
               </el-form-item>
             </el-col>
-            
+            <el-col :span="24">
+              <el-form-item label="减速箱效率" label-width="130px" prop="gearboxlevel">
+                <el-select v-model="form.gearboxlevel" style="width:100%" placeholder="请选择减速箱效率">
+                  <el-option
+                    v-for="item in gearboxlevel()"
+                    :label="item.remarks"
+                    :value="item.value"
+                    :key="item.index"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="重量(kg)" label-width="130px" prop="weight">
                 <el-input  v-model="form.weight" autocomplete="off" placeholder="请输入重量"></el-input>
@@ -102,7 +113,7 @@
 <script>
 import {mapGetters} from "vuex";
 export default {
-  inject:['func','bodystructure'],
+  inject:['gearboxlevel'],
   data () {
     return {
       drawer:false,

+ 14 - 3
src/optionSystem/speedBoxManage/modules/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" type="primary" @click="onShow">编辑</el-button>
+    <el-button size="mini" type="primary" @click="onShow" :disabled="data.status != '新建'">编辑</el-button>
     <el-drawer
       title="编辑减速箱"
       :visible.sync="drawer"
@@ -51,7 +51,18 @@
                 <el-input  v-model="form.torquegain" autocomplete="off" placeholder="请输入力矩增益"></el-input>
               </el-form-item>
             </el-col>
-            
+            <el-col :span="24">
+              <el-form-item label="减速箱效率" label-width="130px" prop="gearboxlevel">
+                <el-select v-model="form.gearboxlevel" style="width:100%" placeholder="请选择减速箱效率">
+                  <el-option
+                    v-for="item in gearboxlevel()"
+                    :label="item.remarks"
+                    :value="item.value"
+                    :key="item.index"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="重量(kg)" label-width="130px" prop="weight">
                 <el-input  v-model="form.weight" autocomplete="off" placeholder="请输入重量"></el-input>
@@ -103,7 +114,7 @@
 import {mapGetters} from "vuex";
 export default {
   props:['data'],
-  inject:['func','bodystructure'],
+  inject:['gearboxlevel'],
   data () {
     return {
       drawer:false,