Przeglądaj źródła

撤销模具下载页的一切更改

Reiskuchen 5 lat temu
rodzic
commit
57b0b66d35
1 zmienionych plików z 47 dodań i 46 usunięć
  1. 47 46
      ys_vue/src/views/mold/moldDownload.vue

+ 47 - 46
ys_vue/src/views/mold/moldDownload.vue

@@ -37,19 +37,19 @@
       <el-table-column type="index" width="60"></el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox @change="checkChanged(0, 0)">
+          <el-checkbox>
             <span>模具名称</span>
           </el-checkbox>
         </template>
         <template slot-scope="scope">
-          <el-checkbox @change="checkChanged(0, scope.$index)">
+          <el-checkbox>
             <span>{{scope.row.name}}</span>
           </el-checkbox>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox @change="checkChanged(1, 0)">
+          <el-checkbox>
             <span>模具3D图档</span>
           </el-checkbox>
         </template>
@@ -57,13 +57,13 @@
           <span v-if="scope.row.states[0] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[0] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox @change="checkChanged(1, scope.$index)">已通过</el-checkbox>
+            <el-checkbox>已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox @change="checkChanged(2, 0)">
+          <el-checkbox>
             <span>模具2D图档</span>
           </el-checkbox>
         </template>
@@ -71,13 +71,13 @@
           <span v-if="scope.row.states[1] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[1] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox @change="checkChanged(2, scope.$index)">已通过</el-checkbox>
+            <el-checkbox>已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox @change="checkChanged(3, 0)">
+          <el-checkbox>
             <span>零件3D图档</span>
           </el-checkbox>
         </template>
@@ -85,13 +85,13 @@
           <span v-if="scope.row.states[2] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[2] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox @change="checkChanged(3, scope.$index)">已通过</el-checkbox>
+            <el-checkbox>已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox @change="checkChanged(4, 0)">
+          <el-checkbox>
             <span>零件2D图档</span>
           </el-checkbox>
         </template>
@@ -99,13 +99,13 @@
           <span v-if="scope.row.states[3] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[3] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox @change="checkChanged(4, scope.$index)">已通过</el-checkbox>
+            <el-checkbox>已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox @change="checkChanged(5, 0)">
+          <el-checkbox>
             <span>保养方案</span>
           </el-checkbox>
         </template>
@@ -113,7 +113,7 @@
           <span v-if="scope.row.states[4] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[4] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox @change="checkChanged(5, scope.$index)">已通过</el-checkbox>
+            <el-checkbox>已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
@@ -166,16 +166,16 @@ export default {
           states: [2, 2, 2, 2, 2]
         }
       ],
-      checkBoxArray: [],
-      defaultItem: { value: false, able: true },
-      defaultLine: [
-        { value: false, able: true },
-        { value: false, able: true },
-        { value: false, able: true },
-        { value: false, able: true },
-        { value: false, able: true },
-        { value: false, able: true }
-      ],
+      // checkBoxArray: [],
+      // defaultItem: { value: false, able: true },
+      // defaultLine: [
+      //   { value: false, able: true },
+      //   { value: false, able: true },
+      //   { value: false, able: true },
+      //   { value: false, able: true },
+      //   { value: false, able: true },
+      //   { value: false, able: true }
+      // ],
       filters: {
         name: "",
         value: ""
@@ -197,36 +197,37 @@ export default {
     },
     selsChange(sels) {
       this.sels = sels;
-    },
-    // 点击复选框事件
-    checkChanged(x, y) {
-      this.checkBoxArray[x][y].value=!this.checkBoxArray[x][y].value;
-      console.log("x="+x+" y="+y+" value="+this.checkBoxArray[x][y].value);
     }
+    // 点击复选框事件
+    // checkChanged(x, y) {
+    //   this.checkBoxArray[x][y].value = !this.checkBoxArray[x][y].value;
+    //   console.log(
+    //     "x=" + x + " y=" + y + " value=" + this.checkBoxArray[x][y].value
+    //   );
+    //   console.log(this.checkBoxArray[0]);
+    // }
   },
   created() {
     let height = window.innerHeight;
     this.tableHeight = height - 210;
-  },
-  mounted() {
+
     //向checkBoxArray中push信息
-    this.checkBoxArray = [];
-    this.checkBoxArray.push(this.defaultLine);
-    this.moulds.forEach(mould => {
-      var checkBoxLine = [];
-      checkBoxLine.push(this.defaultItem);
-      for (var i = 0; i < 6; i++) {}
-      mould.states.forEach(state => {
-        var value = false;
-        var able = state == 2;
-        var item = { value, able };
-        checkBoxLine.push(item);
-      });
-      // console.log(checkBoxLine);
-      this.checkBoxArray.push(checkBoxLine);
-    });
-    // console.log(this.checkBoxArray);
-  }
+    // this.checkBoxArray = [];
+    // this.checkBoxArray.push(this.defaultLine);
+    // this.moulds.forEach(mould => {
+    //   var checkBoxLine = [];
+    //   checkBoxLine.push(this.defaultItem);
+    //   for (var i = 0; i < 6; i++) {}
+    //   mould.states.forEach(state => {
+    //     var value = false;
+    //     var able = state == 2;
+    //     var item = { value, able };
+    //     checkBoxLine.push(item);
+    //   });
+    //   this.checkBoxArray.push(checkBoxLine);
+    // });
+  },
+  mounted() {}
 };
 </script>