Kaynağa Gözat

删除归档返修改

duy 2 ay önce
ebeveyn
işleme
fbe644a6db
1 değiştirilmiş dosya ile 56 ekleme ve 5 silme
  1. 56 5
      src/views/codeRule/ruleManage.vue

+ 56 - 5
src/views/codeRule/ruleManage.vue

@@ -20,14 +20,14 @@
                     </div>
                 </el-card>
                 </div>
-            </el-col>
+        </el-col>
       <template v-if="!isShowDetail">
           <el-col :span="18" class="h-100" v-if="isShowList">
             <div class="h-100 rule-box-all">
                
                 <el-card class="box-card  h-100">
                 <div slot="header" class="clearfix">
-                    <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="goBack"></i>
+                    <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="goBackFirst"></i>
                     <span>退出</span>
                         <div style="float: right;">
                             <el-button
@@ -40,10 +40,10 @@
                             </el-button>
                             <el-button
                             icon="el-icon-document-copy"
-                            
                             size="small"
                             style="background-color:#FFA042;color:white;font-weight:bold;"
                             plain
+                            @click="manageFolder"
                             >管理
                             </el-button>
                             
@@ -203,6 +203,7 @@
                 </el-card>
          </el-col>
     </el-row>
+    <!-- 新增文件夹 -->
     <el-dialog
       title="新增"
       :visible.sync="addDialogVisible"
@@ -219,6 +220,30 @@
         <el-button type="primary" @click="addDialogVisible = false">确 定</el-button>
       </span>
     </el-dialog>
+    <!-- 管理规范 -->
+     <el-dialog title="管理" :visible.sync="manageVisible" width="50%" append-to-body>
+        <el-table :data="manageData" border   height="550">
+          <el-table-column property="name" label="规范名称" >
+            <template slot-scope="scope">
+              
+              <el-input v-model="scope.row.name" placeholder="请输入内容"></el-input>
+            </template>
+
+          </el-table-column>
+          <el-table-column label="操作" width="200">
+            <template slot-scope="scope">
+             
+              <el-button type="text" size="small" style="color: rgb(219, 55, 55);" @click="delManange(scope.$index)">删除</el-button>
+            </template>
+
+          </el-table-column>
+         
+        </el-table>
+          <div slot="footer" class="dialog-footer">
+          <el-button @click="manageVisible = false">取 消</el-button>
+          <el-button type="primary" @click="manageVisible = false">确 定</el-button>
+        </div>
+      </el-dialog>
    </div>
 </template>
 <script>
@@ -265,7 +290,15 @@ import {getLazytree} from "@/api/manager/wbsprivate";
             { required: true, message: '请输入样品名称', trigger: 'blur' }
           ],
         
-        }
+        },
+        manageVisible: false,
+        manageData: [
+          { name: '规范1' },
+          { name: '规范2' },
+          { name: '规范3' },
+          { name: '规范4' },
+          { name: '规范5' }
+        ]
       };
     },
      computed: {
@@ -303,6 +336,11 @@ import {getLazytree} from "@/api/manager/wbsprivate";
                     return resolve(arr);
                 });
         },
+        goBackFirst() {
+                this.isShowList = true;
+                this.$router.go(-1);
+         },
+        
         goBack() {
                 this.isShowList = true;
          },
@@ -342,6 +380,19 @@ import {getLazytree} from "@/api/manager/wbsprivate";
     // 删除基础信息行
     removeBasicInfo(index) {
       this.ypDetail.basic.splice(index, 1);
+    },
+    // 管理文件夹
+    manageFolder(){
+      this.manageVisible = true;
+    },
+    delManange(index){
+           this.$confirm('删除后,数据将无法恢复,是否确认删除!', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+           this.manageData.splice(index, 1);
+          })
     }
     }
   };
@@ -501,7 +552,7 @@ import {getLazytree} from "@/api/manager/wbsprivate";
     flex: 1;
     overflow-y: auto;
    padding: 20px;
-   height: calc(100% - 285px); /* 减去标题和底部按钮的高度 */
+   height: calc(100vh - 342px); /* 减去标题和底部按钮的高度 */
 }
 // 新增底部按钮容器样式
 .add-yp-footer {