Răsfoiți Sursa

#fix 单选修改

jc-wangyt 1 lună în urmă
părinte
comite
51d22dc370
1 a modificat fișierele cu 6 adăugiri și 7 ștergeri
  1. 6 7
      src/views/openMarketBid/edit.vue

+ 6 - 7
src/views/openMarketBid/edit.vue

@@ -263,7 +263,7 @@
                     placeholder="请输入商机编号、商机名称" clearable style="width: 300px; margin-bottom: 20px;"></el-input>
             </div>
             <el-table :data="opportunityList" style="width: 100%" border
-                v-loading="opportunityLoading" >
+                v-loading="opportunityLoading" @current-change="handleCurrentChange">
                 <el-table-column type="radio" width="55"></el-table-column>
                 <el-table-column prop="opportunityCode" label="商机编号" width="180"></el-table-column>
                 <el-table-column prop="opportunityName" label="商机名称" min-width="200"></el-table-column>
@@ -402,17 +402,16 @@ export default {
         },
         // 选择商机确定
         handleSelectOpportunity() {
-            if (this.multipleSelection.length > 0) {
-                const selected = this.multipleSelection[0];
-                this.formData.opportunityCode = selected.opportunityCode;
+            if (this.selectedOpportunity) {
+                this.formData.opportunityCode = this.selectedOpportunity.opportunityCode;
                 this.dialogVisibleOpportunity = false;
             } else {
                 this.$message.warning('请选择一条商机');
             }
         },
-        // 处理选变化
-        handleSelectionChange(val) {
-            this.multipleSelection = val;
+        // 处理选变化
+        handleCurrentChange(val) {
+            this.selectedOpportunity = val;
         },
     }
 }