heyang hai 1 ano
pai
achega
b15c44481d

+ 7 - 4
src/views/medicUniversity-3_1/chemicalManagement/chemicalLibrary/ChemicalInfo/addPage.vue

@@ -91,7 +91,7 @@
         <div class="form-el-checkbox-group" style="max-width:1380px;">
           <el-form-item label="属性:" prop="classifyAttribute">
             <div style="padding:10px 20px 4px; border:1px solid #dedede;">
-              <el-checkbox-group v-model="formData.classifyAttribute" style="margin-top:2px;flex:1;">
+              <el-checkbox-group v-model="classifyAttribute" style="margin-top:2px;flex:1;">
                 <el-checkbox v-for="item in optionsListTwo" :label="item.dictValue"
                              :key="item.dictValue">{{item.dictLabel}}</el-checkbox>
               </el-checkbox-group>
@@ -222,12 +222,14 @@
           // labelType:1,
           classifyAttribute:[],
         },
+
         //化学品形态
         optionsList:[],
         //化学品分类列表
         optionsListOne:[],
         //属性列表
         optionsListTwo:[],
+        classifyAttribute:[],
         //化学品计量单位
         chemicalsMeasuringUnit:[],
       };
@@ -248,8 +250,9 @@
       if(this.addPropsData.id){
         this.formData = JSON.parse(JSON.stringify(this.addPropsData));
         this.formData.chemicalShape = this.addPropsData.chemicalShape+''
+        console.log(this.formData)
         if(this.formData.classifyAttribute){
-          this.formData.classifyAttribute = this.formData.classifyAttribute.split(",");
+          this.classifyAttribute = this.formData.classifyAttribute.split(',');
         }
       }
     },
@@ -270,7 +273,7 @@
                   this.formData.criticality = 0;
                 }
               }
-              this.formData.classifyAttribute = this.formData.classifyAttribute+'';
+              this.formData.classifyAttribute = this.classifyAttribute+'';
               putHxpChemical(this.formData).then(response => {
                 if(response.code == 200){
                   this.msgSuccess(response.msg);
@@ -286,7 +289,7 @@
                   this.formData.criticality = 0;
                 }
               }
-              this.formData.classifyAttribute = this.formData.classifyAttribute+'';
+              this.formData.classifyAttribute = this.classifyAttribute+'';
               addHxpChemical(this.formData).then(response => {
                 if(response.code == 200){
                   this.msgSuccess(response.msg);