yusheng 1 rok temu
rodzic
commit
10b4cd18bd

+ 31 - 24
src/views/rulesManagement/matterRules/components/matter-add.vue

@@ -61,7 +61,14 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="13">
+          <el-col :span="11">
+            <el-form-item label="设备信息" prop="">
+              <el-input v-model="ShebeiName" disabled></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
             <el-form-item label="周期" prop="cycleValue">
               <rule-cycle
                 ref="cycleMultipleRef"
@@ -71,11 +78,6 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="11">
-            <el-form-item label="设备信息" prop="">
-              <el-input v-model="ShebeiName" disabled></el-input>
-            </el-form-item>
-          </el-col>
         </el-row>
 
         <el-table
@@ -100,7 +102,7 @@
           <el-table-column prop="categoryCode" label="零部件编码" width="160">
             <template slot-scope="scope">
               <el-input
-              size="small"
+                size="small"
                 @click.native="
                   openpartDialog(scope.row, scope.$index, '零部件')
                 "
@@ -111,7 +113,7 @@
           <el-table-column prop="categoryName" label="零部件名称" width="160">
             <template slot-scope="scope">
               <el-input
-              size="small"
+                size="small"
                 @click.native="
                   openpartDialog(scope.row, scope.$index, '零部件')
                 "
@@ -339,10 +341,10 @@
           ]
         },
         isBindPlan: false,
-        cCode:'',
-          cName:'',
-          cId:'',
-          ShebeiName:''
+        cCode: '',
+        cName: '',
+        cId: '',
+        ShebeiName: ''
         // matterTypeList: []
       };
     },
@@ -477,14 +479,14 @@
       dataKeep() {
         let form = deepClone(this.formData);
         console.log(this.$refs.cycleMultipleRef);
-        
-        form.categoryCode=this.cCode;
-        form.categoryName=this.cName;
-        form.categoryId=this.cId;
+
+        form.categoryCode = this.cCode;
+        form.categoryName = this.cName;
+        form.categoryId = this.cId;
 
         form.cycle = this.$refs.cycleMultipleRef.ruleCycleList;
         console.log(form);
-        
+
         switch (form.cycleType) {
           case 1:
             if (form.cycle[0].minute === '') {
@@ -580,15 +582,20 @@
           this.$message.error('请添加事项内容!');
         }
       },
-      chooseRadio(val,clickBomData) {
+      chooseRadio(val, clickBomData) {
         if (val.length > 0) {
-          console.log('clickBomData--------------------',clickBomData);
+          console.log('clickBomData--------------------', clickBomData);
+
+          this.cCode = clickBomData.code;
+          this.cName = clickBomData.name;
+          this.cId = clickBomData.id;
+          this.ShebeiName =
+            clickBomData.code +
+            '-' +
+            clickBomData.name +
+            '-' +
+            clickBomData.modelType;
 
-          this.cCode= clickBomData.code;
-          this.cName= clickBomData.name;
-          this.cId= clickBomData.id;
-          this.ShebeiName=clickBomData.code+'-'+clickBomData.name+'-'+clickBomData.modelType;
-          
           console.log('this.cCode', this.cCode);
           console.log('this.cName', this.cName);
           console.log('this.cId', this.cId);

+ 3 - 0
src/views/rulesManagement/matterRules/components/rule-cycle.vue

@@ -446,6 +446,9 @@
 </script>
 
 <style lang="scss" scoped>
+:deep(.el-input){
+  // width:100px;
+}
   .cycle_item {
     display: flex;
     align-items: center;