Răsfoiți Sursa

参数库修改

duy 5 luni în urmă
părinte
comite
fa8393fc7e

+ 24 - 4
src/views/manager/wbsinfo/checkDetailEle.vue

@@ -80,6 +80,16 @@ export default {
         if (selectedIds.has(item.id)) {
           // item.select = true;
           this.$set(item, 'select', true)
+        }else{
+          this.$set(item, 'select', false)
+        }
+      });
+      this.selectedDataValue.forEach(item => {
+        if (selectedIds.has(item.id)) {
+          // item.select = true;
+          this.$set(item, 'select', true)
+        }else{
+          this.$set(item, 'select', false)
         }
       });
     },
@@ -93,20 +103,30 @@ export default {
     selectElement(row,index){
         // row.select =true
         this.$set(row, "select", true)
-        console.log(row,'row');
+     
         
     },
     canlSelect(row,index){
       this.$set(row, "select", false)
-   
+      this.selectedDataValue.forEach((ele)=>{
+        if(ele.id == row.id){
+          ele.select = false
+          this.$set(ele, "select", false)
+        }
+      })
+
+      
     },
 /**
  * 确认用户选择的操作,并将选中的数据传递给父组件
  */
 confirmSelection() {
+  
      // 过滤出 select 为 true 的数据
-     const selectedData = this.editEleListFilter.filter(item => item.select === true);
-     const combinedData = [...this.selectedDataValue, ...selectedData];
+     const selectedData = this.editEleListFilter.filter(item => item.select === true)
+     
+     const arr=this.selectedDataValue.filter(item => item.select === true);
+     const combinedData = [...arr, ...selectedData];
     // 使用 Map 来过滤掉重复的 id
     const uniqueData = Array.from(new Map(combinedData.map(item => [item.id, item])).values());
     // 触发事件将选中的数据传递给父组件

+ 18 - 11
src/views/manager/wbsinfo/parameter.vue

@@ -7,7 +7,7 @@
     <div class="pd-t-20">
         <el-row :gutter="20" style="height: calc(100vh - 290px)" v-if="projectPageList.length > 0">
             <el-col  :span="6" v-for="(item, index) in projectPageList" :key="item.id">
-                <el-card @click.native="handleSetParameterName(item)" class="box-card h-100p flex bg-color clickable" style="height: 160px;">
+                <el-card @click.native="handleSetParameterName(item)" class="box-card h-100p flex bg-color clickable" style="height: auto;">
                     <div class="card-content">
                     <h3>{{ item.paramName }}</h3>
                     <p class="text-bold">{{item.paramTypeName }}</p>
@@ -127,9 +127,10 @@ export default{
 }
 </script>
 <style scoped lang="scss">
-.bg-color{
-    background-color: #F5F7FA;
+.bg-color {
+  background-color: #F5F7FA;
 }
+
 .clickable {
   cursor: pointer;
   width: 100%;
@@ -140,15 +141,20 @@ export default{
 
 .card-content {
   flex: 1;
-  margin-top: -10px
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
 }
 
 .small-text {
   font-size: smaller;
-  margin-top:30px;
+  margin-top: 20px;
+  flex: 1;
 }
-.text-bold{
-    font-weight: bold;
+
+.text-bold {
+  font-weight: bold;
+  height: 30px;
 }
 
 .delete-icon-container {
@@ -162,10 +168,11 @@ export default{
   color: red;
   cursor: pointer;
 }
+
 .empty-data {
-    align-items: center;
-    display: flex;
-    justify-content: center;
-    height: calc(-290px + 100vh);
+  align-items: center;
+  display: flex;
+  justify-content: center;
+  height: calc(-290px + 100vh);
 }
 </style>