value
2023-08-29 f6b6162c08fb8fd93369064d4daef6c94b100eea
src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -41,7 +41,8 @@
                  <el-table-column prop="remarks" label="备注" min-width="8%" />
                  <el-table-column label="操作" min-width="8%">
                     <template slot-scope="scope">
                        <el-button type="text" size="small" @click="deleteRow(scope.row)">删除</el-button>
                        <el-button type="text" size="small"
                           @click.native.prevent="deleteRow(scope.$index, detectionInfo)">删除</el-button>
                     </template>
                  </el-table-column>
               </el-table>
@@ -174,7 +175,8 @@
                     </el-col>
                     <el-col :span="11">
                        <el-form-item label="规格型号:">
                           <el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="请先选择样品名称" @change="getProductList">
                           <el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="请先选择样品名称"
                              @change="getProductList">
                              <el-option v-for="options in model_sta_options" :value="options.key" :label="options.value"
                                 :key="options.key">{{ options.value }}</el-option>
                           </el-select>
@@ -194,7 +196,7 @@
                     </el-col>
                  </el-row>
                  <el-row :gutter="50">
                     <el-col :span="9">
                     <el-col :span="11">
                        <el-form-item label="添加项目:">
                           <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
                              <el-checkbox v-for="(expers, ai) in productList" :label="expers"
@@ -202,7 +204,7 @@
                           </el-checkbox-group>
                        </el-form-item>
                     </el-col>
                     <el-col :span="41">
                     <el-col :span="11">
                        <el-form-item label="备注:">
                           <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}" style="width: 200px;"
                              v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" />
@@ -302,12 +304,12 @@
      watch: {
         addPointerForm: {
            handler: function(val) {
               if(val.addway!=""){
               if (val.addway != "") {
                  this.model_sta_options = []
                  this.model_options.forEach(a=>{
                     if(a.specificationsName==val.addway){
                        this.model_sta_options = a.children.map(item=>{
                           return{
                  this.model_options.forEach(a => {
                     if (a.specificationsName == val.addway) {
                        this.model_sta_options = a.children.map(item => {
                           return {
                              key: item.modelId,
                              value: item.modelName
                           }
@@ -426,8 +428,8 @@
         handleCurrentChange(pageNo) {
            this.pageParams.pageNo = pageNo
         },
         deleteRow(row) {
         deleteRow(index, rows) {
            rows.splice(index, 1);
         },
         upMaterialName(val) {
            this.sampleoptions.forEach(a => {
@@ -437,9 +439,11 @@
            })
            this.getModelSpecification(val)
         },
         getProductList(val){
            getProductList({modelId: val}).then(res=>{
               this.productList = res.data.map(item=>{
         getProductList(val) {
            getProductList({
               modelId: val
            }).then(res => {
               this.productList = res.data.map(item => {
                  return item.name
               })
            })